Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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
110 changes: 110 additions & 0 deletions ibm_catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@
},
{
"key": "prefix",
"default_value": "dev",
"random_string": {
"length": 4
},
"value_constraints": [
{
"type": "regex",
Expand Down Expand Up @@ -306,6 +310,20 @@
}
]
},
{
"key": "resource_group",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not following why you are adding this virtual input? You should be mapping the existing_resource_group_name input down

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if your starting point is buckets there is no RG, so we need a virtual for it. For consistency I will update it to existing_resource_group_name with displayname

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahh got it - just for buckets yes

"custom_config": {
"type": "resource_group",
"grouping": "deployment",
"original_grouping": "deployment",
"config_constraints": {
"identifier": "rg_name"
}
},
"default_value": "Default",
"description": "The name of an existing resource group to provision the resources.",
"virtual": true
},
{
"key": "cross_region_location",
"required": true,
Expand Down Expand Up @@ -590,6 +608,11 @@
"dependency_input": "prefix",
"version_input": "prefix",
"reference_version": true
},
{
"dependency_input": "existing_resource_group_name",
"version_input": "existing_resource_group_name",
"reference_version": true
}
]
},
Expand All @@ -614,6 +637,11 @@
"dependency_input": "prefix",
"version_input": "prefix",
"reference_version": true
},
{
"dependency_input": "existing_resource_group_name",
"version_input": "existing_resource_group_name",
"reference_version": true
}
],
"optional": true,
Expand Down Expand Up @@ -645,6 +673,11 @@
"dependency_input": "enable_platform_metrics",
"version_input": "enable_platform_metrics",
"reference_version": true
},
{
"dependency_input": "existing_resource_group_name",
"version_input": "existing_resource_group_name",
"reference_version": true
}
]
}
Expand Down Expand Up @@ -726,6 +759,20 @@
}
]
},
{
"key": "resource_group",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

"custom_config": {
"type": "resource_group",
"grouping": "deployment",
"original_grouping": "deployment",
"config_constraints": {
"identifier": "rg_name"
}
},
"default_value": "Default",
"description": "The name of an existing resource group to provision the resources.",
"virtual": true
},
{
"key": "cross_region_location",
"required": true,
Expand Down Expand Up @@ -971,6 +1018,11 @@
"dependency_input": "prefix",
"version_input": "prefix",
"reference_version": true
},
{
"dependency_input": "existing_resource_group_name",
"version_input": "existing_resource_group_name",
"reference_version": true
}
]
},
Expand All @@ -995,6 +1047,11 @@
"dependency_input": "prefix",
"version_input": "prefix",
"reference_version": true
},
{
"dependency_input": "existing_resource_group_name",
"version_input": "existing_resource_group_name",
"reference_version": true
}
],
"optional": true,
Expand Down Expand Up @@ -1026,6 +1083,11 @@
"dependency_input": "enable_platform_metrics",
"version_input": "enable_platform_metrics",
"reference_version": true
},
{
"dependency_input": "existing_resource_group_name",
"version_input": "existing_resource_group_name",
"reference_version": true
}
]
}
Expand Down Expand Up @@ -1122,6 +1184,20 @@
}
]
},
{
"key": "resource_group",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

"custom_config": {
"type": "resource_group",
"grouping": "deployment",
"original_grouping": "deployment",
"config_constraints": {
"identifier": "rg_name"
}
},
"default_value": "Default",
"description": "The name of an existing resource group to provision the resources.",
"virtual": true
},
{
"key": "region",
"required": true,
Expand Down Expand Up @@ -1439,6 +1515,11 @@
"dependency_input": "prefix",
"version_input": "prefix",
"reference_version": true
},
{
"dependency_input": "existing_resource_group_name",
"version_input": "existing_resource_group_name",
"reference_version": true
}
]
},
Expand Down Expand Up @@ -1585,6 +1666,20 @@
}
]
},
{
"key": "resource_group",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can update these but they are virtual inputs that would get a display name of resource_group so I skipped calling them existing

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we have a virtual input at all? #978 (comment)

"custom_config": {
"type": "resource_group",
"grouping": "deployment",
"original_grouping": "deployment",
"config_constraints": {
"identifier": "rg_name"
}
},
"default_value": "Default",
"description": "The name of an existing resource group to provision the resources.",
"virtual": true
},
{
"key": "region",
"required": true,
Expand Down Expand Up @@ -1856,6 +1951,11 @@
"dependency_input": "prefix",
"version_input": "prefix",
"reference_version": true
},
{
"dependency_input": "existing_resource_group_name",
"version_input": "existing_resource_group_name",
"reference_version": true
}
]
},
Expand All @@ -1880,6 +1980,11 @@
"dependency_input": "prefix",
"version_input": "prefix",
"reference_version": true
},
{
"dependency_input": "existing_resource_group_name",
"version_input": "existing_resource_group_name",
"reference_version": true
}
],
"optional": true,
Expand Down Expand Up @@ -1911,6 +2016,11 @@
"dependency_input": "enable_platform_metrics",
"version_input": "enable_platform_metrics",
"reference_version": true
},
{
"dependency_input": "existing_resource_group_name",
"version_input": "existing_resource_group_name",
"reference_version": true
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion solutions/instance/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

module "resource_group" {
source = "terraform-ibm-modules/resource-group/ibm"
version = "1.3.0"
version = "1.4.0"
existing_resource_group_name = var.existing_resource_group_name
}

Expand Down
8 changes: 4 additions & 4 deletions tests/pr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -642,8 +642,8 @@ func TestRegionalBucketAddonDefault(t *testing.T) {
"deploy-arch-ibm-cos",
"regional-bucket-fully-configurable",
map[string]interface{}{
"prefix": options.Prefix,
"bucket_name": "test",
"bucket_name": "test",
"resource_group": resourceGroup,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resource_group is not the name of the input, thats just the display name in ibm_catalog.json. The input is called existing_resource_group_name

},
)

Expand All @@ -666,8 +666,8 @@ func TestCrossRegionalBucketAddonDefault(t *testing.T) {
"deploy-arch-ibm-cos",
"cross-regional-bucket-fully-configurable",
map[string]interface{}{
"prefix": options.Prefix,
"bucket_name": "test",
"bucket_name": "test",
"resource_group": resourceGroup,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

},
)

Expand Down