diff --git a/cos.tf b/cos.tf index c884b4c52..d63b100fa 100644 --- a/cos.tf +++ b/cos.tf @@ -81,7 +81,9 @@ resource "ibm_resource_key" "key" { resource "ibm_cos_bucket" "buckets" { for_each = local.buckets_map - depends_on = [time_sleep.wait_for_authorization_policy] + depends_on = [ + time_sleep.wait_for_authorization_policy + ] bucket_name = "${var.prefix}-${each.value.name}${each.value.random_suffix == "true" ? "-${random_string.random_cos_suffix.result}" : ""}" resource_instance_id = local.cos_instance_ids[each.value.instance] diff --git a/ibm_catalog.json b/ibm_catalog.json index a4f34eec8..962c4912a 100644 --- a/ibm_catalog.json +++ b/ibm_catalog.json @@ -1903,7 +1903,21 @@ "key": "existing_cos_resource_group" }, { - "key": "existing_cos_endpoint_type" + "key": "existing_cos_endpoint_type", + "options": [ + { + "displayname": "direct", + "value": "direct" + }, + { + "displayname": "private", + "value": "private" + }, + { + "displayname": "public", + "value": "public" + } + ] }, { "key": "use_existing_cos_for_vpc_flowlogs" diff --git a/patterns/dynamic_values/variables.tf b/patterns/dynamic_values/variables.tf index f664d7f07..77a3389cc 100644 --- a/patterns/dynamic_values/variables.tf +++ b/patterns/dynamic_values/variables.tf @@ -125,13 +125,13 @@ variable "existing_cos_resource_group" { } variable "existing_cos_endpoint_type" { - description = "The endpoint type to use when accessing the existing COS instance, default is `public`." + description = "The endpoint type to use when accessing the existing COS instance. `direct` is the preferred endpoint type for re-platformed regions." type = string - default = "public" + default = "direct" validation { - error_message = "Endpoint type can only be `public` or `private`." - condition = contains(["public", "private", null], var.existing_cos_endpoint_type) + error_message = "Endpoint type can only be `public`, `private`, or `direct`." + condition = contains(["public", "private", "direct", null], var.existing_cos_endpoint_type) } } diff --git a/patterns/mixed/override.json b/patterns/mixed/override.json index 7e84dc959..064ead336 100644 --- a/patterns/mixed/override.json +++ b/patterns/mixed/override.json @@ -46,7 +46,7 @@ { "buckets": [ { - "endpoint_type": "public", + "endpoint_type": "direct", "force_delete": true, "kms_key": "slz-atracker-key", "name": "atracker-bucket", @@ -89,7 +89,7 @@ { "buckets": [ { - "endpoint_type": "public", + "endpoint_type": "direct", "force_delete": true, "kms_key": "slz-slz-key", "name": "management-bucket", @@ -111,7 +111,7 @@ } }, { - "endpoint_type": "public", + "endpoint_type": "direct", "force_delete": true, "kms_key": "slz-slz-key", "name": "workload-bucket", diff --git a/patterns/roks/module/variables.tf b/patterns/roks/module/variables.tf index ab6b5fa58..71b1c4ac1 100644 --- a/patterns/roks/module/variables.tf +++ b/patterns/roks/module/variables.tf @@ -143,13 +143,13 @@ variable "existing_cos_resource_group" { } variable "existing_cos_endpoint_type" { - description = "The endpoint type to use when accessing the existing COS instance, default is `public`." + description = "The endpoint type to use when accessing the existing COS instance. `direct` is the preferred endpoint type for re-platformed regions." type = string - default = "public" + default = "direct" validation { - error_message = "Endpoint type can only be `public` or `private`." - condition = contains(["public", "private", null], var.existing_cos_endpoint_type) + error_message = "Endpoint type can only be `public`, `private`, or `direct`." + condition = contains(["public", "private", "direct", null], var.existing_cos_endpoint_type) } } diff --git a/patterns/roks/override.json b/patterns/roks/override.json index 858c146aa..8290a9f0c 100644 --- a/patterns/roks/override.json +++ b/patterns/roks/override.json @@ -89,7 +89,7 @@ { "buckets": [ { - "endpoint_type": "public", + "endpoint_type": "direct", "force_delete": true, "kms_key": "slz-atracker-key", "name": "atracker-bucket", @@ -132,7 +132,7 @@ { "buckets": [ { - "endpoint_type": "public", + "endpoint_type": "direct", "force_delete": true, "kms_key": "slz-slz-key", "name": "management-bucket", @@ -154,7 +154,7 @@ } }, { - "endpoint_type": "public", + "endpoint_type": "direct", "force_delete": true, "kms_key": "slz-slz-key", "name": "workload-bucket", diff --git a/patterns/roks/variables.tf b/patterns/roks/variables.tf index b54b86257..1cb25829a 100644 --- a/patterns/roks/variables.tf +++ b/patterns/roks/variables.tf @@ -150,13 +150,13 @@ variable "existing_cos_resource_group" { } variable "existing_cos_endpoint_type" { - description = "The endpoint type to use when accessing the existing COS instance, default is `public`." + description = "The endpoint type to use when accessing the existing COS instance. `direct` is the preferred endpoint type for re-platformed regions." type = string - default = "public" + default = "direct" validation { - error_message = "Endpoint type can only be `public` or `private`." - condition = contains(["public", "private", null], var.existing_cos_endpoint_type) + error_message = "Endpoint type can only be `public`, `private`, or `direct`." + condition = contains(["public", "private", "direct", null], var.existing_cos_endpoint_type) } } diff --git a/patterns/vpc/override.json b/patterns/vpc/override.json index 60f8c1ec7..1d1df54f9 100644 --- a/patterns/vpc/override.json +++ b/patterns/vpc/override.json @@ -10,7 +10,7 @@ { "buckets": [ { - "endpoint_type": "public", + "endpoint_type": "direct", "force_delete": true, "kms_key": "slz-atracker-key", "name": "atracker-bucket", @@ -53,7 +53,7 @@ { "buckets": [ { - "endpoint_type": "public", + "endpoint_type": "direct", "force_delete": true, "kms_key": "slz-slz-key", "name": "management-bucket", @@ -75,7 +75,7 @@ } }, { - "endpoint_type": "public", + "endpoint_type": "direct", "force_delete": true, "kms_key": "slz-slz-key", "name": "workload-bucket", diff --git a/patterns/vsi/override.json b/patterns/vsi/override.json index 7b16b8bbc..ea6838983 100644 --- a/patterns/vsi/override.json +++ b/patterns/vsi/override.json @@ -10,7 +10,7 @@ { "buckets": [ { - "endpoint_type": "public", + "endpoint_type": "direct", "force_delete": true, "kms_key": "slz-atracker-key", "name": "atracker-bucket", diff --git a/tests/pr_test.go b/tests/pr_test.go index 4e72dced8..96cbd812d 100644 --- a/tests/pr_test.go +++ b/tests/pr_test.go @@ -428,7 +428,7 @@ func setupOptionsSchematics(t *testing.T, prefix string, dir string) *testschema return options } -func setupOptionsVsiExstention(t *testing.T, prefix string, region string, existingTerraformOptions *terraform.Options) *testhelper.TestOptions { +func setupOptionsVsiExtention(t *testing.T, prefix string, region string, existingTerraformOptions *terraform.Options) *testhelper.TestOptions { sshPublicKey := sshPublicKey(t) outputVpcJson := terraform.OutputJson(t, existingTerraformOptions, "vpc_data") @@ -598,7 +598,7 @@ func TestRunVPCPatternSchematics(t *testing.T) { assert.NoError(t, err, "Schematic Test had unexpected error") } -func TestRunVsiExstention(t *testing.T) { +func TestRunVsiExtention(t *testing.T) { t.Parallel() // ------------------------------------------------------------------------------------ @@ -639,7 +639,7 @@ func TestRunVsiExstention(t *testing.T) { if existErr != nil { assert.True(t, existErr == nil, "Init and Apply of temp existing resource failed") } else { - options := setupOptionsVsiExstention(t, prefix, region, existingTerraformOptions) + options := setupOptionsVsiExtention(t, prefix, region, existingTerraformOptions) output, err := options.RunTestConsistency() assert.Nil(t, err, "This should not have errored") assert.NotNil(t, output, "Expected some output") @@ -660,7 +660,7 @@ func TestRunVsiExstention(t *testing.T) { } } -func TestRunUpgradeVsiExstention(t *testing.T) { +func TestRunUpgradeVsiExtention(t *testing.T) { // ------------------------------------------------------------------------------------ // Deploy SLZ VPC first since it is needed for the landing-zone extension input // ------------------------------------------------------------------------------------ @@ -698,7 +698,7 @@ func TestRunUpgradeVsiExstention(t *testing.T) { if existErr != nil { assert.True(t, existErr == nil, "Init and Apply of temp existing resource failed") } else { - options := setupOptionsVsiExstention(t, prefix, region, existingTerraformOptions) + options := setupOptionsVsiExtention(t, prefix, region, existingTerraformOptions) output, err := options.RunTestUpgrade() if !options.UpgradeTestSkipped { assert.Nil(t, err, "This should not have errored") diff --git a/vpe.tf b/vpe.tf index 44db07679..fcb9321cd 100644 --- a/vpe.tf +++ b/vpe.tf @@ -48,4 +48,4 @@ resource "ibm_is_virtual_endpoint_gateway_ip" "endpoint_gateway_ip" { reserved_ip = ibm_is_subnet_reserved_ip.ip[each.key].reserved_ip } -##############################################################################\ +##############################################################################