Skip to content

Commit d2ac54b

Browse files
committed
network list , vm cluster list, avmc list, test cases and documentation added
1 parent 3a27b3c commit d2ac54b

17 files changed

+912
-270
lines changed

internal/service/odb/cloud_autonomous_vm_cluster.go

Lines changed: 80 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -84,52 +84,66 @@ func (r *resourceCloudAutonomousVmCluster) Schema(ctx context.Context, req resou
8484
PlanModifiers: []planmodifier.String{
8585
stringplanmodifier.RequiresReplace(),
8686
},
87+
Description: "Exadata infrastructure id. Changing this will force terraform to create new resource.",
8788
},
8889
"autonomous_data_storage_percentage": schema.Float32Attribute{
89-
Computed: true,
90+
Computed: true,
91+
Description: "The progress of the current operation on the Autonomous VM cluster, as a percentage.",
9092
},
9193
"autonomous_data_storage_size_in_tbs": schema.Float64Attribute{
9294
Required: true,
9395
PlanModifiers: []planmodifier.Float64{
9496
float64planmodifier.RequiresReplace(),
9597
},
98+
Description: "The data storage size allocated for Autonomous Databases in the Autonomous VM cluster, in TB. Changing this will force terraform to create new resource.",
9699
},
97100
"available_autonomous_data_storage_size_in_tbs": schema.Float64Attribute{
98-
Computed: true,
101+
Computed: true,
102+
Description: "The available data storage space for Autonomous Databases in the Autonomous VM cluster, in TB.",
99103
},
100104
"available_container_databases": schema.Int32Attribute{
101-
Computed: true,
105+
Computed: true,
106+
Description: "The number of Autonomous CDBs that you can create with the currently available storage.",
102107
},
103108
"available_cpus": schema.Float32Attribute{
104-
Computed: true,
109+
Computed: true,
110+
Description: "The number of CPU cores available for allocation to Autonomous Databases",
105111
},
106112
"compute_model": schema.StringAttribute{
107-
CustomType: computeModel,
108-
Computed: true,
113+
CustomType: computeModel,
114+
Computed: true,
115+
Description: "The compute model of the Autonomous VM cluster: ECPU or OCPU.",
109116
},
110117
"cpu_core_count": schema.Int32Attribute{
111-
Computed: true,
118+
Computed: true,
119+
Description: "The total number of CPU cores in the Autonomous VM cluster.",
112120
},
113121
"cpu_core_count_per_node": schema.Int32Attribute{
114122
Required: true,
115123
PlanModifiers: []planmodifier.Int32{
116124
int32planmodifier.RequiresReplace(),
117125
},
126+
Description: "The number of CPU cores enabled per node in the Autonomous VM cluster.",
118127
},
119128
"cpu_percentage": schema.Float32Attribute{
120-
Computed: true,
129+
Computed: true,
130+
Description: "The percentage of total CPU cores currently in use in the Autonomous VM cluster.",
121131
},
122132
"created_at": schema.StringAttribute{
123-
Computed: true,
133+
Computed: true,
134+
Description: "The date and time when the Autonomous VM cluster was created.",
124135
},
125136
"data_storage_size_in_gbs": schema.Float64Attribute{
126-
Computed: true,
137+
Computed: true,
138+
Description: "The total data storage allocated to the Autonomous VM cluster, in GB.",
127139
},
128140
"data_storage_size_in_tbs": schema.Float64Attribute{
129-
Computed: true,
141+
Computed: true,
142+
Description: "The total data storage allocated to the Autonomous VM cluster, in TB.",
130143
},
131144
"odb_node_storage_size_in_gbs": schema.Int32Attribute{
132-
Computed: true,
145+
Computed: true,
146+
Description: " The local node storage allocated to the Autonomous VM cluster, in gigabytes (GB)",
133147
},
134148
"db_servers": schema.SetAttribute{
135149
Required: true,
@@ -138,32 +152,38 @@ func (r *resourceCloudAutonomousVmCluster) Schema(ctx context.Context, req resou
138152
PlanModifiers: []planmodifier.Set{
139153
setplanmodifier.RequiresReplace(),
140154
},
155+
Description: "The database servers in the Autonomous VM cluster. Changing this will force terraform to create new resource.",
141156
},
142157
"description": schema.StringAttribute{
143158
Optional: true,
144159
PlanModifiers: []planmodifier.String{
145160
stringplanmodifier.RequiresReplace(),
146161
stringplanmodifier.UseStateForUnknown(),
147162
},
163+
Description: "The description of the Autonomous VM cluster.",
148164
},
149165
"display_name": schema.StringAttribute{
150166
Required: true,
151167
Validators: stringLengthBetween1And255Validator,
152168
PlanModifiers: []planmodifier.String{
153169
stringplanmodifier.RequiresReplace(),
154170
},
171+
Description: "The display name of the Autonomous VM cluster. Changing this will force terraform to create new resource.",
155172
},
156173
"domain": schema.StringAttribute{
157-
Computed: true,
174+
Computed: true,
175+
Description: "The domain name of the Autonomous VM cluster.",
158176
},
159177
"exadata_storage_in_tbs_lowest_scaled_value": schema.Float64Attribute{
160-
Computed: true,
178+
Computed: true,
179+
Description: "The minimum value to which you can scale down the Exadata storage, in TB.",
161180
},
162181
"hostname": schema.StringAttribute{
163182
Computed: true,
164183
PlanModifiers: []planmodifier.String{
165184
stringplanmodifier.UseStateForUnknown(),
166185
},
186+
Description: "The hostname of the Autonomous VM cluster.",
167187
},
168188
"is_mtls_enabled_vm_cluster": schema.BoolAttribute{
169189
Optional: true,
@@ -172,6 +192,7 @@ func (r *resourceCloudAutonomousVmCluster) Schema(ctx context.Context, req resou
172192
boolplanmodifier.RequiresReplace(),
173193
boolplanmodifier.UseStateForUnknown(),
174194
},
195+
Description: "Indicates whether mutual TLS (mTLS) authentication is enabled for the Autonomous VM cluster. Changing this will force terraform to create new resource. ",
175196
},
176197
"license_model": schema.StringAttribute{
177198
CustomType: licenseModel,
@@ -181,79 +202,100 @@ func (r *resourceCloudAutonomousVmCluster) Schema(ctx context.Context, req resou
181202
stringplanmodifier.RequiresReplace(),
182203
stringplanmodifier.UseStateForUnknown(),
183204
},
205+
Description: "The license model for the Autonomous VM cluster. Valid values are LICENSE_INCLUDED or BRING_YOUR_OWN_LICENSE . Changing this will force terraform to create new resource.",
184206
},
185207
"max_acds_lowest_scaled_value": schema.Int32Attribute{
186-
Computed: true,
208+
Computed: true,
209+
Description: "The minimum value to which you can scale down the maximum number of Autonomous CDBs.",
187210
},
188211
"memory_per_oracle_compute_unit_in_gbs": schema.Int32Attribute{
189212
Required: true,
190213
PlanModifiers: []planmodifier.Int32{
191214
int32planmodifier.RequiresReplace(),
192215
},
216+
Description: "The amount of memory allocated per Oracle Compute Unit, in GB. Changing this will force terraform to create new resource.",
193217
},
194218
"memory_size_in_gbs": schema.Int32Attribute{
195-
Computed: true,
219+
Computed: true,
220+
Description: "The total amount of memory allocated to the Autonomous VM cluster, in gigabytes(GB).",
196221
},
197222
"node_count": schema.Int32Attribute{
198-
Computed: true,
223+
Computed: true,
224+
Description: "The number of database server nodes in the Autonomous VM cluster.",
199225
},
200226
"non_provisionable_autonomous_container_databases": schema.Int32Attribute{
201-
Computed: true,
227+
Computed: true,
228+
Description: "The number of Autonomous CDBs that can't be provisioned because of resource constraints.",
202229
},
203230
"oci_resource_anchor_name": schema.StringAttribute{
204-
Computed: true,
231+
Computed: true,
232+
Description: "The name of the OCI resource anchor associated with this Autonomous VM cluster.",
205233
},
206234
"oci_url": schema.StringAttribute{
207-
Computed: true,
235+
Computed: true,
236+
Description: "The URL for accessing the OCI console page for this Autonomous VM cluster.",
208237
},
209238
"ocid": schema.StringAttribute{
210-
Computed: true,
239+
Computed: true,
240+
Description: "The Oracle Cloud Identifier (OCID) of the Autonomous VM cluster.",
211241
},
212242
"odb_network_id": schema.StringAttribute{
213243
Required: true,
214244
PlanModifiers: []planmodifier.String{
215245
stringplanmodifier.RequiresReplace(),
216246
},
247+
Description: "The unique identifier of the ODB network associated with this Autonomous VM Cluster. Changing this will force terraform to create new resource.",
217248
},
218249
"percent_progress": schema.Float32Attribute{
219-
Computed: true,
250+
Computed: true,
251+
Description: `The progress of the current operation on the Autonomous VM cluster, as a percentage.`,
220252
},
221253
"provisionable_autonomous_container_databases": schema.Int32Attribute{
222-
Computed: true,
254+
Computed: true,
255+
Description: "The number of Autonomous CDBs that can be provisioned in the Autonomous VM cluster.",
223256
},
224257
"provisioned_autonomous_container_databases": schema.Int32Attribute{
225-
Computed: true,
258+
Computed: true,
259+
Description: "The number of Autonomous CDBs currently provisioned in the Autonomous VM cluster.",
226260
},
227261
"provisioned_cpus": schema.Float32Attribute{
228-
Computed: true,
262+
Computed: true,
263+
Description: "The number of CPUs provisioned in the Autonomous VM cluster.",
229264
},
230265
"reclaimable_cpus": schema.Float32Attribute{
231-
Computed: true,
266+
Computed: true,
267+
Description: "The number of CPU cores that can be reclaimed from terminated or scaled-down Autonomous Databases.",
232268
},
233269
"reserved_cpus": schema.Float32Attribute{
234-
Computed: true,
270+
Computed: true,
271+
Description: "The number of CPU cores reserved for system operations and redundancy.",
235272
},
236273
"scan_listener_port_non_tls": schema.Int32Attribute{
237274
Required: true,
238275
PlanModifiers: []planmodifier.Int32{
239276
int32planmodifier.RequiresReplace(),
240277
},
278+
Description: "The SCAN listener port for non-TLS (TCP) protocol. The default is 1521. Changing this will force terraform to create new resource.",
241279
},
242280
"scan_listener_port_tls": schema.Int32Attribute{
243281
Required: true,
244282
PlanModifiers: []planmodifier.Int32{
245283
int32planmodifier.RequiresReplace(),
246284
},
285+
Description: "The SCAN listener port for TLS (TCP) protocol. The default is 2484. Changing this will force terraform to create new resource.",
247286
},
248287
"shape": schema.StringAttribute{
249-
Computed: true,
288+
Computed: true,
289+
Description: "The shape of the Exadata infrastructure for the Autonomous VM cluster.",
250290
},
251291
"status": schema.StringAttribute{
252-
CustomType: status,
253-
Computed: true,
292+
CustomType: status,
293+
Computed: true,
294+
Description: "The status of the Autonomous VM cluster. Possible values include CREATING, AVAILABLE , UPDATING , DELETING , DELETED , FAILED ",
254295
},
255-
"reason": schema.StringAttribute{
256-
Computed: true,
296+
"status_reason": schema.StringAttribute{
297+
Computed: true,
298+
Description: "Additional information about the current status of the Autonomous VM cluster.",
257299
},
258300
"time_zone": schema.StringAttribute{
259301
Optional: true,
@@ -262,25 +304,29 @@ func (r *resourceCloudAutonomousVmCluster) Schema(ctx context.Context, req resou
262304
stringplanmodifier.RequiresReplace(),
263305
stringplanmodifier.UseStateForUnknown(),
264306
},
307+
Description: "The time zone of the Autonomous VM cluster. Changing this will force terraform to create new resource.",
265308
},
266309
"total_container_databases": schema.Int32Attribute{
267310
Required: true,
268311
PlanModifiers: []planmodifier.Int32{
269312
int32planmodifier.RequiresReplace(),
270313
},
314+
Description: "The total number of Autonomous Container Databases that can be created with the allocated local storage. Changing this will force terraform to create new resource.",
271315
},
272316
"time_ords_certificate_expires": schema.StringAttribute{
273317
Computed: true,
274318
},
275319
"time_database_ssl_certificate_expires": schema.StringAttribute{
276-
Computed: true,
320+
Computed: true,
321+
Description: "The expiration date and time of the database SSL certificate.",
277322
},
278323
"maintenance_window": schema.ObjectAttribute{
279324
Required: true,
280325
CustomType: fwtypes.NewObjectTypeOf[cloudAutonomousVmClusterMaintenanceWindowResourceModel](ctx),
281326
PlanModifiers: []planmodifier.Object{
282327
objectplanmodifier.RequiresReplace(),
283328
},
329+
Description: "The maintenance window of the Autonomous VM cluster.",
284330
AttributeTypes: map[string]attr.Type{
285331
"days_of_week": types.SetType{
286332
ElemType: fwtypes.StringEnumType[odbtypes.DayOfWeekName](),
@@ -800,7 +846,7 @@ type cloudAutonomousVmClusterResourceModel struct {
800846
ScanListenerPortTls types.Int32 `tfsdk:"scan_listener_port_tls"`
801847
Shape types.String `tfsdk:"shape"`
802848
Status fwtypes.StringEnum[odbtypes.ResourceStatus] `tfsdk:"status"`
803-
StatusReason types.String `tfsdk:"reason"`
849+
StatusReason types.String `tfsdk:"status_reason"`
804850
TimeZone types.String `tfsdk:"time_zone"`
805851
TotalContainerDatabases types.Int32 `tfsdk:"total_container_databases"`
806852
Timeouts timeouts.Value `tfsdk:"timeouts"`

internal/service/odb/cloud_autonomous_vm_cluster_data_source.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,12 @@ func (d *dataSourceCloudAutonomousVmCluster) Schema(ctx context.Context, req dat
4646
names.AttrARN: framework.ARNAttributeComputedOnly(),
4747

4848
names.AttrID: schema.StringAttribute{
49-
Required: true,
49+
Required: true,
50+
Description: "Unique ID of the Autonomous VM cluster.",
5051
},
5152
"cloud_exadata_infrastructure_id": schema.StringAttribute{
52-
Computed: true,
53+
Computed: true,
54+
Description: "Exadata infrastructure id. Changing this will force terraform to create new resource.",
5355
},
5456
"autonomous_data_storage_percentage": schema.Float32Attribute{
5557
Computed: true,
@@ -176,7 +178,7 @@ func (d *dataSourceCloudAutonomousVmCluster) Schema(ctx context.Context, req dat
176178
CustomType: status,
177179
Computed: true,
178180
},
179-
"reason": schema.StringAttribute{
181+
"status_reason": schema.StringAttribute{
180182
Computed: true,
181183
},
182184
"time_database_ssl_certificate_expires": schema.StringAttribute{
@@ -370,7 +372,7 @@ type cloudAutonomousVmClusterDataSourceModel struct {
370372
ScanListenerPortTls types.Int32 `tfsdk:"scan_listener_port_tls"`
371373
Shape types.String `tfsdk:"shape"`
372374
Status fwtypes.StringEnum[odbtypes.ResourceStatus] `tfsdk:"status"`
373-
StatusReason types.String `tfsdk:"reason"`
375+
StatusReason types.String `tfsdk:"status_reason"`
374376
TimeDatabaseSslCertificateExpires types.String `tfsdk:"time_database_ssl_certificate_expires" autoflex:",noflatten"`
375377
TimeOrdsCertificateExpires types.String `tfsdk:"time_ords_certificate_expires" autoflex:",noflatten"`
376378
TimeZone types.String `tfsdk:"time_zone"`

0 commit comments

Comments
 (0)