Skip to content

Commit

Permalink
Merge pull request #910 from ministryofjustice/feature/share-ip-pool
Browse files Browse the repository at this point in the history
Share IPAM pool with noc-production
  • Loading branch information
davidkelliott authored May 17, 2024
2 parents 558187b + cf5a4a0 commit 5606c72
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions organisation-security/terraform/ipam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,8 @@ resource "aws_ram_resource_association" "network_operations_centre_byoip" {
resource_arn = aws_vpc_ipam_pool.network_operations_centre.arn
resource_share_arn = aws_ram_resource_share.network_operations_centre_byoip.arn
}

resource "aws_ram_principal_association" "network_operations_centre_production_byoip" {
principal = local.moj_network_operations_centre_production_account_id
resource_share_arn = aws_ram_resource_share.network_operations_centre_byoip.arn
}
6 changes: 6 additions & 0 deletions organisation-security/terraform/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ locals {
if account.name == "Workplace Tech Proof Of Concept Development"
]...)

moj_network_operations_centre_production_account_id = coalesce([
for account in local.organizations_organization.accounts :
account.id
if account.name == "moj-network-operations-centre-production"
]...)

organisation_account_numbers = [for account in local.organizations_organization.accounts : account.id]

# AWS Organizational Units
Expand Down

0 comments on commit 5606c72

Please sign in to comment.