@@ -26,6 +26,9 @@ import (
2626)
2727
2828var (
29+ ignoreEmailDomainDefinedTagsChangesRep = map [string ]interface {}{
30+ "ignore_changes" : acctest.Representation {RepType : acctest .Required , Create : []string {`defined_tags` }},
31+ }
2932 EmailEmailDomainRequiredOnlyResource = EmailEmailDomainResourceDependencies +
3033 acctest .GenerateResourceFromRepresentationMap ("oci_email_email_domain" , "test_email_domain" , acctest .Required , acctest .Create , EmailEmailDomainRepresentation )
3134
@@ -50,11 +53,13 @@ var (
5053 }
5154
5255 EmailEmailDomainRepresentation = map [string ]interface {}{
53- "compartment_id" : acctest.Representation {RepType : acctest .Required , Create : `${var.compartment_id}` },
54- "name" : acctest.Representation {RepType : acctest .Required , Create : randomDomain },
55- "defined_tags" : acctest.Representation {RepType : acctest .Optional , Create : `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}` , Update : `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}` },
56- "description" : acctest.Representation {RepType : acctest .Optional , Create : `description` , Update : `description2` },
57- "freeform_tags" : acctest.Representation {RepType : acctest .Optional , Create : map [string ]string {"Department" : "Finance" }, Update : map [string ]string {"Department" : "Accounting" }},
56+ "compartment_id" : acctest.Representation {RepType : acctest .Required , Create : `${var.compartment_id}` },
57+ "name" : acctest.Representation {RepType : acctest .Required , Create : randomDomain },
58+ "defined_tags" : acctest.Representation {RepType : acctest .Optional , Create : `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}` , Update : `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}` },
59+ "description" : acctest.Representation {RepType : acctest .Optional , Create : `description` , Update : `description2` },
60+ "domain_verification_id" : acctest.Representation {RepType : acctest .Optional , Create : `NONE` },
61+ "freeform_tags" : acctest.Representation {RepType : acctest .Optional , Create : map [string ]string {"Department" : "Finance" }, Update : map [string ]string {"Department" : "Accounting" }},
62+ "lifecycle" : acctest.RepresentationGroup {RepType : acctest .Required , Group : ignoreEmailDomainDefinedTagsChangesRep },
5863 }
5964
6065 EmailEmailDomainResourceDependencies = DefinedTagsDependencies
@@ -108,6 +113,7 @@ func TestEmailEmailDomainResource_basic(t *testing.T) {
108113 Check : resource .ComposeAggregateTestCheckFunc (
109114 resource .TestCheckResourceAttr (resourceName , "compartment_id" , compartmentId ),
110115 resource .TestCheckResourceAttr (resourceName , "description" , "description" ),
116+ resource .TestCheckResourceAttrSet (resourceName , "domain_verification_id" ),
111117 resource .TestCheckResourceAttr (resourceName , "freeform_tags.%" , "1" ),
112118 resource .TestCheckResourceAttrSet (resourceName , "id" ),
113119 resource .TestCheckResourceAttr (resourceName , "name" , randomDomain ),
@@ -134,6 +140,7 @@ func TestEmailEmailDomainResource_basic(t *testing.T) {
134140 Check : resource .ComposeAggregateTestCheckFunc (
135141 resource .TestCheckResourceAttr (resourceName , "compartment_id" , compartmentIdU ),
136142 resource .TestCheckResourceAttr (resourceName , "description" , "description" ),
143+ resource .TestCheckResourceAttrSet (resourceName , "domain_verification_id" ),
137144 resource .TestCheckResourceAttr (resourceName , "freeform_tags.%" , "1" ),
138145 resource .TestCheckResourceAttrSet (resourceName , "id" ),
139146 resource .TestCheckResourceAttr (resourceName , "name" , randomDomain ),
@@ -155,6 +162,7 @@ func TestEmailEmailDomainResource_basic(t *testing.T) {
155162 Check : resource .ComposeAggregateTestCheckFunc (
156163 resource .TestCheckResourceAttr (resourceName , "compartment_id" , compartmentId ),
157164 resource .TestCheckResourceAttr (resourceName , "description" , "description2" ),
165+ resource .TestCheckResourceAttrSet (resourceName , "domain_verification_id" ),
158166 resource .TestCheckResourceAttr (resourceName , "freeform_tags.%" , "1" ),
159167 resource .TestCheckResourceAttrSet (resourceName , "id" ),
160168 resource .TestCheckResourceAttr (resourceName , "name" , randomDomain ),
0 commit comments