aws.ec2.EipDomainName
Explore with Pulumi AI
Assigns a static reverse DNS record to an Elastic IP addresses. See Using reverse DNS for email applications.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.ec2.Eip("example", {domain: "vpc"});
const exampleRecord = new aws.route53.Record("example", {
zoneId: main.zoneId,
name: "reverse",
type: aws.route53.RecordType.A,
records: [example.publicIp],
});
const exampleEipDomainName = new aws.ec2.EipDomainName("example", {
allocationId: example.allocationId,
domainName: exampleRecord.fqdn,
});
import pulumi
import pulumi_aws as aws
example = aws.ec2.Eip("example", domain="vpc")
example_record = aws.route53.Record("example",
zone_id=main["zoneId"],
name="reverse",
type=aws.route53.RecordType.A,
records=[example.public_ip])
example_eip_domain_name = aws.ec2.EipDomainName("example",
allocation_id=example.allocation_id,
domain_name=example_record.fqdn)
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := ec2.NewEip(ctx, "example", &ec2.EipArgs{
Domain: pulumi.String("vpc"),
})
if err != nil {
return err
}
exampleRecord, err := route53.NewRecord(ctx, "example", &route53.RecordArgs{
ZoneId: pulumi.Any(main.ZoneId),
Name: pulumi.String("reverse"),
Type: pulumi.String(route53.RecordTypeA),
Records: pulumi.StringArray{
example.PublicIp,
},
})
if err != nil {
return err
}
_, err = ec2.NewEipDomainName(ctx, "example", &ec2.EipDomainNameArgs{
AllocationId: example.AllocationId,
DomainName: exampleRecord.Fqdn,
})
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 example = new Aws.Ec2.Eip("example", new()
{
Domain = "vpc",
});
var exampleRecord = new Aws.Route53.Record("example", new()
{
ZoneId = main.ZoneId,
Name = "reverse",
Type = Aws.Route53.RecordType.A,
Records = new[]
{
example.PublicIp,
},
});
var exampleEipDomainName = new Aws.Ec2.EipDomainName("example", new()
{
AllocationId = example.AllocationId,
DomainName = exampleRecord.Fqdn,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.Eip;
import com.pulumi.aws.ec2.EipArgs;
import com.pulumi.aws.route53.Record;
import com.pulumi.aws.route53.RecordArgs;
import com.pulumi.aws.ec2.EipDomainName;
import com.pulumi.aws.ec2.EipDomainNameArgs;
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 example = new Eip("example", EipArgs.builder()
.domain("vpc")
.build());
var exampleRecord = new Record("exampleRecord", RecordArgs.builder()
.zoneId(main.zoneId())
.name("reverse")
.type("A")
.records(example.publicIp())
.build());
var exampleEipDomainName = new EipDomainName("exampleEipDomainName", EipDomainNameArgs.builder()
.allocationId(example.allocationId())
.domainName(exampleRecord.fqdn())
.build());
}
}
resources:
example:
type: aws:ec2:Eip
properties:
domain: vpc
exampleRecord:
type: aws:route53:Record
name: example
properties:
zoneId: ${main.zoneId}
name: reverse
type: A
records:
- ${example.publicIp}
exampleEipDomainName:
type: aws:ec2:EipDomainName
name: example
properties:
allocationId: ${example.allocationId}
domainName: ${exampleRecord.fqdn}
Create EipDomainName Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new EipDomainName(name: string, args: EipDomainNameArgs, opts?: CustomResourceOptions);
@overload
def EipDomainName(resource_name: str,
args: EipDomainNameArgs,
opts: Optional[ResourceOptions] = None)
@overload
def EipDomainName(resource_name: str,
opts: Optional[ResourceOptions] = None,
allocation_id: Optional[str] = None,
domain_name: Optional[str] = None,
timeouts: Optional[EipDomainNameTimeoutsArgs] = None)
func NewEipDomainName(ctx *Context, name string, args EipDomainNameArgs, opts ...ResourceOption) (*EipDomainName, error)
public EipDomainName(string name, EipDomainNameArgs args, CustomResourceOptions? opts = null)
public EipDomainName(String name, EipDomainNameArgs args)
public EipDomainName(String name, EipDomainNameArgs args, CustomResourceOptions options)
type: aws:ec2:EipDomainName
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 EipDomainNameArgs
- 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 EipDomainNameArgs
- 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 EipDomainNameArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args EipDomainNameArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args EipDomainNameArgs
- 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 eipDomainNameResource = new Aws.Ec2.EipDomainName("eipDomainNameResource", new()
{
AllocationId = "string",
DomainName = "string",
Timeouts = new Aws.Ec2.Inputs.EipDomainNameTimeoutsArgs
{
Create = "string",
Delete = "string",
Update = "string",
},
});
example, err := ec2.NewEipDomainName(ctx, "eipDomainNameResource", &ec2.EipDomainNameArgs{
AllocationId: pulumi.String("string"),
DomainName: pulumi.String("string"),
Timeouts: &ec2.EipDomainNameTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Update: pulumi.String("string"),
},
})
var eipDomainNameResource = new EipDomainName("eipDomainNameResource", EipDomainNameArgs.builder()
.allocationId("string")
.domainName("string")
.timeouts(EipDomainNameTimeoutsArgs.builder()
.create("string")
.delete("string")
.update("string")
.build())
.build());
eip_domain_name_resource = aws.ec2.EipDomainName("eipDomainNameResource",
allocation_id="string",
domain_name="string",
timeouts={
"create": "string",
"delete": "string",
"update": "string",
})
const eipDomainNameResource = new aws.ec2.EipDomainName("eipDomainNameResource", {
allocationId: "string",
domainName: "string",
timeouts: {
create: "string",
"delete": "string",
update: "string",
},
});
type: aws:ec2:EipDomainName
properties:
allocationId: string
domainName: string
timeouts:
create: string
delete: string
update: string
EipDomainName 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 EipDomainName resource accepts the following input properties:
- Allocation
Id string - The allocation ID.
- Domain
Name string - The domain name to modify for the IP address.
- Timeouts
Eip
Domain Name Timeouts
- Allocation
Id string - The allocation ID.
- Domain
Name string - The domain name to modify for the IP address.
- Timeouts
Eip
Domain Name Timeouts Args
- allocation
Id String - The allocation ID.
- domain
Name String - The domain name to modify for the IP address.
- timeouts
Eip
Domain Name Timeouts
- allocation
Id string - The allocation ID.
- domain
Name string - The domain name to modify for the IP address.
- timeouts
Eip
Domain Name Timeouts
- allocation_
id str - The allocation ID.
- domain_
name str - The domain name to modify for the IP address.
- timeouts
Eip
Domain Name Timeouts Args
- allocation
Id String - The allocation ID.
- domain
Name String - The domain name to modify for the IP address.
- timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the EipDomainName resource produces the following output properties:
- id str
- The provider-assigned unique ID for this managed resource.
- ptr_
record str - The DNS pointer (PTR) record for the IP address.
Look up Existing EipDomainName Resource
Get an existing EipDomainName 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?: EipDomainNameState, opts?: CustomResourceOptions): EipDomainName
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
allocation_id: Optional[str] = None,
domain_name: Optional[str] = None,
ptr_record: Optional[str] = None,
timeouts: Optional[EipDomainNameTimeoutsArgs] = None) -> EipDomainName
func GetEipDomainName(ctx *Context, name string, id IDInput, state *EipDomainNameState, opts ...ResourceOption) (*EipDomainName, error)
public static EipDomainName Get(string name, Input<string> id, EipDomainNameState? state, CustomResourceOptions? opts = null)
public static EipDomainName get(String name, Output<String> id, EipDomainNameState 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.
- Allocation
Id string - The allocation ID.
- Domain
Name string - The domain name to modify for the IP address.
- Ptr
Record string - The DNS pointer (PTR) record for the IP address.
- Timeouts
Eip
Domain Name Timeouts
- Allocation
Id string - The allocation ID.
- Domain
Name string - The domain name to modify for the IP address.
- Ptr
Record string - The DNS pointer (PTR) record for the IP address.
- Timeouts
Eip
Domain Name Timeouts Args
- allocation
Id String - The allocation ID.
- domain
Name String - The domain name to modify for the IP address.
- ptr
Record String - The DNS pointer (PTR) record for the IP address.
- timeouts
Eip
Domain Name Timeouts
- allocation
Id string - The allocation ID.
- domain
Name string - The domain name to modify for the IP address.
- ptr
Record string - The DNS pointer (PTR) record for the IP address.
- timeouts
Eip
Domain Name Timeouts
- allocation_
id str - The allocation ID.
- domain_
name str - The domain name to modify for the IP address.
- ptr_
record str - The DNS pointer (PTR) record for the IP address.
- timeouts
Eip
Domain Name Timeouts Args
- allocation
Id String - The allocation ID.
- domain
Name String - The domain name to modify for the IP address.
- ptr
Record String - The DNS pointer (PTR) record for the IP address.
- timeouts Property Map
Supporting Types
EipDomainNameTimeouts, EipDomainNameTimeoutsArgs
- Create string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- Delete string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- Update string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- Create string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- Delete string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- Update string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- create String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- delete String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- update String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- create string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- delete string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- update string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- create str
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- delete str
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- update str
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- create String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- delete String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- update String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.