Skip to content

Commit

Permalink
fix import documentation for string separated values (GoogleCloudPlat…
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottSuarez authored and akshat-jindal-nit committed Nov 18, 2024
1 parent 55001d4 commit 5e65019
Show file tree
Hide file tree
Showing 16 changed files with 27 additions and 1 deletion.
1 change: 1 addition & 0 deletions mmv1/products/activedirectory/Domain.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ update_mask: true
# equivalent to {{name}}, but makes sweepers work
delete_url: 'projects/{{project}}/locations/global/domains/{{domain_name}}'
import_format:
- '{{project}} {{name}}'
- '{{name}}'
timeouts:
insert_minutes: 60
Expand Down
1 change: 1 addition & 0 deletions mmv1/products/bigquerydatatransfer/Config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ self_link: '{{name}}'
update_url: '{{name}}?serviceAccountName={{service_account_name}}'
update_verb: 'PATCH'
import_format:
- '{{project}} {{name}}'
- '{{name}}'
timeouts:
insert_minutes: 20
Expand Down
1 change: 1 addition & 0 deletions mmv1/products/integrations/AuthConfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ self_link: '{{name}}'
update_verb: 'PATCH'
mutex: '{{name}}'
import_format:
- '{{project}} {{name}}'
- '{{name}}'
timeouts:
insert_minutes: 20
Expand Down
1 change: 1 addition & 0 deletions mmv1/products/monitoring/AlertPolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ update_verb: 'PATCH'
update_mask: true
mutex: 'alertPolicy/{{project}}'
import_format:
- '{{project}} {{name}}'
- '{{name}}'
timeouts:
insert_minutes: 20
Expand Down
1 change: 1 addition & 0 deletions mmv1/products/monitoring/Group.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ base_url: 'v3/projects/{{project}}/groups'
self_link: 'v3/{{name}}'
mutex: 'stackdriver/groups/{{project}}'
import_format:
- '{{project}} {{name}}'
- '{{name}}'
timeouts:
insert_minutes: 20
Expand Down
1 change: 1 addition & 0 deletions mmv1/products/monitoring/MetricDescriptor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ self_link: 'v3/{{name}}'
update_url: 'v3/projects/{{project}}/metricDescriptors'
update_verb: 'POST'
import_format:
- '{{project}} {{name}}'
- '{{name}}'
timeouts:
insert_minutes: 20
Expand Down
1 change: 1 addition & 0 deletions mmv1/products/monitoring/Service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ create_url: 'v3/projects/{{project}}/services?serviceId={{service_id}}'
update_verb: 'PATCH'
update_mask: true
import_format:
- '{{project}} {{name}}'
- '{{name}}'
timeouts:
insert_minutes: 20
Expand Down
1 change: 1 addition & 0 deletions mmv1/products/monitoring/Slo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ update_verb: 'PATCH'
update_mask: true
mutex: 'monitoring/project/{{project}}/service/{{service}}'
import_format:
- '{{project}} {{name}}'
- '{{name}}'
timeouts:
insert_minutes: 20
Expand Down
1 change: 1 addition & 0 deletions mmv1/products/monitoring/UptimeCheckConfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ update_verb: 'PATCH'
update_mask: true
mutex: 'stackdriver/groups/{{project}}'
import_format:
- '{{project}} {{name}}'
- '{{name}}'
timeouts:
insert_minutes: 20
Expand Down
3 changes: 3 additions & 0 deletions mmv1/products/osconfig/PatchDeployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ docs:
id_format: '{{name}}'
base_url: 'projects/{{project}}/patchDeployments'
self_link: '{{name}}'
import_format:
- '{{project}} {{name}}'
- '{{name}}'
create_url: 'projects/{{project}}/patchDeployments?patchDeploymentId={{patch_deployment_id}}'
immutable: true
timeouts:
Expand Down
2 changes: 2 additions & 0 deletions mmv1/products/securitycenter/NotificationConfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ self_link: '{{name}}'
create_url: 'organizations/{{organization}}/notificationConfigs?configId={{config_id}}'
update_verb: 'PATCH'
update_mask: true
import_format:
- '{{name}}'
timeouts:
insert_minutes: 20
update_minutes: 20
Expand Down
2 changes: 2 additions & 0 deletions mmv1/products/securitycenter/ProjectNotificationConfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ self_link: '{{name}}'
create_url: 'projects/{{project}}/notificationConfigs?configId={{config_id}}'
update_verb: 'PATCH'
update_mask: true
import_format:
- '{{name}}'
timeouts:
insert_minutes: 20
update_minutes: 20
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ self_link: '{{name}}'
create_url: 'organizations/{{organization}}/locations/{{location}}/notificationConfigs?configId={{config_id}}'
update_verb: 'PATCH'
update_mask: true
import_format:
- '{{name}}'
timeouts:
insert_minutes: 20
update_minutes: 20
Expand Down
3 changes: 3 additions & 0 deletions mmv1/products/securityscanner/ScanConfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ base_url: 'projects/{{project}}/scanConfigs'
self_link: '{{name}}'
update_verb: 'PATCH'
update_mask: true
import_format:
- '{{project}} {{name}}'
- '{{name}}'
timeouts:
insert_minutes: 20
update_minutes: 20
Expand Down
1 change: 1 addition & 0 deletions mmv1/products/transcoder/Job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ self_link: '{{name}}'
create_url: 'projects/{{project}}/locations/{{location}}/jobs'
immutable: true
import_format:
- '{{project}} {{name}}'
- '{{name}}'
timeouts:
insert_minutes: 20
Expand Down
6 changes: 5 additions & 1 deletion mmv1/templates/terraform/resource.html.markdown.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,11 @@ When using the [`terraform import` command](https://developer.hashicorp.com/terr

```
{{- range $idFormat := $.ImportIdFormatsFromResource }}
$ terraform import {{$.TerraformName}}.default {{replaceAll $idFormat "%" "" }}
{{- $importId := replaceAll $idFormat "%" "" }}
{{- if contains $importId " " }}
{{- $importId = printf "\"%s\"" $importId }}
{{- end }}
$ terraform import {{$.TerraformName}}.default {{$importId}}
{{- end }}
```
{{ end }}
Expand Down

0 comments on commit 5e65019

Please sign in to comment.