cloudfoundry.Domain
Explore with Pulumi AI
Provides a resource for managing shared or private domains in Cloud Foundry.
Example Usage
The following is an example of a shared domain for a sub-domain of the default application domain retrieved via a domain data source.
import * as pulumi from "@pulumi/pulumi";
import * as cloudfoundry from "@pulumi/cloudfoundry";
const shared = new cloudfoundry.Domain("shared", {
subDomain: "dev",
domain: data.cloudfoundry_domain.apps.domain,
internal: false,
});
import pulumi
import pulumi_cloudfoundry as cloudfoundry
shared = cloudfoundry.Domain("shared",
sub_domain="dev",
domain=data["cloudfoundry_domain"]["apps"]["domain"],
internal=False)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/cloudfoundry/cloudfoundry"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudfoundry.NewDomain(ctx, "shared", &cloudfoundry.DomainArgs{
SubDomain: pulumi.String("dev"),
Domain: pulumi.Any(data.Cloudfoundry_domain.Apps.Domain),
Internal: pulumi.Bool(false),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudfoundry = Pulumi.Cloudfoundry;
return await Deployment.RunAsync(() =>
{
var shared = new Cloudfoundry.Domain("shared", new()
{
SubDomain = "dev",
Domain = data.Cloudfoundry_domain.Apps.Domain,
Internal = false,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudfoundry.Domain;
import com.pulumi.cloudfoundry.DomainArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var shared = new Domain("shared", DomainArgs.builder()
.subDomain("dev")
.domain(data.cloudfoundry_domain().apps().domain())
.internal(false)
.build());
}
}
resources:
shared:
type: cloudfoundry:Domain
properties:
subDomain: 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
.
import * as pulumi from "@pulumi/pulumi";
import * as cloudfoundry from "@pulumi/cloudfoundry";
const _private = new cloudfoundry.Domain("private", {org: cloudfoundry_org["pcfdev-org"].id});
import pulumi
import pulumi_cloudfoundry as cloudfoundry
private = cloudfoundry.Domain("private", org=cloudfoundry_org["pcfdev-org"]["id"])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/cloudfoundry/cloudfoundry"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudfoundry.NewDomain(ctx, "private", &cloudfoundry.DomainArgs{
Org: pulumi.Any(cloudfoundry_org.PcfdevOrg.Id),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudfoundry = Pulumi.Cloudfoundry;
return await Deployment.RunAsync(() =>
{
var @private = new Cloudfoundry.Domain("private", new()
{
Org = cloudfoundry_org.Pcfdev_org.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudfoundry.Domain;
import com.pulumi.cloudfoundry.DomainArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var private_ = new Domain("private", DomainArgs.builder()
.org(cloudfoundry_org.pcfdev-org().id())
.build());
}
}
resources:
private:
type: cloudfoundry:Domain
properties:
org: ${cloudfoundry_org"pcfdev-org"[%!s(MISSING)].id}
NOTE: To control sharing of a private domain, use the cloudfoundry.PrivateDomainAccess resource.
Create Domain Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Domain(name: string, args?: DomainArgs, opts?: CustomResourceOptions);
@overload
def Domain(resource_name: str,
args: Optional[DomainArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def Domain(resource_name: str,
opts: Optional[ResourceOptions] = None,
domain: Optional[str] = None,
domain_id: Optional[str] = None,
internal: Optional[bool] = None,
name: Optional[str] = None,
org: Optional[str] = None,
router_group: Optional[str] = None,
sub_domain: Optional[str] = None)
func NewDomain(ctx *Context, name string, args *DomainArgs, opts ...ResourceOption) (*Domain, error)
public Domain(string name, DomainArgs? args = null, CustomResourceOptions? opts = null)
public Domain(String name, DomainArgs args)
public Domain(String name, DomainArgs args, CustomResourceOptions options)
type: cloudfoundry:Domain
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args DomainArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args DomainArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args DomainArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DomainArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DomainArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var domainResource = new Cloudfoundry.Domain("domainResource", new()
{
Domain = "string",
DomainId = "string",
Internal = false,
Name = "string",
Org = "string",
RouterGroup = "string",
SubDomain = "string",
});
example, err := cloudfoundry.NewDomain(ctx, "domainResource", &cloudfoundry.DomainArgs{
Domain: pulumi.String("string"),
DomainId: pulumi.String("string"),
Internal: pulumi.Bool(false),
Name: pulumi.String("string"),
Org: pulumi.String("string"),
RouterGroup: pulumi.String("string"),
SubDomain: pulumi.String("string"),
})
var domainResource = new Domain("domainResource", DomainArgs.builder()
.domain("string")
.domainId("string")
.internal(false)
.name("string")
.org("string")
.routerGroup("string")
.subDomain("string")
.build());
domain_resource = cloudfoundry.Domain("domainResource",
domain="string",
domain_id="string",
internal=False,
name="string",
org="string",
router_group="string",
sub_domain="string")
const domainResource = new cloudfoundry.Domain("domainResource", {
domain: "string",
domainId: "string",
internal: false,
name: "string",
org: "string",
routerGroup: "string",
subDomain: "string",
});
type: cloudfoundry:Domain
properties:
domain: string
domainId: string
internal: false
name: string
org: string
routerGroup: string
subDomain: string
Domain Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Domain resource accepts the following input properties:
- Domain string
Domain part of full domain name. If specified the
sub_domain
argument needs to be provided and thename
will be computed.The following argument applies only to shared domains.
- Domain
Id string - The GUID of the domain.
- Internal 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.
- Name string
- Full name of domain. If specified then the
sub_domain
anddomain
attributes will be computed from thename
- Org 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.
- Router
Group string The router group GUID, which can be retrieved via the
cloudfoundry.getRouterGroup
data resource. You would need to provide this when creating a shared domain for TCP routes.The following argument applies only to private domains.
- Sub
Domain string - Sub-domain part of full domain name. If specified the
domain
argument needs to be provided and thename
will be computed.
- Domain string
Domain part of full domain name. If specified the
sub_domain
argument needs to be provided and thename
will be computed.The following argument applies only to shared domains.
- Domain
Id string - The GUID of the domain.
- Internal 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.
- Name string
- Full name of domain. If specified then the
sub_domain
anddomain
attributes will be computed from thename
- Org 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.
- Router
Group string The router group GUID, which can be retrieved via the
cloudfoundry.getRouterGroup
data resource. You would need to provide this when creating a shared domain for TCP routes.The following argument applies only to private domains.
- Sub
Domain string - Sub-domain part of full domain name. If specified the
domain
argument needs to be provided and thename
will be computed.
- domain String
Domain part of full domain name. If specified the
sub_domain
argument needs to be provided and thename
will be computed.The following argument applies only to shared domains.
- domain
Id String - The GUID of the domain.
- internal Boolean
- 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.
- name String
- Full name of domain. If specified then the
sub_domain
anddomain
attributes will be computed from thename
- org 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.
- router
Group String The router group GUID, which can be retrieved via the
cloudfoundry.getRouterGroup
data resource. You would need to provide this when creating a shared domain for TCP routes.The following argument applies only to private domains.
- sub
Domain String - Sub-domain part of full domain name. If specified the
domain
argument needs to be provided and thename
will be computed.
- domain string
Domain part of full domain name. If specified the
sub_domain
argument needs to be provided and thename
will be computed.The following argument applies only to shared domains.
- domain
Id string - The GUID of the domain.
- internal boolean
- 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.
- name string
- Full name of domain. If specified then the
sub_domain
anddomain
attributes will be computed from thename
- org 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.
- router
Group string The router group GUID, which can be retrieved via the
cloudfoundry.getRouterGroup
data resource. You would need to provide this when creating a shared domain for TCP routes.The following argument applies only to private domains.
- sub
Domain string - Sub-domain part of full domain name. If specified the
domain
argument needs to be provided and thename
will be computed.
- domain str
Domain part of full domain name. If specified the
sub_domain
argument needs to be provided and thename
will be computed.The following argument applies only to shared domains.
- domain_
id str - The GUID of the domain.
- internal 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.
- name str
- Full name of domain. If specified then the
sub_domain
anddomain
attributes will be computed from thename
- org str
- 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.
- router_
group str The router group GUID, which can be retrieved via the
cloudfoundry.getRouterGroup
data resource. You would need to provide this when creating a shared domain for TCP routes.The following argument applies only to private domains.
- sub_
domain str - Sub-domain part of full domain name. If specified the
domain
argument needs to be provided and thename
will be computed.
- domain String
Domain part of full domain name. If specified the
sub_domain
argument needs to be provided and thename
will be computed.The following argument applies only to shared domains.
- domain
Id String - The GUID of the domain.
- internal Boolean
- 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.
- name String
- Full name of domain. If specified then the
sub_domain
anddomain
attributes will be computed from thename
- org 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.
- router
Group String The router group GUID, which can be retrieved via the
cloudfoundry.getRouterGroup
data resource. You would need to provide this when creating a shared domain for TCP routes.The following argument applies only to private domains.
- sub
Domain String - Sub-domain part of full domain name. If specified the
domain
argument needs to be provided and thename
will be computed.
Outputs
All input properties are implicitly available as output properties. Additionally, the Domain resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Router
Type string
- Id string
- The provider-assigned unique ID for this managed resource.
- Router
Type string
- id String
- The provider-assigned unique ID for this managed resource.
- router
Type String
- id string
- The provider-assigned unique ID for this managed resource.
- router
Type string
- id str
- The provider-assigned unique ID for this managed resource.
- router_
type str
- id String
- The provider-assigned unique ID for this managed resource.
- router
Type String
Look up Existing Domain Resource
Get an existing Domain resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: DomainState, opts?: CustomResourceOptions): Domain
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
domain: Optional[str] = None,
domain_id: Optional[str] = None,
internal: Optional[bool] = None,
name: Optional[str] = None,
org: Optional[str] = None,
router_group: Optional[str] = None,
router_type: Optional[str] = None,
sub_domain: Optional[str] = None) -> Domain
func GetDomain(ctx *Context, name string, id IDInput, state *DomainState, opts ...ResourceOption) (*Domain, error)
public static Domain Get(string name, Input<string> id, DomainState? state, CustomResourceOptions? opts = null)
public static Domain get(String name, Output<String> id, DomainState state, CustomResourceOptions options)
resources: _: type: cloudfoundry:Domain get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Domain string
Domain part of full domain name. If specified the
sub_domain
argument needs to be provided and thename
will be computed.The following argument applies only to shared domains.
- Domain
Id string - The GUID of the domain.
- Internal 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.
- Name string
- Full name of domain. If specified then the
sub_domain
anddomain
attributes will be computed from thename
- Org 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.
- Router
Group string The router group GUID, which can be retrieved via the
cloudfoundry.getRouterGroup
data resource. You would need to provide this when creating a shared domain for TCP routes.The following argument applies only to private domains.
- Router
Type string - Sub
Domain string - Sub-domain part of full domain name. If specified the
domain
argument needs to be provided and thename
will be computed.
- Domain string
Domain part of full domain name. If specified the
sub_domain
argument needs to be provided and thename
will be computed.The following argument applies only to shared domains.
- Domain
Id string - The GUID of the domain.
- Internal 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.
- Name string
- Full name of domain. If specified then the
sub_domain
anddomain
attributes will be computed from thename
- Org 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.
- Router
Group string The router group GUID, which can be retrieved via the
cloudfoundry.getRouterGroup
data resource. You would need to provide this when creating a shared domain for TCP routes.The following argument applies only to private domains.
- Router
Type string - Sub
Domain string - Sub-domain part of full domain name. If specified the
domain
argument needs to be provided and thename
will be computed.
- domain String
Domain part of full domain name. If specified the
sub_domain
argument needs to be provided and thename
will be computed.The following argument applies only to shared domains.
- domain
Id String - The GUID of the domain.
- internal Boolean
- 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.
- name String
- Full name of domain. If specified then the
sub_domain
anddomain
attributes will be computed from thename
- org 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.
- router
Group String The router group GUID, which can be retrieved via the
cloudfoundry.getRouterGroup
data resource. You would need to provide this when creating a shared domain for TCP routes.The following argument applies only to private domains.
- router
Type String - sub
Domain String - Sub-domain part of full domain name. If specified the
domain
argument needs to be provided and thename
will be computed.
- domain string
Domain part of full domain name. If specified the
sub_domain
argument needs to be provided and thename
will be computed.The following argument applies only to shared domains.
- domain
Id string - The GUID of the domain.
- internal boolean
- 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.
- name string
- Full name of domain. If specified then the
sub_domain
anddomain
attributes will be computed from thename
- org 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.
- router
Group string The router group GUID, which can be retrieved via the
cloudfoundry.getRouterGroup
data resource. You would need to provide this when creating a shared domain for TCP routes.The following argument applies only to private domains.
- router
Type string - sub
Domain string - Sub-domain part of full domain name. If specified the
domain
argument needs to be provided and thename
will be computed.
- domain str
Domain part of full domain name. If specified the
sub_domain
argument needs to be provided and thename
will be computed.The following argument applies only to shared domains.
- domain_
id str - The GUID of the domain.
- internal 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.
- name str
- Full name of domain. If specified then the
sub_domain
anddomain
attributes will be computed from thename
- org str
- 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.
- router_
group str The router group GUID, which can be retrieved via the
cloudfoundry.getRouterGroup
data resource. You would need to provide this when creating a shared domain for TCP routes.The following argument applies only to private domains.
- router_
type str - sub_
domain str - Sub-domain part of full domain name. If specified the
domain
argument needs to be provided and thename
will be computed.
- domain String
Domain part of full domain name. If specified the
sub_domain
argument needs to be provided and thename
will be computed.The following argument applies only to shared domains.
- domain
Id String - The GUID of the domain.
- internal Boolean
- 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.
- name String
- Full name of domain. If specified then the
sub_domain
anddomain
attributes will be computed from thename
- org 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.
- router
Group String The router group GUID, which can be retrieved via the
cloudfoundry.getRouterGroup
data resource. You would need to provide this when creating a shared domain for TCP routes.The following argument applies only to private domains.
- router
Type String - sub
Domain String - Sub-domain part of full domain name. If specified the
domain
argument needs to be provided and thename
will be computed.
Import
An existing Domain can be imported using its Domain Guid, e.g.
bash
$ pulumi import cloudfoundry:index/domain:Domain private a-guid
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- cloudfoundry cloudfoundry-community/terraform-provider-cloudfoundry
- License
- Notes
- This Pulumi package is based on the
cloudfoundry
Terraform Provider.