EipDomainName class
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)
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 main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/ec2"
"github.com/pulumi/pulumi-aws/sdk/v7/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
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_ec2_eip" "example" {
domain = "vpc"
}
resource "aws_route53_record" "example" {
zone_id = main.zoneId
name = "reverse"
type = "A"
records = [aws_ec2_eip.example.public_ip]
}
resource "aws_ec2_eipdomainname" "example" {
allocation_id = aws_ec2_eip.example.allocation_id
domain_name = aws_route53_record.example.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.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 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}
Import
Using pulumi import, import a static reverse DNS record to an Elastic IP addresses using their association IDs. For example:
$ pulumi import aws:ec2/eipDomainName:EipDomainName test eipalloc-ab12c345
Constructors
- EipDomainName(String name, {EipDomainNameArgs? args, CustomResourceOptions? options})
-
Creates a new EipDomainName.
nameThe Pulumi resource name.argsArguments used to configure this EipDomainName. The set of arguments for EipDomainName.optionsResource options controlling this resource's behavior. - EipDomainName.reference(String urn)
- Creates a typed reference to an existing EipDomainName resource.
Properties
-
allocationId
↔ Output<
String> -
The allocation ID.
latefinal
-
childResources
→ Set<
Resource> -
finalinherited
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
-
domainName
↔ Output<
String> -
The domain name to modify for the IP address.
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
-
id
↔ Output<
String> -
getter/setter pairinherited
- 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
-
ptrRecord
↔ Output<
String> -
The DNS pointer (PTR) record for the IP address.
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
-
timeouts
↔ Output<
EipDomainNameTimeouts?> -
latefinal
-
transformations
→ List<
ResourceTransformation> -
Inherited/explicit legacy transformations.
no setterinherited
-
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, {EipDomainNameState? state, CustomResourceOptions? options}) → EipDomainName -
Gets an existing EipDomainName resource's state with the given
nameandid.