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

Add functionality to allow users provide a separate service account for gcs remote terraform backend #1643

Merged

Conversation

rochana-atapattu
Copy link
Contributor

This pull request primarily focuses on enhancing the Google Cloud Platform (GCP) integration in the get-target-config and lib packages. The changes introduce two new optional parameters, gcp_remote_backend_service_account and gcp_remote_backend_workload_identity_provider, to the run function in get-target-config/src/run.ts and to the JobConfig and TargetGroup objects in lib/src/index.ts. These parameters are then used in setup/action.yaml to authenticate with GCP if they are provided.

GCP Integration Enhancements:

  • get-target-config/src/run.ts: Added gcp_remote_backend_service_account and gcp_remote_backend_workload_identity_provider to the list of parameters in the run function. These parameters are used to authenticate with GCP. [1] [2]

  • lib/src/index.ts: Added gcp_remote_backend_service_account and gcp_remote_backend_workload_identity_provider as optional parameters to the JobConfig and TargetGroup objects. These parameters are used to authenticate with GCP. [1] [2]

  • setup/action.yaml: Added a new step to use the google-github-actions/auth action with the gcp_remote_backend_service_account and gcp_remote_backend_workload_identity_provider parameters if they are provided. This step authenticates with GCP and sets the GOOGLE_BACKEND_CREDENTIALS environment variable.

this PR is a follow up PR for #1641

Copy link

🚀 Pull Request Branch was created or updated

Build link

The pull request branch pr/1643 was created or updated.

You can try this pull request in your workflows by changing tfaction version to pr/1643.

e.g.

- uses: suzuki-shunsuke/tfaction/setup@pr/1643

To update the pull request branch again, please run the workflow.

@suzuki-shunsuke
Copy link
Owner

Thank you for recreating the pull request!
I'll test the pull request in my test environment.

@rochana-atapattu
Copy link
Contributor Author

Thank you for the feedback. I'll try out
- uses: suzuki-shunsuke/tfaction/setup@pr/1643

@rochana-atapattu
Copy link
Contributor Author

i tried this on my setup, apply and plan workflows are working as expected with the new feature.

@suzuki-shunsuke
Copy link
Owner

Could you check this comment when you have time?

@suzuki-shunsuke suzuki-shunsuke merged commit 9be450c into suzuki-shunsuke:main May 3, 2024
12 checks passed
@suzuki-shunsuke suzuki-shunsuke added this to the v1.4.1 milestone May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants