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

fix(stages): only add sandbox SA when sandbox feature is enabled #1391

Merged
merged 1 commit into from
May 24, 2023

Conversation

gustavovalverde
Copy link
Contributor

If you have the project_factory feature enabled, but not the sandbox feature (as it's not a requirement on your org), when doing a terraform apply on 1-resman it raises this errors as it's expecting the wrong feature when creating the sandbox SA

│ Error: Invalid index
│ 
│   on branch-sandbox.tf line 68, in resource "google_organization_iam_member" "org_policy_admin_sandbox":
│   68:   member = module.branch-sandbox-sa.0.iam_email
│     ├────────────────
│     │ module.branch-sandbox-sa is empty tuple
│ 
│ The given key does not identify an element in this collection value: the collection has no elements.

If you have the `project_factory` feature enabled, but not the `sandbox` feature (as it's not a requirement on your org), when doing a `terraform apply` on `1-resman` it raises this errors as it's expecting the wrong feature when creating the sandbox SA

```
│ Error: Invalid index
│ 
│   on branch-sandbox.tf line 68, in resource "google_organization_iam_member" "org_policy_admin_sandbox":
│   68:   member = module.branch-sandbox-sa.0.iam_email
│     ├────────────────
│     │ module.branch-sandbox-sa is empty tuple
│ 
│ The given key does not identify an element in this collection value: the collection has no elements.
```
@google-cla
Copy link

google-cla bot commented May 23, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@gustavovalverde
Copy link
Contributor Author

CLA signed

Copy link
Collaborator

@ludoo ludoo left a comment

Choose a reason for hiding this comment

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

Thanks for this, stupid mistake on our side :)

@ludoo ludoo enabled auto-merge (squash) May 24, 2023 05:06
@ludoo ludoo merged commit 00cac91 into GoogleCloudPlatform:master May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants