Skip to content

Commit

Permalink
Revert to hardcoded TGW
Browse files Browse the repository at this point in the history
Signed-off-by: Jacob Woffenden <jacob.woffenden@digital.justice.gov.uk>
  • Loading branch information
Jacob Woffenden committed Jun 27, 2024
1 parent 9619a52 commit de9f962
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
19 changes: 9 additions & 10 deletions terraform/environments/analytical-platform-compute/data.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,16 @@ data "aws_ec2_transit_gateway" "pttp" {
id = "tgw-026162f1ba39ce704"
}

data "aws_ram_resource_share" "moj_tgw" {
resource_owner = "OTHER-ACCOUNTS"
filter {
name = "resourceType"
values = ["ec2:TransitGateway"]
}
}
# data "aws_ram_resource_share" "moj_tgw" {
# filter {
# name = "resourceType"
# values = ["ec2:TransitGateway"]
# }
# }

data "aws_arn" "moj_tgw" {
arn = data.aws_ram_resource_share.moj_tgw.resource_arns[0]
}
# data "aws_arn" "moj_tgw" {
# arn = data.aws_ram_resource_share.moj_tgw.resource_arns[0]
# }

# TODO: revisit this to unhardcode the tgw ID above
# data "aws_ram_resource_share" "tgw_moj" {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
resource "aws_ec2_transit_gateway_vpc_attachment" "pttp" {
# transit_gateway_id = data.aws_ec2_transit_gateway.pttp.id
transit_gateway_id = data.aws_arn.moj_tgw.resource
# transit_gateway_id = data.aws_arn.moj_tgw.resource
vpc_id = module.vpc.vpc_id
subnet_ids = module.vpc.private_subnets

Expand Down

0 comments on commit de9f962

Please sign in to comment.