Skip to content

Commit 39c6396

Browse files
ewbankkitrosbo
authored andcommitted
Add 'google_organization' data source (hashicorp#887)
* Add 'google_organization' data source. * Use 'GetResourceNameFromSelfLink'. * Remove 'resourcemanager_helpers'. * Use 'ConflictsWith' in schema. * Add 'organization' argument and make 'name' an output-only attribute.
1 parent 5c372ab commit 39c6396

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed
+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
layout: "google"
3+
page_title: "Google: google_organization"
4+
sidebar_current: "docs-google-datasource-organization"
5+
description: |-
6+
Get information about a Google Cloud Organization.
7+
---
8+
9+
# google\_organization
10+
11+
Use this data source to get information about a Google Cloud Organization.
12+
13+
```hcl
14+
data "google_organization" "org" {
15+
domain = "example.com"
16+
}
17+
18+
resource "google_folder" "sales" {
19+
display_name = "Sales"
20+
parent = "${data.google_organization.org.name}"
21+
}
22+
```
23+
24+
## Argument Reference
25+
26+
The arguments of this data source act as filters for querying the available Organizations.
27+
The given filters must match exactly one Organizations whose data will be exported as attributes.
28+
The following arguments are supported:
29+
30+
* `organization` (Optional) - The name of the Organization in the form `{organization_id}` or `organizations/{organization_id}`.
31+
* `domain` (Optional) - The domain name of the Organization.
32+
33+
~> **NOTE:** One of `organization` or `domain` must be specified.
34+
35+
## Attributes Reference
36+
37+
The following additional attributes are exported:
38+
39+
* `id` - The Organization ID.
40+
* `name` - The resource name of the Organization in the form `organizations/{organization_id}`.
41+
* `directory_customer_id` - The Google for Work customer ID of the Organization.
42+
* `create_time` - Timestamp when the Organization was created. A timestamp in RFC3339 UTC "Zulu" format, accurate to nanoseconds. Example: "2014-10-02T15:01:23.045123456Z".
43+
* `lifecycle_state` - The Organization's current lifecycle state.

google.erb

+3
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@
6464
<li<%= sidebar_current("docs-google-kms-secret") %>>
6565
<a href="/docs/providers/google/d/google_kms_secret.html">google_kms_secret</a>
6666
</li>
67+
<li<%= sidebar_current("docs-google-datasource-organization") %>>
68+
<a href="/docs/providers/google/d/google_organization.html">google_organization</a>
69+
</li>
6770
<li<%= sidebar_current("docs-google-datasource-signed_url") %>>
6871
<a href="/docs/providers/google/d/signed_url.html">google_storage_object_signed_url</a>
6972
</li>

0 commit comments

Comments
 (0)