DomainEntry class
Manages a Lightsail domain entry (DNS record). Use this resource to define how DNS queries for your domain are handled.
> NOTE on id: In an effort to simplify imports, this resource id field has been updated to the standard resource id separator, a comma (,). For backward compatibility, the previous separator (underscore _) can still be used to read and import existing resources. When state is refreshed, the id will be updated to use the new standard separator. The previous separator will be deprecated in a future major release.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.lightsail.Domain("example", {domainName: "example.com"});
const exampleDomainEntry = new aws.lightsail.DomainEntry("example", {
domainName: example.domainName,
name: "www",
type: "A",
target: "127.0.0.1",
});
import pulumi
import pulumi_aws as aws
example = aws.lightsail.Domain("example", domain_name="example.com")
example_domain_entry = aws.lightsail.DomainEntry("example",
domain_name=example.domain_name,
name="www",
type="A",
target="127.0.0.1")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.LightSail.Domain("example", new()
{
DomainName = "example.com",
});
var exampleDomainEntry = new Aws.LightSail.DomainEntry("example", new()
{
DomainName = example.DomainName,
Name = "www",
Type = "A",
Target = "127.0.0.1",
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/lightsail"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := lightsail.NewDomain(ctx, "example", &lightsail.DomainArgs{
DomainName: pulumi.String("example.com"),
})
if err != nil {
return err
}
_, err = lightsail.NewDomainEntry(ctx, "example", &lightsail.DomainEntryArgs{
DomainName: example.DomainName,
Name: pulumi.String("www"),
Type: pulumi.String("A"),
Target: pulumi.String("127.0.0.1"),
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_lightsail_domain" "example" {
domain_name = "example.com"
}
resource "aws_lightsail_domainentry" "example" {
domain_name = aws_lightsail_domain.example.domain_name
name = "www"
type = "A"
target = "127.0.0.1"
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.lightsail.Domain;
import com.pulumi.aws.lightsail.DomainArgs;
import com.pulumi.aws.lightsail.DomainEntry;
import com.pulumi.aws.lightsail.DomainEntryArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 example = new Domain("example", DomainArgs.builder()
.domainName("example.com")
.build());
var exampleDomainEntry = new DomainEntry("exampleDomainEntry", DomainEntryArgs.builder()
.domainName(example.domainName())
.name("www")
.type("A")
.target("127.0.0.1")
.build());
}
}
resources:
example:
type: aws:lightsail:Domain
properties:
domainName: example.com
exampleDomainEntry:
type: aws:lightsail:DomainEntry
name: example
properties:
domainName: ${example.domainName}
name: www
type: A
target: 127.0.0.1
Import
Using pulumi import, import Lightsail Domain Entry using the id attribute. For example:
$ pulumi import aws:lightsail/domainEntry:DomainEntry example www,example.com,A,127.0.0.1
Constructors
- DomainEntry(String name, {DomainEntryArgs? args, CustomResourceOptions? options})
-
Creates a new DomainEntry.
nameThe Pulumi resource name.argsArguments used to configure this DomainEntry. The set of arguments for DomainEntry.optionsResource options controlling this resource's behavior. - DomainEntry.reference(String urn)
- Creates a typed reference to an existing DomainEntry resource.
Properties
-
childResources
→ Set<
Resource> -
finalinherited
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
-
domainName
↔ Output<
String> -
Name of the Lightsail domain in which to create the entry.
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
-
id
↔ Output<
String> -
getter/setter pairinherited
-
isAlias
↔ Output<
bool?> -
Whether the entry should be an alias. Default:
false.latefinal - isCustom → bool
-
Returns whether this resource is provider-managed.
no setterinherited
- isProtected → bool
-
Returns whether this resource is protected from deletion.
no setterinherited
- isRemote → bool
-
Whether this resource is registered as remote.
no setterinherited
- isResourceReference → bool
-
Whether this instance represents a resource value returned over RPC.
finalinherited
-
name
↔ Output<
String> -
Name of the entry record.
latefinal
-
region
↔ Output<
String> -
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
-
resourceTransforms
→ List<
ResourceTransform> -
Inherited/explicit async transforms.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
target
↔ Output<
String> -
Target of the domain entry.
latefinal
-
transformations
→ List<
ResourceTransformation> -
Inherited/explicit legacy transformations.
no setterinherited
-
type
↔ Output<
String> -
Type of record. Valid values:
A,AAAA,CNAME,MX,NS,SOA,SRV,TXT.latefinal -
urn
↔ Output<
String> -
latefinalinherited
Methods
-
failId(
Object error) → void -
Completes this resource ID with an error when registration fails.
inherited
-
failOutputs(
Object error) → void -
Completes all output properties with
error.inherited -
failUrn(
Object error) → void -
Completes this resource URN with an error when registration fails.
inherited
-
getProvider(
String moduleMember) → ProviderResource? -
Returns provider for
moduleMember's package, if configured.inherited -
getResourceName(
) → String -
Returns this resource's logical name.
inherited
-
getResourceType(
) → String -
Returns this resource's Pulumi type token.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerOutput<
T> (String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output< T> -
Registers a dynamic output property for this resource.
inherited
-
resolveId(
String? value, {required bool isKnown}) → void -
Resolves the provider-assigned ID for this resource.
inherited
-
resolveOutputs(
Struct outputs) → void -
Resolves all output properties from a monitor response payload.
inherited
-
resolveUrn(
String value) → void -
Resolves this resource's URN once assigned by the engine.
inherited
-
serializeProperties(
Map< String, dynamic> properties) → Future<Struct> -
Serializes resource properties for RPC transmission.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
get(
String name, Input< String> id, {DomainEntryState? state, CustomResourceOptions? options}) → DomainEntry -
Gets an existing DomainEntry resource's state with the given
nameandid.