-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
Copy pathterraform.yaml
196 lines (192 loc) · 9.72 KB
/
terraform.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
# Copyright 2020 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
--- !ruby/object:Provider::Terraform::Config
overrides: !ruby/object:Overrides::ResourceOverrides
Environment: !ruby/object:Overrides::Terraform::ResourceOverride
properties:
location: !ruby/object:Overrides::Terraform::PropertyOverride
diff_suppress_func: 'compareSelfLinkOrResourceName'
custom_expand: templates/terraform/custom_expand/resource_from_self_link.go.erb
custom_flatten: templates/terraform/custom_flatten/name_from_self_link.erb
examples:
- !ruby/object:Provider::Terraform::Examples
name: "notebook_environment_basic"
primary_resource_id: "environment"
vars:
environment_name: "notebooks-environment"
Instance: !ruby/object:Overrides::Terraform::ResourceOverride
autogen_async: true
examples:
- !ruby/object:Provider::Terraform::Examples
name: "notebook_instance_basic"
primary_resource_id: "instance"
primary_resource_name: "fmt.Sprintf(\"tf-test-notebooks-instance%s\", context[\"random_suffix\"])"
region_override: "us-west1-a"
vars:
instance_name: "notebooks-instance"
- !ruby/object:Provider::Terraform::Examples
name: "notebook_instance_basic_container"
primary_resource_id: "instance"
primary_resource_name: "fmt.Sprintf(\"tf-test-notebooks-instance%s\", context[\"random_suffix\"])"
region_override: "us-west1-a"
vars:
instance_name: "notebooks-instance"
- !ruby/object:Provider::Terraform::Examples
name: "notebook_instance_basic_gpu"
primary_resource_id: "instance"
primary_resource_name: "fmt.Sprintf(\"tf-test-notebooks-instance%s\", context[\"random_suffix\"])"
region_override: "us-west1-a"
vars:
instance_name: "notebooks-instance"
- !ruby/object:Provider::Terraform::Examples
name: "notebook_instance_full"
primary_resource_id: "instance"
primary_resource_name: "fmt.Sprintf(\"tf-test-notebooks-instance%s\", context[\"random_suffix\"])"
region_override: "us-west1-a"
vars:
instance_name: "notebooks-instance"
test_env_vars:
service_account: :SERVICE_ACCT
description: |
{{description}}
~> **Note:** Due to limitations of the Notebooks Instance API, many fields
in this resource do not properly detect drift. These fields will also not
appear in state once imported.
custom_code: !ruby/object:Provider::Terraform::CustomCode
constants: templates/terraform/constants/notebooks_instance.go
properties:
bootDiskSizeGb: !ruby/object:Overrides::Terraform::PropertyOverride
ignore_read: true
bootDiskType: !ruby/object:Overrides::Terraform::PropertyOverride
ignore_read: true
createTime: !ruby/object:Overrides::Terraform::PropertyOverride
default_from_api: true
containerImage: !ruby/object:Overrides::Terraform::PropertyOverride
ignore_read: true
dataDiskSizeGb: !ruby/object:Overrides::Terraform::PropertyOverride
ignore_read: true
noRemoveDataDisk: !ruby/object:Overrides::Terraform::PropertyOverride
ignore_read: true
dataDiskType: !ruby/object:Overrides::Terraform::PropertyOverride
diff_suppress_func: 'emptyOrDefaultStringSuppress("DISK_TYPE_UNSPECIFIED")'
diskEncryption: !ruby/object:Overrides::Terraform::PropertyOverride
diff_suppress_func: 'emptyOrDefaultStringSuppress("DISK_ENCRYPTION_UNSPECIFIED")'
instanceOwners: !ruby/object:Overrides::Terraform::PropertyOverride
ignore_read: true
labels: !ruby/object:Overrides::Terraform::PropertyOverride
default_from_api: true
diff_suppress_func: NotebooksInstanceLabelDiffSuppress
machineType: !ruby/object:Overrides::Terraform::PropertyOverride
diff_suppress_func: 'compareSelfLinkOrResourceName'
custom_flatten: templates/terraform/custom_flatten/name_from_self_link.erb
metadata: !ruby/object:Overrides::Terraform::PropertyOverride
# This is not a traditional ignore_read. Metadata is returned from the API,
# but it gets merged with metadata that the server sets. This prevents us
# from detecting drift.
ignore_read: true
name: !ruby/object:Overrides::Terraform::PropertyOverride
custom_flatten: 'templates/terraform/custom_flatten/name_from_self_link.erb'
network: !ruby/object:Overrides::Terraform::PropertyOverride
diff_suppress_func: compareSelfLinkOrResourceName
default_from_api: true
serviceAccount: !ruby/object:Overrides::Terraform::PropertyOverride
default_from_api: true
subnet: !ruby/object:Overrides::Terraform::PropertyOverride
diff_suppress_func: compareSelfLinkOrResourceName
default_from_api: true
updateTime: !ruby/object:Overrides::Terraform::PropertyOverride
default_from_api: true
vmImage: !ruby/object:Overrides::Terraform::PropertyOverride
ignore_read: true
shieldedInstanceConfig: !ruby/object:Overrides::Terraform::PropertyOverride
default_from_api: true
Runtime: !ruby/object:Overrides::Terraform::ResourceOverride
autogen_async: true
examples:
- !ruby/object:Provider::Terraform::Examples
name: "notebook_runtime_basic"
primary_resource_name: "fmt.Sprintf(\"tf-test-notebooks-runtime%s\", context[\"random_suffix\"])"
primary_resource_id: "runtime"
region_override: "us-central1"
vars:
runtime_name: "notebooks-runtime"
- !ruby/object:Provider::Terraform::Examples
name: "notebook_runtime_basic_gpu"
primary_resource_id: "runtime_gpu"
primary_resource_name: "fmt.Sprintf(\"tf-test-notebooks-runtime-gpu%s\", context[\"random_suffix\"])"
region_override: "us-central1"
vars:
runtime_name: "notebooks-runtime-gpu"
- !ruby/object:Provider::Terraform::Examples
name: "notebook_runtime_basic_container"
primary_resource_id: "runtime_container"
primary_resource_name: "fmt.Sprintf(\"tf-test-notebooks-runtime-container%s\", context[\"random_suffix\"])"
region_override: "us-central1"
vars:
runtime_name: "notebooks-runtime-container"
- !ruby/object:Provider::Terraform::Examples
name: "notebook_runtime_kernels"
primary_resource_id: "runtime_container"
primary_resource_name: "fmt.Sprintf(\"tf-test-notebooks-runtime-container%s\", context[\"random_suffix\"])"
region_override: "us-central1"
vars:
runtime_name: "notebooks-runtime-kernel"
- !ruby/object:Provider::Terraform::Examples
name: "notebook_runtime_script"
primary_resource_id: "runtime_container"
primary_resource_name: "fmt.Sprintf(\"tf-test-notebooks-runtime-container%s\", context[\"random_suffix\"])"
region_override: "us-central1"
vars:
runtime_name: "notebooks-runtime-script"
description: |
{{description}}
~> **Note:** Due to limitations of the Notebooks Runtime API, many fields
in this resource do not properly detect drift. These fields will also not
appear in state once imported.
custom_code: !ruby/object:Provider::Terraform::CustomCode
constants: templates/terraform/constants/notebooks_runtime.go
properties:
virtualMachine.virtualMachineConfig.labels: !ruby/object:Overrides::Terraform::PropertyOverride
default_from_api: true
diff_suppress_func: NotebooksRuntimeLabelDiffSuppress
virtualMachine.virtualMachineConfig.internalIpOnly: !ruby/object:Overrides::Terraform::PropertyOverride
send_empty_value: true
virtualMachine.virtualMachineConfig.metadata: !ruby/object:Overrides::Terraform::PropertyOverride
# API returns empty value.
default_from_api: true
virtualMachine.virtualMachineConfig.tags: !ruby/object:Overrides::Terraform::PropertyOverride
# API returns empty value.
default_from_api: true
virtualMachine.virtualMachineConfig.dataDisk.initializeParams.labels: !ruby/object:Overrides::Terraform::PropertyOverride
# API returns empty value.
default_from_api: true
virtualMachine.virtualMachineConfig.containerImages: !ruby/object:Overrides::Terraform::PropertyOverride
default_from_api: true
softwareConfig: !ruby/object:Overrides::Terraform::PropertyOverride
# API returns default idleShutdown (true) and default idleShutdownTimeout (180).
default_from_api: true
update_mask_fields:
- "softwareConfig.idleShutdown"
- "softwareConfig.idleShutdownTimeout"
- "softwareConfig.customGpuDriverPath"
- "softwareConfig.postStartupScript"
Location: !ruby/object:Overrides::Terraform::ResourceOverride
properties:
name: !ruby/object:Overrides::Terraform::PropertyOverride
custom_flatten: templates/terraform/custom_flatten/name_from_self_link.erb
# This is for copying files over
files: !ruby/object:Provider::Config::Files
# These files have templating (ERB) code that will be run.
# This is usually to add licensing info, autogeneration notices, etc.
compile:
<%= lines(indent(compile('provider/terraform/product~compile.yaml'), 4)) -%>