Skip to content

Commit

Permalink
Add space_name as output from cg_space module
Browse files Browse the repository at this point in the history
  • Loading branch information
rahearn committed Oct 10, 2024
1 parent ec560e0 commit 5dd540d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cg_space/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
output "space_id" {
value = cloudfoundry_space.space.id
}

output "space_name" {
value = cloudfoundry_space.space.name
}
5 changes: 5 additions & 0 deletions cg_space/tests/creation.tftest.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ run "test_space_creation" {
condition = cloudfoundry_space.space.name == var.cf_space_name
error_message = "Space name should match the cf_space_name variable"
}

assert {
condition = cloudfoundry_space.space.name == output.space_name
error_message = "Space name output must match the new space"
}
}

run "test_manager_only" {
Expand Down

0 comments on commit 5dd540d

Please sign in to comment.