Skip to content

Commit

Permalink
feature #4 - add env variable for exchange rate internal url
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugeniosales committed Oct 16, 2022
1 parent c2b1968 commit 3ed9359
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
3 changes: 2 additions & 1 deletion terraform/env/dev.tfvars
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
ENV = "dev"
ENV = "dev"
EXCHANGE_RATE_INTERNAL_URL="http://api.dev.sbf.exchangerate.internal.com"
3 changes: 2 additions & 1 deletion terraform/env/hml.tfvars
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
ENV = "hml"
ENV = "hml"
EXCHANGE_RATE_INTERNAL_URL="http://api.hml.sbf.exchangerate.internal.com"
3 changes: 2 additions & 1 deletion terraform/env/prd.tfvars
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
ENV = "prd"
ENV = "prd"
EXCHANGE_RATE_INTERNAL_URL="http://api.sbf.exchangerate.internal.com"
4 changes: 2 additions & 2 deletions terraform/ssm.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ resource "aws_ssm_parameter" "exchange-rate-api-token-ssm" {
overwrite = true
}

resource "aws_ssm_parameter" "exchange-rate-internal-ssm" {
resource "aws_ssm_parameter" "exchange-rate-internal-url-ssm" {
name = "/exchangerate/infra/alb/arn"
type = "String"
value = "http://api.sbf.exchangerate.internal.com"
value = "${var.EXCHANGE_RATE_INTERNAL_URL}"
overwrite = true
}
6 changes: 6 additions & 0 deletions terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,9 @@ variable "ENV" {
description = "Environment"
default = null
}

variable "EXCHANGE_RATE_INTERNAL_URL" {
type = string
description = "Exchange rate microsservice internal url"
default = null
}

0 comments on commit 3ed9359

Please sign in to comment.