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
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var testDomain = new Aws.LightSail.Domain("testDomain", new()
{
DomainName = "mydomain.com",
});
var testDomainEntry = new Aws.LightSail.DomainEntry("testDomainEntry", new()
{
DomainName = aws_lightsail_domain.Domain_test.Domain_name,
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, "testDomain", &lightsail.DomainArgs{
DomainName: pulumi.String("mydomain.com"),
})
if err != nil {
return err
}
_, err = lightsail.NewDomainEntry(ctx, "testDomainEntry", &lightsail.DomainEntryArgs{
DomainName: pulumi.Any(aws_lightsail_domain.Domain_test.Domain_name),
Type: pulumi.String("A"),
Target: pulumi.String("127.0.0.1"),
})
if err != nil {
return err
}
return nil
})
}
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 testDomain = new Domain("testDomain", DomainArgs.builder()
.domainName("mydomain.com")
.build());
var testDomainEntry = new DomainEntry("testDomainEntry", DomainEntryArgs.builder()
.domainName(aws_lightsail_domain.domain_test().domain_name())
.type("A")
.target("127.0.0.1")
.build());
}
}
import pulumi
import pulumi_aws as aws
test_domain = aws.lightsail.Domain("testDomain", domain_name="mydomain.com")
test_domain_entry = aws.lightsail.DomainEntry("testDomainEntry",
domain_name=aws_lightsail_domain["domain_test"]["domain_name"],
type="A",
target="127.0.0.1")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const testDomain = new aws.lightsail.Domain("testDomain", {domainName: "mydomain.com"});
const testDomainEntry = new aws.lightsail.DomainEntry("testDomainEntry", {
domainName: aws_lightsail_domain.domain_test.domain_name,
type: "A",
target: "127.0.0.1",
});
resources:
testDomain:
type: aws:lightsail:Domain
properties:
domainName: mydomain.com
testDomainEntry:
type: aws:lightsail:DomainEntry
properties:
domainName: ${aws_lightsail_domain.domain_test.domain_name}
type: A
target: 127.0.0.1
Create DomainEntry Resource
new DomainEntry(name: string, args: DomainEntryArgs, opts?: CustomResourceOptions);
@overload
def DomainEntry(resource_name: 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)
@overload
def DomainEntry(resource_name: str,
args: DomainEntryArgs,
opts: Optional[ResourceOptions] = 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.
- 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.
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
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.