-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Correct usage of 'folders' for 'google_folder_organization_policy' resource #963
Conversation
What do you think to using |
I think we should definitely use the canonicalFolderId method here. Do you want to add it in this PR? |
Yes, I can do that (and re-title the PR). |
No need to change the PR title 😄.
|
@@ -38,7 +39,7 @@ func resourceGoogleFolderOrganizationPolicyCreate(d *schema.ResourceData, meta i | |||
|
|||
func resourceGoogleFolderOrganizationPolicyRead(d *schema.ResourceData, meta interface{}) error { | |||
config := meta.(*Config) | |||
folder := d.Get("folder").(string) | |||
folder := canonicalFolderId(d.Get("folder").(string)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should also call this method at line 73 and 91 to ensure the create, delete and update method also work.
Can you also update one of the acceptance test to use the id only for the folder
field:
resource "google_folder_organization_policy" "list" {
folder = "replace(${google_folder.orgpolicy.name}, 'folders/','')
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Rebased and squashed. |
Travis CI |
Rebased again after merge of #969. |
Provider level compile
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! |
The
folders
argument to thegoogle_folder_organization_policy
resource has to be the folder's resource name in the format folders/{folder_id}.Correct the documentation.