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: handle deleted org when provisioning admin org settings #982

Merged

Conversation

ctrombley
Copy link
Contributor

Description

This PR allows the admin org settings resource to provision properly in the case that its parent org has been manually deleted.

Testing plan

To reproduce the error reported above (and test that it has been resolved), follow these steps:

  1. Provision an org and admin org settings with the following config:

main.tf

resource "tfe_organization" "a-module-producer" {
  name  = "my-org-116681"
  email = "admin@company.com"
}

resource "tfe_admin_organization_settings" "test-settings" {
  organization                          = tfe_organization.a-module-producer.name
  workspace_limit                       = 15
  access_beta_tools                     = false
  global_module_sharing                 = false
}
  1. Delete the org manually
  2. Run another plan and apply

Output from acceptance tests

I was unable to run the updated test locally, but manual testing shows the issue has been addressed.

$ TESTARGS="-run TestAccTFEAdminOrganizationSettings_basic" make testacc

...

Copy link
Collaborator

@uturunku1 uturunku1 left a comment

Choose a reason for hiding this comment

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

Thank you for fixing this bug for my team!

@uturunku1 uturunku1 merged commit 682fb2c into hashicorp:main Aug 3, 2023
12 of 19 checks passed
@ctrombley ctrombley mentioned this pull request Aug 4, 2023
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

Successfully merging this pull request may close these issues.

None yet

2 participants