Skip to content
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

Merged
merged 11 commits into from
May 10, 2023

Conversation

mariusz89016
Copy link
Contributor

No description provided.

@mariusz89016 mariusz89016 marked this pull request as ready for review March 28, 2023 18:38
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" },
Copy link
Contributor

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.

Copy link
Contributor Author

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)

Copy link
Contributor

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

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.

@mariusz89016 mariusz89016 force-pushed the infracost-add-github-and-bitbucket branch from 5d15309 to 44ffedc Compare April 20, 2023 10:29
Copy link
Contributor

@jakubigla jakubigla left a 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

main.tf Outdated Show resolved Hide resolved
variables.tf Show resolved Hide resolved
@mariusz89016 mariusz89016 merged commit db89cb2 into main May 10, 2023
@mariusz89016 mariusz89016 deleted the infracost-add-github-and-bitbucket branch May 10, 2023 11:12
@github-actions
Copy link
Contributor

The new version v2.2.0 has been released 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants