1. Packages
  2. Spectrocloud Provider
  3. API Docs
  4. PrivatecloudgatewayDnsMap
spectrocloud 0.23.4 published on Monday, Apr 14, 2025 by spectrocloud

spectrocloud.PrivatecloudgatewayDnsMap

Explore with Pulumi AI

This resource allows for the management of DNS mappings for private cloud gateways. This helps ensure proper DNS resolution for resources within the private cloud environment.

You can learn more about Private Cloud Gateways DNS Mapping by reviewing the Create and Manage DNS Mappings guide.

Example Usage

An example of creating an DNS Map for a Private Cloud Gateway using a search domain, datacenter and network.

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

const gateway = spectrocloud.getPrivateCloudGateway({
    name: "test-vm-pcg",
});
const dnsMapTest = new spectrocloud.PrivatecloudgatewayDnsMap("dnsMapTest", {
    privateCloudGatewayId: gateway.then(gateway => gateway.id),
    searchDomainName: "test1.spectro.com",
    dataCenter: "DataCenterTest",
    network: "TEST-VM-NETWORK",
});
Copy
import pulumi
import pulumi_spectrocloud as spectrocloud

gateway = spectrocloud.get_private_cloud_gateway(name="test-vm-pcg")
dns_map_test = spectrocloud.PrivatecloudgatewayDnsMap("dnsMapTest",
    private_cloud_gateway_id=gateway.id,
    search_domain_name="test1.spectro.com",
    data_center="DataCenterTest",
    network="TEST-VM-NETWORK")
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/spectrocloud/spectrocloud"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		gateway, err := spectrocloud.GetPrivateCloudGateway(ctx, &spectrocloud.GetPrivateCloudGatewayArgs{
			Name: pulumi.StringRef("test-vm-pcg"),
		}, nil)
		if err != nil {
			return err
		}
		_, err = spectrocloud.NewPrivatecloudgatewayDnsMap(ctx, "dnsMapTest", &spectrocloud.PrivatecloudgatewayDnsMapArgs{
			PrivateCloudGatewayId: pulumi.String(gateway.Id),
			SearchDomainName:      pulumi.String("test1.spectro.com"),
			DataCenter:            pulumi.String("DataCenterTest"),
			Network:               pulumi.String("TEST-VM-NETWORK"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Spectrocloud = Pulumi.Spectrocloud;

return await Deployment.RunAsync(() => 
{
    var gateway = Spectrocloud.GetPrivateCloudGateway.Invoke(new()
    {
        Name = "test-vm-pcg",
    });

    var dnsMapTest = new Spectrocloud.PrivatecloudgatewayDnsMap("dnsMapTest", new()
    {
        PrivateCloudGatewayId = gateway.Apply(getPrivateCloudGatewayResult => getPrivateCloudGatewayResult.Id),
        SearchDomainName = "test1.spectro.com",
        DataCenter = "DataCenterTest",
        Network = "TEST-VM-NETWORK",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.spectrocloud.SpectrocloudFunctions;
import com.pulumi.spectrocloud.inputs.GetPrivateCloudGatewayArgs;
import com.pulumi.spectrocloud.PrivatecloudgatewayDnsMap;
import com.pulumi.spectrocloud.PrivatecloudgatewayDnsMapArgs;
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) {
        final var gateway = SpectrocloudFunctions.getPrivateCloudGateway(GetPrivateCloudGatewayArgs.builder()
            .name("test-vm-pcg")
            .build());

        var dnsMapTest = new PrivatecloudgatewayDnsMap("dnsMapTest", PrivatecloudgatewayDnsMapArgs.builder()
            .privateCloudGatewayId(gateway.applyValue(getPrivateCloudGatewayResult -> getPrivateCloudGatewayResult.id()))
            .searchDomainName("test1.spectro.com")
            .dataCenter("DataCenterTest")
            .network("TEST-VM-NETWORK")
            .build());

    }
}
Copy
resources:
  dnsMapTest:
    type: spectrocloud:PrivatecloudgatewayDnsMap
    properties:
      privateCloudGatewayId: ${gateway.id}
      searchDomainName: test1.spectro.com
      dataCenter: DataCenterTest
      network: TEST-VM-NETWORK
variables:
  gateway:
    fn::invoke:
      function: spectrocloud:getPrivateCloudGateway
      arguments:
        name: test-vm-pcg
Copy

Create PrivatecloudgatewayDnsMap Resource

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

Constructor syntax

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

@overload
def PrivatecloudgatewayDnsMap(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              data_center: Optional[str] = None,
                              network: Optional[str] = None,
                              private_cloud_gateway_id: Optional[str] = None,
                              search_domain_name: Optional[str] = None,
                              privatecloudgateway_dns_map_id: Optional[str] = None,
                              timeouts: Optional[PrivatecloudgatewayDnsMapTimeoutsArgs] = None)
func NewPrivatecloudgatewayDnsMap(ctx *Context, name string, args PrivatecloudgatewayDnsMapArgs, opts ...ResourceOption) (*PrivatecloudgatewayDnsMap, error)
public PrivatecloudgatewayDnsMap(string name, PrivatecloudgatewayDnsMapArgs args, CustomResourceOptions? opts = null)
public PrivatecloudgatewayDnsMap(String name, PrivatecloudgatewayDnsMapArgs args)
public PrivatecloudgatewayDnsMap(String name, PrivatecloudgatewayDnsMapArgs args, CustomResourceOptions options)
type: spectrocloud:PrivatecloudgatewayDnsMap
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. PrivatecloudgatewayDnsMapArgs
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. PrivatecloudgatewayDnsMapArgs
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. PrivatecloudgatewayDnsMapArgs
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. PrivatecloudgatewayDnsMapArgs
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. PrivatecloudgatewayDnsMapArgs
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 privatecloudgatewayDnsMapResource = new Spectrocloud.PrivatecloudgatewayDnsMap("privatecloudgatewayDnsMapResource", new()
{
    DataCenter = "string",
    Network = "string",
    PrivateCloudGatewayId = "string",
    SearchDomainName = "string",
    PrivatecloudgatewayDnsMapId = "string",
    Timeouts = new Spectrocloud.Inputs.PrivatecloudgatewayDnsMapTimeoutsArgs
    {
        Create = "string",
        Delete = "string",
        Update = "string",
    },
});
Copy
example, err := spectrocloud.NewPrivatecloudgatewayDnsMap(ctx, "privatecloudgatewayDnsMapResource", &spectrocloud.PrivatecloudgatewayDnsMapArgs{
DataCenter: pulumi.String("string"),
Network: pulumi.String("string"),
PrivateCloudGatewayId: pulumi.String("string"),
SearchDomainName: pulumi.String("string"),
PrivatecloudgatewayDnsMapId: pulumi.String("string"),
Timeouts: &.PrivatecloudgatewayDnsMapTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Update: pulumi.String("string"),
},
})
Copy
var privatecloudgatewayDnsMapResource = new PrivatecloudgatewayDnsMap("privatecloudgatewayDnsMapResource", PrivatecloudgatewayDnsMapArgs.builder()
    .dataCenter("string")
    .network("string")
    .privateCloudGatewayId("string")
    .searchDomainName("string")
    .privatecloudgatewayDnsMapId("string")
    .timeouts(PrivatecloudgatewayDnsMapTimeoutsArgs.builder()
        .create("string")
        .delete("string")
        .update("string")
        .build())
    .build());
Copy
privatecloudgateway_dns_map_resource = spectrocloud.PrivatecloudgatewayDnsMap("privatecloudgatewayDnsMapResource",
    data_center="string",
    network="string",
    private_cloud_gateway_id="string",
    search_domain_name="string",
    privatecloudgateway_dns_map_id="string",
    timeouts={
        "create": "string",
        "delete": "string",
        "update": "string",
    })
Copy
const privatecloudgatewayDnsMapResource = new spectrocloud.PrivatecloudgatewayDnsMap("privatecloudgatewayDnsMapResource", {
    dataCenter: "string",
    network: "string",
    privateCloudGatewayId: "string",
    searchDomainName: "string",
    privatecloudgatewayDnsMapId: "string",
    timeouts: {
        create: "string",
        "delete": "string",
        update: "string",
    },
});
Copy
type: spectrocloud:PrivatecloudgatewayDnsMap
properties:
    dataCenter: string
    network: string
    privateCloudGatewayId: string
    privatecloudgatewayDnsMapId: string
    searchDomainName: string
    timeouts:
        create: string
        delete: string
        update: string
Copy

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

DataCenter This property is required. string
The data center in which the private cloud resides.
Network This property is required. string
The network to which the private cloud gateway is mapped.
PrivateCloudGatewayId This property is required. string
The ID of the Private Cloud Gateway.
SearchDomainName This property is required. string
The domain name used for DNS search queries within the private cloud.
PrivatecloudgatewayDnsMapId string
The ID of this resource.
Timeouts PrivatecloudgatewayDnsMapTimeouts
DataCenter This property is required. string
The data center in which the private cloud resides.
Network This property is required. string
The network to which the private cloud gateway is mapped.
PrivateCloudGatewayId This property is required. string
The ID of the Private Cloud Gateway.
SearchDomainName This property is required. string
The domain name used for DNS search queries within the private cloud.
PrivatecloudgatewayDnsMapId string
The ID of this resource.
Timeouts PrivatecloudgatewayDnsMapTimeoutsArgs
dataCenter This property is required. String
The data center in which the private cloud resides.
network This property is required. String
The network to which the private cloud gateway is mapped.
privateCloudGatewayId This property is required. String
The ID of the Private Cloud Gateway.
searchDomainName This property is required. String
The domain name used for DNS search queries within the private cloud.
privatecloudgatewayDnsMapId String
The ID of this resource.
timeouts PrivatecloudgatewayDnsMapTimeouts
dataCenter This property is required. string
The data center in which the private cloud resides.
network This property is required. string
The network to which the private cloud gateway is mapped.
privateCloudGatewayId This property is required. string
The ID of the Private Cloud Gateway.
searchDomainName This property is required. string
The domain name used for DNS search queries within the private cloud.
privatecloudgatewayDnsMapId string
The ID of this resource.
timeouts PrivatecloudgatewayDnsMapTimeouts
data_center This property is required. str
The data center in which the private cloud resides.
network This property is required. str
The network to which the private cloud gateway is mapped.
private_cloud_gateway_id This property is required. str
The ID of the Private Cloud Gateway.
search_domain_name This property is required. str
The domain name used for DNS search queries within the private cloud.
privatecloudgateway_dns_map_id str
The ID of this resource.
timeouts PrivatecloudgatewayDnsMapTimeoutsArgs
dataCenter This property is required. String
The data center in which the private cloud resides.
network This property is required. String
The network to which the private cloud gateway is mapped.
privateCloudGatewayId This property is required. String
The ID of the Private Cloud Gateway.
searchDomainName This property is required. String
The domain name used for DNS search queries within the private cloud.
privatecloudgatewayDnsMapId String
The ID of this resource.
timeouts Property Map

Outputs

All input properties are implicitly available as output properties. Additionally, the PrivatecloudgatewayDnsMap 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 PrivatecloudgatewayDnsMap Resource

Get an existing PrivatecloudgatewayDnsMap 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?: PrivatecloudgatewayDnsMapState, opts?: CustomResourceOptions): PrivatecloudgatewayDnsMap
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        data_center: Optional[str] = None,
        network: Optional[str] = None,
        private_cloud_gateway_id: Optional[str] = None,
        privatecloudgateway_dns_map_id: Optional[str] = None,
        search_domain_name: Optional[str] = None,
        timeouts: Optional[PrivatecloudgatewayDnsMapTimeoutsArgs] = None) -> PrivatecloudgatewayDnsMap
func GetPrivatecloudgatewayDnsMap(ctx *Context, name string, id IDInput, state *PrivatecloudgatewayDnsMapState, opts ...ResourceOption) (*PrivatecloudgatewayDnsMap, error)
public static PrivatecloudgatewayDnsMap Get(string name, Input<string> id, PrivatecloudgatewayDnsMapState? state, CustomResourceOptions? opts = null)
public static PrivatecloudgatewayDnsMap get(String name, Output<String> id, PrivatecloudgatewayDnsMapState state, CustomResourceOptions options)
resources:  _:    type: spectrocloud:PrivatecloudgatewayDnsMap    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:
DataCenter string
The data center in which the private cloud resides.
Network string
The network to which the private cloud gateway is mapped.
PrivateCloudGatewayId string
The ID of the Private Cloud Gateway.
PrivatecloudgatewayDnsMapId string
The ID of this resource.
SearchDomainName string
The domain name used for DNS search queries within the private cloud.
Timeouts PrivatecloudgatewayDnsMapTimeouts
DataCenter string
The data center in which the private cloud resides.
Network string
The network to which the private cloud gateway is mapped.
PrivateCloudGatewayId string
The ID of the Private Cloud Gateway.
PrivatecloudgatewayDnsMapId string
The ID of this resource.
SearchDomainName string
The domain name used for DNS search queries within the private cloud.
Timeouts PrivatecloudgatewayDnsMapTimeoutsArgs
dataCenter String
The data center in which the private cloud resides.
network String
The network to which the private cloud gateway is mapped.
privateCloudGatewayId String
The ID of the Private Cloud Gateway.
privatecloudgatewayDnsMapId String
The ID of this resource.
searchDomainName String
The domain name used for DNS search queries within the private cloud.
timeouts PrivatecloudgatewayDnsMapTimeouts
dataCenter string
The data center in which the private cloud resides.
network string
The network to which the private cloud gateway is mapped.
privateCloudGatewayId string
The ID of the Private Cloud Gateway.
privatecloudgatewayDnsMapId string
The ID of this resource.
searchDomainName string
The domain name used for DNS search queries within the private cloud.
timeouts PrivatecloudgatewayDnsMapTimeouts
data_center str
The data center in which the private cloud resides.
network str
The network to which the private cloud gateway is mapped.
private_cloud_gateway_id str
The ID of the Private Cloud Gateway.
privatecloudgateway_dns_map_id str
The ID of this resource.
search_domain_name str
The domain name used for DNS search queries within the private cloud.
timeouts PrivatecloudgatewayDnsMapTimeoutsArgs
dataCenter String
The data center in which the private cloud resides.
network String
The network to which the private cloud gateway is mapped.
privateCloudGatewayId String
The ID of the Private Cloud Gateway.
privatecloudgatewayDnsMapId String
The ID of this resource.
searchDomainName String
The domain name used for DNS search queries within the private cloud.
timeouts Property Map

Supporting Types

PrivatecloudgatewayDnsMapTimeouts
, PrivatecloudgatewayDnsMapTimeoutsArgs

Create string
Delete string
Update string
Create string
Delete string
Update string
create String
delete String
update String
create string
delete string
update string
create str
delete str
update str
create String
delete String
update String

Package Details

Repository
spectrocloud spectrocloud/terraform-provider-spectrocloud
License
Notes
This Pulumi package is based on the spectrocloud Terraform Provider.