Skip to content

Commit 58f639a

Browse files
tulika-aakrititrodge
authored andcommitted
Feat: Add google_oracle_database_cloud_exadata_infrastructure resource (GoogleCloudPlatform#11879)
Co-authored-by: Thomas Rodgers <[email protected]>
1 parent 68e835d commit 58f639a

File tree

6 files changed

+369
-0
lines changed

6 files changed

+369
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,296 @@
1+
# Copyright 2024 Google Inc.
2+
# Licensed under the Apache License, Version 2.0 (the "License");
3+
# you may not use this file except in compliance with the License.
4+
# You may obtain a copy of the License at
5+
#
6+
# http://www.apache.org/licenses/LICENSE-2.0
7+
#
8+
# Unless required by applicable law or agreed to in writing, software
9+
# distributed under the License is distributed on an "AS IS" BASIS,
10+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
# See the License for the specific language governing permissions and
12+
# limitations under the License.
13+
---
14+
name: 'CloudExadataInfrastructure'
15+
description: A CloudExadataInfrastructure resource.
16+
references:
17+
guides:
18+
'Create Exadata Infrastructure instances': 'https://cloud.google.com/oracle/database/docs/create-instances'
19+
api: 'https://cloud.google.com/oracle/database/docs/reference/rest/v1/projects.locations.cloudExadataInfrastructures'
20+
docs:
21+
id_format: 'projects/{{project}}/locations/{{location}}/cloudExadataInfrastructures/{{cloud_exadata_infrastructure_id}}'
22+
base_url: 'projects/{{project}}/locations/{{location}}/cloudExadataInfrastructures'
23+
self_link: 'projects/{{project}}/locations/{{location}}/cloudExadataInfrastructures/{{cloud_exadata_infrastructure_id}}'
24+
create_url: 'projects/{{project}}/locations/{{location}}/cloudExadataInfrastructures?cloudExadataInfrastructureId={{cloud_exadata_infrastructure_id}}'
25+
immutable: true
26+
import_format:
27+
- 'projects/{{project}}/locations/{{location}}/cloudExadataInfrastructures/{{cloud_exadata_infrastructure_id}}'
28+
timeouts:
29+
insert_minutes: 240
30+
update_minutes: 120
31+
delete_minutes: 120
32+
autogen_async: true
33+
async:
34+
actions: ['create', 'delete', 'update']
35+
type: 'OpAsync'
36+
operation:
37+
base_url: '{{op_id}}'
38+
path: 'name'
39+
wait_ms: 1000
40+
timeouts:
41+
insert_minutes: 240
42+
update_minutes: 120
43+
delete_minutes: 120
44+
result:
45+
path: 'response'
46+
resource_inside_response: true
47+
error:
48+
path: 'error'
49+
message: 'message'
50+
custom_code:
51+
examples:
52+
- name: 'oracledatabase_cloud_exadata_infrastructure_basic'
53+
primary_resource_id: 'my-cloud-exadata'
54+
vars:
55+
project: 'my-project'
56+
test_vars_overrides:
57+
'project': '"oci-terraform-testing"'
58+
- name: 'oracledatabase_cloud_exadata_infrastructure_full'
59+
primary_resource_id: 'my-cloud-exadata'
60+
vars:
61+
project: 'my-project'
62+
test_vars_overrides:
63+
'project': '"oci-terraform-testing"'
64+
parameters:
65+
- name: 'location'
66+
type: String
67+
description: 'Resource ID segment making up resource `name`. See documentation
68+
for resource type `oracledatabase.googleapis.com/DbServer`. '
69+
url_param_only: true
70+
required: true
71+
immutable: true
72+
- name: 'cloudExadataInfrastructureId'
73+
type: String
74+
description: "The ID of the Exadata Infrastructure to create. This value
75+
is restricted\nto (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$) and must be a maximum of
76+
63\ncharacters in length. The value must start with a letter and end with\na letter
77+
or a number. "
78+
url_param_only: true
79+
required: true
80+
immutable: true
81+
properties:
82+
- name: 'name'
83+
type: String
84+
description: "Identifier. The name of the Exadata Infrastructure resource with the
85+
following format:\nprojects/{project}/locations/{region}/cloudExadataInfrastructures/{cloud_exadata_infrastructure} "
86+
output: true
87+
- name: 'displayName'
88+
type: String
89+
description: 'User friendly name for this resource. '
90+
- name: 'gcpOracleZone'
91+
type: String
92+
description: 'GCP location where Oracle Exadata is hosted. '
93+
default_from_api: true
94+
- name: 'entitlementId'
95+
type: String
96+
description: "Entitlement ID of the private offer against which this
97+
infrastructure\nresource is provisioned. "
98+
output: true
99+
- name: 'properties'
100+
type: NestedObject
101+
description: 'Various properties of Exadata Infrastructure. '
102+
properties:
103+
- name: 'ocid'
104+
type: String
105+
description: "OCID of created infra.\nhttps://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm#Oracle "
106+
output: true
107+
- name: 'computeCount'
108+
type: Integer
109+
description: 'The number of compute servers for the Exadata Infrastructure. '
110+
- name: 'storageCount'
111+
type: Integer
112+
description: 'The number of Cloud Exadata storage servers for the Exadata
113+
Infrastructure. '
114+
- name: 'totalStorageSizeGb'
115+
type: Integer
116+
description: "The total storage allocated to the Exadata Infrastructure\nresource,
117+
in gigabytes (GB). "
118+
default_from_api: true
119+
- name: 'availableStorageSizeGb'
120+
type: Integer
121+
description: "The available storage can be allocated to the Exadata
122+
Infrastructure\nresource, in gigabytes (GB). "
123+
output: true
124+
- name: 'maintenanceWindow'
125+
type: NestedObject
126+
description: "Maintenance window as defined by Oracle.\nhttps://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/datatypes/MaintenanceWindow "
127+
default_from_api: true
128+
properties:
129+
- name: 'preference'
130+
type: String
131+
description: "The maintenance window scheduling preference. \n
132+
Possible values:\n MAINTENANCE_WINDOW_PREFERENCE_UNSPECIFIED\nCUSTOM_PREFERENCE\nNO_PREFERENCE"
133+
default_from_api: true
134+
- name: 'months'
135+
type: Array
136+
description: 'Months during the year when maintenance should be performed. '
137+
default_from_api: true
138+
item_type:
139+
type: String
140+
- name: 'weeksOfMonth'
141+
type: Array
142+
description: "Weeks during the month when maintenance should be performed.
143+
Weeks start on\nthe 1st, 8th, 15th, and 22nd days of the month, and have a
144+
duration of 7\ndays. Weeks start and end based on calendar dates, not days
145+
of the week. "
146+
default_from_api: true
147+
item_type:
148+
type: Integer
149+
- name: 'daysOfWeek'
150+
type: Array
151+
description: 'Days during the week when maintenance should be performed. '
152+
default_from_api: true
153+
item_type:
154+
type: String
155+
- name: 'hoursOfDay'
156+
type: Array
157+
description: "The window of hours during the day when maintenance
158+
should be performed.\nThe window is a 4 hour slot. Valid values are:\n 0
159+
- represents time slot 0:00 - 3:59 UTC\n 4 - represents time slot 4:00 -
160+
7:59 UTC\n 8 - represents time slot 8:00 - 11:59 UTC\n 12 - represents time
161+
slot 12:00 - 15:59 UTC\n 16 - represents time slot 16:00 - 19:59 UTC\n 20
162+
- represents time slot 20:00 - 23:59 UTC "
163+
default_from_api: true
164+
item_type:
165+
type: Integer
166+
- name: 'leadTimeWeek'
167+
type: Integer
168+
description: "Lead time window allows user to set a lead time to prepare
169+
for a down time.\nThe lead time is in weeks and valid value is between 1 to
170+
4. "
171+
default_from_api: true
172+
- name: 'patchingMode'
173+
type: String
174+
description: "Cloud CloudExadataInfrastructure node patching method,
175+
either \"ROLLING\"\n or \"NONROLLING\". Default value is ROLLING. \n
176+
Possible values:\n PATCHING_MODE_UNSPECIFIED\nROLLING\nNON_ROLLING"
177+
default_from_api: true
178+
- name: 'customActionTimeoutMins'
179+
type: Integer
180+
description: "Determines the amount of time the system will wait before
181+
the start of each\ndatabase server patching operation. Custom action timeout
182+
is in minutes and\nvalid value is between 15 to 120 (inclusive). "
183+
default_from_api: true
184+
- name: 'isCustomActionTimeoutEnabled'
185+
type: Boolean
186+
description: "If true, enables the configuration of a custom action
187+
timeout (waiting\nperiod) between database server patching operations. "
188+
default_from_api: true
189+
- name: 'state'
190+
type: String
191+
description: "The current lifecycle state of the Exadata Infrastructure.
192+
\n Possible values:\n STATE_UNSPECIFIED\nPROVISIONING\nAVAILABLE\nUPDATING\nTERMINATING\nTERMINATED\nFAILED\nMAINTENANCE_IN_PROGRESS"
193+
output: true
194+
- name: 'shape'
195+
type: String
196+
description: "The shape of the Exadata Infrastructure. The shape determines
197+
the\namount of CPU, storage, and memory resources allocated to the instance. "
198+
required: true
199+
- name: 'ociUrl'
200+
type: String
201+
description: 'Deep link to the OCI console to view this resource. '
202+
output: true
203+
- name: 'cpuCount'
204+
type: Integer
205+
description: 'The number of enabled CPU cores. '
206+
output: true
207+
- name: 'maxCpuCount'
208+
type: Integer
209+
description: 'The total number of CPU cores available. '
210+
output: true
211+
- name: 'memorySizeGb'
212+
type: Integer
213+
description: 'The memory allocated in GBs. '
214+
output: true
215+
- name: 'maxMemoryGb'
216+
type: Integer
217+
description: 'The total memory available in GBs. '
218+
output: true
219+
- name: 'dbNodeStorageSizeGb'
220+
type: Integer
221+
description: 'The local node storage allocated in GBs. '
222+
output: true
223+
- name: 'maxDbNodeStorageSizeGb'
224+
type: Integer
225+
description: 'The total local node storage available in GBs. '
226+
output: true
227+
- name: 'dataStorageSizeTb'
228+
type: Double
229+
description: 'Size, in terabytes, of the DATA disk group. '
230+
output: true
231+
- name: 'maxDataStorageTb'
232+
type: Double
233+
description: 'The total available DATA disk group size. '
234+
output: true
235+
- name: 'activatedStorageCount'
236+
type: Integer
237+
description: "The requested number of additional storage servers
238+
activated for the\nExadata Infrastructure. "
239+
output: true
240+
- name: 'additionalStorageCount'
241+
type: Integer
242+
description: "The requested number of additional storage servers
243+
for the Exadata\nInfrastructure. "
244+
output: true
245+
- name: 'dbServerVersion'
246+
type: String
247+
description: "The software version of the database servers (dom0)
248+
in the Exadata\nInfrastructure. "
249+
output: true
250+
- name: 'storageServerVersion'
251+
type: String
252+
description: "The software version of the storage servers (cells)
253+
in the Exadata\nInfrastructure. "
254+
output: true
255+
- name: 'nextMaintenanceRunId'
256+
type: String
257+
description: 'The OCID of the next maintenance run. '
258+
output: true
259+
- name: 'nextMaintenanceRunTime'
260+
type: String
261+
description: 'The time when the next maintenance run will occur. '
262+
output: true
263+
- name: 'nextSecurityMaintenanceRunTime'
264+
type: String
265+
description: 'The time when the next security maintenance run will
266+
occur. '
267+
output: true
268+
- name: 'customerContacts'
269+
type: Array
270+
description: 'The list of customer contacts. '
271+
item_type:
272+
type: NestedObject
273+
properties:
274+
- name: 'email'
275+
type: String
276+
description: "The email address used by Oracle to send notifications
277+
regarding databases\nand infrastructure. "
278+
required: true
279+
- name: 'monthlyStorageServerVersion'
280+
type: String
281+
description: "The monthly software version of the storage servers
282+
(cells)\nin the Exadata Infrastructure. Example: 20.1.15 "
283+
output: true
284+
- name: 'monthlyDbServerVersion'
285+
type: String
286+
description: "The monthly software version of the database servers
287+
(dom0)\nin the Exadata Infrastructure. Example: 20.1.15 "
288+
output: true
289+
- name: 'labels'
290+
type: KeyValueLabels
291+
description: 'Labels or tags associated with the resource. '
292+
- name: 'createTime'
293+
type: String
294+
description: 'The date and time that the Exadata Infrastructure was
295+
created. '
296+
output: true
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Copyright 2024 Google Inc.
2+
# Licensed under the Apache License, Version 2.0 (the "License");
3+
# you may not use this file except in compliance with the License.
4+
# You may obtain a copy of the License at
5+
#
6+
# http://www.apache.org/licenses/LICENSE-2.0
7+
#
8+
# Unless required by applicable law or agreed to in writing, software
9+
# distributed under the License is distributed on an "AS IS" BASIS,
10+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
# See the License for the specific language governing permissions and
12+
# limitations under the License.
13+
---
14+
name: 'OracleDatabase'
15+
display_name: 'OracleDatabase'
16+
versions:
17+
- name: 'ga'
18+
base_url: 'https://oracledatabase.googleapis.com/v1/'
19+
- name: 'beta'
20+
base_url: 'https://oracledatabase.googleapis.com/v1/'
21+
scopes:
22+
- 'https://www.googleapis.com/auth/cloud-platform'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
resource "google_oracle_database_cloud_exadata_infrastructure" "{{$.PrimaryResourceId}}"{
2+
display_name = "OFake exadata displayname"
3+
cloud_exadata_infrastructure_id = "ofake-exadata"
4+
location = "us-east4"
5+
project = "{{index $.Vars "project"}}"
6+
properties {
7+
shape = "Exadata.X9M"
8+
compute_count= "2"
9+
storage_count= "3"
10+
}
11+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
resource "google_oracle_database_cloud_exadata_infrastructure" "{{$.PrimaryResourceId}}"{
2+
display_name = "OFake exadata displayname"
3+
cloud_exadata_infrastructure_id = "ofake-exadata-id"
4+
location = "us-east4"
5+
project = "{{index $.Vars "project"}}"
6+
gcp_oracle_zone = "us-east4-b-r1"
7+
properties {
8+
shape = "Exadata.X9M"
9+
compute_count= "2"
10+
storage_count= "3"
11+
customer_contacts {
12+
13+
}
14+
maintenance_window {
15+
custom_action_timeout_mins = "20"
16+
days_of_week = ["SUNDAY"]
17+
hours_of_day = [4]
18+
is_custom_action_timeout_enabled = "0"
19+
lead_time_week = "1"
20+
months = ["JANUARY","APRIL","MAY","OCTOBER"]
21+
patching_mode = "ROLLING"
22+
preference = "CUSTOM_PREFERENCE"
23+
weeks_of_month = [4]
24+
}
25+
total_storage_size_gb = "196608"
26+
}
27+
labels = {
28+
"label-one" = "value-one"
29+
}
30+
}

mmv1/third_party/terraform/.teamcity/components/inputs/services_beta.kt

+5
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,11 @@ var ServicesListBeta = mapOf(
546546
"displayName" to "Notebooks",
547547
"path" to "./google-beta/services/notebooks"
548548
),
549+
"oracledatabase" to mapOf(
550+
"name" to "oracledatabase",
551+
"displayName" to "OracleDatabase",
552+
"path" to "./google-beta/services/oracledatabase"
553+
),
549554
"orgpolicy" to mapOf(
550555
"name" to "orgpolicy",
551556
"displayName" to "Orgpolicy",

mmv1/third_party/terraform/.teamcity/components/inputs/services_ga.kt

+5
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,11 @@ var ServicesListGa = mapOf(
541541
"displayName" to "Notebooks",
542542
"path" to "./google/services/notebooks"
543543
),
544+
"oracledatabase" to mapOf(
545+
"name" to "oracledatabase",
546+
"displayName" to "OracleDatabase",
547+
"path" to "./google/services/oracledatabase"
548+
),
544549
"orgpolicy" to mapOf(
545550
"name" to "orgpolicy",
546551
"displayName" to "Orgpolicy",

0 commit comments

Comments
 (0)