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

Add new resource google_folder_organization_policy #747

Merged
merged 4 commits into from
Nov 27, 2017

Conversation

rosbo
Copy link
Contributor

@rosbo rosbo commented Nov 15, 2017

Fixes #414

@rosbo rosbo requested a review from danawillow November 15, 2017 23:46
@rosbo rosbo force-pushed the folder-org-policy branch 2 times, most recently from 45790d0 to dc03279 Compare November 21, 2017 21:18
@rosbo rosbo force-pushed the folder-org-policy branch from dc03279 to ff7d965 Compare November 21, 2017 23:06
@rosbo
Copy link
Contributor Author

rosbo commented Nov 21, 2017

Rebased with the latest changes.

}

if policy.ListPolicy.AllValues != policyType {
return fmt.Errorf("Expected the list policy to '%s' all values, got '%s'", policyType, policy.ListPolicy.AllValues)
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not totally sure what this is supposed to say, can you reword it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Wooahh. I don't even know what I meant. Reworded.

FYI, policyType is either ALLOW or DENY.

func testAccGoogleFolderOrganizationPolicy_boolean(org string, enforced bool) string {
return fmt.Sprintf(`
resource "google_folder" "orgpolicy" {
display_name = "%s"
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: indentation isn't consistent between this block and the next

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

enforced = %t
}
}
`, acctest.RandomWithPrefix("tf-test"), "organizations/"+org, enforced)
Copy link
Contributor

Choose a reason for hiding this comment

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

Even though you can rename a folder, let's use a consistent name per-test (rather than per-test-step) so we guarantee we're testing only the org policy behavior.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@rosbo rosbo merged commit 10f764a into hashicorp:master Nov 27, 2017
@rosbo rosbo deleted the folder-org-policy branch November 27, 2017 22:53
chrisst pushed a commit to chrisst/terraform-provider-google that referenced this pull request Nov 9, 2018
* Add new resource google_folder_organization_policy
* Add documentation
modular-magician pushed a commit to modular-magician/terraform-provider-google that referenced this pull request Sep 27, 2019
@ghost
Copy link

ghost commented Mar 30, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Configure constraints on a GCP folder
2 participants