Skip to content

Commit 511bef1

Browse files
committed
resource group null by default
1 parent e4f8d64 commit 511bef1

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

solutions/fully-configurable/main.tf

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,10 @@ locals {
66
# Resource Group
77
##############################################################################
88

9-
locals {
10-
existing_resource_group_name = var.existing_resource_group_name == null ? data.ibm_resource_group.default[0].name : var.existing_resource_group_name
11-
}
12-
13-
data "ibm_resource_group" "default" {
14-
count = var.existing_resource_group_name == null ? 1 : 0
15-
is_default = "true"
16-
}
17-
189
module "resource_group" {
1910
source = "terraform-ibm-modules/resource-group/ibm"
2011
version = "1.2.1"
21-
existing_resource_group_name = local.existing_resource_group_name
12+
existing_resource_group_name = var.existing_resource_group_name
2213
}
2314

2415
#############################################################################

solutions/fully-configurable/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ variable "provider_visibility" {
2121

2222
variable "existing_resource_group_name" {
2323
type = string
24-
description = "The name of an existing resource group to provision the resources."
24+
description = "The name of an existing resource group to provision the resources. If not provided the default resource group will be used."
2525
default = null
2626
}
2727

0 commit comments

Comments
 (0)