Skip to content

Commit fdf73a1

Browse files
Add support for google_oracle_database_cloud_exadata_infrastructure_exascale_config (#18002)
1 parent 6b79045 commit fdf73a1

3 files changed

Lines changed: 113 additions & 0 deletions

File tree

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# Copyright 2026 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+
---
15+
name: CloudExadataInfrastructureExascaleConfig
16+
description: |
17+
A resource to configure Exascale storage on an Oracle Cloud Exadata Infrastructure.
18+
19+
~> **Note:** Oracle Database @ Google Cloud does not support deconfiguring Exascale storage on an Exadata Infrastructure.
20+
Deleting this resource from Terraform state will only remove it from Terraform management; it will not delete or reset the Exascale configuration on the actual Exadata Infrastructure.
21+
self_link: projects/{{project}}/locations/{{location}}/cloudExadataInfrastructures/{{cloud_exadata_infrastructure}}
22+
id_format: projects/{{project}}/locations/{{location}}/cloudExadataInfrastructures/{{cloud_exadata_infrastructure}}
23+
import_format:
24+
- 'projects/{{project}}/locations/{{location}}/cloudExadataInfrastructures/{{cloud_exadata_infrastructure}}'
25+
create_url: projects/{{project}}/locations/{{location}}/cloudExadataInfrastructures/{{cloud_exadata_infrastructure}}:configureExascale
26+
create_verb: POST
27+
immutable: true
28+
timeouts:
29+
insert_minutes: 120
30+
31+
autogen_async: true
32+
async:
33+
actions: ['create']
34+
type: OpAsync
35+
operation:
36+
timeouts:
37+
insert_minutes: 120
38+
base_url: '{{op_id}}'
39+
40+
custom_code:
41+
custom_delete: templates/terraform/custom_delete/only_remove_from_state.go.tmpl
42+
decoder: templates/terraform/decoders/oracledatabase_cloud_exadata_infrastructure_exascale_config.go.tmpl
43+
44+
samples:
45+
- name: oracledatabase_cloud_exadata_infrastructure_exascale_config_basic
46+
primary_resource_id: my_exascale_config
47+
steps:
48+
- name: oracledatabase_cloud_exadata_infrastructure_exascale_config_basic
49+
resource_id_vars:
50+
project: my-project
51+
cloud_exadata_infrastructure_id: my-infra
52+
deletion_protection: true
53+
ignore_read_extra:
54+
- deletion_protection
55+
test_vars_overrides:
56+
deletion_protection: "false"
57+
project: '"oci-terraform-testing-prod"'
58+
cloud_exadata_infrastructure_id: fmt.Sprintf("ofake-test-tf-configured-exadata-%s", acctest.RandString(t, 10))
59+
60+
parameters:
61+
- name: location
62+
type: String
63+
required: true
64+
immutable: true
65+
url_param_only: true
66+
- name: cloudExadataInfrastructure
67+
type: ResourceRef
68+
required: true
69+
immutable: true
70+
url_param_only: true
71+
resource: CloudExadataInfrastructure
72+
imports: name
73+
74+
properties:
75+
- name: totalStorageSizeGb
76+
type: Integer
77+
required: true
78+
immutable: true
79+
description: "The total storage to be allocated to Exascale in GBs."
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
properties, ok := res["properties"].(map[string]interface{})
2+
if !ok || properties == nil {
3+
return nil, fmt.Errorf("properties not found in response")
4+
}
5+
6+
exascaleConfig, ok := properties["exascaleConfig"].(map[string]interface{})
7+
if !ok || exascaleConfig == nil {
8+
return nil, nil
9+
}
10+
11+
res["totalStorageSizeGb"] = exascaleConfig["totalStorageSizeGb"]
12+
13+
return res, nil
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
resource "google_oracle_database_cloud_exadata_infrastructure" "infra" {
2+
cloud_exadata_infrastructure_id = "{{index $.ResourceIdVars "cloud_exadata_infrastructure_id"}}"
3+
display_name = "{{index $.ResourceIdVars "cloud_exadata_infrastructure_id"}} displayname"
4+
location = "us-east4"
5+
project = "{{index $.ResourceIdVars "project"}}"
6+
7+
properties {
8+
shape = "Exadata.X9M"
9+
compute_count = "2"
10+
storage_count = "3"
11+
}
12+
13+
deletion_protection = "{{index $.ResourceIdVars "deletion_protection"}}"
14+
}
15+
16+
resource "google_oracle_database_cloud_exadata_infrastructure_exascale_config" "{{$.PrimaryResourceId}}" {
17+
cloud_exadata_infrastructure = google_oracle_database_cloud_exadata_infrastructure.infra.cloud_exadata_infrastructure_id
18+
location = "us-east4"
19+
project = "{{index $.ResourceIdVars "project"}}"
20+
total_storage_size_gb = 10240
21+
}

0 commit comments

Comments
 (0)