From 95ea3ba5a5e56a1436c2dc75c9c2990677e74f81 Mon Sep 17 00:00:00 2001 From: Ryan Ahearn Date: Fri, 11 Oct 2024 08:29:40 -0400 Subject: [PATCH] Pass allow_ssh variable on to space creation --- README.md | 1 + cg_space/main.tf | 5 +++-- cg_space/variables.tf | 6 ++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6149bc3..db970db 100644 --- a/README.md +++ b/README.md @@ -146,6 +146,7 @@ module "egress_space" { "trusted_local_networks_egress", "public_networks_egress" ] + allow_ssh = false } ``` diff --git a/cg_space/main.tf b/cg_space/main.tf index f69f79d..3be9866 100644 --- a/cg_space/main.tf +++ b/cg_space/main.tf @@ -3,8 +3,9 @@ data "cloudfoundry_org" "org" { } resource "cloudfoundry_space" "space" { - name = var.cf_space_name - org = data.cloudfoundry_org.org.id + name = var.cf_space_name + org = data.cloudfoundry_org.org.id + allow_ssh = var.allow_ssh } ### diff --git a/cg_space/variables.tf b/cg_space/variables.tf index 6257cb9..1811aae 100644 --- a/cg_space/variables.tf +++ b/cg_space/variables.tf @@ -31,3 +31,9 @@ variable "deployers" { description = "list of cloud.gov users to be assigned both SpaceManager and SpaceDeveloper roles" default = [] } + +variable "allow_ssh" { + type = bool + description = "(Optional) Allows SSH to application containers via the CF CLI. Defaults to true." + default = true +}