From aa63af1fc3545e9e5a19053a2a9f17672ecf16f6 Mon Sep 17 00:00:00 2001 From: Vincent Roseberry Date: Fri, 17 Nov 2017 09:24:48 -0800 Subject: [PATCH] Add documentation for import in google_folder_organization_policy (#746) * Remove import support for org policy * Add ForceNew to org_id field * Revert "Remove import support for org policy" This reverts commit f65d9fb347d6b0998be55ef823c5726e876c53ae. * Add import documentation for google_organization_policy --- google/resource_google_organization_policy.go | 1 + website/docs/r/google_organization_policy.html.markdown | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/google/resource_google_organization_policy.go b/google/resource_google_organization_policy.go index c450c268..f046203e 100644 --- a/google/resource_google_organization_policy.go +++ b/google/resource_google_organization_policy.go @@ -22,6 +22,7 @@ func resourceGoogleOrganizationPolicy() *schema.Resource { "org_id": { Type: schema.TypeString, Required: true, + ForceNew: true, }, "constraint": { Type: schema.TypeString, diff --git a/website/docs/r/google_organization_policy.html.markdown b/website/docs/r/google_organization_policy.html.markdown index 9451c9bb..51717387 100644 --- a/website/docs/r/google_organization_policy.html.markdown +++ b/website/docs/r/google_organization_policy.html.markdown @@ -103,4 +103,11 @@ exported: * `etag` - (Computed) The etag of the organization policy. `etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. -* `update_time` - (Computed) The timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds, representing when the variable was last updated. Example: "2016-10-09T12:33:37.578138407Z". \ No newline at end of file +* `update_time` - (Computed) The timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds, representing when the variable was last updated. Example: "2016-10-09T12:33:37.578138407Z". + +## Import + +Organization Policies can be imported using the `org_id` and the `contraint`, e.g. + +``` +$ terraform import google_folder_organization_policy.services_policy 123456789:constraints/serviceuser.services \ No newline at end of file