Skip to content

Commit b79ba0f

Browse files
author
Sean Sundberg
authored
Adds logic to wait for resource group (#6)
Signed-off-by: Sean Sundberg <[email protected]>
1 parent 1bda04f commit b79ba0f

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

main.tf

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
provider "ibm" {
2-
generation = 2
3-
region = var.region
4-
ibmcloud_api_key = var.ibmcloud_api_key
5-
}
61

72
locals {
83
zone_count = 3
@@ -17,7 +12,15 @@ locals {
1712
ipv4_cidr_blocks = ibm_is_subnet.vpc_subnet[*].ipv4_cidr_block
1813
}
1914

15+
resource null_resource print_names {
16+
provisioner "local-exec" {
17+
command = "echo 'Resource group: ${var.resource_group_name}'"
18+
}
19+
}
20+
2021
data ibm_resource_group resource_group {
22+
depends_on = [null_resource.print_names]
23+
2124
name = var.resource_group_name
2225
}
2326

provider.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
provider "ibm" {
2+
generation = 2
3+
region = var.region
4+
ibmcloud_api_key = var.ibmcloud_api_key
5+
}

0 commit comments

Comments
 (0)