generated from hashicorp/terraform-provider-scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Implement chrome policy schema datasources * Add missing lines * make diffsuppressfunc, revert export of org_unit_id to contain prefix for consistency * Implement chrome policy resource * Fix ordering * Add resource * Implement update * add validations and get tests to pass * Fix implementation and write tests * make test more complex * Write even more thorough test, fix description * Add datasource test * Add examples * generate examples * return early if error * add some nil checks * add more nil checks Co-authored-by: Megan Bang <[email protected]>
- Loading branch information
Showing
15 changed files
with
1,408 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "googleworkspace_chrome_policy_schema Data Source - terraform-provider-googleworkspace" | ||
subcategory: "" | ||
description: |- | ||
Chrome Policy Schema data source in the Terraform Googleworkspace provider. | ||
--- | ||
|
||
# googleworkspace_chrome_policy_schema (Data Source) | ||
|
||
Chrome Policy Schema data source in the Terraform Googleworkspace provider. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
data "googleworkspace_chrome_policy_schema" "example" { | ||
schema_name = "chrome.printers.AllowForUsers" | ||
} | ||
output "field_descriptions" { | ||
value = data.googleworkspace_chrome_policy_schema.example.field_descriptions | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- **schema_name** (String) The full qualified name of the policy schema | ||
|
||
### Optional | ||
|
||
- **id** (String) The ID of this resource. | ||
|
||
### Read-Only | ||
|
||
- **access_restrictions** (List of String) Specific access restrictions related to this policy. | ||
- **additional_target_key_names** (List of Object) Additional key names that will be used to identify the target of the policy value. When specifying a policyTargetKey, each of the additional keys specified here will have to be included in the additionalTargetKeys map. (see [below for nested schema](#nestedatt--additional_target_key_names)) | ||
- **definition** (List of Object) Schema definition using proto descriptor. (see [below for nested schema](#nestedatt--definition)) | ||
- **field_descriptions** (String) Detailed description of each field that is part of the schema, represented as a JSON string. | ||
- **notices** (List of Object) Special notice messages related to setting certain values in certain fields in the schema. (see [below for nested schema](#nestedatt--notices)) | ||
- **policy_description** (String) Description about the policy schema for user consumption. | ||
- **support_uri** (String) URI to related support article for this schema. | ||
|
||
<a id="nestedatt--additional_target_key_names"></a> | ||
### Nested Schema for `additional_target_key_names` | ||
|
||
Read-Only: | ||
|
||
- **key** (String) | ||
- **key_description** (String) | ||
|
||
|
||
<a id="nestedatt--definition"></a> | ||
### Nested Schema for `definition` | ||
|
||
Read-Only: | ||
|
||
- **enum_type** (List of Object) (see [below for nested schema](#nestedobjatt--definition--enum_type)) | ||
- **message_type** (String) | ||
- **name** (String) | ||
- **package** (String) | ||
- **syntax** (String) | ||
|
||
<a id="nestedobjatt--definition--enum_type"></a> | ||
### Nested Schema for `definition.enum_type` | ||
|
||
Read-Only: | ||
|
||
- **name** (String) | ||
- **value** (List of Object) (see [below for nested schema](#nestedobjatt--definition--enum_type--value)) | ||
|
||
<a id="nestedobjatt--definition--enum_type--value"></a> | ||
### Nested Schema for `definition.enum_type.value` | ||
|
||
Read-Only: | ||
|
||
- **name** (String) | ||
- **number** (Number) | ||
|
||
|
||
|
||
|
||
<a id="nestedatt--notices"></a> | ||
### Nested Schema for `notices` | ||
|
||
Read-Only: | ||
|
||
- **acknowledgement_required** (Boolean) | ||
- **field** (String) | ||
- **notice_message** (String) | ||
- **notice_value** (String) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "googleworkspace_chrome_policy Resource - terraform-provider-googleworkspace" | ||
subcategory: "" | ||
description: |- | ||
Chrome Policy resource in the Terraform Googleworkspace provider. Currently only supports policies not requiring additionalTargetKeys. | ||
--- | ||
|
||
# googleworkspace_chrome_policy (Resource) | ||
|
||
Chrome Policy resource in the Terraform Googleworkspace provider. Currently only supports policies not requiring additionalTargetKeys. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "googleworkspace_org_unit" "example" { | ||
name = "example" | ||
parent_org_unit_path = "/" | ||
} | ||
resource "googleworkspace_chrome_policy" "example" { | ||
org_unit_id = googleworkspace_org_unit.test.id | ||
policies { | ||
schema_name = "chrome.users.MaxConnectionsPerProxy" | ||
schema_values = { | ||
maxConnectionsPerProxy = jsonencode(34) | ||
} | ||
} | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- **org_unit_id** (String) The target org unit on which this policy is applied. | ||
- **policies** (Block List, Min: 1) Policies to set for the org unit (see [below for nested schema](#nestedblock--policies)) | ||
|
||
### Optional | ||
|
||
- **id** (String) The ID of this resource. | ||
|
||
<a id="nestedblock--policies"></a> | ||
### Nested Schema for `policies` | ||
|
||
Required: | ||
|
||
- **schema_name** (String) The full qualified name of the policy schema. | ||
- **schema_values** (Map of String) JSON encoded map that represents key/value pairs that correspond to the given schema. | ||
|
||
|
7 changes: 7 additions & 0 deletions
7
examples/data-sources/googleworkspace_chrome_policy_schema/data-source.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
data "googleworkspace_chrome_policy_schema" "example" { | ||
schema_name = "chrome.printers.AllowForUsers" | ||
} | ||
|
||
output "field_descriptions" { | ||
value = data.googleworkspace_chrome_policy_schema.example.field_descriptions | ||
} |
14 changes: 14 additions & 0 deletions
14
examples/resources/googleworkspace_chrome_policy/resource.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
resource "googleworkspace_org_unit" "example" { | ||
name = "example" | ||
parent_org_unit_path = "/" | ||
} | ||
|
||
resource "googleworkspace_chrome_policy" "example" { | ||
org_unit_id = googleworkspace_org_unit.test.id | ||
policies { | ||
schema_name = "chrome.users.MaxConnectionsPerProxy" | ||
schema_values = { | ||
maxConnectionsPerProxy = jsonencode(34) | ||
} | ||
} | ||
} |
Oops, something went wrong.