1. Packages
  2. Cloudfoundry Provider
  3. API Docs
  4. PrivateDomainAccess
cloudfoundry 0.54.0 published on Monday, Apr 14, 2025 by cloudfoundry-community

cloudfoundry.PrivateDomainAccess

Explore with Pulumi AI

Provides a resource for sharing access to private domains with other Cloud Foundry Organizations.

NOTE: Multiple instances of this resource can be used to share a given private domain with multiple orgs.

NOTE: This resource requires the provider to be authenticated with an account granted org manager permissions.

Example Usage

The following is an example of giving an organization access to a private [domain]. The domain is retrieved via a domain data source and the organization via an [org data source)(/docs/providers/cloudfoundry/d/org.html).

import * as pulumi from "@pulumi/pulumi";
import * as cloudfoundry from "@pulumi/cloudfoundry";

const shared_to_my_org = new cloudfoundry.PrivateDomainAccess("shared-to-my-org", {
    domain: data.cloudfoundry_domain.domain.id,
    org: data.cloudfoundry_org["my-org"].id,
});
Copy
import pulumi
import pulumi_cloudfoundry as cloudfoundry

shared_to_my_org = cloudfoundry.PrivateDomainAccess("shared-to-my-org",
    domain=data["cloudfoundry_domain"]["domain"]["id"],
    org=data["cloudfoundry_org"]["my-org"]["id"])
Copy
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.NewPrivateDomainAccess(ctx, "shared-to-my-org", &cloudfoundry.PrivateDomainAccessArgs{
			Domain: pulumi.Any(data.Cloudfoundry_domain.Domain.Id),
			Org:    pulumi.Any(data.Cloudfoundry_org.MyOrg.Id),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudfoundry = Pulumi.Cloudfoundry;

return await Deployment.RunAsync(() => 
{
    var shared_to_my_org = new Cloudfoundry.PrivateDomainAccess("shared-to-my-org", new()
    {
        Domain = data.Cloudfoundry_domain.Domain.Id,
        Org = data.Cloudfoundry_org.My_org.Id,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudfoundry.PrivateDomainAccess;
import com.pulumi.cloudfoundry.PrivateDomainAccessArgs;
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_to_my_org = new PrivateDomainAccess("shared-to-my-org", PrivateDomainAccessArgs.builder()
            .domain(data.cloudfoundry_domain().domain().id())
            .org(data.cloudfoundry_org().my-org().id())
            .build());

    }
}
Copy
resources:
  shared-to-my-org:
    type: cloudfoundry:PrivateDomainAccess
    properties:
      domain: ${data.cloudfoundry_domain.domain.id}
      org: ${data.cloudfoundry_org"my-org"[%!s(MISSING)].id}
Copy

Create PrivateDomainAccess Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new PrivateDomainAccess(name: string, args: PrivateDomainAccessArgs, opts?: CustomResourceOptions);
@overload
def PrivateDomainAccess(resource_name: str,
                        args: PrivateDomainAccessArgs,
                        opts: Optional[ResourceOptions] = None)

@overload
def PrivateDomainAccess(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        domain: Optional[str] = None,
                        org: Optional[str] = None,
                        private_domain_access_id: Optional[str] = None)
func NewPrivateDomainAccess(ctx *Context, name string, args PrivateDomainAccessArgs, opts ...ResourceOption) (*PrivateDomainAccess, error)
public PrivateDomainAccess(string name, PrivateDomainAccessArgs args, CustomResourceOptions? opts = null)
public PrivateDomainAccess(String name, PrivateDomainAccessArgs args)
public PrivateDomainAccess(String name, PrivateDomainAccessArgs args, CustomResourceOptions options)
type: cloudfoundry:PrivateDomainAccess
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. PrivateDomainAccessArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. PrivateDomainAccessArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. PrivateDomainAccessArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. PrivateDomainAccessArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. PrivateDomainAccessArgs
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 privateDomainAccessResource = new Cloudfoundry.PrivateDomainAccess("privateDomainAccessResource", new()
{
    Domain = "string",
    Org = "string",
    PrivateDomainAccessId = "string",
});
Copy
example, err := cloudfoundry.NewPrivateDomainAccess(ctx, "privateDomainAccessResource", &cloudfoundry.PrivateDomainAccessArgs{
Domain: pulumi.String("string"),
Org: pulumi.String("string"),
PrivateDomainAccessId: pulumi.String("string"),
})
Copy
var privateDomainAccessResource = new PrivateDomainAccess("privateDomainAccessResource", PrivateDomainAccessArgs.builder()
    .domain("string")
    .org("string")
    .privateDomainAccessId("string")
    .build());
Copy
private_domain_access_resource = cloudfoundry.PrivateDomainAccess("privateDomainAccessResource",
    domain="string",
    org="string",
    private_domain_access_id="string")
Copy
const privateDomainAccessResource = new cloudfoundry.PrivateDomainAccess("privateDomainAccessResource", {
    domain: "string",
    org: "string",
    privateDomainAccessId: "string",
});
Copy
type: cloudfoundry:PrivateDomainAccess
properties:
    domain: string
    org: string
    privateDomainAccessId: string
Copy

PrivateDomainAccess 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 PrivateDomainAccess resource accepts the following input properties:

Domain This property is required. string
The GUID of private domain.
Org This property is required. string
The GUID of the organization.
PrivateDomainAccessId string
Domain This property is required. string
The GUID of private domain.
Org This property is required. string
The GUID of the organization.
PrivateDomainAccessId string
domain This property is required. String
The GUID of private domain.
org This property is required. String
The GUID of the organization.
privateDomainAccessId String
domain This property is required. string
The GUID of private domain.
org This property is required. string
The GUID of the organization.
privateDomainAccessId string
domain This property is required. str
The GUID of private domain.
org This property is required. str
The GUID of the organization.
private_domain_access_id str
domain This property is required. String
The GUID of private domain.
org This property is required. String
The GUID of the organization.
privateDomainAccessId String

Outputs

All input properties are implicitly available as output properties. Additionally, the PrivateDomainAccess resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing PrivateDomainAccess Resource

Get an existing PrivateDomainAccess 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?: PrivateDomainAccessState, opts?: CustomResourceOptions): PrivateDomainAccess
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        domain: Optional[str] = None,
        org: Optional[str] = None,
        private_domain_access_id: Optional[str] = None) -> PrivateDomainAccess
func GetPrivateDomainAccess(ctx *Context, name string, id IDInput, state *PrivateDomainAccessState, opts ...ResourceOption) (*PrivateDomainAccess, error)
public static PrivateDomainAccess Get(string name, Input<string> id, PrivateDomainAccessState? state, CustomResourceOptions? opts = null)
public static PrivateDomainAccess get(String name, Output<String> id, PrivateDomainAccessState state, CustomResourceOptions options)
resources:  _:    type: cloudfoundry:PrivateDomainAccess    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.
The following state arguments are supported:
Domain string
The GUID of private domain.
Org string
The GUID of the organization.
PrivateDomainAccessId string
Domain string
The GUID of private domain.
Org string
The GUID of the organization.
PrivateDomainAccessId string
domain String
The GUID of private domain.
org String
The GUID of the organization.
privateDomainAccessId String
domain string
The GUID of private domain.
org string
The GUID of the organization.
privateDomainAccessId string
domain str
The GUID of private domain.
org str
The GUID of the organization.
private_domain_access_id str
domain String
The GUID of private domain.
org String
The GUID of the organization.
privateDomainAccessId String

Import

An existing CF private domain access can be imported using the combined `/’ identifier, e.g.

bash

$ pulumi import cloudfoundry:index/privateDomainAccess:PrivateDomainAccess my-access 84f5ba83-1728-481f-9a62-72d109e4be74/c8eba5e6-5a21-45ee-ae0a-59b1f650888a
Copy

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.