Skip to content

Commit

Permalink
testing
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 3e8eacf commit 9619a52
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
25 changes: 25 additions & 0 deletions terraform/environments/analytical-platform-compute/data.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,31 @@ 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_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" {
# name = "tgw-moj"
# resource_owner = "OTHER-ACCOUNTS"
# }

# data "aws_ec2_transit_gateway" "pttp" {
# filter {
# name = "owner-id"
# values = [data.aws_ram_resource_share.tgw_moj.resource_arns]
# }
# }

data "aws_iam_roles" "eks_sso_access_role" {
name_regex = "AWSReservedSSO_${local.environment_configuration.eks_sso_access_role}_.*"
path_prefix = "/aws-reserved/sso.amazonaws.com/"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
resource "aws_ec2_transit_gateway_vpc_attachment" "pttp" {
transit_gateway_id = data.aws_ec2_transit_gateway.pttp.id
# transit_gateway_id = data.aws_ec2_transit_gateway.pttp.id
transit_gateway_id = data.aws_arn.moj_tgw.resource
vpc_id = module.vpc.vpc_id
subnet_ids = module.vpc.private_subnets

tags = local.tags
}

0 comments on commit 9619a52

Please sign in to comment.