-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Add support for google_oracle_database_cloud_exadata_infrastructure_exascale_config #18002
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
slevenick
merged 1 commit into
GoogleCloudPlatform:main
from
virgulati2003:feature/oracledatabase-exascale-config
Jun 25, 2026
+113
−0
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
79 changes: 79 additions & 0 deletions
79
mmv1/products/oracledatabase/CloudExadataInfrastructureExascaleConfig.yaml
This file contains hidden or 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,79 @@ | ||
| # Copyright 2026 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: CloudExadataInfrastructureExascaleConfig | ||
| description: | | ||
| A resource to configure Exascale storage on an Oracle Cloud Exadata Infrastructure. | ||
|
|
||
| ~> **Note:** Oracle Database @ Google Cloud does not support deconfiguring Exascale storage on an Exadata Infrastructure. | ||
| 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. | ||
| self_link: projects/{{project}}/locations/{{location}}/cloudExadataInfrastructures/{{cloud_exadata_infrastructure}} | ||
| id_format: projects/{{project}}/locations/{{location}}/cloudExadataInfrastructures/{{cloud_exadata_infrastructure}} | ||
| import_format: | ||
| - 'projects/{{project}}/locations/{{location}}/cloudExadataInfrastructures/{{cloud_exadata_infrastructure}}' | ||
| create_url: projects/{{project}}/locations/{{location}}/cloudExadataInfrastructures/{{cloud_exadata_infrastructure}}:configureExascale | ||
| create_verb: POST | ||
| immutable: true | ||
| timeouts: | ||
| insert_minutes: 120 | ||
|
|
||
| autogen_async: true | ||
| async: | ||
| actions: ['create'] | ||
| type: OpAsync | ||
| operation: | ||
| timeouts: | ||
| insert_minutes: 120 | ||
| base_url: '{{op_id}}' | ||
|
|
||
| custom_code: | ||
| custom_delete: templates/terraform/custom_delete/only_remove_from_state.go.tmpl | ||
| decoder: templates/terraform/decoders/oracledatabase_cloud_exadata_infrastructure_exascale_config.go.tmpl | ||
|
|
||
| samples: | ||
| - name: oracledatabase_cloud_exadata_infrastructure_exascale_config_basic | ||
| primary_resource_id: my_exascale_config | ||
| steps: | ||
| - name: oracledatabase_cloud_exadata_infrastructure_exascale_config_basic | ||
| resource_id_vars: | ||
| project: my-project | ||
| cloud_exadata_infrastructure_id: my-infra | ||
| deletion_protection: true | ||
| ignore_read_extra: | ||
| - deletion_protection | ||
| test_vars_overrides: | ||
| deletion_protection: "false" | ||
| project: '"oci-terraform-testing-prod"' | ||
| cloud_exadata_infrastructure_id: fmt.Sprintf("ofake-test-tf-configured-exadata-%s", acctest.RandString(t, 10)) | ||
|
|
||
| parameters: | ||
| - name: location | ||
| type: String | ||
| required: true | ||
| immutable: true | ||
| url_param_only: true | ||
| - name: cloudExadataInfrastructure | ||
| type: ResourceRef | ||
| required: true | ||
| immutable: true | ||
| url_param_only: true | ||
| resource: CloudExadataInfrastructure | ||
| imports: name | ||
|
|
||
| properties: | ||
| - name: totalStorageSizeGb | ||
| type: Integer | ||
| required: true | ||
| immutable: true | ||
| description: "The total storage to be allocated to Exascale in GBs." | ||
13 changes: 13 additions & 0 deletions
13
...es/terraform/decoders/oracledatabase_cloud_exadata_infrastructure_exascale_config.go.tmpl
This file contains hidden or 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,13 @@ | ||
| properties, ok := res["properties"].(map[string]interface{}) | ||
| if !ok || properties == nil { | ||
| return nil, fmt.Errorf("properties not found in response") | ||
| } | ||
|
|
||
| exascaleConfig, ok := properties["exascaleConfig"].(map[string]interface{}) | ||
| if !ok || exascaleConfig == nil { | ||
| return nil, nil | ||
| } | ||
|
|
||
| res["totalStorageSizeGb"] = exascaleConfig["totalStorageSizeGb"] | ||
|
|
||
| return res, nil |
21 changes: 21 additions & 0 deletions
21
.../oracledatabase/oracledatabase_cloud_exadata_infrastructure_exascale_config_basic.tf.tmpl
This file contains hidden or 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,21 @@ | ||
| resource "google_oracle_database_cloud_exadata_infrastructure" "infra" { | ||
| cloud_exadata_infrastructure_id = "{{index $.ResourceIdVars "cloud_exadata_infrastructure_id"}}" | ||
| display_name = "{{index $.ResourceIdVars "cloud_exadata_infrastructure_id"}} displayname" | ||
| location = "us-east4" | ||
| project = "{{index $.ResourceIdVars "project"}}" | ||
|
|
||
| properties { | ||
| shape = "Exadata.X9M" | ||
| compute_count = "2" | ||
| storage_count = "3" | ||
| } | ||
|
|
||
| deletion_protection = "{{index $.ResourceIdVars "deletion_protection"}}" | ||
| } | ||
|
|
||
| resource "google_oracle_database_cloud_exadata_infrastructure_exascale_config" "{{$.PrimaryResourceId}}" { | ||
| cloud_exadata_infrastructure = google_oracle_database_cloud_exadata_infrastructure.infra.cloud_exadata_infrastructure_id | ||
| location = "us-east4" | ||
| project = "{{index $.ResourceIdVars "project"}}" | ||
| total_storage_size_gb = 10240 | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to "delete" or reset the value to default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oracle currently doesn't provide functionality to deconfigure exascale storage on an exadata infrastructure. Since the api does not support deletion/reset for Exascale configurations, which is why only_remove_from_state is used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a note to that effect in the description of the resource? Just to make sure people know that deleting this resource doesn't actually change or remove the exascale config