-
Notifications
You must be signed in to change notification settings - Fork 87
resource_space
ArthurHlt edited this page Aug 31, 2020
·
3 revisions
Provides a Cloud Foundry resource for managing Cloud Foundry spaces within organizations.
~> NOTE: This resource requires the provider to be authenticated with an account granted org manager permissions. ~> NOTE: Only modify users managed in the resource, and ignore any existing other users provisioned elsewhere.
The following is a Space created within the referenced Org. All referenced users must have been added as a member to the owning Org (see related CF doc for additional context)
resource "cloudfoundry_space" "s1" {
name = "space-one"
org = cloudfoundry_org.o1.id
quota = cloudfoundry_quota.dev.id
asgs = [ cloudfoundry_asg.svc.id ]
allow_ssh = true
}
The following arguments are supported:
-
name
- (Required) The name of the Space in Cloud Foundry. -
org
- (Required) The ID of the Org within which to create the space. -
quota
- (Optional) The ID of the Space quota or plan defined for the owning Org. Specifying an empty string requests unassigns any space quota from the space. Defaults to empty string. -
allow_ssh
- (Optional) Allows SSH to application containers via the CF CLI. Defaults to true. -
isolation_segment
- (Experimental
,Optional) The ID of the isolation segment to assign to the space. The segment must be entitled to the space's parent organization. If the isolation segment id is unspecified, then Cloud Foundry assigns the space to the org’s default isolation segment if any. Note that existing apps in the space will not run in a newly assigned isolation segment until they are restarted. -
asgs
- (Optional) List of running application security groups to apply to applications running within this space. Defaults to empty list. -
staging_asgs
- (Optional) List of staging application security groups to apply to applications being staged for this space. Defaults to empty list. -
labels
- (Optional, map string of string) Add labels as described here. Works only on cloud foundry with api >= v3.63. -
annotations
- (Optional, map string of string) Add annotations as described here. Works only on cloud foundry with api >= v3.63.
The following attributes are exported:
-
id
- The GUID of the Space
An existing Space can be imported using its guid, e.g.
$ terraform import cloudfoundry_space.s1 a-guid
- cloudfoundry_app
- cloudfoundry_asg
- cloudfoundry_domain
- cloudfoundry_info
- cloudfoundry_isolation_segment
- cloudfoundry_org
- cloudfoundry_org_quota
- cloudfoundry_route
- cloudfoundry_router_group
- cloudfoundry_service
- cloudfoundry_service_instance
- cloudfoundry_service_key
- cloudfoundry_space
- cloudfoundry_space_quota
- cloudfoundry_stack
- cloudfoundry_user
- cloudfoundry_user_provided_service
- cloudfoundry_app
- cloudfoundry_asg
- cloudfoundry_buildpack
- cloudfoundry_default_asg
- cloudfoundry_domain
- cloudfoundry_evg
- cloudfoundry_feature_flag
- cloudfoundry_isolation_segment
- cloudfoundry_isolation_segment_entitlement
- cloudfoundry_network_policy
- cloudfoundry_org
- cloudfoundry_org_quota
- cloudfoundry_org_users
- cloudfoundry_private_domain_access
- cloudfoundry_route
- cloudfoundry_route_service_binding
- cloudfoundry_service_broker
- cloudfoundry_service_instance
- cloudfoundry_service_key
- cloudfoundry_service_plan_access
- cloudfoundry_space
- cloudfoundry_space_quota
- cloudfoundry_space_users
- cloudfoundry_user
- cloudfoundry_user_provided_service