-
Notifications
You must be signed in to change notification settings - Fork 87
resource_domain
Provides a resource for managing shared or private domains in Cloud Foundry.
The following is an example of a shared domain for a sub-domain of the default application domain retrieved via a domain data source.
resource "cloudfoundry_domain" "shared" {
sub_domain = "dev"
domain = data.cloudfoundry_domain.apps.domain
internal = false
}
The following example creates a private domain owned by the Org referenced by cloudfoundry_org.pcfdev-org.id
.
resource "cloudfoundry_domain" "private" {
name = "pcfdev-org.io"
org = cloudfoundry_org.pcfdev-org.id
}
~> NOTE: To control sharing of a private domain, use the cloudfoundry_private_domain resource.
The following arguments are supported:
-
name
- (Optional, String) Full name of domain. If specified then thesub_domain
anddomain
attributes will be computed from thename
-
sub_domain
- (Optional, String) Sub-domain part of full domain name. If specified thedomain
argument needs to be provided and thename
will be computed. -
domain
- (Optional, String) Domain part of full domain name. If specified thesub_domain
argument needs to be provided and thename
will be computed.
The following argument applies only to shared domains.
-
router_group
- (Optional, String) The router group GUID, which can be retrieved via thecloudfoundry_router_group
data resource. You would need to provide this when creating a shared domain for TCP routes.
The following argument applies only to private domains.
-
org
- (Optional, String) The ID of the Org that owns this domain. If specified, this resource will provision a private domain. By default, the provisioned domain is a public (shared) domain. -
internal
- (Optional, bool) Flag that sets the domain as an internal domain. Internal domains are used for internal app to app networking only. Defaults to "false". Only works on shared domain.
The following attributes are exported:
-
id
- The GUID of the domain.
An existing Domain can be imported using its Domain Guid, e.g.
$ terraform import cloudfoundry_domain.private 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