mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-10-14 23:17:15 +00:00
b02686b9eb
* adding google folder data source with get by id, search by fields and lookup organization functionality * removing search functionality * creating folders for each test and updating documentation with default values
1.6 KiB
1.6 KiB
layout | page_title | sidebar_current | description |
---|---|---|---|
Google: google_folder | docs-google-datasource-folder | Get information about a Google Cloud Folder. |
google_folder
Use this data source to get information about a Google Cloud Folder.
# Get folder by id
data "google_folder" "my_folder_1" {
folder = "folders/12345"
lookup_organization = true
}
# Search by fields
data "google_folder" "my_folder_2" {
folder = "folders/23456"
}
output "my_folder_1_organization" {
value = "${data.google_folder.my_folder_1.organization}"
}
output "my_folder_2_parent" {
value = "${data.google_folder.my_folder_2.parent}"
}
Argument Reference
The following arguments are supported:
folder
(Required) - The name of the Folder in the form{folder_id}
orfolders/{folder_id}
.lookup_organization
(Optional) -true
to find the organization that the folder belongs,false
to avoid the lookup. It searches up the tree. (defaults tofalse
)
Attributes Reference
The following attributes are exported:
id
- The Folder ID.name
- The resource name of the Folder in the formfolders/{organization_id}
.parent
- The resource name of the parent Folder or Organization.display_name
- The folder's display name.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".lifecycle_state
- The Folder's current lifecycle state.organization
- Iflookup_organization
is enable, the resource name of the Organization that the folder belongs.