Skip to content

Commit ef48e65

Browse files
author
Ravi Tandon
committed
Revert "ORCH-1110 Database resource tags"
This reverts commit 48ec966.
1 parent 8085327 commit ef48e65

File tree

5 files changed

+0
-50
lines changed

5 files changed

+0
-50
lines changed

docs/database/db_systems.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,6 @@ The following arguments are supported:
7272
* `auto_backup_enabled` - (Applicable when source=NONE) If set to true, configures automatic backups. If you previously used RMAN or dbcli to configure backups and then you switch to using the Console or the API for backups, a new backup configuration is created and associated with your database. This means that you can no longer rely on your previously configured unmanaged backups to work.
7373
* `db_name` - (Required when source=NONE) The database name. It must begin with an alphabetic character and can contain a maximum of eight alphanumeric characters. Special characters are not permitted.
7474
* `db_workload` - (Applicable when source=NONE) Database workload type.
75-
* `defined_tags` - (Applicable when source=NONE) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}`
76-
* `freeform_tags` - (Applicable when source=NONE) 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}`
7775
* `ncharacter_set` - (Applicable when source=NONE) National character set for the database. The default is AL16UTF16. Allowed values are: AL16UTF16 or UTF8.
7876
* `pdb_name` - (Applicable when source=NONE) Pluggable database name. It must begin with an alphabetic character and can contain a maximum of eight alphanumeric characters. Special characters are not permitted. Pluggable database should not be same as database name.
7977
* `db_version` - (Required when source=NONE) A valid Oracle database version. To get a list of supported versions, use the [ListDbVersions](https://docs.us-phoenix-1.oraclecloud.com/api/#/en/database/20160918/DbVersion/ListDbVersions) operation.
@@ -131,8 +129,6 @@ resource "oci_database_db_system" "test_db_system" {
131129
}
132130
db_name = "${var.db_system_db_home_database_db_name}"
133131
db_workload = "${var.db_system_db_home_database_db_workload}"
134-
defined_tags = {"Operations.CostCenter"= "42"}
135-
freeform_tags = {"Department"= "Finance"}
136132
ncharacter_set = "${var.db_system_db_home_database_ncharacter_set}"
137133
pdb_name = "${var.db_system_db_home_database_pdb_name}"
138134
}

docs/examples/db_systems/resources.tf

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ resource "oci_database_db_system" "test_db_system" {
1212
ncharacter_set = "${var.n_character_set}"
1313
db_workload = "${var.db_workload}"
1414
pdb_name = "${var.pdb_name}"
15-
defined_tags = "${map("example-tag-namespace-all.example-tag", "originalValue")}"
16-
freeform_tags = {
17-
"Department" = "Finance"
18-
}
1915

2016
db_backup_config {
2117
auto_backup_enabled = true

provider/database_db_system_resource.go

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -133,19 +133,6 @@ func DbSystemResource() *schema.Resource {
133133
Computed: true,
134134
ForceNew: true,
135135
},
136-
"defined_tags": {
137-
Type: schema.TypeMap,
138-
Optional: true,
139-
Computed: true,
140-
DiffSuppressFunc: definedTagsDiffSuppressFunction,
141-
Elem: schema.TypeString,
142-
},
143-
"freeform_tags": {
144-
Type: schema.TypeMap,
145-
Optional: true,
146-
Computed: true,
147-
Elem: schema.TypeString,
148-
},
149136
// serverside defaults to AL16UTF16, but returns as "" if not supplied
150137
"ncharacter_set": {
151138
Type: schema.TypeString,
@@ -666,17 +653,6 @@ func mapToCreateDatabaseDetails(raw map[string]interface{}) oci_database.CreateD
666653
result.PdbName = &tmp
667654
}
668655

669-
if definedTags, ok := raw["defined_tags"]; ok && definedTags != "" {
670-
convertedDefinedTags, err := mapToDefinedTags(definedTags.(map[string]interface{}))
671-
if err != nil {
672-
result.DefinedTags = convertedDefinedTags
673-
}
674-
}
675-
676-
if freeformTags, ok := raw["freeform_tags"]; ok && freeformTags != "" {
677-
result.FreeformTags = objectMapToStringMap(freeformTags.(map[string]interface{}))
678-
}
679-
680656
return result
681657
}
682658

@@ -709,14 +685,6 @@ func CreateDatabaseDetailsToMap(obj *oci_database.CreateDatabaseDetails) map[str
709685
result["pdb_name"] = string(*obj.PdbName)
710686
}
711687

712-
if obj.DefinedTags != nil {
713-
result["defined_tags"] = obj.DefinedTags
714-
}
715-
716-
if obj.FreeformTags != nil {
717-
result["freeform_tags"] = obj.FreeformTags
718-
}
719-
720688
return result
721689
}
722690

provider/database_db_system_resource_test.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -415,8 +415,6 @@ func (s *ResourceDatabaseDBSystemTestSuite) TestAccResourceDatabaseDBSystem_allV
415415
ncharacter_set = "AL16UTF16"
416416
db_workload = "OLTP"
417417
pdb_name = "pdbName"
418-
defined_tags = "${map("example-tag-namespace-all.example-tag", "originalValueDB")}"
419-
freeform_tags = {"Department"= "FinanceDB"}
420418
db_backup_config {
421419
auto_backup_enabled = true
422420
}
@@ -496,8 +494,6 @@ func (s *ResourceDatabaseDBSystemTestSuite) TestAccResourceDatabaseDBSystem_allV
496494
resource.TestCheckResourceAttr(s.ResourceName, "db_home.0.database.0.db_workload", "OLTP"),
497495
resource.TestCheckResourceAttr(s.ResourceName, "db_home.0.database.0.pdb_name", "pdbName"),
498496
resource.TestCheckResourceAttr(s.ResourceName, "db_home.0.database.0.db_backup_config.0.auto_backup_enabled", "true"),
499-
resource.TestCheckResourceAttr(s.ResourceName, "db_home.0.database.0.defined_tags.example-tag-namespace-all.example-tag", "originalValueDB"),
500-
resource.TestCheckResourceAttr(s.ResourceName, "db_home.0.database.0.freeform_tags.Department", "FinanceDB"),
501497
resource.TestCheckResourceAttr(s.ResourceName, "state", string(database.DbSystemLifecycleStateAvailable)),
502498
resource.TestCheckResourceAttr(s.ResourceName, "defined_tags.example-tag-namespace-all.example-tag", "originalValue"),
503499
resource.TestCheckResourceAttr(s.ResourceName, "freeform_tags.Department", "Finance"),
@@ -662,8 +658,6 @@ func (s *ResourceDatabaseDBSystemTestSuite) TestAccResourceDatabaseDBSystem_allV
662658
ncharacter_set = "AL16UTF16"
663659
db_workload = "OLTP"
664660
pdb_name = "pdbName"
665-
defined_tags = "${map("example-tag-namespace-all.example-tag", "updateValueDB")}"
666-
freeform_tags = {"Department"= "AdminDB"}
667661
db_backup_config {
668662
auto_backup_enabled = true
669663
}
@@ -743,8 +737,6 @@ func (s *ResourceDatabaseDBSystemTestSuite) TestAccResourceDatabaseDBSystem_allV
743737
resource.TestCheckResourceAttr(s.ResourceName, "db_home.0.database.0.db_workload", "OLTP"),
744738
resource.TestCheckResourceAttr(s.ResourceName, "db_home.0.database.0.pdb_name", "pdbName"),
745739
resource.TestCheckResourceAttr(s.ResourceName, "db_home.0.database.0.db_backup_config.0.auto_backup_enabled", "true"),
746-
resource.TestCheckResourceAttr(s.ResourceName, "db_home.0.database.0.defined_tags.example-tag-namespace-all.example-tag", "updateValueDB"),
747-
resource.TestCheckResourceAttr(s.ResourceName, "db_home.0.database.0.freeform_tags.Department", "AdminDB"),
748740
resource.TestCheckResourceAttr(s.ResourceName, "state", string(database.DbSystemLifecycleStateAvailable)),
749741
resource.TestCheckResourceAttr(s.ResourceName, "defined_tags.example-tag-namespace-all.example-tag", "updateValue"),
750742
resource.TestCheckResourceAttr(s.ResourceName, "freeform_tags.Department", "Admin"),

website/docs/r/database_db_system.html.markdown

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,6 @@ The following arguments are supported:
100100
* `auto_backup_enabled` - (Applicable when source=NONE) If set to true, configures automatic backups. If you previously used RMAN or dbcli to configure backups and then you switch to using the Console or the API for backups, a new backup configuration is created and associated with your database. This means that you can no longer rely on your previously configured unmanaged backups to work.
101101
* `db_name` - (Required when source=NONE) The database name. It must begin with an alphabetic character and can contain a maximum of eight alphanumeric characters. Special characters are not permitted.
102102
* `db_workload` - (Applicable when source=NONE) Database workload type.
103-
* `defined_tags` - (Applicable when source=NONE) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}`
104-
* `freeform_tags` - (Applicable when source=NONE) 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.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}`
105103
* `ncharacter_set` - (Applicable when source=NONE) National character set for the database. The default is AL16UTF16. Allowed values are: AL16UTF16 or UTF8.
106104
* `pdb_name` - (Applicable when source=NONE) Pluggable database name. It must begin with an alphabetic character and can contain a maximum of eight alphanumeric characters. Special characters are not permitted. Pluggable database should not be same as database name.
107105
* `db_version` - (Required when source=NONE) A valid Oracle database version. To get a list of supported versions, use the [ListDbVersions](https://docs.us-phoenix-1.oraclecloud.com/api/#/en/database/20160918/DbVersion/ListDbVersions) operation.

0 commit comments

Comments
 (0)