forked from GoogleCloudPlatform/magic-modules
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: Add google_oracle_database_cloud_exadata_infrastructure resource (
GoogleCloudPlatform#11879) Co-authored-by: Thomas Rodgers <[email protected]>
- Loading branch information
1 parent
765b5e3
commit 577cf5d
Showing
6 changed files
with
369 additions
and
0 deletions.
There are no files selected for viewing
296 changes: 296 additions & 0 deletions
296
mmv1/products/oracledatabase/CloudExadataInfrastructure.yaml
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 |
---|---|---|
@@ -0,0 +1,296 @@ | ||
# Copyright 2024 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. | ||
--- | ||
name: 'CloudExadataInfrastructure' | ||
description: A CloudExadataInfrastructure resource. | ||
references: | ||
guides: | ||
'Create Exadata Infrastructure instances': 'https://cloud.google.com/oracle/database/docs/create-instances' | ||
api: 'https://cloud.google.com/oracle/database/docs/reference/rest/v1/projects.locations.cloudExadataInfrastructures' | ||
docs: | ||
id_format: 'projects/{{project}}/locations/{{location}}/cloudExadataInfrastructures/{{cloud_exadata_infrastructure_id}}' | ||
base_url: 'projects/{{project}}/locations/{{location}}/cloudExadataInfrastructures' | ||
self_link: 'projects/{{project}}/locations/{{location}}/cloudExadataInfrastructures/{{cloud_exadata_infrastructure_id}}' | ||
create_url: 'projects/{{project}}/locations/{{location}}/cloudExadataInfrastructures?cloudExadataInfrastructureId={{cloud_exadata_infrastructure_id}}' | ||
immutable: true | ||
import_format: | ||
- 'projects/{{project}}/locations/{{location}}/cloudExadataInfrastructures/{{cloud_exadata_infrastructure_id}}' | ||
timeouts: | ||
insert_minutes: 240 | ||
update_minutes: 120 | ||
delete_minutes: 120 | ||
autogen_async: true | ||
async: | ||
actions: ['create', 'delete', 'update'] | ||
type: 'OpAsync' | ||
operation: | ||
base_url: '{{op_id}}' | ||
path: 'name' | ||
wait_ms: 1000 | ||
timeouts: | ||
insert_minutes: 240 | ||
update_minutes: 120 | ||
delete_minutes: 120 | ||
result: | ||
path: 'response' | ||
resource_inside_response: true | ||
error: | ||
path: 'error' | ||
message: 'message' | ||
custom_code: | ||
examples: | ||
- name: 'oracledatabase_cloud_exadata_infrastructure_basic' | ||
primary_resource_id: 'my-cloud-exadata' | ||
vars: | ||
project: 'my-project' | ||
test_vars_overrides: | ||
'project': '"oci-terraform-testing"' | ||
- name: 'oracledatabase_cloud_exadata_infrastructure_full' | ||
primary_resource_id: 'my-cloud-exadata' | ||
vars: | ||
project: 'my-project' | ||
test_vars_overrides: | ||
'project': '"oci-terraform-testing"' | ||
parameters: | ||
- name: 'location' | ||
type: String | ||
description: 'Resource ID segment making up resource `name`. See documentation | ||
for resource type `oracledatabase.googleapis.com/DbServer`. ' | ||
url_param_only: true | ||
required: true | ||
immutable: true | ||
- name: 'cloudExadataInfrastructureId' | ||
type: String | ||
description: "The ID of the Exadata Infrastructure to create. This value | ||
is restricted\nto (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$) and must be a maximum of | ||
63\ncharacters in length. The value must start with a letter and end with\na letter | ||
or a number. " | ||
url_param_only: true | ||
required: true | ||
immutable: true | ||
properties: | ||
- name: 'name' | ||
type: String | ||
description: "Identifier. The name of the Exadata Infrastructure resource with the | ||
following format:\nprojects/{project}/locations/{region}/cloudExadataInfrastructures/{cloud_exadata_infrastructure} " | ||
output: true | ||
- name: 'displayName' | ||
type: String | ||
description: 'User friendly name for this resource. ' | ||
- name: 'gcpOracleZone' | ||
type: String | ||
description: 'GCP location where Oracle Exadata is hosted. ' | ||
default_from_api: true | ||
- name: 'entitlementId' | ||
type: String | ||
description: "Entitlement ID of the private offer against which this | ||
infrastructure\nresource is provisioned. " | ||
output: true | ||
- name: 'properties' | ||
type: NestedObject | ||
description: 'Various properties of Exadata Infrastructure. ' | ||
properties: | ||
- name: 'ocid' | ||
type: String | ||
description: "OCID of created infra.\nhttps://docs.oracle.com/en-us/iaas/Content/General/Concepts/identifiers.htm#Oracle " | ||
output: true | ||
- name: 'computeCount' | ||
type: Integer | ||
description: 'The number of compute servers for the Exadata Infrastructure. ' | ||
- name: 'storageCount' | ||
type: Integer | ||
description: 'The number of Cloud Exadata storage servers for the Exadata | ||
Infrastructure. ' | ||
- name: 'totalStorageSizeGb' | ||
type: Integer | ||
description: "The total storage allocated to the Exadata Infrastructure\nresource, | ||
in gigabytes (GB). " | ||
default_from_api: true | ||
- name: 'availableStorageSizeGb' | ||
type: Integer | ||
description: "The available storage can be allocated to the Exadata | ||
Infrastructure\nresource, in gigabytes (GB). " | ||
output: true | ||
- name: 'maintenanceWindow' | ||
type: NestedObject | ||
description: "Maintenance window as defined by Oracle.\nhttps://docs.oracle.com/en-us/iaas/api/#/en/database/20160918/datatypes/MaintenanceWindow " | ||
default_from_api: true | ||
properties: | ||
- name: 'preference' | ||
type: String | ||
description: "The maintenance window scheduling preference. \n | ||
Possible values:\n MAINTENANCE_WINDOW_PREFERENCE_UNSPECIFIED\nCUSTOM_PREFERENCE\nNO_PREFERENCE" | ||
default_from_api: true | ||
- name: 'months' | ||
type: Array | ||
description: 'Months during the year when maintenance should be performed. ' | ||
default_from_api: true | ||
item_type: | ||
type: String | ||
- name: 'weeksOfMonth' | ||
type: Array | ||
description: "Weeks during the month when maintenance should be performed. | ||
Weeks start on\nthe 1st, 8th, 15th, and 22nd days of the month, and have a | ||
duration of 7\ndays. Weeks start and end based on calendar dates, not days | ||
of the week. " | ||
default_from_api: true | ||
item_type: | ||
type: Integer | ||
- name: 'daysOfWeek' | ||
type: Array | ||
description: 'Days during the week when maintenance should be performed. ' | ||
default_from_api: true | ||
item_type: | ||
type: String | ||
- name: 'hoursOfDay' | ||
type: Array | ||
description: "The window of hours during the day when maintenance | ||
should be performed.\nThe window is a 4 hour slot. Valid values are:\n 0 | ||
- represents time slot 0:00 - 3:59 UTC\n 4 - represents time slot 4:00 - | ||
7:59 UTC\n 8 - represents time slot 8:00 - 11:59 UTC\n 12 - represents time | ||
slot 12:00 - 15:59 UTC\n 16 - represents time slot 16:00 - 19:59 UTC\n 20 | ||
- represents time slot 20:00 - 23:59 UTC " | ||
default_from_api: true | ||
item_type: | ||
type: Integer | ||
- name: 'leadTimeWeek' | ||
type: Integer | ||
description: "Lead time window allows user to set a lead time to prepare | ||
for a down time.\nThe lead time is in weeks and valid value is between 1 to | ||
4. " | ||
default_from_api: true | ||
- name: 'patchingMode' | ||
type: String | ||
description: "Cloud CloudExadataInfrastructure node patching method, | ||
either \"ROLLING\"\n or \"NONROLLING\". Default value is ROLLING. \n | ||
Possible values:\n PATCHING_MODE_UNSPECIFIED\nROLLING\nNON_ROLLING" | ||
default_from_api: true | ||
- name: 'customActionTimeoutMins' | ||
type: Integer | ||
description: "Determines the amount of time the system will wait before | ||
the start of each\ndatabase server patching operation. Custom action timeout | ||
is in minutes and\nvalid value is between 15 to 120 (inclusive). " | ||
default_from_api: true | ||
- name: 'isCustomActionTimeoutEnabled' | ||
type: Boolean | ||
description: "If true, enables the configuration of a custom action | ||
timeout (waiting\nperiod) between database server patching operations. " | ||
default_from_api: true | ||
- name: 'state' | ||
type: String | ||
description: "The current lifecycle state of the Exadata Infrastructure. | ||
\n Possible values:\n STATE_UNSPECIFIED\nPROVISIONING\nAVAILABLE\nUPDATING\nTERMINATING\nTERMINATED\nFAILED\nMAINTENANCE_IN_PROGRESS" | ||
output: true | ||
- name: 'shape' | ||
type: String | ||
description: "The shape of the Exadata Infrastructure. The shape determines | ||
the\namount of CPU, storage, and memory resources allocated to the instance. " | ||
required: true | ||
- name: 'ociUrl' | ||
type: String | ||
description: 'Deep link to the OCI console to view this resource. ' | ||
output: true | ||
- name: 'cpuCount' | ||
type: Integer | ||
description: 'The number of enabled CPU cores. ' | ||
output: true | ||
- name: 'maxCpuCount' | ||
type: Integer | ||
description: 'The total number of CPU cores available. ' | ||
output: true | ||
- name: 'memorySizeGb' | ||
type: Integer | ||
description: 'The memory allocated in GBs. ' | ||
output: true | ||
- name: 'maxMemoryGb' | ||
type: Integer | ||
description: 'The total memory available in GBs. ' | ||
output: true | ||
- name: 'dbNodeStorageSizeGb' | ||
type: Integer | ||
description: 'The local node storage allocated in GBs. ' | ||
output: true | ||
- name: 'maxDbNodeStorageSizeGb' | ||
type: Integer | ||
description: 'The total local node storage available in GBs. ' | ||
output: true | ||
- name: 'dataStorageSizeTb' | ||
type: Double | ||
description: 'Size, in terabytes, of the DATA disk group. ' | ||
output: true | ||
- name: 'maxDataStorageTb' | ||
type: Double | ||
description: 'The total available DATA disk group size. ' | ||
output: true | ||
- name: 'activatedStorageCount' | ||
type: Integer | ||
description: "The requested number of additional storage servers | ||
activated for the\nExadata Infrastructure. " | ||
output: true | ||
- name: 'additionalStorageCount' | ||
type: Integer | ||
description: "The requested number of additional storage servers | ||
for the Exadata\nInfrastructure. " | ||
output: true | ||
- name: 'dbServerVersion' | ||
type: String | ||
description: "The software version of the database servers (dom0) | ||
in the Exadata\nInfrastructure. " | ||
output: true | ||
- name: 'storageServerVersion' | ||
type: String | ||
description: "The software version of the storage servers (cells) | ||
in the Exadata\nInfrastructure. " | ||
output: true | ||
- name: 'nextMaintenanceRunId' | ||
type: String | ||
description: 'The OCID of the next maintenance run. ' | ||
output: true | ||
- name: 'nextMaintenanceRunTime' | ||
type: String | ||
description: 'The time when the next maintenance run will occur. ' | ||
output: true | ||
- name: 'nextSecurityMaintenanceRunTime' | ||
type: String | ||
description: 'The time when the next security maintenance run will | ||
occur. ' | ||
output: true | ||
- name: 'customerContacts' | ||
type: Array | ||
description: 'The list of customer contacts. ' | ||
item_type: | ||
type: NestedObject | ||
properties: | ||
- name: 'email' | ||
type: String | ||
description: "The email address used by Oracle to send notifications | ||
regarding databases\nand infrastructure. " | ||
required: true | ||
- name: 'monthlyStorageServerVersion' | ||
type: String | ||
description: "The monthly software version of the storage servers | ||
(cells)\nin the Exadata Infrastructure. Example: 20.1.15 " | ||
output: true | ||
- name: 'monthlyDbServerVersion' | ||
type: String | ||
description: "The monthly software version of the database servers | ||
(dom0)\nin the Exadata Infrastructure. Example: 20.1.15 " | ||
output: true | ||
- name: 'labels' | ||
type: KeyValueLabels | ||
description: 'Labels or tags associated with the resource. ' | ||
- name: 'createTime' | ||
type: String | ||
description: 'The date and time that the Exadata Infrastructure was | ||
created. ' | ||
output: true |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Copyright 2024 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. | ||
--- | ||
name: 'OracleDatabase' | ||
display_name: 'OracleDatabase' | ||
versions: | ||
- name: 'ga' | ||
base_url: 'https://oracledatabase.googleapis.com/v1/' | ||
- name: 'beta' | ||
base_url: 'https://oracledatabase.googleapis.com/v1/' | ||
scopes: | ||
- 'https://www.googleapis.com/auth/cloud-platform' |
11 changes: 11 additions & 0 deletions
11
mmv1/templates/terraform/examples/oracledatabase_cloud_exadata_infrastructure_basic.tf.tmpl
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
resource "google_oracle_database_cloud_exadata_infrastructure" "{{$.PrimaryResourceId}}"{ | ||
display_name = "OFake exadata displayname" | ||
cloud_exadata_infrastructure_id = "ofake-exadata" | ||
location = "us-east4" | ||
project = "{{index $.Vars "project"}}" | ||
properties { | ||
shape = "Exadata.X9M" | ||
compute_count= "2" | ||
storage_count= "3" | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
mmv1/templates/terraform/examples/oracledatabase_cloud_exadata_infrastructure_full.tf.tmpl
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
resource "google_oracle_database_cloud_exadata_infrastructure" "{{$.PrimaryResourceId}}"{ | ||
display_name = "OFake exadata displayname" | ||
cloud_exadata_infrastructure_id = "ofake-exadata-id" | ||
location = "us-east4" | ||
project = "{{index $.Vars "project"}}" | ||
gcp_oracle_zone = "us-east4-b-r1" | ||
properties { | ||
shape = "Exadata.X9M" | ||
compute_count= "2" | ||
storage_count= "3" | ||
customer_contacts { | ||
email = "[email protected]" | ||
} | ||
maintenance_window { | ||
custom_action_timeout_mins = "20" | ||
days_of_week = ["SUNDAY"] | ||
hours_of_day = [4] | ||
is_custom_action_timeout_enabled = "0" | ||
lead_time_week = "1" | ||
months = ["JANUARY","APRIL","MAY","OCTOBER"] | ||
patching_mode = "ROLLING" | ||
preference = "CUSTOM_PREFERENCE" | ||
weeks_of_month = [4] | ||
} | ||
total_storage_size_gb = "196608" | ||
} | ||
labels = { | ||
"label-one" = "value-one" | ||
} | ||
} |
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