Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed Mar 29, 2023
1 parent c9ef465 commit db59331
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion route53-zone-association/vpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ No modules.
| <a name="input_account_id"></a> [account\_id](#input\_account\_id) | AWS Account ID (default: will pull from current user) | `string` | `""` | no |
| <a name="input_override_prefixes"></a> [override\_prefixes](#input\_override\_prefixes) | Override built-in prefixes by component. This should be used primarily for common infrastructure things | `map(string)` | `{}` | no |
| <a name="input_private_zone"></a> [private\_zone](#input\_private\_zone) | Selection either private or public (default: private) for named zones | `bool` | `true` | no |
| <a name="input_region"></a> [region](#input\_region) | AWS Region to select for peer (default: from provider aws.peer) | `string` | `null` | no |
| <a name="input_region"></a> [region](#input\_region) | AWS Region to select for self (default: from provider aws.self) | `string` | `null` | no |
| <a name="input_tags"></a> [tags](#input\_tags) | AWS Tags to apply to appropriate resources (S3, KMS). Do not include safeguard tags here, use the data\_safeguard field for such things. | `map(string)` | `{}` | no |
| <a name="input_vpc_id"></a> [vpc\_id](#input\_vpc\_id) | VPC ID with which to associate Route53 PHZs | `string` | n/a | yes |
| <a name="input_zone_ids"></a> [zone\_ids](#input\_zone\_ids) | List of Route53 PHZ IDs to associate with a (local/remote) VPC | `list(string)` | `[]` | no |
Expand Down
8 changes: 4 additions & 4 deletions route53-zone-association/vpc/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ resource "aws_route53_vpc_association_authorization" "peer_zone" {
provider = aws.peer
for_each = data.aws_caller_identity.self.account_id != data.aws_caller_identity.peer.account_id ? toset(var.zone_ids) : toset([])
zone_id = each.key
vpc_region = var.region == null ? data.aws_region.peer.name : var.region
vpc_region = var.region == null ? data.aws_region.self.name : var.region
vpc_id = var.vpc_id
}

Expand All @@ -34,7 +34,7 @@ resource "aws_route53_zone_association" "peer_zone" {

zone_id = each.key
vpc_id = var.vpc_id
vpc_region = data.aws_region.self.name
vpc_region = var.region == null ? data.aws_region.self.name : var.region

depends_on = [aws_route53_vpc_association_authorization.peer_zone]
}
Expand All @@ -56,7 +56,7 @@ resource "aws_route53_vpc_association_authorization" "peer_zones" {
provider = aws.peer
for_each = data.aws_caller_identity.self.account_id != data.aws_caller_identity.peer.account_id ? toset(local.zones_ids) : toset([])
zone_id = each.key
vpc_region = var.region == null ? data.aws_region.peer.name : var.region
vpc_region = var.region == null ? data.aws_region.self.name : var.region
vpc_id = var.vpc_id
}

Expand All @@ -66,7 +66,7 @@ resource "aws_route53_zone_association" "peer_zones" {

zone_id = each.key
vpc_id = var.vpc_id
vpc_region = data.aws_region.self.name
vpc_region = var.region == null ? data.aws_region.self.name : var.region

depends_on = [aws_route53_vpc_association_authorization.peer_zones]
}
2 changes: 1 addition & 1 deletion route53-zone-association/vpc/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ variable "private_zone" {
}

variable "region" {
description = "AWS Region to select for peer (default: from provider aws.peer)"
description = "AWS Region to select for self (default: from provider aws.self)"
type = string
default = null
}

0 comments on commit db59331

Please sign in to comment.