Skip to content

Commit c2ea44d

Browse files
authored
feat: added new outputs app_config_account_id, app_config_crn and app_config_account_id (#206)
1 parent 4da3980 commit c2ea44d

File tree

5 files changed

+53
-7
lines changed

5 files changed

+53
-7
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,11 @@ For more information on access and permissions, see <https://cloud.ibm.com/docs/
111111

112112
| Name | Description |
113113
|------|-------------|
114+
| <a name="output_app_config_account_id"></a> [app\_config\_account\_id](#output\_app\_config\_account\_id) | Account ID of the App Configuration instance |
114115
| <a name="output_app_config_collection_ids"></a> [app\_config\_collection\_ids](#output\_app\_config\_collection\_ids) | List of IDs for the collections in the App Configuration instance |
116+
| <a name="output_app_config_crn"></a> [app\_config\_crn](#output\_app\_config\_crn) | CRN of the App Configuration instance |
115117
| <a name="output_app_config_guid"></a> [app\_config\_guid](#output\_app\_config\_guid) | GUID of the App Configuration instance |
118+
| <a name="output_app_config_id"></a> [app\_config\_id](#output\_app\_config\_id) | ID of the App Configuration instance |
116119
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
117120

118121
<!-- Leave this section as is so that your module has a link to local development environment set up steps for contributors to follow -->

examples/basic/outputs.tf

+15
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,18 @@ output "app_config_guid" {
1616
description = "App Configuration GUID"
1717
value = module.app_config.app_config_guid
1818
}
19+
20+
output "app_config_crn" {
21+
description = "CRN of the App Configuration instance"
22+
value = module.app_config.app_config_crn
23+
}
24+
25+
output "app_config_id" {
26+
description = "ID of the App Configuration instance"
27+
value = module.app_config.app_config_id
28+
}
29+
30+
output "app_config_account_id" {
31+
description = "Account ID of the App Configuration instance"
32+
value = module.app_config.app_config_account_id
33+
}

examples/complete/outputs.tf

+16-1
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,29 @@ output "prefix" {
1414

1515
output "resource_group_name" {
1616
description = "The name of the resource group used"
17-
value = var.resource_group
17+
value = module.resource_group.resource_group_name
1818
}
1919

2020
output "app_config_guid" {
2121
description = "App Configuration GUID"
2222
value = module.app_config.app_config_guid
2323
}
2424

25+
output "app_config_crn" {
26+
description = "CRN of the App Configuration instance"
27+
value = module.app_config.app_config_crn
28+
}
29+
30+
output "app_config_id" {
31+
description = "ID of the App Configuration instance"
32+
value = module.app_config.app_config_id
33+
}
34+
35+
output "app_config_account_id" {
36+
description = "Account ID of the App Configuration instance"
37+
value = module.app_config.app_config_account_id
38+
}
39+
2540
output "app_config_collection_ids" {
2641
description = "App Configuration Collection IDs"
2742
value = module.app_config.app_config_collection_ids

outputs.tf

+15
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,26 @@
22
# Outputs
33
########################################################################################################################
44

5+
output "app_config_crn" {
6+
description = "CRN of the App Configuration instance"
7+
value = ibm_resource_instance.app_config.crn
8+
}
9+
10+
output "app_config_id" {
11+
description = "ID of the App Configuration instance"
12+
value = ibm_resource_instance.app_config.id
13+
}
14+
515
output "app_config_guid" {
616
description = "GUID of the App Configuration instance"
717
value = ibm_resource_instance.app_config.guid
818
}
919

20+
output "app_config_account_id" {
21+
description = "Account ID of the App Configuration instance"
22+
value = ibm_resource_instance.app_config.account_id
23+
}
24+
1025
output "app_config_collection_ids" {
1126
description = "List of IDs for the collections in the App Configuration instance"
1227
value = [for obj in ibm_app_config_collection.collections : obj.collection_id]

tests/pr_test.go

+4-6
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import (
1111
)
1212

1313
// Use existing resource group
14-
const resourceGroup = "geretain-test-app-config"
1514
const completeExampleDir = "examples/complete"
1615

1716
func setupOptions(t *testing.T, prefix string, dir string) *testhelper.TestOptions {
@@ -23,11 +22,10 @@ func setupOptions(t *testing.T, prefix string, dir string) *testhelper.TestOptio
2322
}
2423
rand.New(rand.NewSource(time.Now().Unix()))
2524
options := testhelper.TestOptionsDefaultWithVars(&testhelper.TestOptions{
26-
Testing: t,
27-
TerraformDir: dir,
28-
Prefix: prefix,
29-
Region: validRegions[rand.Intn(len(validRegions))],
30-
ResourceGroup: resourceGroup,
25+
Testing: t,
26+
TerraformDir: dir,
27+
Prefix: prefix,
28+
Region: validRegions[rand.Intn(len(validRegions))],
3129
})
3230
return options
3331
}

0 commit comments

Comments
 (0)