Closed
Description
Thanks for putting together this create module.
I am running into the following issue. GitHub supports wildcards so the github org and repo is not tied down to specific repos and branches.
Whilst the below works it's restrictive as it is entirely acceptable to use wildcards especially when additional repos are created by developers but then does not allow for scale.
github_repositories = [
"org/repo",
"anotherorg/repo:ref:refs/heads/main",
]
When changing to this:
github_repositories = [
"org/*:*",
"anotherorg/repo:ref:refs/heads/main",
]
the variables.tf on these lines validation rejects the wildcard:
╷
│ Error: Invalid value for variable
│
│ on main.tf line 21, in module "aws_oidc_github":
│ 21: github_repositories = [
│ 22: "org/*:*",
│ 23: "anotherorg/repo:ref:refs/heads/main",
│ 24: ]
│ ├────────────────
│ │ var.github_repositories is list of string with 2 elements
│
│ Repositories must be specified in the organization/repository format.
│
│ This was checked by the validation rule at .terraform/modules/aws_oidc_github/variables.tf:72,3-13.
Please take this issue to support for wildcard operator, in the meantime I am going to have to revert back to writing the terraform code.
Thank you for taking this request into consideration.
Supporting documentation: