Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion cos.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
16 changes: 15 additions & 1 deletion ibm_catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
8 changes: 4 additions & 4 deletions patterns/dynamic_values/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down
6 changes: 3 additions & 3 deletions patterns/mixed/override.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
{
"buckets": [
{
"endpoint_type": "public",
"endpoint_type": "direct",
"force_delete": true,
"kms_key": "slz-atracker-key",
"name": "atracker-bucket",
Expand Down Expand Up @@ -89,7 +89,7 @@
{
"buckets": [
{
"endpoint_type": "public",
"endpoint_type": "direct",
"force_delete": true,
"kms_key": "slz-slz-key",
"name": "management-bucket",
Expand All @@ -111,7 +111,7 @@
}
},
{
"endpoint_type": "public",
"endpoint_type": "direct",
"force_delete": true,
"kms_key": "slz-slz-key",
"name": "workload-bucket",
Expand Down
8 changes: 4 additions & 4 deletions patterns/roks/module/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down
6 changes: 3 additions & 3 deletions patterns/roks/override.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
{
"buckets": [
{
"endpoint_type": "public",
"endpoint_type": "direct",
"force_delete": true,
"kms_key": "slz-atracker-key",
"name": "atracker-bucket",
Expand Down Expand Up @@ -132,7 +132,7 @@
{
"buckets": [
{
"endpoint_type": "public",
"endpoint_type": "direct",
"force_delete": true,
"kms_key": "slz-slz-key",
"name": "management-bucket",
Expand All @@ -154,7 +154,7 @@
}
},
{
"endpoint_type": "public",
"endpoint_type": "direct",
"force_delete": true,
"kms_key": "slz-slz-key",
"name": "workload-bucket",
Expand Down
8 changes: 4 additions & 4 deletions patterns/roks/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down
6 changes: 3 additions & 3 deletions patterns/vpc/override.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{
"buckets": [
{
"endpoint_type": "public",
"endpoint_type": "direct",
"force_delete": true,
"kms_key": "slz-atracker-key",
"name": "atracker-bucket",
Expand Down Expand Up @@ -53,7 +53,7 @@
{
"buckets": [
{
"endpoint_type": "public",
"endpoint_type": "direct",
"force_delete": true,
"kms_key": "slz-slz-key",
"name": "management-bucket",
Expand All @@ -75,7 +75,7 @@
}
},
{
"endpoint_type": "public",
"endpoint_type": "direct",
"force_delete": true,
"kms_key": "slz-slz-key",
"name": "workload-bucket",
Expand Down
2 changes: 1 addition & 1 deletion patterns/vsi/override.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{
"buckets": [
{
"endpoint_type": "public",
"endpoint_type": "direct",
"force_delete": true,
"kms_key": "slz-atracker-key",
"name": "atracker-bucket",
Expand Down
10 changes: 5 additions & 5 deletions tests/pr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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()

// ------------------------------------------------------------------------------------
Expand Down Expand Up @@ -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")
Expand All @@ -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
// ------------------------------------------------------------------------------------
Expand Down Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion vpe.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

##############################################################################\
##############################################################################