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

Allow setting folder_id to empty string on google_project #1425

Merged
merged 3 commits into from
May 3, 2018

Conversation

rosbo
Copy link
Contributor

@rosbo rosbo commented May 2, 2018

@rosbo rosbo requested a review from danawillow May 2, 2018 23:58
@rosbo
Copy link
Contributor Author

rosbo commented May 2, 2018

--- PASS: TestAccProject_parentFolder (29.59s)

orgId, orgOk := d.GetOk("org_id")
folderId, folderOk := d.GetOk("folder_id")

if orgOk && folderOk && orgId != "" && folderId != "" {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: the ok just means "is not the zero value for this type", so orgOk will always be the same as orgId != ""

Copy link
Contributor

Choose a reason for hiding this comment

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

Yea - it might be more elegant to just use d.Get("...") and have the != "" check

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

@sethvargo
Copy link
Contributor

LGTM - let's make sure we highlight this as a behavior change in the CHANGELOG

@rosbo rosbo force-pushed the project-rm-conflicts-with branch from 33bae54 to 1272055 Compare May 3, 2018 16:43
@rosbo rosbo merged commit 135f5c4 into hashicorp:master May 3, 2018
@rosbo rosbo deleted the project-rm-conflicts-with branch May 3, 2018 16:53
@ghost
Copy link

ghost commented Nov 18, 2018

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 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators Nov 18, 2018
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.

3 participants