Skip to content

Commit 47ca3db

Browse files
jiangongcodycushing
authored andcommitted
suppress availability_domain case sensitivity
# Conflicts: # CHANGELOG.md
1 parent 7b3a74b commit 47ca3db

13 files changed

+58
-41
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
## 3.25.0 (Unreleased)
1+
## 3.24.1 (Unreleased)
2+
3+
### Fixed
4+
- Fix unhandled error when Security Lists are altered outside Terraform
5+
- Updated `availability_domain` property to be case insensitive
6+
27
## 3.24.0 (April 24, 2019)
38

49
### Added

oci/core_boot_volume_resource.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@ func CoreBootVolumeResource() *schema.Resource {
2828
Schema: map[string]*schema.Schema{
2929
// Required
3030
"availability_domain": {
31-
Type: schema.TypeString,
32-
Required: true,
33-
ForceNew: true,
31+
Type: schema.TypeString,
32+
Required: true,
33+
ForceNew: true,
34+
DiffSuppressFunc: EqualIgnoreCaseSuppressDiff,
3435
},
3536
"compartment_id": {
3637
Type: schema.TypeString,

oci/core_instance_configuration_resource.go

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,11 @@ func CoreInstanceConfigurationResource() *schema.Resource {
119119

120120
// Optional
121121
"availability_domain": {
122-
Type: schema.TypeString,
123-
Optional: true,
124-
Computed: true,
125-
ForceNew: true,
122+
Type: schema.TypeString,
123+
Optional: true,
124+
Computed: true,
125+
ForceNew: true,
126+
DiffSuppressFunc: EqualIgnoreCaseSuppressDiff,
126127
},
127128
"backup_policy_id": {
128129
Type: schema.TypeString,
@@ -227,10 +228,11 @@ func CoreInstanceConfigurationResource() *schema.Resource {
227228

228229
// Optional
229230
"availability_domain": {
230-
Type: schema.TypeString,
231-
Optional: true,
232-
Computed: true,
233-
ForceNew: true,
231+
Type: schema.TypeString,
232+
Optional: true,
233+
Computed: true,
234+
ForceNew: true,
235+
DiffSuppressFunc: EqualIgnoreCaseSuppressDiff,
234236
},
235237
"compartment_id": {
236238
Type: schema.TypeString,

oci/core_instance_pool_resource.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,9 @@ func CoreInstancePoolResource() *schema.Resource {
4747
Schema: map[string]*schema.Schema{
4848
// Required
4949
"availability_domain": {
50-
Type: schema.TypeString,
51-
Required: true,
50+
Type: schema.TypeString,
51+
Required: true,
52+
DiffSuppressFunc: EqualIgnoreCaseSuppressDiff,
5253
},
5354
"primary_subnet_id": {
5455
Type: schema.TypeString,

oci/core_instance_resource.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,10 @@ func CoreInstanceResource() *schema.Resource {
3636
Schema: map[string]*schema.Schema{
3737
// Required
3838
"availability_domain": {
39-
Type: schema.TypeString,
40-
Required: true,
41-
ForceNew: true,
39+
Type: schema.TypeString,
40+
Required: true,
41+
ForceNew: true,
42+
DiffSuppressFunc: EqualIgnoreCaseSuppressDiff,
4243
},
4344
"compartment_id": {
4445
Type: schema.TypeString,

oci/core_subnet_resource.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,11 @@ func CoreSubnetResource() *schema.Resource {
4040

4141
// Optional
4242
"availability_domain": {
43-
Type: schema.TypeString,
44-
Optional: true,
45-
Computed: true,
46-
ForceNew: true,
43+
Type: schema.TypeString,
44+
Optional: true,
45+
Computed: true,
46+
ForceNew: true,
47+
DiffSuppressFunc: EqualIgnoreCaseSuppressDiff,
4748
},
4849
"defined_tags": {
4950
Type: schema.TypeMap,

oci/core_subnet_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ var (
4343
"cidr_block": Representation{repType: Required, create: `10.0.0.0/16`},
4444
"compartment_id": Representation{repType: Required, create: `${var.compartment_id}`},
4545
"vcn_id": Representation{repType: Required, create: `${oci_core_vcn.test_vcn.id}`},
46-
"availability_domain": Representation{repType: Optional, create: `${data.oci_identity_availability_domains.test_availability_domains.availability_domains.0.name}`},
46+
"availability_domain": Representation{repType: Optional, create: `${lower("${data.oci_identity_availability_domains.test_availability_domains.availability_domains.0.name}")}`},
4747
"defined_tags": Representation{repType: 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")}`},
4848
"dhcp_options_id": Representation{repType: Optional, create: `${oci_core_vcn.test_vcn.default_dhcp_options_id}`, update: `${oci_core_dhcp_options.test_dhcp_options.id}`},
4949
"display_name": Representation{repType: Optional, create: `MySubnet`, update: `displayName2`},

oci/core_volume_group_resource.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@ func CoreVolumeGroupResource() *schema.Resource {
2828
Schema: map[string]*schema.Schema{
2929
// Required
3030
"availability_domain": {
31-
Type: schema.TypeString,
32-
Required: true,
33-
ForceNew: true,
31+
Type: schema.TypeString,
32+
Required: true,
33+
ForceNew: true,
34+
DiffSuppressFunc: EqualIgnoreCaseSuppressDiff,
3435
},
3536
"compartment_id": {
3637
Type: schema.TypeString,

oci/core_volume_resource.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@ func CoreVolumeResource() *schema.Resource {
2828
Schema: map[string]*schema.Schema{
2929
// Required
3030
"availability_domain": {
31-
Type: schema.TypeString,
32-
Required: true,
33-
ForceNew: true,
31+
Type: schema.TypeString,
32+
Required: true,
33+
ForceNew: true,
34+
DiffSuppressFunc: EqualIgnoreCaseSuppressDiff,
3435
},
3536
"compartment_id": {
3637
Type: schema.TypeString,

oci/database_data_guard_association_resource.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,11 @@ func DatabaseDataGuardAssociationResource() *schema.Resource {
6868

6969
// Optional
7070
"availability_domain": {
71-
Type: schema.TypeString,
72-
Optional: true,
73-
Computed: true,
74-
ForceNew: true,
71+
Type: schema.TypeString,
72+
Optional: true,
73+
Computed: true,
74+
ForceNew: true,
75+
DiffSuppressFunc: EqualIgnoreCaseSuppressDiff,
7576
},
7677
"display_name": {
7778
Type: schema.TypeString,

0 commit comments

Comments
 (0)