From f0dd32994a8dd10f5a84c32b43cc16ace67e64ca Mon Sep 17 00:00:00 2001 From: Eugenio Sales Date: Sun, 16 Oct 2022 01:04:35 -0300 Subject: [PATCH] feature #4 - remove route s3 --- .github/workflows/terraform.yml | 2 +- terraform/env/dev.tfvars | 3 +-- terraform/env/hml.tfvars | 3 +-- terraform/env/prd.tfvars | 3 +-- terraform/main.tf | 9 --------- terraform/route53.tf | 15 --------------- terraform/ssm.tf | 7 ------- 7 files changed, 4 insertions(+), 38 deletions(-) delete mode 100644 terraform/route53.tf diff --git a/.github/workflows/terraform.yml b/.github/workflows/terraform.yml index 2ab99f3..f1987c2 100644 --- a/.github/workflows/terraform.yml +++ b/.github/workflows/terraform.yml @@ -2,7 +2,7 @@ name: 'Terraform CD' on: push: - branches: [ "main" ] + branches: [ "develop" ] pull_request: permissions: diff --git a/terraform/env/dev.tfvars b/terraform/env/dev.tfvars index 020b9aa..bc34f8f 100644 --- a/terraform/env/dev.tfvars +++ b/terraform/env/dev.tfvars @@ -3,5 +3,4 @@ aws_profile = "dev" vpc_id = "vpc-0b1ae7a4fa0ec7d9d" SUB_NET_01 = "subnet-05d245e39491bb3d2" SUB_NET_02 = "subnet-06761316782230c98" -base_url_internal = "http://exchangerate.internal.dev.sbf.com" -route53_zone_host = "internal.dev.sbf.com" +base_url_internal = "internal-sbf-exchangerate-dev-lb-1838583828.us-east-1.elb.amazonaws.com" diff --git a/terraform/env/hml.tfvars b/terraform/env/hml.tfvars index 9069aff..3aa6b0a 100644 --- a/terraform/env/hml.tfvars +++ b/terraform/env/hml.tfvars @@ -3,5 +3,4 @@ aws_profile = "hml" vpc_id = "vpc-0b1ae7a4fa0ec7d9d" SUB_NET_01 = "subnet-05d245e39491bb3d2" SUB_NET_02 = "subnet-06761316782230c98" -base_url_internal = "http://exchangerate.internal.dev.sbf.com" -route53_zone_host = "internal.dev.sbf.com" +base_url_internal = "internal-sbf-exchangerate-dev-lb-1838583828.us-east-1.elb.amazonaws.com" diff --git a/terraform/env/prd.tfvars b/terraform/env/prd.tfvars index 45810ba..e4e3853 100644 --- a/terraform/env/prd.tfvars +++ b/terraform/env/prd.tfvars @@ -3,5 +3,4 @@ aws_profile = "prd" vpc_id = "vpc-0b1ae7a4fa0ec7d9d" SUB_NET_01 = "subnet-05d245e39491bb3d2" SUB_NET_02 = "subnet-06761316782230c98" -base_url_internal = "http://exchangerate.internal.dev.sbf.com" -route53_zone_host = "internal.dev.sbf.com" +base_url_internal = "internal-sbf-exchangerate-dev-lb-1838583828.us-east-1.elb.amazonaws.com" diff --git a/terraform/main.tf b/terraform/main.tf index e437746..f75945f 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -24,12 +24,3 @@ provider "aws" { region = "us-east-1" } -variable "route53_zone_host" { - type = string - description = "Route53 Zone Host" -} - -data "aws_route53_zone" "selected" { - name = var.route53_zone_host - private_zone = true -} diff --git a/terraform/route53.tf b/terraform/route53.tf deleted file mode 100644 index 19ef634..0000000 --- a/terraform/route53.tf +++ /dev/null @@ -1,15 +0,0 @@ -resource "aws_route53_record" "record-sbf-exchangerate" { - zone_id = data.aws_route53_zone.selected.zone_id - name = "sbf-exchangerate" - type = "A" - - alias { - name = aws_lb.lb-sbf-exchangerate.dns_name - zone_id = aws_lb.lb-sbf-exchangerate.zone_id - evaluate_target_health = true - } -} - -output "route53_record" { - value = "${aws_route53_record.record-sbf-exchangerate.name}.${data.aws_route53_zone.selected.name}" -} diff --git a/terraform/ssm.tf b/terraform/ssm.tf index 6273c2f..689c687 100644 --- a/terraform/ssm.tf +++ b/terraform/ssm.tf @@ -11,10 +11,3 @@ resource "aws_ssm_parameter" "exchange-rate-api-token-ssm" { value = "custom" overwrite = true } - -resource "aws_ssm_parameter" "exchange-rate-internal-url-ssm" { - name = "/exchangerate/infra/alb/arn" - type = "String" - value = "${var.base_url_internal}" - overwrite = true -}