Skip to content

Commit 6f417de

Browse files
authored
added resource_crn to outputs (#16)
* added resource_crn to outputs Signed-off-by: Andrew Trice <[email protected]> * removed module symlink directory Signed-off-by: Andrew Trice <[email protected]> * updated test case Signed-off-by: Andrew Trice <[email protected]>
1 parent dfc30b5 commit 6f417de

File tree

4 files changed

+13
-0
lines changed

4 files changed

+13
-0
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
11
.idea/
22
*.iml
3+
4+
test/stages/module
5+
.terraform
6+
*.tfstate*
7+

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ locals {
44
vpc_name = lower(replace(var.name != "" ? var.name : "${local.prefix_name}-vpc", "_", "-"))
55
vpc_id = ibm_is_vpc.vpc.id
66
security_group_id = ibm_is_vpc.vpc.default_security_group
7+
crn = ibm_is_vpc.vpc.resource_crn
78
}
89

910
resource ibm_is_vpc vpc {

outputs.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,9 @@ output "acl_id" {
1515
value = ibm_is_network_acl.network_acl.id
1616
description = "The id of the network acl"
1717
}
18+
19+
output "crn" {
20+
value = local.crn
21+
depends_on = [ibm_is_vpc.vpc]
22+
description = "The CRN for the vpc instance"
23+
}

test/stages/stage1-resource-group.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ module "resource_group" {
33

44
resource_group_name = var.resource_group_name
55
provision = false
6+
ibmcloud_api_key = var.ibmcloud_api_key
67
}

0 commit comments

Comments
 (0)