Skip to content

Commit 47a1d9d

Browse files
committed
Store last deployed sha in SSM for drift detection
Only for deploy and integration deployments
1 parent 403edaf commit 47a1d9d

12 files changed

Lines changed: 227 additions & 99 deletions

File tree

infra/deployments/deploy/account/site.tf

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,17 @@ terraform {
88
}
99
}
1010

11+
locals {
12+
deployment = "deploy/account"
13+
}
14+
1115
provider "aws" {
1216
allowed_account_ids = [var.deploy_account_id]
1317

1418
default_tags {
1519
tags = {
1620
Environment = "deploy"
17-
Deployment = "deploy/account"
21+
Deployment = local.deployment
1822
}
1923
}
2024
}

infra/deployments/deploy/coordination/site.tf

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,16 @@ terraform {
99
}
1010
}
1111

12+
locals {
13+
deployment = "deploy/coordination"
14+
}
15+
1216
provider "aws" {
1317
allowed_account_ids = [var.deploy_account_id]
1418
default_tags {
1519
tags = {
1620
Environment = "deploy"
17-
Deployment = "deploy/coordination"
21+
Deployment = local.deployment
1822
}
1923
}
2024
}

infra/deployments/deploy/e2e-tests-image-builder/site.tf

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,17 @@ terraform {
99
}
1010
}
1111

12+
locals {
13+
deployment = "deploy/e2e-tests-image-builder"
14+
}
15+
1216
provider "aws" {
1317
allowed_account_ids = [var.deploy_account_id]
1418

1519
default_tags {
1620
tags = {
1721
Environment = "deploy"
18-
Deployment = "deploy/e2e-tests-image-builder"
22+
Deployment = local.deployment
1923
}
2024
}
2125
}

infra/deployments/deploy/ecr/site.tf

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,16 @@ terraform {
99
}
1010
}
1111

12+
locals {
13+
deployment = "deploy/ecr"
14+
}
15+
1216
provider "aws" {
1317
allowed_account_ids = [var.deploy_account_id]
1418
default_tags {
1519
tags = {
1620
Environment = "deploy"
17-
Deployment = "deploy/ecr"
21+
Deployment = local.deployment
1822
}
1923
}
2024
}

infra/deployments/deploy/engineer-access/site.tf

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,19 @@ terraform {
99
}
1010
}
1111

12+
locals {
13+
deployment = "deploy/engineer-access"
14+
}
15+
1216
provider "aws" {
1317
allowed_account_ids = [var.deploy_account_id]
18+
default_tags {
19+
tags = {
20+
Environment = "deploy"
21+
Deployment = local.deployment
22+
}
23+
}
1424
}
15-
1625
module "state_bucket" {
1726
source = "../../../modules/state-bucket"
1827

infra/deployments/deploy/image-builders/site.tf

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,17 @@ terraform {
99
}
1010
}
1111

12+
locals {
13+
deployment = "deploy/image-builders"
14+
}
15+
1216
provider "aws" {
1317
allowed_account_ids = [var.deploy_account_id]
1418

1519
default_tags {
1620
tags = {
1721
Environment = "deploy"
18-
Deployment = "deploy/image-builders"
22+
Deployment = local.deployment
1923
}
2024
}
2125
}

infra/deployments/deploy/tools/site.tf

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,17 @@ terraform {
99
}
1010
}
1111

12+
locals {
13+
deployment = "deploy/pipeline-visualiser"
14+
}
15+
1216
provider "aws" {
1317
allowed_account_ids = [var.deploy_account_id]
1418

1519
default_tags {
1620
tags = {
1721
Environment = "deploy"
18-
Deployment = "deploy/pipeline-visualiser"
22+
Deployment = local.deployment
1923
}
2024
}
2125
}
@@ -29,7 +33,7 @@ provider "aws" {
2933
default_tags {
3034
tags = {
3135
Environment = "deploy"
32-
Deployment = "deploy/pipeline-visualiser"
36+
Deployment = local.deployment
3337
}
3438
}
3539
}

infra/deployments/integration/account/.terraform.lock.hcl

Lines changed: 90 additions & 88 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

infra/deployments/integration/account/site.tf

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,15 @@ terraform {
88
}
99
}
1010

11+
locals {
12+
deployment = "integration/account"
13+
}
14+
1115
provider "aws" {
1216
allowed_account_ids = [var.aws_account_id]
1317
default_tags {
1418
tags = {
15-
Deployment = "integration/account"
19+
Deployment = local.deployment
1620
}
1721
}
1822
}

infra/deployments/integration/review/site.tf

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,16 @@ terraform {
99
}
1010
}
1111

12+
locals {
13+
deployment = "integration/review"
14+
}
15+
1216
provider "aws" {
1317
allowed_account_ids = [var.aws_account_id]
1418
default_tags {
1519
tags = {
1620
Environment = "review"
17-
Deployment = "integration/review"
21+
Deployment = local.deployment
1822
}
1923
}
2024
}
@@ -28,7 +32,7 @@ provider "aws" {
2832
default_tags {
2933
tags = {
3034
Environment = "review"
31-
Deployment = "integration/review"
35+
Deployment = local.deployment
3236
}
3337
}
3438
}

0 commit comments

Comments
 (0)