Skip to content

Commit 81568cf

Browse files
Terraform Team Automationvsin12
authored andcommitted
Added - Support for ExaCS Private DNS Integration
1 parent 95e7adc commit 81568cf

19 files changed

+167
-50
lines changed

examples/database/db_systems/db_exacs/datasources.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ data "oci_database_cloud_vm_cluster_iorm_config" "test_cloud_vm_cluster_iorm_con
2020
cloud_vm_cluster_id = oci_database_cloud_vm_cluster_iorm_config.test_cloud_vm_cluster_iorm_config.cloud_vm_cluster_id
2121
}
2222

23+
data "oci_identity_tenancy" "tenancy" {
24+
tenancy_id = var.tenancy_ocid
25+
}
26+
2327
data "oci_database_db_servers" "test_cloud_db_servers" {
2428
#Required
2529
compartment_id = var.compartment_ocid

examples/database/db_systems/db_exacs/network.tf

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,3 +114,29 @@ resource "oci_core_network_security_group" "test_network_security_group_backup"
114114
vcn_id = oci_core_vcn.vcn.id
115115
display_name = "displayName"
116116
}
117+
118+
resource "oci_dns_zone" "test_zone" {
119+
compartment_id = var.compartment_ocid
120+
name = "sicdbaas.exacs.zonetest"
121+
zone_type = "PRIMARY"
122+
scope = "PRIVATE"
123+
view_id = oci_dns_view.test_view.id
124+
}
125+
126+
resource "oci_dns_view" "test_view" {
127+
compartment_id = var.compartment_ocid
128+
scope = "PRIVATE"
129+
}
130+
131+
resource "oci_dns_resolver" "test_resolver" {
132+
attached_views {
133+
view_id = oci_dns_view.test_view.id
134+
}
135+
display_name = "test_resolver"
136+
resolver_id = data.oci_core_vcn_dns_resolver_association.test_vcn_dns_resolver_association.dns_resolver_id
137+
scope = "PRIVATE"
138+
}
139+
140+
data "oci_core_vcn_dns_resolver_association" "test_vcn_dns_resolver_association" {
141+
vcn_id = "${oci_core_vcn.vcn.id}"
142+
}

examples/database/db_systems/db_exacs/resources.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ resource "oci_database_cloud_vm_cluster" "test_cloud_vm_cluster" {
1919
compartment_id = var.compartment_ocid
2020
cpu_core_count = var.cloud_vm_cluster_cpu_core_count
2121
display_name = "MyTFVmClusterExaCs"
22-
domain = oci_core_subnet.subnet.subnet_domain_name
22+
domain = oci_dns_zone.test_zone.name
2323
gi_version = var.cloud_vm_cluster_gi_version
2424
hostname = var.cloud_vm_cluster_hostname
2525
ssh_public_keys = [var.ssh_public_key]
@@ -33,6 +33,7 @@ resource "oci_database_cloud_vm_cluster" "test_cloud_vm_cluster" {
3333
ocpu_count = var.cloud_vm_cluster_ocpu_count
3434
scan_listener_port_tcp = var.cloud_vm_cluster_scan_listener_port_tcp
3535
scan_listener_port_tcp_ssl = var.cloud_vm_cluster_scan_listener_port_tcp_ssl
36+
private_zone_id = oci_dns_zone.test_zone.id
3637

3738
data_collection_options {
3839
#Optional

internal/integrationtest/database_cloud_vm_cluster_iorm_config_test.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,12 @@ var (
3131
"db_plans": acctest.RepresentationGroup{RepType: acctest.Required, Group: dbPlanRepresentation},
3232
}
3333

34-
DatabaseCloudVmClusterIormConfigResourceDependencies = AvailabilityDomainConfig + DatabaseCloudVmClusterRequiredOnlyResource
34+
DatabaseCloudVmClusterIormResourceDependencies = ad_subnet_security + acctest.GenerateResourceFromRepresentationMap("oci_database_cloud_exadata_infrastructure", "test_cloud_exadata_infrastructure", acctest.Required, acctest.Create,
35+
acctest.RepresentationCopyWithNewProperties(acctest.RepresentationCopyWithRemovedProperties(DatabaseCloudExadataInfrastructureRepresentation, []string{"compute_count"}), map[string]interface{}{
36+
"compute_count": acctest.Representation{RepType: acctest.Required, Create: `2`, Update: `3`},
37+
})) + acctest.GenerateResourceFromRepresentationMap("oci_database_cloud_vm_cluster", "test_cloud_vm_cluster", acctest.Required, acctest.Create, DatabaseCloudVmClusterRepresentation)
38+
39+
DatabaseCloudVmClusterIormConfigResourceDependencies = AvailabilityDomainConfig + DatabaseCloudVmClusterIormResourceDependencies
3540
)
3641

3742
// issue-routing-tag: database/ExaCS

internal/integrationtest/database_cloud_vm_cluster_test.go

Lines changed: 87 additions & 14 deletions
Large diffs are not rendered by default.

internal/service/database/database_cloud_vm_cluster_resource.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,12 @@ func DatabaseCloudVmClusterResource() *schema.Resource {
214214
Optional: true,
215215
Computed: true,
216216
},
217+
"private_zone_id": {
218+
Type: schema.TypeString,
219+
Optional: true,
220+
Computed: true,
221+
ForceNew: true,
222+
},
217223
"scan_listener_port_tcp": {
218224
Type: schema.TypeInt,
219225
Optional: true,
@@ -605,6 +611,11 @@ func (s *DatabaseCloudVmClusterResourceCrud) Create() error {
605611
}
606612
}
607613

614+
if privateZoneId, ok := s.D.GetOkExists("private_zone_id"); ok {
615+
tmp := privateZoneId.(string)
616+
request.PrivateZoneId = &tmp
617+
}
618+
608619
if scanListenerPortTcp, ok := s.D.GetOkExists("scan_listener_port_tcp"); ok {
609620
tmp := scanListenerPortTcp.(int)
610621
request.ScanListenerPortTcp = &tmp

website/docs/d/database_autonomous_vm_cluster.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ The following attributes are exported:
5050
* `freeform_tags` - Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}`
5151
* `id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Autonomous VM cluster.
5252
* `is_local_backup_enabled` - If true, database backup on local Exadata storage is configured for the Autonomous VM cluster. If false, database backup on local Exadata storage is not available in the Autonomous VM cluster.
53-
* `is_mtls_enabled` - Enable mutual TLS(mTLS) authentication for database at time of provisioning a VMCluster. Default is TLS.
53+
* `is_mtls_enabled` - Enable mutual TLS(mTLS) authentication for database while provisioning a VMCluster. Default is TLS.
5454
* `last_maintenance_run_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the last maintenance run.
5555
* `license_model` - The Oracle license model that applies to the Autonomous VM cluster. The default is LICENSE_INCLUDED.
5656
* `lifecycle_details` - Additional information about the current lifecycle state.

website/docs/d/database_autonomous_vm_clusters.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ The following attributes are exported:
6464
* `freeform_tags` - Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}`
6565
* `id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Autonomous VM cluster.
6666
* `is_local_backup_enabled` - If true, database backup on local Exadata storage is configured for the Autonomous VM cluster. If false, database backup on local Exadata storage is not available in the Autonomous VM cluster.
67-
* `is_mtls_enabled` - Enable mutual TLS(mTLS) authentication for database at time of provisioning a VMCluster. Default is TLS.
67+
* `is_mtls_enabled` - Enable mutual TLS(mTLS) authentication for database while provisioning a VMCluster. Default is TLS.
6868
* `last_maintenance_run_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the last maintenance run.
6969
* `license_model` - The Oracle license model that applies to the Autonomous VM cluster. The default is LICENSE_INCLUDED.
7070
* `lifecycle_details` - Additional information about the current lifecycle state.

website/docs/d/database_cloud_exadata_infrastructure_un_allocated_resource.html.markdown

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description: |-
1010
# Data Source: oci_database_cloud_exadata_infrastructure_un_allocated_resource
1111
This data source provides details about a specific Cloud Exadata Infrastructure Un Allocated Resource resource in Oracle Cloud Infrastructure Database service.
1212

13-
Gets un allocated resources information for the specified Cloud Exadata infrastructure.
13+
Gets unallocated resources information for the specified Cloud Exadata infrastructure.
1414

1515

1616
## Example Usage
@@ -33,13 +33,13 @@ The following arguments are supported:
3333

3434
The following attributes are exported:
3535

36-
* `cloud_autonomous_vm_clusters` - The list of Cloud Autonomous VM Clusters on the Infra and their associated unallocated resources details
36+
* `cloud_autonomous_vm_clusters` - The list of Cloud Autonomous VM Clusters on the Infrastructure and their associated unallocated resources details.
3737
* `id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Cloud Exadata infrastructure.
38-
* `un_allocated_adb_storage_in_tbs` - Total unallocated autonomous data storage in the CAVM in TBs.
38+
* `un_allocated_adb_storage_in_tbs` - Total unallocated autonomous data storage in the Cloud Autonomous VM Cluster in TBs.
3939
* `cloud_exadata_infrastructure_display_name` - The user-friendly name for the Cloud Exadata infrastructure. The name does not need to be unique.
4040
* `cloud_exadata_infrastructure_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the Cloud Exadata infrastructure.
4141
* `exadata_storage_in_tbs` - Total unallocated exadata storage in the infrastructure in TBs.
42-
* `local_storage_in_gbs` - The minimum amount of un allocated storage that is available across all nodes in the infrastructure.
43-
* `memory_in_gbs` - The minimum amount of un allocated memory that is available across all nodes in the infrastructure.
44-
* `ocpus` - The minimum amount of un allocated ocpus that is available across all nodes in the infrastructure.
42+
* `local_storage_in_gbs` - The minimum amount of unallocated storage available across all nodes in the infrastructure.
43+
* `memory_in_gbs` - The minimum amount of unallocated memory available across all nodes in the infrastructure.
44+
* `ocpus` - The minimum amount of unallocated ocpus available across all nodes in the infrastructure.
4545

website/docs/d/database_cloud_vm_cluster.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ The following attributes are exported:
4949
* `data_storage_percentage` - The percentage assigned to DATA storage (user data and database files). The remaining percentage is assigned to RECO storage (database redo logs, archive logs, and recovery manager backups). Accepted values are 35, 40, 60 and 80. The default is 80 percent assigned to DATA storage. See [Storage Configuration](https://docs.cloud.oracle.com/iaas/Content/Database/Concepts/exaoverview.htm#Exadata) in the Exadata documentation for details on the impact of the configuration settings on storage.
5050
* `data_storage_size_in_tbs` - The data disk group size to be allocated in TBs.
5151
* `db_node_storage_size_in_gbs` - The local node storage to be allocated in GBs.
52-
* `db_servers` - The list of Db servers.
52+
* `db_servers` - The list of DB servers.
5353
* `defined_tags` - Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm).
5454
* `disk_redundancy` - The type of redundancy configured for the cloud Vm cluster. NORMAL is 2-way redundancy. HIGH is 3-way redundancy.
5555
* `display_name` - The user-friendly name for the cloud VM cluster. The name does not need to be unique.

0 commit comments

Comments
 (0)