From 5ece5488bb872800853158460c19f366cbfe9609 Mon Sep 17 00:00:00 2001 From: rifisdfds Date: Thu, 4 Apr 2024 09:44:16 +0100 Subject: [PATCH 1/3] fix: use capability_root_id instead of capability_id due to a difference in value of this attribute with older capabilities --- security/org-account-context/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/org-account-context/main.tf b/security/org-account-context/main.tf index 6e3b08259..a6f7b709e 100644 --- a/security/org-account-context/main.tf +++ b/security/org-account-context/main.tf @@ -409,7 +409,7 @@ module "vpc_peering_oxygen_eu_west_1" { source = "../../_sub/network/vpc-peering-accepter" - capability_id = var.capability_id + capability_id = var.capability_root_id destination_cidr_block = each.value.assigned_cidr_block_vpc vpc_id = each.value.peer_vpc_id peering_connection_id = module.vpc_peering_capability_eu_west_1[each.key].vpc_peering_connection_id From 23923f46b26efa49548a5bbd46ee3955e2fc54e4 Mon Sep 17 00:00:00 2001 From: rifisdfds Date: Thu, 4 Apr 2024 11:32:21 +0100 Subject: [PATCH 2/3] fix: set Name tag on vpc endpoints --- _sub/network/vpc-peering-requester/main.tf | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/_sub/network/vpc-peering-requester/main.tf b/_sub/network/vpc-peering-requester/main.tf index 9144a1061..3e06c90f3 100644 --- a/_sub/network/vpc-peering-requester/main.tf +++ b/_sub/network/vpc-peering-requester/main.tf @@ -131,7 +131,9 @@ resource "aws_vpc_endpoint" "ssm" { aws_default_security_group.default.id ] - tags = var.tags + tags = merge(var.tags,{ + Name = "com.amazonaws.${data.aws_region.current.name}.ssm" + }) } resource "aws_vpc_endpoint" "ssmmessages" { @@ -148,7 +150,9 @@ resource "aws_vpc_endpoint" "ssmmessages" { aws_default_security_group.default.id ] - tags = var.tags + tags = merge(var.tags,{ + Name = "com.amazonaws.${data.aws_region.current.name}.ssmmessages" + }) } resource "aws_vpc_endpoint" "ec2" { @@ -165,7 +169,9 @@ resource "aws_vpc_endpoint" "ec2" { aws_default_security_group.default.id ] - tags = var.tags + tags = merge(var.tags,{ + Name = "com.amazonaws.${data.aws_region.current.name}.ec2" + }) } resource "aws_vpc_endpoint" "ec2messages" { @@ -182,7 +188,9 @@ resource "aws_vpc_endpoint" "ec2messages" { aws_default_security_group.default.id ] - tags = var.tags + tags = merge(var.tags,{ + Name = "com.amazonaws.${data.aws_region.current.name}.ec2messages" + }) } data "aws_iam_policy_document" "ssm_trust" { From 954def6e5439062b98f911d99c83f62fde048ed7 Mon Sep 17 00:00:00 2001 From: rifisdfds Date: Thu, 4 Apr 2024 11:41:53 +0100 Subject: [PATCH 3/3] fix: add vpc name to vpc endpoint tag name --- _sub/network/vpc-peering-requester/main.tf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/_sub/network/vpc-peering-requester/main.tf b/_sub/network/vpc-peering-requester/main.tf index 3e06c90f3..cb801554d 100644 --- a/_sub/network/vpc-peering-requester/main.tf +++ b/_sub/network/vpc-peering-requester/main.tf @@ -132,7 +132,7 @@ resource "aws_vpc_endpoint" "ssm" { ] tags = merge(var.tags,{ - Name = "com.amazonaws.${data.aws_region.current.name}.ssm" + Name = "peering-com.amazonaws.${data.aws_region.current.name}.ssm" }) } @@ -151,7 +151,7 @@ resource "aws_vpc_endpoint" "ssmmessages" { ] tags = merge(var.tags,{ - Name = "com.amazonaws.${data.aws_region.current.name}.ssmmessages" + Name = "peering-com.amazonaws.${data.aws_region.current.name}.ssmmessages" }) } @@ -170,7 +170,7 @@ resource "aws_vpc_endpoint" "ec2" { ] tags = merge(var.tags,{ - Name = "com.amazonaws.${data.aws_region.current.name}.ec2" + Name = "peering-com.amazonaws.${data.aws_region.current.name}.ec2" }) } @@ -189,7 +189,7 @@ resource "aws_vpc_endpoint" "ec2messages" { ] tags = merge(var.tags,{ - Name = "com.amazonaws.${data.aws_region.current.name}.ec2messages" + Name = "peering-com.amazonaws.${data.aws_region.current.name}.ec2messages" }) }