Skip to content

Conversation

@IGForeau
Copy link
Contributor

Running terraform plan is not required to get estimates (and infracost runs init on its own if needed), and not running it makes it so that the whole workflow does not need to expose authentication information, hence the removal of AWS_* env.

Adding GCP support for deployments via the GOOGLE_APPLICATION_CREDENTIALS file path. Repository owners should define secrets.GOOGLE_APPLICATION_CREDENTIALS_CONTENT with the content of their Google authentication file (Related terraform documentation: https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#running-terraform-outside-of-google-cloud ). If the secret is not defined, the step is explicitly skipped and no file is created.

Copy link
Contributor

@Matty-ops Matty-ops left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let AWS credentials into th-check-secure-estimate
Ok for other changes
GCP credentials should be tested but it can be integrated right now

pull-requests: write

env:
AWS_ACCESS_KEY_ID : "${{ secrets.AWS_ACCESS_KEY_ID }}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be declared to work with the check code step

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed, added -backend=false, which should fix the check issue

with:
terraform_wrapper: false

# Initialize a new or existing Terraform working directory by creating initial files, loading any remote state, downloading modules, etc.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok for this remove of init and plan for estimate cost

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added explicit init back in to ensure that it is executed withbackend = false

* Add Google auth file if the corresponding secret is set
* Remove terraform plan from estimation job in
  check-secure-estimate workflow
* Remove AWS-related auth env vars in check-secure-estimate workflow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants