Skip to content

Commit

Permalink
updating DNS for sample to reference existing hosted zone
Browse files Browse the repository at this point in the history
  • Loading branch information
henrykie committed Jun 20, 2024
1 parent 50bb097 commit 10b9461
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 17 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/scoutsuite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ jobs:
id: plan
working-directory: ${{ matrix.dir }}
run: terraform plan -no-color

- run: echo ${{ steps.plan.outputs.stdout }}
- run: echo ${{ steps.plan.outputs.stderr }}
- run: echo ${{ steps.plan.outputs.exitcode }}


- name: Terraform Apply
id: apply
working-directory: ${{ matrix.dir }}
23 changes: 11 additions & 12 deletions samples/simple-build-pipeline/dns.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@
##########################################
# Route53 Hosted Zone for FQDN
##########################################

resource "aws_route53_zone" "public_zone" {
data "aws_route53_zone" "public_zone" {
name = var.fully_qualified_domain_name
}

resource "aws_route53_record" "jenkins" {
zone_id = aws_route53_zone.public_zone.id
name = aws_route53_zone.public_zone.name
zone_id = data.aws_route53_zone.public_zone.id
name = data.aws_route53_zone.public_zone.name
type = "A"
alias {
name = module.jenkins.jenkins_alb_dns_name
Expand All @@ -31,8 +30,8 @@ resource "aws_route53_zone" "helix_private_zone" {
}

resource "aws_route53_record" "helix_swarm" {
zone_id = aws_route53_zone.public_zone.id
name = "swarm.helix.${aws_route53_zone.public_zone.name}"
zone_id = data.aws_route53_zone.public_zone.id
name = "swarm.helix.${data.aws_route53_zone.public_zone.name}"
type = "A"
alias {
name = module.perforce_helix_swarm.alb_dns_name
Expand All @@ -42,8 +41,8 @@ resource "aws_route53_record" "helix_swarm" {
}

resource "aws_route53_record" "helix_authentication_service" {
zone_id = aws_route53_zone.public_zone.zone_id
name = "auth.helix.${aws_route53_zone.public_zone.name}"
zone_id = data.aws_route53_zone.public_zone.zone_id
name = "auth.helix.${data.aws_route53_zone.public_zone.name}"
type = "A"
alias {
name = module.perforce_helix_authentication_service.alb_dns_name
Expand All @@ -53,8 +52,8 @@ resource "aws_route53_record" "helix_authentication_service" {
}

resource "aws_route53_record" "perforce_helix_core" {
zone_id = aws_route53_zone.public_zone.zone_id
name = "core.helix.${aws_route53_zone.public_zone.name}"
zone_id = data.aws_route53_zone.public_zone.zone_id
name = "core.helix.${data.aws_route53_zone.public_zone.name}"
type = "A"
ttl = 300
records = [module.perforce_helix_core.helix_core_eip_public_ip]
Expand Down Expand Up @@ -99,7 +98,7 @@ resource "aws_route53_record" "jenkins_cert" {
records = [each.value.record]
ttl = 60
type = each.value.type
zone_id = aws_route53_zone.public_zone.id
zone_id = data.aws_route53_zone.public_zone.id
}

resource "aws_acm_certificate_validation" "jenkins" {
Expand Down Expand Up @@ -142,7 +141,7 @@ resource "aws_route53_record" "helix_cert" {
records = [each.value.record]
ttl = 60
type = each.value.type
zone_id = aws_route53_zone.public_zone.id
zone_id = data.aws_route53_zone.public_zone.id
}

resource "aws_acm_certificate_validation" "helix" {
Expand Down

0 comments on commit 10b9461

Please sign in to comment.