-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove diffs in iam documentations (#11027)
- Loading branch information
Showing
2 changed files
with
28 additions
and
17 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 |
---|---|---|
|
@@ -103,7 +103,7 @@ With IAM Conditions: | |
|
||
```hcl | ||
data "google_iam_policy" "admin" { | ||
{{ if eq $.MinVersionObj.Name "beta" }} | ||
{{- if eq $.MinVersionObj.Name "beta" }} | ||
provider = google-beta | ||
{{- end }} | ||
binding { | ||
|
@@ -135,7 +135,7 @@ resource "{{ $.IamTerraformName }}_policy" "policy" { | |
resource "{{ $.IamTerraformName }}_binding" "binding" { | ||
{{- if eq $.MinVersionObj.Name "beta" }} | ||
provider = google-beta | ||
{{- end -}} | ||
{{- end }} | ||
{{- $.CustomTemplate $.IamPolicy.ExampleConfigBody false }} | ||
role = "{{if $.IamPolicy.AdminIamRole}}{{$.IamPolicy.AdminIamRole }}{{else}}{{$.IamPolicy.AllowedIamRole}}{{end}}" | ||
members = [ | ||
|
@@ -169,22 +169,22 @@ resource "{{ $.IamTerraformName }}_binding" "binding" { | |
|
||
```hcl | ||
resource "{{ $.IamTerraformName }}_member" "member" { | ||
{{- if eq $.MinVersionObj.Name "beta" -}} | ||
{{- if eq $.MinVersionObj.Name "beta" }} | ||
provider = google-beta | ||
{{- end -}} | ||
{{- end }} | ||
{{- $.CustomTemplate $.IamPolicy.ExampleConfigBody false }} | ||
role = "{{if $.IamPolicy.AdminIamRole}}{{$.IamPolicy.AdminIamRole }}{{else}}{{$.IamPolicy.AllowedIamRole}}{{end}}" | ||
member = "user:[email protected]" | ||
} | ||
``` | ||
{{ if $.IamPolicy.IamConditionsRequestType -}} | ||
{{ if $.IamPolicy.IamConditionsRequestType }} | ||
With IAM Conditions: | ||
|
||
```hcl | ||
resource "{{ $.IamTerraformName }}_member" "member" { | ||
{{- if eq $.MinVersionObj.Name "beta" }} | ||
provider = google-beta | ||
{{- end -}} | ||
{{- end }} | ||
{{- $.CustomTemplate $.IamPolicy.ExampleConfigBody false }} | ||
role = "{{if $.IamPolicy.AdminIamRole}}{{$.IamPolicy.AdminIamRole}}{{else}}{{$.IamPolicy.AllowedIamRole}}{{end}}" | ||
member = "user:[email protected]" | ||
|
@@ -245,8 +245,7 @@ The following arguments are supported: | |
|
||
* `policy_data` - (Required only by `{{ $.IamTerraformName }}_policy`) The policy data generated by | ||
a `google_iam_policy` data source. | ||
|
||
{{ if $.IamPolicy.IamConditionsRequestType -}} | ||
{{ if $.IamPolicy.IamConditionsRequestType }} | ||
* `condition` - (Optional) An [IAM Condition](https://cloud.google.com/iam/docs/conditions-overview) for a given binding. | ||
Structure is documented below. | ||
|
||
|
@@ -263,7 +262,7 @@ The `condition` block supports: | |
~> **Warning:** Terraform considers the `role` and condition contents (`title`+`description`+`expression`) as the | ||
identifier for the binding. This means that if any part of the condition is changed out-of-band, Terraform will | ||
consider it to be an entirely different resource and will treat it as such. | ||
{{- end -}} | ||
{{- end }} | ||
## Attributes Reference | ||
|
||
In addition to the arguments listed above, the following computed attributes are | ||
|