Skip to content

Commit

Permalink
added uniqueness to role name
Browse files Browse the repository at this point in the history
  • Loading branch information
dms1981 committed Oct 30, 2023
1 parent b62a422 commit 5bd30aa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/unit-test/main.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
resource "random_id" "role" {
byte_length = 1
}

module "module_test" {
source = "../../"
github_repositories = ["ministryofjustice/modernisation-platform-environments:*", "ministryofjustice/modernisation-platform-ami-builds:*"]
additional_permissions = data.aws_iam_policy_document.extra_permissions.json
github_repositories = ["ministryofjustice/modernisation-platform-environments:*", "ministryofjustice/modernisation-platform-ami-builds:*"]
role_name = format("github-actions-%s", random_id.role.dec)
tags_common = local.tags
tags_prefix = terraform.workspace
}
Expand Down
4 changes: 4 additions & 0 deletions test/unit-test/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ terraform {
version = "~> 5.0"
source = "hashicorp/aws"
}
random = {
source = "hashicorp/random"
version = "~> 3.5"
}
}
required_version = ">= 1.0.1"
}

0 comments on commit 5bd30aa

Please sign in to comment.