Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "feat: exposed the ability to set the provider_visibility in DA" and plugged test gaps #930

Merged
merged 2 commits into from
Dec 11, 2024
Merged
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
3 changes: 0 additions & 3 deletions cra-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,16 @@ CRA_TARGETS:
CRA_ENVIRONMENT_VARIABLES:
TF_VAR_prefix: "slz-vpc"
TF_VAR_region: "us-south"
TF_VAR_provider_visibility: "public"
- CRA_TARGET: "patterns/vsi"
CRA_IGNORE_RULES_FILE: "cra-tf-validate-ignore-rules.json"
PROFILE_ID: "fe96bd4d-9b37-40f2-b39f-a62760e326a3" # SCC profile ID (currently set to 'IBM Cloud Framework for Financial Services' '1.7.0' profile).
CRA_ENVIRONMENT_VARIABLES:
TF_VAR_prefix: "slz-vsi"
TF_VAR_region: "us-south"
TF_VAR_ssh_public_key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC/hfNI5cNjimtcVgNA1acGmi1iv7PTjKcF8D+8DqffkGMsY6vU7KtB1mASwVU8GMGLzU2qvGmXwHSANYqPOraEitgI06zhq5VXVvtjOR41IJjP+ssjHIbql+EDzls2yJuZd2g4Wmk5NKTzJFNYsvIaCGUYCSMUPT9bepUqIOyjsrCEiHGLaphF5W2V/hj1+1NEZqV3ozhmHmtff2tIb6+VQpd/dl61RKuF74rywd1krmBOe4kbPzfYRqiRKV0rl0bPuyL+FV3Zv5gdzRRLNQiOxapv9uSkCal3W0umpSQyBYtj6BhGxeKrBKVgXgdq7byStRFSlREaKIg+tkekieqNZbBArgSYoNACZilxrzzC6u0KuWtllldy1CwCtFEdBlSPnHwnD/XhAs6FVuoh5tmw+FLtVyg8UyMgSvVr1Vcya9uAOCLLiihsgAB5xqqcJaXcfk+zkWn7rUJ9F+R3CZs9rgEvBbHpFAKJqcMsInZ+G0Jt0s6kIpAPr/plcfrK2bcwG/L9Kbuedf31dmHAylKqfMpdqm2YoSXOs5Y7Wh6KV/1VhL/u0++hxGt6APjvpY0BTlvsw7fmBSPniHkC8fF6bEzP0blCRcI3SB7P/glrZqM5UptBoEI5a8LBv5G4YsVolRepj6FjwlPvfgBbLF5AXxFtZTk07UW7CRauO5xbJw=="
TF_VAR_provider_visibility: "public"
- CRA_TARGET: "patterns/roks"
CRA_IGNORE_RULES_FILE: "cra-tf-validate-ignore-rules.json"
PROFILE_ID: "fe96bd4d-9b37-40f2-b39f-a62760e326a3" # SCC profile ID (currently set to 'IBM Cloud Framework for Financial Services' '1.7.0' profile).
CRA_ENVIRONMENT_VARIABLES:
TF_VAR_prefix: "slz-roks"
TF_VAR_region: "us-south"
TF_VAR_provider_visibility: "public"
102 changes: 0 additions & 102 deletions ibm_catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,23 +66,6 @@
},
"key": "override_json_string"
},
{
"key": "provider_visibility",
"options": [
{
"displayname": "private",
"value": "private"
},
{
"displayname": "public",
"value": "public"
},
{
"displayname": "public-and-private",
"value": "public-and-private"
}
]
},
{
"custom_config": {
"config_constraints": {
Expand Down Expand Up @@ -212,23 +195,6 @@
"key": "ssh_public_key",
"required": true
},
{
"key": "provider_visibility",
"options": [
{
"displayname": "private",
"value": "private"
},
{
"displayname": "public",
"value": "public"
},
{
"displayname": "public-and-private",
"value": "public-and-private"
}
]
},
{
"hidden": true,
"key": "teleport_domain"
Expand Down Expand Up @@ -567,23 +533,6 @@
"key": "ssh_public_key",
"required": true
},
{
"key": "provider_visibility",
"options": [
{
"displayname": "private",
"value": "private"
},
{
"displayname": "public",
"value": "public"
},
{
"displayname": "public-and-private",
"value": "public-and-private"
}
]
},
{
"custom_config": {
"config_constraints": {
Expand Down Expand Up @@ -723,23 +672,6 @@
"key": "region",
"required": true
},
{
"key": "provider_visibility",
"options": [
{
"displayname": "private",
"value": "private"
},
{
"displayname": "public",
"value": "public"
},
{
"displayname": "public-and-private",
"value": "public-and-private"
}
]
},
{
"key": "add_edge_vpc",
"hidden": true
Expand Down Expand Up @@ -1091,23 +1023,6 @@
"key": "region",
"required": true,
"type": "string"
},
{
"key": "provider_visibility",
"options": [
{
"displayname": "private",
"value": "private"
},
{
"displayname": "public",
"value": "public"
},
{
"displayname": "public-and-private",
"value": "public-and-private"
}
]
}
],
"iam_permissions": [
Expand Down Expand Up @@ -1227,23 +1142,6 @@
],
"custom_config": {}
},
{
"key": "provider_visibility",
"options": [
{
"displayname": "private",
"value": "private"
},
{
"displayname": "public",
"value": "public"
},
{
"displayname": "public-and-private",
"value": "public-and-private"
}
]
},
{
"hidden": true,
"key": "tgactive_url"
Expand Down
1 change: 0 additions & 1 deletion patterns/roks-quickstart/provider.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
provider "ibm" {
ibmcloud_api_key = var.ibmcloud_api_key
region = var.region
visibility = var.provider_visibility
}
9 changes: 0 additions & 9 deletions patterns/roks-quickstart/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,6 @@ variable "ibmcloud_api_key" {
sensitive = true
}

variable "provider_visibility" {
description = "Set the visibility value for the IBM terraform provider. Supported values are `public`, `private`, `public-and-private`. [Learn more](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/guides/custom-service-endpoints)."
type = string
default = "private"
validation {
condition = contains(["public", "private", "public-and-private"], var.provider_visibility)
error_message = "Invalid visibility option. Allowed values are 'public', 'private', or 'public-and-private'."
}
}
variable "prefix" {
description = "A unique identifier for resources that is prepended to resources that are provisioned. Must begin with a lowercase letter and end with a lowercase letter or number. Must be 13 or fewer characters."
type = string
Expand Down
1 change: 0 additions & 1 deletion patterns/roks/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ provider "ibm" {
ibmcloud_api_key = var.ibmcloud_api_key
region = var.region
ibmcloud_timeout = 60
visibility = var.provider_visibility
}

##############################################################################
Expand Down
10 changes: 1 addition & 9 deletions patterns/roks/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,7 @@ variable "ibmcloud_api_key" {
type = string
sensitive = true
}
variable "provider_visibility" {
description = "Set the visibility value for the IBM terraform provider. Supported values are `public`, `private`, `public-and-private`. [Learn more](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/guides/custom-service-endpoints)."
type = string
default = "private"
validation {
condition = contains(["public", "private", "public-and-private"], var.provider_visibility)
error_message = "Invalid visibility option. Allowed values are 'public', 'private', or 'public-and-private'."
}
}

variable "prefix" {
description = "A unique identifier for resources that is prepended to resources that are provisioned. Must begin with a lowercase letter and end with a lowercase letter or number. Must be 13 or fewer characters."
type = string
Expand Down
1 change: 0 additions & 1 deletion patterns/vpc/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ provider "ibm" {
ibmcloud_api_key = var.ibmcloud_api_key
region = var.region
ibmcloud_timeout = 60
visibility = var.provider_visibility
}

##############################################################################
Expand Down
10 changes: 1 addition & 9 deletions patterns/vpc/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,7 @@ variable "ibmcloud_api_key" {
type = string
sensitive = true
}
variable "provider_visibility" {
description = "Set the visibility value for the IBM terraform provider. Supported values are `public`, `private`, `public-and-private`. [Learn more](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/guides/custom-service-endpoints)."
type = string
default = "private"
validation {
condition = contains(["public", "private", "public-and-private"], var.provider_visibility)
error_message = "Invalid visibility option. Allowed values are 'public', 'private', or 'public-and-private'."
}
}

variable "prefix" {
description = "A unique identifier for resources that is prepended to resources that are provisioned. Must begin with a lowercase letter and end with a lowercase letter or number. Must be 16 or fewer characters."
type = string
Expand Down
1 change: 0 additions & 1 deletion patterns/vsi-extension/provider.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
provider "ibm" {
ibmcloud_api_key = var.ibmcloud_api_key
region = var.region
visibility = var.provider_visibility
}
9 changes: 0 additions & 9 deletions patterns/vsi-extension/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,7 @@ variable "ibmcloud_api_key" {
type = string
sensitive = true
}
variable "provider_visibility" {
description = "Set the visibility value for the IBM terraform provider. Supported values are `public`, `private`, `public-and-private`. [Learn more](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/guides/custom-service-endpoints)."
type = string
default = "private"

validation {
condition = contains(["public", "private", "public-and-private"], var.provider_visibility)
error_message = "Invalid visibility option. Allowed values are 'public', 'private', or 'public-and-private'."
}
}
variable "region" {
description = "The region of the landing zone VPC."
type = string
Expand Down
1 change: 0 additions & 1 deletion patterns/vsi-quickstart/provider.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
provider "ibm" {
ibmcloud_api_key = var.ibmcloud_api_key
region = var.region
visibility = var.provider_visibility
}
10 changes: 0 additions & 10 deletions patterns/vsi-quickstart/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,6 @@ variable "ibmcloud_api_key" {
sensitive = true
}

variable "provider_visibility" {
description = "Set the visibility value for the IBM terraform provider. Supported values are `public`, `private`, `public-and-private`. [Learn more](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/guides/custom-service-endpoints)."
type = string
default = "private"

validation {
condition = contains(["public", "private", "public-and-private"], var.provider_visibility)
error_message = "Invalid visibility option. Allowed values are 'public', 'private', or 'public-and-private'."
}
}
variable "prefix" {
description = "A unique identifier for resources that is prepended to resources that are provisioned. Must begin with a lowercase letter and end with a lowercase letter or number. Must be 16 or fewer characters."
type = string
Expand Down
1 change: 0 additions & 1 deletion patterns/vsi/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ provider "ibm" {
ibmcloud_api_key = var.ibmcloud_api_key
region = var.region
ibmcloud_timeout = 60
visibility = var.provider_visibility
}

##############################################################################
Expand Down
10 changes: 1 addition & 9 deletions patterns/vsi/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,7 @@ variable "ibmcloud_api_key" {
type = string
sensitive = true
}
variable "provider_visibility" {
description = "Set the visibility value for the IBM terraform provider. Supported values are `public`, `private`, `public-and-private`. [Learn more](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/guides/custom-service-endpoints)."
type = string
default = "private"
validation {
condition = contains(["public", "private", "public-and-private"], var.provider_visibility)
error_message = "Invalid visibility option. Allowed values are 'public', 'private', or 'public-and-private'."
}
}

variable "prefix" {
description = "A unique identifier for resources that is prepended to resources that are provisioned. Must begin with a lowercase letter and end with a lowercase letter or number. Must be 16 or fewer characters."
type = string
Expand Down
2 changes: 0 additions & 2 deletions tests/other_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ func TestRunRoksPatternWithHPCS(t *testing.T) {
options.TerraformVars["hs_crypto_instance_name"] = permanentResources["hpcs_name_south"]
options.TerraformVars["hs_crypto_resource_group"] = permanentResources["hpcs_rg_south"]
options.TerraformVars["skip_kms_block_storage_s2s_auth_policy"] = true
options.TerraformVars["provider_visibility"] = "public"
// If "jp-osa" was the best region selected, default to us-south instead.
// "jp-osa" is currently not allowing hs-crypto be used for encrypting buckets in that region.
currentRegion, ok := options.TerraformVars["region"]
Expand All @@ -40,7 +39,6 @@ func TestRunVSIPatternWithHPCS(t *testing.T) {
options.TerraformVars["hs_crypto_instance_name"] = permanentResources["hpcs_name_south"]
options.TerraformVars["hs_crypto_resource_group"] = permanentResources["hpcs_rg_south"]
options.TerraformVars["skip_kms_block_storage_s2s_auth_policy"] = true
options.TerraformVars["provider_visibility"] = "public"
// If "jp-osa" was the best region selected, default to us-south instead.
// "jp-osa" is currently not allowing hs-crypto be used for encrypting buckets in that region.
currentRegion, ok := options.TerraformVars["region"]
Expand Down
Loading