Skip to content

Commit

Permalink
fix: update terraform format using command
Browse files Browse the repository at this point in the history
  • Loading branch information
anmolnagpal committed Oct 2, 2023
1 parent 6d68278 commit 5ecfc7f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion _example/public-hostedzone/example.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module "route53" {
type = "A"
alias = {
name = "d130easdflja734js.cloudfront.net" # name/DNS of attached cloudfront.
zone_id = "Z2XXXXHXTXXXX4" # A valid zone ID of cloudfront you are trying to create alias of.
zone_id = "Z2XXXXHXTXXXX4" # A valid zone ID of cloudfront you are trying to create alias of.
}
},
{
Expand Down
4 changes: 2 additions & 2 deletions _example/vpc-association/example.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ module "route53" {
environment = "test"
label_order = ["environment", "name"]
private_enabled = true
record_enabled = false
record_enabled = false

domain_name = "clouddrove.com"
vpc_id = "vpc-xxxxxxxxxxxxxx"

secondary_vpc_id = "vpc-xxxxxxxxxxxxxx"
secondary_vpc_id = "vpc-xxxxxxxxxxxxxx"
}
6 changes: 3 additions & 3 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ resource "aws_route53_zone" "public" {
## Terraform module to create Route53 record sets resource on AWS.
##-----------------------------------------------------------------------------
resource "aws_route53_record" "this" {
for_each = { for k, v in local.recordsets : k => v if var.enabled && var.record_enabled && ( var.zone_id != null || var.public_enabled != null || var.private_enabled != null || var.domain_name != null) }
for_each = { for k, v in local.recordsets : k => v if var.enabled && var.record_enabled && (var.zone_id != null || var.public_enabled != null || var.private_enabled != null || var.domain_name != null) }

zone_id = local.zone_id

Expand Down Expand Up @@ -119,8 +119,8 @@ resource "aws_route53_record" "this" {
subdivision = lookup(each.value.geolocation_routing_policy, "subdivision", null)
}
}
depends_on = [
aws_route53_zone.public,
depends_on = [
aws_route53_zone.public,
aws_route53_zone.private
]
}
Expand Down

0 comments on commit 5ecfc7f

Please sign in to comment.