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

Secret manager e2etests #2280

Merged

Conversation

dibaskar-google
Copy link
Contributor


Checklist

I applicable, I acknowledge that I have:

  • [X ] Read the contributing guide
  • [ X] Ran terraform fmt on all modified files
  • [X ] Regenerated the relevant README.md files using tools/tfdoc.py
  • [ X] Made sure all relevant tests pass

Copy link
Collaborator

@wiktorn wiktorn left a comment

Choose a reason for hiding this comment

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

tests/examples_e2e/setup_module/main.tf Outdated Show resolved Hide resolved
tests/examples_e2e/setup_module/main.tf Outdated Show resolved Hide resolved
tests/fixtures/secret.tf Outdated Show resolved Hide resolved
@wiktorn
Copy link
Collaborator

wiktorn commented May 15, 2024

Hi Dinesh,

Thanks for this work. The E2E run showed few errors of looking like this:

module.secret-manager.google_secret_manager_secret.default["test-manual"]: Creating...
module.secret-manager.google_secret_manager_secret.default["test-auto"]: Creating...
module.secret-manager.google_secret_manager_secret.default["test-auto"]: Creation complete after 0s [id=projects/***-171577335114-prj/secrets/test-auto]
 
Error: Error creating Secret: googleapi: Error 400: Location [europe-west4] is provided more than once in replication policy.

  with module.secret-manager.google_secret_manager_secret.default["test-manual"],
  on fabric/modules/secret-manager/main.tf line 38, in resource "google_secret_manager_secret" "default":
  38: resource "google_secret_manager_secret" "default" {

', '
Error: Error creating Secret: googleapi: Error 400: Location [europe-west4] is provided more than once in replication policy.

  with module.secret-manager.google_secret_manager_secret.default["test-manual"],
  on fabric/modules/secret-manager/main.tf line 38, in resource "google_secret_manager_secret" "default":
  38: resource "google_secret_manager_secret" "default" {

')

Are you sure we have all required changes?

@dibaskar-google
Copy link
Contributor Author

dibaskar-google commented May 15, 2024

Hello @wiktorn,

Thanks for reviewing this one. This should be because the TFTEST_E2E_region env variable might be set to "europe-west4" while running the test. As same region is used for replication, this resulted in error.

Modified the hardcode region from europe-west4 to europe-west9 which should not now clash with TFTEST_E2E_region env variable

@wiktorn wiktorn enabled auto-merge (squash) May 28, 2024 05:42
@wiktorn wiktorn merged commit 3d66817 into GoogleCloudPlatform:master May 28, 2024
9 checks passed
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