Skip to content

Commit d694ebb

Browse files
committed
SKIP UPGRADE TEST
1 parent 4a7d4f2 commit d694ebb

File tree

5 files changed

+39
-15
lines changed

5 files changed

+39
-15
lines changed

.secrets.baseline

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"files": "go.sum|^.secrets.baseline$",
44
"lines": null
55
},
6-
"generated_at": "2025-03-24T11:10:21Z",
6+
"generated_at": "2025-05-02T09:58:59Z",
77
"plugins_used": [
88
{
99
"name": "AWSKeyDetector"
@@ -104,6 +104,16 @@
104104
"type": "Secret Keyword",
105105
"verified_result": null
106106
}
107+
],
108+
"tests/pr_test.go": [
109+
{
110+
"hashed_secret": "8c7c51db5075ebd0369c51e9f14737d9b4c1c21d",
111+
"is_secret": false,
112+
"is_verified": false,
113+
"line_number": 356,
114+
"type": "Base64 High Entropy String",
115+
"verified_result": null
116+
}
107117
]
108118
},
109119
"version": "0.13.1+ibm.62.dss",

cra-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ CRA_TARGETS:
66
PROFILE_ID: "fe96bd4d-9b37-40f2-b39f-a62760e326a3" # SCC profile ID (currently set to 'IBM Cloud Framework for Financial Services' '1.7.0' profile).
77
CRA_ENVIRONMENT_VARIABLES:
88
TF_VAR_prefix: "test"
9+
TF_VAR_use_ibm_owned_encryption_key: false
910
TF_VAR_existing_kms_instance_crn: "crn:v1:bluemix:public:hs-crypto:us-south:a/abac0df06b644a9cabc6e44f55b3880e:e6dce284-e80f-46e1-a3c1-830f7adff7a9::"
1011
TF_VAR_existing_kms_key_crn: "crn:v1:bluemix:public:hs-crypto:us-south:a/abac0df06b644a9cabc6e44f55b3880e:e6dce284-e80f-46e1-a3c1-830f7adff7a9:key:76170fae-4e0c-48c3-8ebe-326059ebb533"
1112
TF_VAR_provider_visibility: "public"

ibm_catalog.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@
9696
},
9797
{
9898
"key": "provider_visibility",
99+
"hidden": true,
99100
"options": [
100101
{
101102
"displayname": "private",

solutions/fully-configurable/variables.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,13 @@ variable "use_ibm_owned_encryption_key" {
238238
)
239239
error_message = "When not using ibm owned encryption keys by setting variable 'use_ibm_owned_encryption_key' to false, 'existing_kms_instance_crn', 'existing_kms_key_crn' or 'existing_backup_kms_key_crn' must be set."
240240
}
241+
242+
validation {
243+
condition = (
244+
var.use_ibm_owned_encryption_key ? length(compact([var.existing_kms_instance_crn, var.existing_kms_key_crn, var.existing_backup_kms_key_crn])) == 0 : true
245+
)
246+
error_message = "When using ibm owned encryption keys by setting variable 'use_ibm_owned_encryption_key' to true, 'existing_kms_instance_crn', 'existing_kms_key_crn' and 'existing_backup_kms_key_crn' must not be set."
247+
}
241248
}
242249

243250
variable "existing_kms_instance_crn" {

tests/pr_test.go

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ func TestRunFullyConfigurableSolutionSchematics(t *testing.T) {
9696
options.TerraformVars = []testschematic.TestSchematicTerraformVar{
9797
{Name: "ibmcloud_api_key", Value: options.RequiredEnvironmentVars["TF_VAR_ibmcloud_api_key"], DataType: "string", Secure: true},
9898
{Name: "elasticsearch_access_tags", Value: permanentResources["accessTags"], DataType: "list(string)"},
99+
{Name: "use_ibm_owned_encryption_key", Value: false, DataType: "bool"},
99100
{Name: "existing_kms_instance_crn", Value: permanentResources["hpcs_south_crn"], DataType: "string"},
100101
{Name: "kms_endpoint_type", Value: "private", DataType: "string"},
101102
{Name: "existing_resource_group_name", Value: resourceGroup, DataType: "string"},
@@ -131,6 +132,7 @@ func TestRunFullyConfigurableUpgradeSolution(t *testing.T) {
131132
options.TerraformVars = map[string]interface{}{
132133
"prefix": options.Prefix,
133134
"elasticsearch_access_tags": permanentResources["accessTags"],
135+
"use_ibm_owned_encryption_key": false,
134136
"existing_kms_instance_crn": permanentResources["hpcs_south_crn"],
135137
"kms_endpoint_type": "public",
136138
"existing_resource_group_name": resourceGroup,
@@ -185,6 +187,7 @@ func TestRunSecurityEnforcedSolutionSchematics(t *testing.T) {
185187

186188
options.TerraformVars = []testschematic.TestSchematicTerraformVar{
187189
{Name: "ibmcloud_api_key", Value: options.RequiredEnvironmentVars["TF_VAR_ibmcloud_api_key"], DataType: "string", Secure: true},
190+
{Name: "use_ibm_owned_encryption_key", Value: false, DataType: "bool"},
188191
{Name: "elasticsearch_access_tags", Value: permanentResources["accessTags"], DataType: "list(string)"},
189192
{Name: "existing_kms_instance_crn", Value: permanentResources["hpcs_south_crn"], DataType: "string"},
190193
{Name: "existing_resource_group_name", Value: resourceGroup, DataType: "string"},
@@ -310,7 +313,7 @@ func TestPlanValidation(t *testing.T) {
310313
options := testhelper.TestOptionsDefault(&testhelper.TestOptions{
311314
Testing: t,
312315
TerraformDir: fullyConfigurableSolutionTerraformDir,
313-
Prefix: "validate-plan",
316+
Prefix: "val-plan",
314317
ResourceGroup: resourceGroup,
315318
Region: "us-south", // skip VPC region picker
316319
})
@@ -319,36 +322,38 @@ func TestPlanValidation(t *testing.T) {
319322
options.TerraformOptions.Logger = logger.Discard
320323
options.TerraformOptions.Vars = map[string]interface{}{
321324
"prefix": options.Prefix,
325+
"existing_resource_group_name": resourceGroup,
322326
"region": "us-south",
323327
"elasticsearch_version": "8.10",
324328
"provider_visibility": "public",
325-
"existing_resource_group_name": options.Prefix,
326329
}
327330

328331
// Test the DA when using Elser model
329-
var standardSolutionWithElserModelVars = map[string]interface{}{
330-
"existing_kms_instance_crn": permanentResources["hpcs_south_crn"],
331-
"enable_elser_model": true,
332-
"plan": "platinum",
332+
var fullyConfigurableSolutionWithElserModelVars = map[string]interface{}{
333+
"use_ibm_owned_encryption_key": false,
334+
"existing_kms_instance_crn": permanentResources["hpcs_south_crn"],
335+
"enable_elser_model": true,
336+
"plan": "platinum",
333337
}
334338

335339
// Test the DA when using Kibana dashboard and existing KMS instance
336-
var standardSolutionWithKibanaDashboardVars = map[string]interface{}{
337-
"enable_kibana_dashboard": true,
338-
"existing_kms_instance_crn": permanentResources["hpcs_south_crn"],
339-
"plan": "enterprise",
340+
var fullyConfigurableSolutionWithKibanaDashboardVars = map[string]interface{}{
341+
"enable_kibana_dashboard": true,
342+
"use_ibm_owned_encryption_key": false,
343+
"existing_kms_instance_crn": permanentResources["hpcs_south_crn"],
344+
"plan": "enterprise",
340345
}
341346

342347
// Test the DA when using IBM owned encryption key
343-
var standardSolutionWithUseIbmOwnedEncKey = map[string]interface{}{
348+
var fullyConfigurableSolutionWithUseIbmOwnedEncKey = map[string]interface{}{
344349
"use_ibm_owned_encryption_key": true,
345350
}
346351

347352
// Create a map of the variables
348353
tfVarsMap := map[string]map[string]interface{}{
349-
"standardSolutionWithElserModelVars": standardSolutionWithElserModelVars,
350-
"standardSolutionWithKibanaDashboardVars": standardSolutionWithKibanaDashboardVars,
351-
"standardSolutionWithUseIbmOwnedEncKey": standardSolutionWithUseIbmOwnedEncKey,
354+
"fullyConfigurableSolutionWithElserModelVars": fullyConfigurableSolutionWithElserModelVars,
355+
"fullyConfigurableSolutionWithKibanaDashboardVars": fullyConfigurableSolutionWithKibanaDashboardVars,
356+
"fullyConfigurableSolutionWithUseIbmOwnedEncKey": fullyConfigurableSolutionWithUseIbmOwnedEncKey,
352357
}
353358

354359
_, initErr := terraform.InitE(t, options.TerraformOptions)

0 commit comments

Comments
 (0)