confluentcloud.DnsRecord
Explore with Pulumi AI
confluentcloud.DnsRecord
provides a DNS Record resource that enables creating, editing, and deleting DNS Records on Confluent Cloud.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as confluentcloud from "@pulumi/confluentcloud";
const development = new confluentcloud.Environment("development", {displayName: "Development"});
const main = new confluentcloud.DnsRecord("main", {
displayName: "dns_record",
environment: {
id: development.id,
},
domain: "example.com",
gateway: {
id: mainConfluentNetwork.gateway[0].id,
},
privateLinkAccessPoint: {
id: mainConfluentAccessPoint.id,
},
});
import pulumi
import pulumi_confluentcloud as confluentcloud
development = confluentcloud.Environment("development", display_name="Development")
main = confluentcloud.DnsRecord("main",
display_name="dns_record",
environment=confluentcloud.DnsRecordEnvironmentArgs(
id=development.id,
),
domain="example.com",
gateway=confluentcloud.DnsRecordGatewayArgs(
id=main_confluent_network["gateway"][0]["id"],
),
private_link_access_point=confluentcloud.DnsRecordPrivateLinkAccessPointArgs(
id=main_confluent_access_point["id"],
))
package main
import (
"github.com/pulumi/pulumi-confluentcloud/sdk/go/confluentcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
development, err := confluentcloud.NewEnvironment(ctx, "development", &confluentcloud.EnvironmentArgs{
DisplayName: pulumi.String("Development"),
})
if err != nil {
return err
}
_, err = confluentcloud.NewDnsRecord(ctx, "main", &confluentcloud.DnsRecordArgs{
DisplayName: pulumi.String("dns_record"),
Environment: &confluentcloud.DnsRecordEnvironmentArgs{
Id: development.ID(),
},
Domain: pulumi.String("example.com"),
Gateway: &confluentcloud.DnsRecordGatewayArgs{
Id: pulumi.Any(mainConfluentNetwork.Gateway[0].Id),
},
PrivateLinkAccessPoint: &confluentcloud.DnsRecordPrivateLinkAccessPointArgs{
Id: pulumi.Any(mainConfluentAccessPoint.Id),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using ConfluentCloud = Pulumi.ConfluentCloud;
return await Deployment.RunAsync(() =>
{
var development = new ConfluentCloud.Environment("development", new()
{
DisplayName = "Development",
});
var main = new ConfluentCloud.DnsRecord("main", new()
{
DisplayName = "dns_record",
Environment = new ConfluentCloud.Inputs.DnsRecordEnvironmentArgs
{
Id = development.Id,
},
Domain = "example.com",
Gateway = new ConfluentCloud.Inputs.DnsRecordGatewayArgs
{
Id = mainConfluentNetwork.Gateway[0].Id,
},
PrivateLinkAccessPoint = new ConfluentCloud.Inputs.DnsRecordPrivateLinkAccessPointArgs
{
Id = mainConfluentAccessPoint.Id,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.confluentcloud.Environment;
import com.pulumi.confluentcloud.EnvironmentArgs;
import com.pulumi.confluentcloud.DnsRecord;
import com.pulumi.confluentcloud.DnsRecordArgs;
import com.pulumi.confluentcloud.inputs.DnsRecordEnvironmentArgs;
import com.pulumi.confluentcloud.inputs.DnsRecordGatewayArgs;
import com.pulumi.confluentcloud.inputs.DnsRecordPrivateLinkAccessPointArgs;
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 development = new Environment("development", EnvironmentArgs.builder()
.displayName("Development")
.build());
var main = new DnsRecord("main", DnsRecordArgs.builder()
.displayName("dns_record")
.environment(DnsRecordEnvironmentArgs.builder()
.id(development.id())
.build())
.domain("example.com")
.gateway(DnsRecordGatewayArgs.builder()
.id(mainConfluentNetwork.gateway()[0].id())
.build())
.privateLinkAccessPoint(DnsRecordPrivateLinkAccessPointArgs.builder()
.id(mainConfluentAccessPoint.id())
.build())
.build());
}
}
resources:
development:
type: confluentcloud:Environment
properties:
displayName: Development
main:
type: confluentcloud:DnsRecord
properties:
displayName: dns_record
environment:
id: ${development.id}
domain: example.com
gateway:
id: ${mainConfluentNetwork.gateway[0].id}
privateLinkAccessPoint:
id: ${mainConfluentAccessPoint.id}
Create DnsRecord Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DnsRecord(name: string, args: DnsRecordArgs, opts?: CustomResourceOptions);
@overload
def DnsRecord(resource_name: str,
args: DnsRecordArgs,
opts: Optional[ResourceOptions] = None)
@overload
def DnsRecord(resource_name: str,
opts: Optional[ResourceOptions] = None,
domain: Optional[str] = None,
environment: Optional[DnsRecordEnvironmentArgs] = None,
gateway: Optional[DnsRecordGatewayArgs] = None,
display_name: Optional[str] = None,
private_link_access_point: Optional[DnsRecordPrivateLinkAccessPointArgs] = None)
func NewDnsRecord(ctx *Context, name string, args DnsRecordArgs, opts ...ResourceOption) (*DnsRecord, error)
public DnsRecord(string name, DnsRecordArgs args, CustomResourceOptions? opts = null)
public DnsRecord(String name, DnsRecordArgs args)
public DnsRecord(String name, DnsRecordArgs args, CustomResourceOptions options)
type: confluentcloud:DnsRecord
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 DnsRecordArgs
- 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 DnsRecordArgs
- 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 DnsRecordArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DnsRecordArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DnsRecordArgs
- 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 dnsRecordResource = new ConfluentCloud.DnsRecord("dnsRecordResource", new()
{
Domain = "string",
Environment = new ConfluentCloud.Inputs.DnsRecordEnvironmentArgs
{
Id = "string",
},
Gateway = new ConfluentCloud.Inputs.DnsRecordGatewayArgs
{
Id = "string",
},
DisplayName = "string",
PrivateLinkAccessPoint = new ConfluentCloud.Inputs.DnsRecordPrivateLinkAccessPointArgs
{
Id = "string",
},
});
example, err := confluentcloud.NewDnsRecord(ctx, "dnsRecordResource", &confluentcloud.DnsRecordArgs{
Domain: pulumi.String("string"),
Environment: &confluentcloud.DnsRecordEnvironmentArgs{
Id: pulumi.String("string"),
},
Gateway: &confluentcloud.DnsRecordGatewayArgs{
Id: pulumi.String("string"),
},
DisplayName: pulumi.String("string"),
PrivateLinkAccessPoint: &confluentcloud.DnsRecordPrivateLinkAccessPointArgs{
Id: pulumi.String("string"),
},
})
var dnsRecordResource = new DnsRecord("dnsRecordResource", DnsRecordArgs.builder()
.domain("string")
.environment(DnsRecordEnvironmentArgs.builder()
.id("string")
.build())
.gateway(DnsRecordGatewayArgs.builder()
.id("string")
.build())
.displayName("string")
.privateLinkAccessPoint(DnsRecordPrivateLinkAccessPointArgs.builder()
.id("string")
.build())
.build());
dns_record_resource = confluentcloud.DnsRecord("dnsRecordResource",
domain="string",
environment=confluentcloud.DnsRecordEnvironmentArgs(
id="string",
),
gateway=confluentcloud.DnsRecordGatewayArgs(
id="string",
),
display_name="string",
private_link_access_point=confluentcloud.DnsRecordPrivateLinkAccessPointArgs(
id="string",
))
const dnsRecordResource = new confluentcloud.DnsRecord("dnsRecordResource", {
domain: "string",
environment: {
id: "string",
},
gateway: {
id: "string",
},
displayName: "string",
privateLinkAccessPoint: {
id: "string",
},
});
type: confluentcloud:DnsRecord
properties:
displayName: string
domain: string
environment:
id: string
gateway:
id: string
privateLinkAccessPoint:
id: string
DnsRecord Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The DnsRecord resource accepts the following input properties:
- Domain string
- The fully qualified domain name of the DNS Record.
- Environment
Pulumi.
Confluent Cloud. Inputs. Dns Record Environment - Environment objects represent an isolated namespace for your Confluent resources for organizational purposes.
- Gateway
Pulumi.
Confluent Cloud. Inputs. Dns Record Gateway - Display
Name string - The name of the DNS Record.
- Private
Link Pulumi.Access Point Confluent Cloud. Inputs. Dns Record Private Link Access Point
- Domain string
- The fully qualified domain name of the DNS Record.
- Environment
Dns
Record Environment Args - Environment objects represent an isolated namespace for your Confluent resources for organizational purposes.
- Gateway
Dns
Record Gateway Args - Display
Name string - The name of the DNS Record.
- Private
Link DnsAccess Point Record Private Link Access Point Args
- domain String
- The fully qualified domain name of the DNS Record.
- environment
Dns
Record Environment - Environment objects represent an isolated namespace for your Confluent resources for organizational purposes.
- gateway
Dns
Record Gateway - display
Name String - The name of the DNS Record.
- private
Link DnsAccess Point Record Private Link Access Point
- domain string
- The fully qualified domain name of the DNS Record.
- environment
Dns
Record Environment - Environment objects represent an isolated namespace for your Confluent resources for organizational purposes.
- gateway
Dns
Record Gateway - display
Name string - The name of the DNS Record.
- private
Link DnsAccess Point Record Private Link Access Point
- domain str
- The fully qualified domain name of the DNS Record.
- environment
Dns
Record Environment Args - Environment objects represent an isolated namespace for your Confluent resources for organizational purposes.
- gateway
Dns
Record Gateway Args - display_
name str - The name of the DNS Record.
- private_
link_ Dnsaccess_ point Record Private Link Access Point Args
- domain String
- The fully qualified domain name of the DNS Record.
- environment Property Map
- Environment objects represent an isolated namespace for your Confluent resources for organizational purposes.
- gateway Property Map
- display
Name String - The name of the DNS Record.
- private
Link Property MapAccess Point
Outputs
All input properties are implicitly available as output properties. Additionally, the DnsRecord 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 DnsRecord Resource
Get an existing DnsRecord 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?: DnsRecordState, opts?: CustomResourceOptions): DnsRecord
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
display_name: Optional[str] = None,
domain: Optional[str] = None,
environment: Optional[DnsRecordEnvironmentArgs] = None,
gateway: Optional[DnsRecordGatewayArgs] = None,
private_link_access_point: Optional[DnsRecordPrivateLinkAccessPointArgs] = None) -> DnsRecord
func GetDnsRecord(ctx *Context, name string, id IDInput, state *DnsRecordState, opts ...ResourceOption) (*DnsRecord, error)
public static DnsRecord Get(string name, Input<string> id, DnsRecordState? state, CustomResourceOptions? opts = null)
public static DnsRecord get(String name, Output<String> id, DnsRecordState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Display
Name string - The name of the DNS Record.
- Domain string
- The fully qualified domain name of the DNS Record.
- Environment
Pulumi.
Confluent Cloud. Inputs. Dns Record Environment - Environment objects represent an isolated namespace for your Confluent resources for organizational purposes.
- Gateway
Pulumi.
Confluent Cloud. Inputs. Dns Record Gateway - Private
Link Pulumi.Access Point Confluent Cloud. Inputs. Dns Record Private Link Access Point
- Display
Name string - The name of the DNS Record.
- Domain string
- The fully qualified domain name of the DNS Record.
- Environment
Dns
Record Environment Args - Environment objects represent an isolated namespace for your Confluent resources for organizational purposes.
- Gateway
Dns
Record Gateway Args - Private
Link DnsAccess Point Record Private Link Access Point Args
- display
Name String - The name of the DNS Record.
- domain String
- The fully qualified domain name of the DNS Record.
- environment
Dns
Record Environment - Environment objects represent an isolated namespace for your Confluent resources for organizational purposes.
- gateway
Dns
Record Gateway - private
Link DnsAccess Point Record Private Link Access Point
- display
Name string - The name of the DNS Record.
- domain string
- The fully qualified domain name of the DNS Record.
- environment
Dns
Record Environment - Environment objects represent an isolated namespace for your Confluent resources for organizational purposes.
- gateway
Dns
Record Gateway - private
Link DnsAccess Point Record Private Link Access Point
- display_
name str - The name of the DNS Record.
- domain str
- The fully qualified domain name of the DNS Record.
- environment
Dns
Record Environment Args - Environment objects represent an isolated namespace for your Confluent resources for organizational purposes.
- gateway
Dns
Record Gateway Args - private_
link_ Dnsaccess_ point Record Private Link Access Point Args
- display
Name String - The name of the DNS Record.
- domain String
- The fully qualified domain name of the DNS Record.
- environment Property Map
- Environment objects represent an isolated namespace for your Confluent resources for organizational purposes.
- gateway Property Map
- private
Link Property MapAccess Point
Supporting Types
DnsRecordEnvironment, DnsRecordEnvironmentArgs
- Id string
- The ID of the Environment that the DNS Record belongs to, for example,
env-abc123
.
- Id string
- The ID of the Environment that the DNS Record belongs to, for example,
env-abc123
.
- id String
- The ID of the Environment that the DNS Record belongs to, for example,
env-abc123
.
- id string
- The ID of the Environment that the DNS Record belongs to, for example,
env-abc123
.
- id str
- The ID of the Environment that the DNS Record belongs to, for example,
env-abc123
.
- id String
- The ID of the Environment that the DNS Record belongs to, for example,
env-abc123
.
DnsRecordGateway, DnsRecordGatewayArgs
- Id string
- The ID of the gateway to which the DNS Record belongs, for example,
gw-abc123
.
- Id string
- The ID of the gateway to which the DNS Record belongs, for example,
gw-abc123
.
- id String
- The ID of the gateway to which the DNS Record belongs, for example,
gw-abc123
.
- id string
- The ID of the gateway to which the DNS Record belongs, for example,
gw-abc123
.
- id str
- The ID of the gateway to which the DNS Record belongs, for example,
gw-abc123
.
- id String
- The ID of the gateway to which the DNS Record belongs, for example,
gw-abc123
.
DnsRecordPrivateLinkAccessPoint, DnsRecordPrivateLinkAccessPointArgs
- Id string
- The ID of the Private Link access point to which the DNS Record is associated, for example
ap-123abc
.
- Id string
- The ID of the Private Link access point to which the DNS Record is associated, for example
ap-123abc
.
- id String
- The ID of the Private Link access point to which the DNS Record is associated, for example
ap-123abc
.
- id string
- The ID of the Private Link access point to which the DNS Record is associated, for example
ap-123abc
.
- id str
- The ID of the Private Link access point to which the DNS Record is associated, for example
ap-123abc
.
- id String
- The ID of the Private Link access point to which the DNS Record is associated, for example
ap-123abc
.
Import
You can import a DNS Record by using Environment ID and DNS Record ID, in the format <Environment ID>/<DNS Record ID>
. The following example shows how to import a DNS Record:
$ export CONFLUENT_CLOUD_API_KEY="<cloud_api_key>"
$ export CONFLUENT_CLOUD_API_SECRET="<cloud_api_secret>"
$ pulumi import confluentcloud:index/dnsRecord:DnsRecord main env-abc123/dnsrec-abc123
!> Warning: Do not forget to delete terminal command history afterwards for security purposes.
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Confluent Cloud pulumi/pulumi-confluentcloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
confluent
Terraform Provider.