Skip to content

Commit 8ccda9a

Browse files
committed
spec bump for BDS service
1 parent 6b80c0b commit 8ccda9a

File tree

6 files changed

+48
-13
lines changed

6 files changed

+48
-13
lines changed

examples/bds/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ resource "oci_bds_bds_instance" "test_bds_instance" {
164164
defined_tags = "${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "${var.bds_instance_defined_tags_value}")}"
165165
freeform_tags = "${var.bds_instance_freeform_tags}"
166166
network_config {
167-
#Required
167+
#Optional
168168
cidr_block = "${var.bds_instance_network_config_cidr_block}"
169169
is_nat_gateway_required = "${var.bds_instance_network_config_is_nat_gateway_required}"
170170
}

oci/bds_bds_instance_data_source.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,5 +138,9 @@ func (s *BdsBdsInstanceDataSourceCrud) SetData() error {
138138
s.D.Set("time_created", s.Res.TimeCreated.String())
139139
}
140140

141+
if s.Res.TimeUpdated != nil {
142+
s.D.Set("time_updated", s.Res.TimeUpdated.String())
143+
}
144+
141145
return nil
142146
}

oci/bds_bds_instance_resource.go

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ func BdsBdsInstanceResource() *schema.Resource {
5757
Type: schema.TypeString,
5858
Required: true,
5959
},
60+
"display_name": {
61+
Type: schema.TypeString,
62+
Required: true,
63+
},
6064
"is_high_availability": {
6165
Type: schema.TypeBool,
6266
Required: true,
@@ -236,10 +240,6 @@ func BdsBdsInstanceResource() *schema.Resource {
236240
DiffSuppressFunc: definedTagsDiffSuppressFunction,
237241
Elem: schema.TypeString,
238242
},
239-
"display_name": {
240-
Type: schema.TypeString,
241-
Required: true,
242-
},
243243
"freeform_tags": {
244244
Type: schema.TypeMap,
245245
Optional: true,
@@ -249,25 +249,26 @@ func BdsBdsInstanceResource() *schema.Resource {
249249
"network_config": {
250250
Type: schema.TypeList,
251251
Optional: true,
252+
Computed: true,
252253
ForceNew: true,
253254
MaxItems: 1,
254255
MinItems: 1,
255256
Elem: &schema.Resource{
256257
Schema: map[string]*schema.Schema{
257258
// Required
259+
260+
// Optional
258261
"cidr_block": {
259262
Type: schema.TypeString,
260-
Required: true,
261-
ForceNew: true,
263+
Computed: true,
264+
Optional: true,
262265
},
263266
"is_nat_gateway_required": {
264267
Type: schema.TypeBool,
265-
Required: true,
266-
ForceNew: true,
268+
Computed: true,
269+
Optional: true,
267270
},
268271

269-
// Optional
270-
271272
// Computed
272273
},
273274
},
@@ -397,6 +398,10 @@ func BdsBdsInstanceResource() *schema.Resource {
397398
Type: schema.TypeString,
398399
Computed: true,
399400
},
401+
"time_refreshed": {
402+
Type: schema.TypeString,
403+
Computed: true,
404+
},
400405
},
401406
},
402407
},
@@ -412,6 +417,10 @@ func BdsBdsInstanceResource() *schema.Resource {
412417
Type: schema.TypeString,
413418
Computed: true,
414419
},
420+
"time_updated": {
421+
Type: schema.TypeString,
422+
Computed: true,
423+
},
415424
},
416425
}
417426
}
@@ -1002,7 +1011,7 @@ func (s *BdsBdsInstanceResourceCrud) SetData() error {
10021011
if s.Res.CloudSqlDetails != nil {
10031012
s.D.Set("cloud_sql_details", []interface{}{CloudSqlDetailsToMap(s.Res.CloudSqlDetails)})
10041013
} else {
1005-
s.D.Set("cloud_sql_details", nil)
1014+
s.D.Set("cloud_sql_details", []interface{}{})
10061015
s.D.Set("is_cloud_sql_configured", false)
10071016
}
10081017

@@ -1068,6 +1077,10 @@ func (s *BdsBdsInstanceResourceCrud) SetData() error {
10681077
s.D.Set("time_created", s.Res.TimeCreated.String())
10691078
}
10701079

1080+
if s.Res.TimeUpdated != nil {
1081+
s.D.Set("time_updated", s.Res.TimeUpdated.String())
1082+
}
1083+
10711084
return nil
10721085
}
10731086

@@ -1126,6 +1139,10 @@ func ClusterDetailsToMap(obj *oci_bds.ClusterDetails) map[string]interface{} {
11261139
result["time_created"] = obj.TimeCreated.String()
11271140
}
11281141

1142+
if obj.TimeRefreshed != nil {
1143+
result["time_refreshed"] = oci_common.SDKTime(*obj.TimeRefreshed)
1144+
}
1145+
11291146
return result
11301147
}
11311148

@@ -1210,6 +1227,10 @@ func BdsNodeToMap(obj oci_bds.Node) map[string]interface{} {
12101227
result["time_created"] = obj.TimeCreated.String()
12111228
}
12121229

1230+
if obj.TimeUpdated != nil {
1231+
result["time_updated"] = obj.TimeUpdated.String()
1232+
}
1233+
12131234
return result
12141235
}
12151236

website/docs/d/bds_bds_instance.html.markdown

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ The following attributes are exported:
4747
* `cloudera_manager_url` - The URL of a Cloudera Manager
4848
* `hue_server_url` - The URL of a Hue Server
4949
* `time_created` - The time the cluster was created. An RFC3339 formatted datetime string
50+
* `time_refreshed` - The time the BDS instance was automatically, or manually refreshed. An RFC3339 formatted datetime string
5051
* `cluster_version` - Version of the Hadoop distribution
5152
* `compartment_id` - The OCID of the compartment
5253
* `created_by` - The user who created the BDS instance.
@@ -76,7 +77,9 @@ The following attributes are exported:
7677
* `state` - The state of the node
7778
* `subnet_id` - The OCID of the subnet in which the node should be created
7879
* `time_created` - The time the node was created. An RFC3339 formatted datetime string
80+
* `time_updated` - The time the BDS instance was updated. An RFC3339 formatted datetime string
7981
* `number_of_nodes` - Number of nodes that forming the cluster
8082
* `state` - The state of the BDS instance
8183
* `time_created` - The time the BDS instance was created. An RFC3339 formatted datetime string
84+
* `time_updated` - The time the BDS instance was updated. An RFC3339 formatted datetime string
8285

website/docs/d/bds_bds_instances.html.markdown

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ The following attributes are exported:
6060
* `cloudera_manager_url` - The URL of a Cloudera Manager
6161
* `hue_server_url` - The URL of a Hue Server
6262
* `time_created` - The time the cluster was created. An RFC3339 formatted datetime string
63+
* `time_refreshed` - The time the BDS instance was automatically, or manually refreshed. An RFC3339 formatted datetime string
6364
* `cluster_version` - Version of the Hadoop distribution
6465
* `compartment_id` - The OCID of the compartment
6566
* `created_by` - The user who created the BDS instance.
@@ -89,7 +90,9 @@ The following attributes are exported:
8990
* `state` - The state of the node
9091
* `subnet_id` - The OCID of the subnet in which the node should be created
9192
* `time_created` - The time the node was created. An RFC3339 formatted datetime string
93+
* `time_updated` - The time the BDS instance was updated. An RFC3339 formatted datetime string
9294
* `number_of_nodes` - Number of nodes that forming the cluster
9395
* `state` - The state of the BDS instance
9496
* `time_created` - The time the BDS instance was created. An RFC3339 formatted datetime string
97+
* `time_updated` - The time the BDS instance was updated. An RFC3339 formatted datetime string
9598

website/docs/r/bds_bds_instance.html.markdown

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ resource "oci_bds_bds_instance" "test_bds_instance" {
4949
defined_tags = {"foo-namespace.bar-key"= "value"}
5050
freeform_tags = {"bar-key"= "value"}
5151
network_config {
52-
#Required
52+
53+
#Optional
5354
cidr_block = "${var.bds_instance_network_config_cidr_block}"
5455
is_nat_gateway_required = "${var.bds_instance_network_config_is_nat_gateway_required}"
5556
}
@@ -113,6 +114,7 @@ The following attributes are exported:
113114
* `cloudera_manager_url` - The URL of a Cloudera Manager
114115
* `hue_server_url` - The URL of a Hue Server
115116
* `time_created` - The time the cluster was created. An RFC3339 formatted datetime string
117+
* `time_refreshed` - The time the BDS instance was automatically, or manually refreshed. An RFC3339 formatted datetime string
116118
* `cluster_version` - Version of the Hadoop distribution
117119
* `compartment_id` - The OCID of the compartment
118120
* `created_by` - The user who created the BDS instance.
@@ -142,9 +144,11 @@ The following attributes are exported:
142144
* `state` - The state of the node
143145
* `subnet_id` - The OCID of the subnet in which the node should be created
144146
* `time_created` - The time the node was created. An RFC3339 formatted datetime string
147+
* `time_updated` - The time the BDS instance was updated. An RFC3339 formatted datetime string
145148
* `number_of_nodes` - Number of nodes that forming the cluster
146149
* `state` - The state of the BDS instance
147150
* `time_created` - The time the BDS instance was created. An RFC3339 formatted datetime string
151+
* `time_updated` - The time the BDS instance was updated. An RFC3339 formatted datetime string
148152

149153
## Import
150154

0 commit comments

Comments
 (0)