terraform-google-modules / terraform-docs-samples

Terraform samples intended for inclusion in cloud.google.com
Apache License 2.0
299 stars 215 forks source link

feat(application integration): Add oidc token sample for creating auth configs #689

Closed pay20 closed 2 months ago

pay20 commented 4 months ago

Description

Add oidc token sample for creating auth configs

Fixes: b/344572436

Note: If you are not associated with Google, open an issue for discussion before submitting a pull request.

Checklist

Readiness

Style

Testing

Intended location

API enablement

Review

snippet-bot[bot] commented 4 months ago

Here is the summary of changes.

You are about to add 3 region tags. - [application_integration/create_auth_config/main.tf:24](https://github.com/pay20/terraform-docs-samples/blob/63088b20ddce31afca0a96ad26741c5b01332827/application_integration/create_auth_config/main.tf#L24), tag `application_integration_auth_config_sa` - [application_integration/create_auth_config/main.tf:44](https://github.com/pay20/terraform-docs-samples/blob/63088b20ddce31afca0a96ad26741c5b01332827/application_integration/create_auth_config/main.tf#L44), tag `application_integration_create_auth_config_auth_token` - [application_integration/create_auth_config/main.tf:190](https://github.com/pay20/terraform-docs-samples/blob/63088b20ddce31afca0a96ad26741c5b01332827/application_integration/create_auth_config/main.tf#L190), tag `application_integration_create_auth_config_oidc_token`
You are about to delete 1 region tag. - [application_integration/create_auth_config/main.tf:19](https://github.com/terraform-google-modules/terraform-docs-samples/blob/214e68ce8eae0742a5cb2e78a480ba547625a38a/application_integration/create_auth_config/main.tf#L19), tag `application_integration_create_auth_config_auth_token`

This comment is generated by snippet-bot. If you find problems with this result, please file an issue at: https://github.com/googleapis/repo-automation-bots/issues. To update this comment, add snippet-bot:force-run label or use the checkbox below:

glasnt commented 3 months ago

/gcbrun

glasnt commented 3 months ago

Integration tests failed with the following message:

Error: Error creating AuthConfig: googleapi: Error 400: Failed to generate OIDC ID token of the 
service account. Reason: IAM permission denied for service account 
sa-8fc7fbac5ed44b23@ci-tf-samples-0-twt3yqbn.iam.gserviceaccount.com.  Please ensure
that service-549523905169@gcp-sa-integrations.iam.gserviceaccount.com has been granted
'Service Account Token Creator' permission.

(wrapped for readability)

Previously in https://github.com/terraform-google-modules/terraform-docs-samples/pull/658/ we were iterating on this, but this PR doesn't include any IAM resources. Can you confirm what permisions are needed and add them to this PR? Thanks!

glasnt commented 3 months ago

/gcbrun

glasnt commented 3 months ago

/gcbrun

glasnt commented 3 months ago

/gcbrun

glasnt commented 3 months ago

/gcbrun

msampathkumar commented 3 months ago

CICD seem failed with the error reported @ https://github.com/terraform-google-modules/terraform-docs-samples/pull/689#issuecomment-2159706440

msampathkumar commented 3 months ago

@pay20 - PTAL with provided comments.

glasnt commented 3 months ago

/gcbrun

glasnt commented 3 months ago

/gcbrun

glasnt commented 2 months ago

cl/657845149