Closed nitrocode closed 2 years ago
Have a question? Please checkout our Slack Community or visit our Slack Archive.
Instead of using a hard coded requester_vpc_id, we can use a data source instead.
requester_vpc_id
data "aws_vpc" "selected" { provider = aws.accepter tags = var.accepter_vpc_tags }
where the tags are passed in
accepter_vpc_tags = { Name = "yellowstone" }
Looks like we do use a data source for both accepter and requester.
https://github.com/cloudposse/terraform-aws-vpc-peering-multi-account/blob/0cad62a594f9a116a3a2a395ea0c8e1a41e541d4/accepter.tf#L43
Have a question? Please checkout our Slack Community or visit our Slack Archive.
Describe the Feature
Instead of using a hard coded
requester_vpc_id
, we can use a data source instead.where the tags are passed in