Try AWS Native preview for resources not in the classic version.
aws.lightsail.DomainEntry
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
Creates a domain entry resource
NOTE on
id
: In an effort to simplify imports, this resourceid
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, theid
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 test = new aws.lightsail.Domain("test", {domainName: "mydomain.com"});
const testDomainEntry = new aws.lightsail.DomainEntry("test", {
domainName: domainTest.domainName,
name: "www",
type: "A",
target: "127.0.0.1",
});
import pulumi
import pulumi_aws as aws
test = aws.lightsail.Domain("test", domain_name="mydomain.com")
test_domain_entry = aws.lightsail.DomainEntry("test",
domain_name=domain_test["domainName"],
name="www",
type="A",
target="127.0.0.1")
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lightsail"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := lightsail.NewDomain(ctx, "test", &lightsail.DomainArgs{
DomainName: pulumi.String("mydomain.com"),
})
if err != nil {
return err
}
_, err = lightsail.NewDomainEntry(ctx, "test", &lightsail.DomainEntryArgs{
DomainName: pulumi.Any(domainTest.DomainName),
Name: pulumi.String("www"),
Type: pulumi.String("A"),
Target: pulumi.String("127.0.0.1"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var test = new Aws.LightSail.Domain("test", new()
{
DomainName = "mydomain.com",
});
var testDomainEntry = new Aws.LightSail.DomainEntry("test", new()
{
DomainName = domainTest.DomainName,
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.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 test = new Domain("test", DomainArgs.builder()
.domainName("mydomain.com")
.build());
var testDomainEntry = new DomainEntry("testDomainEntry", DomainEntryArgs.builder()
.domainName(domainTest.domainName())
.name("www")
.type("A")
.target("127.0.0.1")
.build());
}
}
resources:
test:
type: aws:lightsail:Domain
properties:
domainName: mydomain.com
testDomainEntry:
type: aws:lightsail:DomainEntry
name: test
properties:
domainName: ${domainTest.domainName}
name: www
type: A
target: 127.0.0.1
Create DomainEntry Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DomainEntry(name: string, args: DomainEntryArgs, opts?: CustomResourceOptions);
@overload
def DomainEntry(resource_name: str,
args: DomainEntryArgs,
opts: Optional[ResourceOptions] = None)
@overload
def DomainEntry(resource_name: str,
opts: Optional[ResourceOptions] = None,
domain_name: Optional[str] = None,
target: Optional[str] = None,
type: Optional[str] = None,
is_alias: Optional[bool] = None,
name: Optional[str] = None)
func NewDomainEntry(ctx *Context, name string, args DomainEntryArgs, opts ...ResourceOption) (*DomainEntry, error)
public DomainEntry(string name, DomainEntryArgs args, CustomResourceOptions? opts = null)
public DomainEntry(String name, DomainEntryArgs args)
public DomainEntry(String name, DomainEntryArgs args, CustomResourceOptions options)
type: aws:lightsail:DomainEntry
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 DomainEntryArgs
- 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 DomainEntryArgs
- 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 DomainEntryArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DomainEntryArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DomainEntryArgs
- 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 domainEntryResource = new Aws.LightSail.DomainEntry("domainEntryResource", new()
{
DomainName = "string",
Target = "string",
Type = "string",
IsAlias = false,
Name = "string",
});
example, err := lightsail.NewDomainEntry(ctx, "domainEntryResource", &lightsail.DomainEntryArgs{
DomainName: pulumi.String("string"),
Target: pulumi.String("string"),
Type: pulumi.String("string"),
IsAlias: pulumi.Bool(false),
Name: pulumi.String("string"),
})
var domainEntryResource = new DomainEntry("domainEntryResource", DomainEntryArgs.builder()
.domainName("string")
.target("string")
.type("string")
.isAlias(false)
.name("string")
.build());
domain_entry_resource = aws.lightsail.DomainEntry("domainEntryResource",
domain_name="string",
target="string",
type="string",
is_alias=False,
name="string")
const domainEntryResource = new aws.lightsail.DomainEntry("domainEntryResource", {
domainName: "string",
target: "string",
type: "string",
isAlias: false,
name: "string",
});
type: aws:lightsail:DomainEntry
properties:
domainName: string
isAlias: false
name: string
target: string
type: string
DomainEntry 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 DomainEntry resource accepts the following input properties:
- Domain
Name string - The name of the Lightsail domain in which to create the entry
- Target string
- Target of the domain entry
- Type string
- Type of record
- Is
Alias bool - If the entry should be an alias Defaults to
false
- Name string
- Name of the entry record
- Domain
Name string - The name of the Lightsail domain in which to create the entry
- Target string
- Target of the domain entry
- Type string
- Type of record
- Is
Alias bool - If the entry should be an alias Defaults to
false
- Name string
- Name of the entry record
- domain
Name String - The name of the Lightsail domain in which to create the entry
- target String
- Target of the domain entry
- type String
- Type of record
- is
Alias Boolean - If the entry should be an alias Defaults to
false
- name String
- Name of the entry record
- domain
Name string - The name of the Lightsail domain in which to create the entry
- target string
- Target of the domain entry
- type string
- Type of record
- is
Alias boolean - If the entry should be an alias Defaults to
false
- name string
- Name of the entry record
- domain_
name str - The name of the Lightsail domain in which to create the entry
- target str
- Target of the domain entry
- type str
- Type of record
- is_
alias bool - If the entry should be an alias Defaults to
false
- name str
- Name of the entry record
- domain
Name String - The name of the Lightsail domain in which to create the entry
- target String
- Target of the domain entry
- type String
- Type of record
- is
Alias Boolean - If the entry should be an alias Defaults to
false
- name String
- Name of the entry record
Outputs
All input properties are implicitly available as output properties. Additionally, the DomainEntry 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 DomainEntry Resource
Get an existing DomainEntry 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?: DomainEntryState, opts?: CustomResourceOptions): DomainEntry
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
domain_name: Optional[str] = None,
is_alias: Optional[bool] = None,
name: Optional[str] = None,
target: Optional[str] = None,
type: Optional[str] = None) -> DomainEntry
func GetDomainEntry(ctx *Context, name string, id IDInput, state *DomainEntryState, opts ...ResourceOption) (*DomainEntry, error)
public static DomainEntry Get(string name, Input<string> id, DomainEntryState? state, CustomResourceOptions? opts = null)
public static DomainEntry get(String name, Output<String> id, DomainEntryState 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.
- Domain
Name string - The name of the Lightsail domain in which to create the entry
- Is
Alias bool - If the entry should be an alias Defaults to
false
- Name string
- Name of the entry record
- Target string
- Target of the domain entry
- Type string
- Type of record
- Domain
Name string - The name of the Lightsail domain in which to create the entry
- Is
Alias bool - If the entry should be an alias Defaults to
false
- Name string
- Name of the entry record
- Target string
- Target of the domain entry
- Type string
- Type of record
- domain
Name String - The name of the Lightsail domain in which to create the entry
- is
Alias Boolean - If the entry should be an alias Defaults to
false
- name String
- Name of the entry record
- target String
- Target of the domain entry
- type String
- Type of record
- domain
Name string - The name of the Lightsail domain in which to create the entry
- is
Alias boolean - If the entry should be an alias Defaults to
false
- name string
- Name of the entry record
- target string
- Target of the domain entry
- type string
- Type of record
- domain_
name str - The name of the Lightsail domain in which to create the entry
- is_
alias bool - If the entry should be an alias Defaults to
false
- name str
- Name of the entry record
- target str
- Target of the domain entry
- type str
- Type of record
- domain
Name String - The name of the Lightsail domain in which to create the entry
- is
Alias Boolean - If the entry should be an alias Defaults to
false
- name String
- Name of the entry record
- target String
- Target of the domain entry
- type String
- Type of record
Import
Using pulumi import
, import aws_lightsail_domain_entry
using the id attribute. For example:
$ pulumi import aws:lightsail/domainEntry:DomainEntry example www,mydomain.com,A,127.0.0.1
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.