Skip to content

Resource: awsLightsailDomainEntry

Creates a domain entry resource

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.lightsailDomain.LightsailDomain(this, "test", {
  domainName: "mydomain.com",
});
const awsLightsailDomainEntryTest =
  new aws.lightsailDomainEntry.LightsailDomainEntry(this, "test_1", {
    domainName: "${aws_lightsail_domain.domain_test.domain_name}",
    name: "www",
    target: "127.0.0.1",
    type: "A",
  });
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsLightsailDomainEntryTest.overrideLogicalId("test");

Argument Reference

The following arguments are supported:

  • domainName - (Required) The name of the Lightsail domain in which to create the entry
  • name - (Required) Name of the entry record
  • type - (Required) Type of record
  • target - (Required) Target of the domain entry
  • isAlias - (Optional) If the entry should be an alias Defaults to false

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • id - A combination of attributes to create a unique id: name_domainName_type_target

Import

awsLightsailDomainEntry can be imported by using the id attribute, e.g.,

$ terraform import aws_lightsail_domain_entry.example www_mydomain.com_A_127.0.0.1