-
-
Notifications
You must be signed in to change notification settings - Fork 355
Task definition is broken with pre-created secrets #67
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
Comments
+1 Complex unparenthesised conditionals added as part of Terraform 0.12 compatibility commit make completely no sense when trying to invoke the module in an existing infra. Secrets don't get populated, IAM policy which should allow the task to access SSM secrets doesn't get applied. I suspect that the configuration will still work in the "standalone" mode where you have a standalone copy of the repo and create This needs to be fixed, and at the very least explicitly mentioned in documentation. |
I encountered a similar problem as I was expecting it to read an existing value in You should be able to work around this though without having to hardcode your token. For me I do the following in my terraform that calls this module:
Note that you cannot use the same param path though as atlantis or it will error with |
Those ternary operators definitely aren't working correctly when using SSM. It seems like the logic for It might be good to have an additional "switch" variable to tell the module to use SSM instead of the regular token variables, so that the logic to coalesce whichever secret it should be using is less complicated. |
This issue has been automatically marked as stale because it has been open 30 days |
This issue has been resolved in version 4.0.0 🎉 |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Hi,
Looks like something regarding the secrets is broken. We discovered this during our upgrade to
0.12
and thev2.1.0
of this module.The following config used to work:
Note that that's the same code from the example, without
atlantis_github_user_token
defined. We don't want to have that in code so we put it in SSM.This module is smart enough that it can take it from SSM if it's not in the Terrafrom config. That's what was happening in
v1.9.0
.In the
v2.1.0
this leads to the following in the JSON task definition:This is obviously wrong and leads to the Task definition failing cause it cannot find those SSM secrets.
I think in https://github.com/terraform-aws-modules/terraform-aws-atlantis/blob/master/main.tf#L17-L23 there's something bad. That breaks the definitions in https://github.com/terraform-aws-modules/terraform-aws-atlantis/blob/master/main.tf#L67-L81. Maybe instead of the
token
there should've beenuser
as I define the user, but thetoken
is always empty.Am I missing something?
The text was updated successfully, but these errors were encountered: