Skip to content

Commit 74ce957

Browse files
committed
removing deprecated fields that are not part of the APIs
1 parent 97787b4 commit 74ce957

14 files changed

+12
-41
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@
2626
- identity_group
2727
- identity_policy
2828
- identity_user
29-
- Removing deprecated field `time_state_modifed` from data source `core_ip_sec_connection_device_status`. `time_state_modified` should be used instead
29+
- Removing deprecated field `time_state_modifed` from data source `oci_core_ip_sec_connection_device_status`. `time_state_modified` should be used instead
30+
- Removing deprecated fields `content-length` and `content-type` from data source `oci_objectstorage_object_head`. `content_length` and `content_type` should be used instead
31+
- Removing `compartment_id` from resource `oci_core_drg_attachment` as an Optional field as the service does not accept it. The compartment of the VCN is the one used by the service. Keeping it as a computed field.
32+
- Removing deprecated field `db_data_size_in_mbs` from resource `oci_database_backup`. `database_size_in_gbs` should be used instead
3033

3134
## 3.33.0 (July 10, 2019)
3235

examples/load_balancer/lb_full/lb_full.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,5 +363,5 @@ resource "oci_load_balancer_rule_set" "test_rule_set" {
363363
}
364364

365365
output "lb_public_ip" {
366-
value = ["${oci_load_balancer.lb1.ip_addresses}"]
366+
value = ["${oci_load_balancer.lb1.ip_address_details}"]
367367
}

examples/load_balancer/lb_private/lb_private.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,5 +113,5 @@ resource "oci_core_network_security_group" "test_network_security_group" {
113113
}
114114

115115
output "lb_private_ip" {
116-
value = ["${oci_load_balancer.lb1.ip_addresses}"]
116+
value = ["${oci_load_balancer.lb1.ip_address_details}"]
117117
}

examples/object_storage/object.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ output object-head-data {
7676
value = <<EOF
7777
7878
object = ${data.oci_objectstorage_object_head.object_head1.object}
79-
content-length = ${data.oci_objectstorage_object_head.object_head1.content-length}
80-
content-type = ${data.oci_objectstorage_object_head.object_head1.content-type}
79+
content-length = ${data.oci_objectstorage_object_head.object_head1.content_length}
80+
content-type = ${data.oci_objectstorage_object_head.object_head1.content_type}
8181
EOF
8282
}
8383

oci/core_drg_attachment_resource.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,6 @@ func CoreDrgAttachmentResource() *schema.Resource {
4949
"compartment_id": {
5050
Type: schema.TypeString,
5151
Computed: true,
52-
// Used to be required. Added back as optional to avoid showing errors (this field
53-
// cannot be set).
54-
Optional: true,
55-
Deprecated: "No longer required. The DRG attachment is automatically placed into the same compartment as the VCN.",
5652
},
5753
"state": {
5854
Type: schema.TypeString,

oci/core_drg_attachment_resource_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ func (s *ResourceCoreDrgAttachmentTestSuite) TestAccResourceCoreDrgAttachment_ba
4949
{
5050
Config: s.Config + `
5151
resource "oci_core_drg_attachment" "t" {
52-
compartment_id = "${var.compartment_id}"
5352
drg_id = "${oci_core_drg.t.id}"
5453
vcn_id = "${oci_core_virtual_network.t.id}"
5554
}`,
@@ -70,7 +69,6 @@ func (s *ResourceCoreDrgAttachmentTestSuite) TestAccResourceCoreDrgAttachment_ba
7069
{
7170
Config: s.Config + `
7271
resource "oci_core_drg_attachment" "t" {
73-
compartment_id = "${var.compartment_id}"
7472
drg_id = "${oci_core_drg.t.id}"
7573
vcn_id = "${oci_core_virtual_network.t.id}"
7674
display_name = "-tf-drg-attachment"

oci/core_drg_attachments_data_source_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ func (s *DatasourceCoreDrgAttachmentTestSuite) SetupTest() {
3434
display_name = "-tf-drg"
3535
}
3636
resource "oci_core_drg_attachment" "t" {
37-
compartment_id = "${var.compartment_id}"
3837
drg_id = "${oci_core_drg.t.id}"
3938
vcn_id = "${oci_core_virtual_network.t.id}"
4039
display_name = "-tf-drg-attachment"

oci/database_backup_resource.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,6 @@ func DatabaseBackupResource() *schema.Resource {
4747
Type: schema.TypeString,
4848
Computed: true,
4949
},
50-
"db_data_size_in_mbs": {
51-
Type: schema.TypeInt,
52-
Computed: true,
53-
Deprecated: FieldDeprecatedForAnother("db_data_size_in_mbs", "database_size_in_gbs"),
54-
},
5550
"database_size_in_gbs": {
5651
Type: schema.TypeFloat,
5752
Computed: true,
@@ -211,7 +206,6 @@ func (s *DatabaseBackupResourceCrud) SetData() error {
211206

212207
if s.Res.DatabaseSizeInGBs != nil {
213208
s.D.Set("database_size_in_gbs", *s.Res.DatabaseSizeInGBs)
214-
s.D.Set("db_data_size_in_mbs", (*s.Res.DatabaseSizeInGBs)*1024)
215209
}
216210

217211
if s.Res.DisplayName != nil {

oci/database_backup_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ func TestDatabaseBackupResource_basic(t *testing.T) {
9999
ImportStateVerifyIgnore: []string{
100100
// Need this workaround due to import behavior change introduced by https://github.com/hashicorp/terraform/issues/20985
101101
"database_size_in_gbs",
102-
"db_data_size_in_mbs",
103102
},
104103
ResourceName: resourceName,
105104
},

oci/database_backups_data_source.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ func (s *DatabaseBackupsDataSourceCrud) SetData() error {
112112

113113
if r.DatabaseSizeInGBs != nil {
114114
backup["database_size_in_gbs"] = *r.DatabaseSizeInGBs
115-
backup["db_data_size_in_mbs"] = (*r.DatabaseSizeInGBs) * 1024
116115
}
117116

118117
if r.DisplayName != nil {

0 commit comments

Comments
 (0)