Skip to content

Commit 70c4272

Browse files
authored
Merge pull request #15 from commitdev/fix-secret-project-reference
fix: missing referenced variable
2 parents fb6623c + 85d27ab commit 70c4272

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

terraform/bootstrap/secrets/main.tf

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@ terraform {
66
required_version = ">= 0.12"
77
}
88

9+
locals {
10+
project = "<% .Name %>"
11+
}
12+
913
# Create the CI User
1014
resource "aws_iam_user" "ci_user" {
11-
name = "${var.project}-ci-user"
15+
name = "${local.project}-ci-user"
1216
}
1317

1418
# Create a keypair to be used by CI systems

terraform/modules/environment/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,5 +97,5 @@ module "ecr" {
9797

9898
environment = var.environment
9999
ecr_repositories = var.ecr_repositories
100-
ecr_principals = [aws_iam_user.ci_user.arn]
100+
ecr_principals = [data.aws_iam_user.ci_user.arn]
101101
}

0 commit comments

Comments
 (0)