Skip to content

Commit d81c119

Browse files
committed
Create an AWS Access Analyzer in each non-ephemeral account
1 parent 1d1a94e commit d81c119

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
resource "aws_accessanalyzer_analyzer" "govuk" {
2+
count = local.is_ephemeral ? 0 : 1
3+
analyzer_name = "govuk"
4+
}

terraform/deployments/vpc/main.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,7 @@ provider "aws" {
2727
}
2828
}
2929
}
30+
31+
locals {
32+
is_ephemeral = startswith(var.govuk_environment, "eph-")
33+
}

0 commit comments

Comments
 (0)