-
-
Notifications
You must be signed in to change notification settings - Fork 329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Policy template instance-secure-parameter-role-policy.json is invalid #1123
Comments
I found a bit more detailed wildcard solved the issue e.g.:
|
It appears that this was a behavior change AWS introduced:
|
## Description This resolves an issue where the previous policy template did not specify a valid resource argument for the second policy statement. The modified template should now apply without error. Closes #1123 ## Verification I applied this module to my runner setup and it resolved the issue. --------- Co-authored-by: Matthias Kay <matthias.kay@hlag.com>
Describe the bug
The statement:
Is not a valid policy statement due to the
Resource
argument using an invalid ARN wildcard. The statement "arn:aws:ssm:*" is disallowed by the IAM policy editor within the AWS console. It also has, albeit inconsistently, failed to apply when runningterraform apply
.To Reproduce
Steps to reproduce the behavior:
access_token_secure_parameter_store_name
argument of therunner_gitlab
configuration block.Expected behavior
The policy generated from the template should be a valid IAM policy that can apply.
Additional context
I'm not sure why this worked previously, as the IAM ARN docs under the "Using wildcards and paths in ARNs" heading states that:
The strangest thing is that up until today, I never had issues with this policy being rejected. However, now it is on some of my jobs that deploy a runner, but not all of them. 🤷
A solution that keeps the same semantics of the existing policy would be:
The wildcard will still apply to any parameter stored in SSM, as I believe the previous policy was attempting to do.
The text was updated successfully, but these errors were encountered: