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

The folder operation violates display name uniqueness within the parent. #33

Closed
sbadakhc opened this issue May 5, 2020 · 4 comments
Closed

Comments

@sbadakhc
Copy link

sbadakhc commented May 5, 2020

Hi,

I'm running terraform apply in 1-org dir. I can see that folders are created but I'm getting uniqueness error. Under my org I have successfully provisioned a common /logs /monitoring /networking folders and they appear to be populated correctly. Is the idempotency breaking here? If those folders exist I guess the apply should run without errors? Possibly related to:

hashicorp/terraform-provider-google#1903

Plan: 79 to add, 0 to change, 0 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

google_folder.common: Creating...

Error: Error creating folder 'common' in 'organizations/<REDACTED>': Error waiting for creating folder: Error code 9, message: The folder operation violates display name uniqueness within the parent.

  on folders.tf line 21, in resource "google_folder" "common":
  21: resource "google_folder" "common" {
@rjerrems
Copy link
Collaborator

rjerrems commented May 5, 2020

Hi @sbadakhc can you please share the output of terraform version from within 1-org directory. Have you modified the code at all or did you run as-is? If modified can you please send the snippet of the changes you have made. If terraform is able to read state and those resources have already been created, it should not try to do it again.

@sbadakhc
Copy link
Author

sbadakhc commented May 8, 2020

Hi @rjerrems. Here is the terraform output from the 1-org directory.

terraform -v
Terraform v0.12.24
+ provider.google v3.20.0
+ provider.google-beta v3.20.0
+ provider.null v2.1.2
+ provider.random v2.2.1

I have made no code modifications and this is a vanilla platform that I can continue to bounce until I get this working. I want to achieve a clean run be before I begin customising things. Thanks,
Sal.

@sbadakhc
Copy link
Author

sbadakhc commented May 8, 2020

@rjerrems - I just tried to destroy the resources and I'm seeing the error below. It seems I am stick on one hand from completing the 'apply' and on the other from executing a 'destroy'. Let me know if I can provide more information. Thanks Sal.

module.org_shared_vpc_prod.module.project-factory.module.gcloud_disable.null_resource.decompress_destroy[0] (local-exec): tar: Error is not recoverable: exiting now


Error: Error running command 'tar -xzf .terraform/modules/org_monitoring_prod.project-factory.gcloud_disable/terraform-google-gcloud-0.5.1/cache/70a0889b/google-cloud-sdk.tar.gz -C .terraform/modules/org_monitoring_prod.project-factory.gcloud_disable/terraform-google-gcloud-0.5.1/cache/70a0889b && cp .terraform/modules/org_monitoring_prod.project-factory.gcloud_disable/terraform-google-gcloud-0.5.1/cache/70a0889b/jq .terraform/modules/org_monitoring_prod.project-factory.gcloud_disable/terraform-google-gcloud-0.5.1/cache/70a0889b/google-cloud-sdk/bin/': exit status 2. Output: tar (child): .terraform/modules/org_monitoring_prod.project-factory.gcloud_disable/terraform-google-gcloud-0.5.1/cache/70a0889b/google-cloud-sdk.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now




Error: Error running command 'tar -xzf .terraform/modules/org_shared_vpc_prod.project-factory.gcloud_disable/terraform-google-gcloud-0.5.1/cache/46879603/google-cloud-sdk.tar.gz -C .terraform/modules/org_shared_vpc_prod.project-factory.gcloud_disable/terraform-google-gcloud-0.5.1/cache/46879603 && cp .terraform/modules/org_shared_vpc_prod.project-factory.gcloud_disable/terraform-google-gcloud-0.5.1/cache/46879603/jq .terraform/modules/org_shared_vpc_prod.project-factory.gcloud_disable/terraform-google-gcloud-0.5.1/cache/46879603/google-cloud-sdk/bin/': exit status 2. Output: tar (child): .terraform/modules/org_shared_vpc_prod.project-factory.gcloud_disable/terraform-google-gcloud-0.5.1/cache/46879603/google-cloud-sdk.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now




Error: Error running command 'tar -xzf .terraform/modules/org_monitoring_nonprod.project-factory.gcloud_disable/terraform-google-gcloud-0.5.1/cache/b4b65875/google-cloud-sdk.tar.gz -C .terraform/modules/org_monitoring_nonprod.project-factory.gcloud_disable/terraform-google-gcloud-0.5.1/cache/b4b65875 && cp .terraform/modules/org_monitoring_nonprod.project-factory.gcloud_disable/terraform-google-gcloud-0.5.1/cache/b4b65875/jq .terraform/modules/org_monitoring_nonprod.project-factory.gcloud_disable/terraform-google-gcloud-0.5.1/cache/b4b65875/google-cloud-sdk/bin/': exit status 2. Output: tar (child): .terraform/modules/org_monitoring_nonprod.project-factory.gcloud_disable/terraform-google-gcloud-0.5.1/cache/b4b65875/google-cloud-sdk.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now




Error: Error running command 'tar -xzf .terraform/modules/org_shared_vpc_nonprod.project-factory.gcloud_disable/terraform-google-gcloud-0.5.1/cache/61fac61d/google-cloud-sdk.tar.gz -C .terraform/modules/org_shared_vpc_nonprod.project-factory.gcloud_disable/terraform-google-gcloud-0.5.1/cache/61fac61d && cp .terraform/modules/org_shared_vpc_nonprod.project-factory.gcloud_disable/terraform-google-gcloud-0.5.1/cache/61fac61d/jq .terraform/modules/org_shared_vpc_nonprod.project-factory.gcloud_disable/terraform-google-gcloud-0.5.1/cache/61fac61d/google-cloud-sdk/bin/': exit status 2. Output: tar (child): .terraform/modules/org_shared_vpc_nonprod.project-factory.gcloud_disable/terraform-google-gcloud-0.5.1/cache/61fac61d/google-cloud-sdk.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

@sbadakhc sbadakhc closed this as completed May 8, 2020
@samanl
Copy link

samanl commented Feb 2, 2022

Hi @sbadakhc , How did you get this uniqueness error sorted. I am trying example foundation for the first time and getting the exact same error. Appreciate if you could advise. Thanks.

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

No branches or pull requests

3 participants