File tree Expand file tree Collapse file tree 7 files changed +29
-11
lines changed
integration/simple_example Expand file tree Collapse file tree 7 files changed +29
-11
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ provider "google" {
2121module "folders" {
2222 source = " ../.."
2323
24- parent = var. parent
24+ parent = " ${ var . parent_type } / ${ var . parent_id } "
2525 names = var. names
2626 set_roles = true
2727 per_folder_admins = var. per_folder_admins
Original file line number Diff line number Diff line change 1414 * limitations under the License.
1515 */
1616
17- variable "parent " {
17+ variable "parent_id " {
1818 type = string
19- description = " The resource name of the parent Folder or Organization. Must be of the form folders/folder_id or organizations/org_id"
19+ description = " Id of the resource under which the folder will be placed."
20+ }
21+
22+ variable "parent_type" {
23+ type = string
24+ description = " Type of the parent reosurce, defaults to organization."
25+ default = " folders"
2026}
2127
2228variable "names" {
Original file line number Diff line number Diff line change @@ -21,7 +21,8 @@ provider "random" {
2121module "example" {
2222 source = " ../../../examples/simple_example"
2323
24- parent = var. parent
24+ parent_id = var. parent_id
25+ parent_type = var. parent_type
2526 names = var. names
2627 per_folder_admins = var. per_folder_admins
2728 all_folder_admins = var. all_folder_admins
Original file line number Diff line number Diff line change @@ -19,9 +19,14 @@ output "names_and_ids" {
1919 value = module. example . names_and_ids
2020}
2121
22- output "parent" {
23- description = " The resource name of the parent Folder or Organization. Must be of the form folders/folder_id or organizations/org_id"
24- value = var. parent
22+ output "parent_id" {
23+ description = " Id of the resource under which the folder will be placed."
24+ value = var. parent_id
25+ }
26+
27+ output "parent_type" {
28+ description = " Type of the parent reosurce, defaults to organization."
29+ value = var. parent_type
2530}
2631
2732output "names" {
Original file line number Diff line number Diff line change 1414 * limitations under the License.
1515 */
1616
17- variable "parent " {
17+ variable "parent_id " {
1818 type = string
19- description = " The resource name of the parent Folder or Organization. Must be of the form folders/folder_id or organizations/org_id"
19+ description = " Id of the resource under which the folder will be placed."
20+ }
21+
22+ variable "parent_type" {
23+ type = string
24+ description = " Type of the parent reosurce, defaults to organization."
25+ default = " folders"
2026}
2127
2228variable "names" {
Original file line number Diff line number Diff line change 1515control "gcloud" do
1616 title "gcloud"
1717
18- describe command ( "gcloud resource-manager folders list --folder=#{ attribute ( "parent" ) . split ( '/' ) [ 1 ] } " ) do
18+ describe command ( "gcloud resource-manager folders list --folder=#{ attribute ( "parent_id" ) } " ) do
1919 its ( :exit_status ) { should eq 0 }
2020 its ( :stderr ) { should eq "" }
2121 its ( :stdout ) { should include "#{ attribute ( "names" ) [ 0 ] } " }
Original file line number Diff line number Diff line change 44 git : https://github.com/inspec/inspec-gcp.git
55 tag : v0.10.0
66attributes :
7- - name : parent
7+ - name : parent_id
88 required : true
99 type : string
1010 - name : names
You can’t perform that action at this time.
0 commit comments