-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: Configure platform in infracost comment command #14
Conversation
main.tf
Outdated
@@ -2,6 +2,12 @@ locals { | |||
#Repo attributes that are meant to simplify configuration rather than being actual repo options | |||
helper_options = ["allow_all_server_side_workflows", "terragrunt_atlantis_config", "infracost"] | |||
|
|||
infracost_parameters = { | |||
github : { token_name : "github-token", environment_variable_name : "GITHUB_TOKEN" }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was thinking to to change the variable names to be more specific INFRACOST_GITHUB_TOKEN
etc. GITHUB_TOKEN
is too generic and if we want to be more granual with permissions, we could then pass token with permissions to only post comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, you're right
(I was thinking about moving that environment_variable_name
into variables (with default) but was worried about too many knobs there)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, very little value in exchange for possible technical debt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO we should use atlantis token for infracost - I don't see any need to create and configure additional tokens.
Even more - I would suggest to "automate" infracost configuration a bit more - and instead of using infracost_parameters
in the script - add few more lines of bash script and check which token is set in atlantis workspace and decide whether it is GitLab, GitHub or BitBucket.
5d15309
to
44ffedc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comments. Other that that - I really like this PR
The new version v2.2.0 has been released 🎉 |
No description provided.