Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix iam files with snakecase back to camelcase #10882

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/5605.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:none

```
10 changes: 5 additions & 5 deletions google/iam_endpoints_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ func ServiceManagementServiceIamUpdaterProducer(d TerraformResourceData, config
values := make(map[string]string)

if v, ok := d.GetOk("service_name"); ok {
values["serviceName"] = v.(string)
values["service_name"] = v.(string)
}

// We may have gotten either a long or short name, so attempt to parse long name if possible
m, err := getImportIdQualifiers([]string{"services/(?P<serviceName>[^/]+)", "(?P<serviceName>[^/]+)"}, d, config, d.Get("service_name").(string))
m, err := getImportIdQualifiers([]string{"services/(?P<service_name>[^/]+)", "(?P<service_name>[^/]+)"}, d, config, d.Get("service_name").(string))
if err != nil {
return nil, err
}
Expand All @@ -54,7 +54,7 @@ func ServiceManagementServiceIamUpdaterProducer(d TerraformResourceData, config
}

u := &ServiceManagementServiceIamUpdater{
serviceName: values["serviceName"],
serviceName: values["service_name"],
d: d,
Config: config,
}
Expand All @@ -69,7 +69,7 @@ func ServiceManagementServiceIamUpdaterProducer(d TerraformResourceData, config
func ServiceManagementServiceIdParseFunc(d *schema.ResourceData, config *Config) error {
values := make(map[string]string)

m, err := getImportIdQualifiers([]string{"services/(?P<serviceName>[^/]+)", "(?P<serviceName>[^/]+)"}, d, config, d.Id())
m, err := getImportIdQualifiers([]string{"services/(?P<service_name>[^/]+)", "(?P<service_name>[^/]+)"}, d, config, d.Id())
if err != nil {
return err
}
Expand All @@ -79,7 +79,7 @@ func ServiceManagementServiceIdParseFunc(d *schema.ResourceData, config *Config)
}

u := &ServiceManagementServiceIamUpdater{
serviceName: values["serviceName"],
serviceName: values["service_name"],
d: d,
Config: config,
}
Expand Down
11 changes: 5 additions & 6 deletions website/docs/r/endpoints_service_iam.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ resource "google_endpoints_service_iam_member" "member" {

The following arguments are supported:

* `service_name` - (Required) The name of the service. Used to find the parent resource to bind the IAM policy to

* `member/members` - (Required) Identities that will be granted the privilege in `role`.
Each entry can have one of the following values:
Expand Down Expand Up @@ -110,26 +109,26 @@ exported:

For all import syntaxes, the "resource in question" can take any of the following forms:

* services/{{serviceName}}
* {{serviceName}}
* services/{{service_name}}
* {{service_name}}

Any variables not passed in the import command will be taken from the provider configuration.

Cloud Endpoints service IAM resources can be imported using the resource identifiers, role, and member.

IAM member imports use space-delimited identifiers: the resource in question, the role, and the member identity, e.g.
```
$ terraform import google_endpoints_service_iam_member.editor "services/{{serviceName}} roles/viewer user:[email protected]"
$ terraform import google_endpoints_service_iam_member.editor "services/{{service_name}} roles/viewer user:[email protected]"
```

IAM binding imports use space-delimited identifiers: the resource in question and the role, e.g.
```
$ terraform import google_endpoints_service_iam_binding.editor "services/{{serviceName}} roles/viewer"
$ terraform import google_endpoints_service_iam_binding.editor "services/{{service_name}} roles/viewer"
```

IAM policy imports use the identifier of the resource in question, e.g.
```
$ terraform import google_endpoints_service_iam_policy.editor services/{{serviceName}}
$ terraform import google_endpoints_service_iam_policy.editor services/{{service_name}}
```

-> **Custom Roles**: If you're importing a IAM resource with a custom role, make sure to use the
Expand Down
36 changes: 18 additions & 18 deletions website/docs/r/os_config_os_policy_assignment.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -702,24 +702,6 @@ The `disruption_budget` block supports:
(Optional)
Specifies the relative value defined as a percentage, which will be multiplied by a reference value.

The `source` block supports:

* `allow_insecure` -
(Optional)
Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified.

* `gcs` -
(Optional)
A Cloud Storage object.

* `local_path` -
(Optional)
A local path within the VM to use.

* `remote` -
(Optional)
A generic remote file.

- - -

* `description` -
Expand Down Expand Up @@ -969,6 +951,24 @@ The `zypper` block supports:
(Required)
Required. A one word, unique name for this repository. This is the `repo id` in the zypper config file and also the `display_name` if `display_name` is omitted. This id is also used as the unique identifier when checking for GuestPolicy conflicts.

The `file` block supports:

* `allow_insecure` -
(Optional)
Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified.

* `gcs` -
(Optional)
A Cloud Storage object.

* `local_path` -
(Optional)
A local path within the VM to use.

* `remote` -
(Optional)
A generic remote file.

The `gcs` block supports:

* `bucket` -
Expand Down