public MyStack() { var main = new Aws.Elb.LoadBalancer("main", new Aws.Elb.LoadBalancerArgs { AvailabilityZones = { "us-east-1c", }, Listeners = { new Aws.Elb.Inputs.LoadBalancerListenerArgs { InstancePort = 80, InstanceProtocol = "http", LbPort = 80, LbProtocol = "http", }, }, }); var www = new Aws.Route53.Record("www", new Aws.Route53.RecordArgs { Aliases = { new Aws.Route53.Inputs.RecordAliasArgs { EvaluateTargetHealth = true, Name = main.DnsName, ZoneId = main.ZoneId, }, }, Name = "example.com", Type = "A", ZoneId = aws_route53_zone.Primary.Zone_id, }); }
public MyStack() { var example = new Aws.Ses.DomainIdentity("example", new Aws.Ses.DomainIdentityArgs { Domain = "example.com", }); var exampleAmazonsesVerificationRecord = new Aws.Route53.Record("exampleAmazonsesVerificationRecord", new Aws.Route53.RecordArgs { Name = example.Id.Apply(id => $"_amazonses.{id}"), Records = { example.VerificationToken, }, Ttl = 600, Type = "TXT", ZoneId = aws_route53_zone.Example.Zone_id, }); var exampleVerification = new Aws.Ses.DomainIdentityVerification("exampleVerification", new Aws.Ses.DomainIdentityVerificationArgs { Domain = example.Id, }, new CustomResourceOptions { DependsOn = { "aws_route53_record.example_amazonses_verification_record", }, }); }
public MyStack() { var exampleDomainName = new Aws.ApiGateway.DomainName("exampleDomainName", new Aws.ApiGateway.DomainNameArgs { CertificateArn = aws_acm_certificate_validation.Example.Certificate_arn, DomainName = "api.example.com", }); // Example DNS record using Route53. // Route53 is not specifically required; any DNS host can be used. var exampleRecord = new Aws.Route53.Record("exampleRecord", new Aws.Route53.RecordArgs { Aliases = { new Aws.Route53.Inputs.RecordAliasArgs { EvaluateTargetHealth = true, Name = exampleDomainName.CloudfrontDomainName, ZoneId = exampleDomainName.CloudfrontZoneId, }, }, Name = exampleDomainName.Domain, Type = "A", ZoneId = aws_route53_zone.Example.Id, }); }
public MyStack() { var ptfeServiceVpcEndpoint = new Aws.Ec2.VpcEndpoint("ptfeServiceVpcEndpoint", new Aws.Ec2.VpcEndpointArgs { PrivateDnsEnabled = false, SecurityGroupIds = { aws_security_group.Ptfe_service.Id, }, ServiceName = @var.Ptfe_service, SubnetIds = { local.Subnet_ids, }, VpcEndpointType = "Interface", VpcId = @var.Vpc_id, }); var @internal = Output.Create(Aws.Route53.GetZone.InvokeAsync(new Aws.Route53.GetZoneArgs { Name = "vpc.internal.", PrivateZone = true, VpcId = @var.Vpc_id, })); var ptfeServiceRecord = new Aws.Route53.Record("ptfeServiceRecord", new Aws.Route53.RecordArgs { Name = @internal.Apply(@internal => $"ptfe.{@internal.Name}"), Records = { ptfeServiceVpcEndpoint.DnsEntries.Apply(dnsEntries => dnsEntries[0])["dns_name"], }, Ttl = 300, Type = "CNAME", ZoneId = @internal.Apply(@internal => @internal.ZoneId), }); }
public MyStack() { var selected = Output.Create(Aws.S3.GetBucket.InvokeAsync(new Aws.S3.GetBucketArgs { Bucket = "bucket.test.com", })); var testZone = Output.Create(Aws.Route53.GetZone.InvokeAsync(new Aws.Route53.GetZoneArgs { Name = "test.com.", })); var example = new Aws.Route53.Record("example", new Aws.Route53.RecordArgs { Aliases = { new Aws.Route53.Inputs.RecordAliasArgs { Name = selected.Apply(selected => selected.WebsiteDomain), ZoneId = selected.Apply(selected => selected.HostedZoneId), }, }, Name = "bucket", Type = "A", ZoneId = testZone.Apply(testZone => testZone.Id), }); }
public MyStack() { var main = new Aws.Route53.Zone("main", new Aws.Route53.ZoneArgs { }); var dev = new Aws.Route53.Zone("dev", new Aws.Route53.ZoneArgs { Tags = { { "Environment", "dev" }, }, }); var dev_ns = new Aws.Route53.Record("dev-ns", new Aws.Route53.RecordArgs { Name = "dev.example.com", Records = { dev.NameServers.Apply(nameServers => nameServers[0]), dev.NameServers.Apply(nameServers => nameServers[1]), dev.NameServers.Apply(nameServers => nameServers[2]), dev.NameServers.Apply(nameServers => nameServers[3]), }, Ttl = 30, Type = "NS", ZoneId = main.ZoneId, }); }
public MyStack() { var www = new Aws.Route53.Record("www", new Aws.Route53.RecordArgs { Name = "www.example.com", Records = { aws_eip.Lb.Public_ip, }, Ttl = 300, Type = "A", ZoneId = aws_route53_zone.Primary.Zone_id, }); }
public MyStack() { var example = new Aws.Ses.DomainIdentity("example", new Aws.Ses.DomainIdentityArgs { Domain = "example.com", }); var exampleAmazonsesVerificationRecord = new Aws.Route53.Record("exampleAmazonsesVerificationRecord", new Aws.Route53.RecordArgs { Name = "_amazonses.example.com", Records = { example.VerificationToken, }, Ttl = 600, Type = "TXT", ZoneId = "ABCDEFGHIJ123", }); }
public MyStack() { var selected = Output.Create(Aws.Route53.GetZone.InvokeAsync(new Aws.Route53.GetZoneArgs { Name = "test.com.", PrivateZone = true, })); var www = new Aws.Route53.Record("www", new Aws.Route53.RecordArgs { Name = selected.Apply(selected => $"www.{selected.Name}"), Records = { "10.0.0.1", }, Ttl = 300, Type = "A", ZoneId = selected.Apply(selected => selected.ZoneId), }); }
public MyStack() { var main = Output.Create(Aws.Elb.GetHostedZoneId.InvokeAsync()); var www = new Aws.Route53.Record("www", new Aws.Route53.RecordArgs { Aliases = { new Aws.Route53.Inputs.RecordAliasArgs { EvaluateTargetHealth = true, Name = aws_elb.Main.Dns_name, ZoneId = main.Apply(main => main.Id), }, }, Name = "example.com", Type = "A", ZoneId = aws_route53_zone.Primary.Zone_id, }); }
public MyStack() { var www_dev = new Aws.Route53.Record("www-dev", new Aws.Route53.RecordArgs { Name = "www", Records = { "dev.example.com", }, SetIdentifier = "dev", Ttl = 5, Type = "CNAME", WeightedRoutingPolicies = { new Aws.Route53.Inputs.RecordWeightedRoutingPolicyArgs { Weight = 10, }, }, ZoneId = aws_route53_zone.Primary.Zone_id, }); var www_live = new Aws.Route53.Record("www-live", new Aws.Route53.RecordArgs { Name = "www", Records = { "live.example.com", }, SetIdentifier = "live", Ttl = 5, Type = "CNAME", WeightedRoutingPolicies = { new Aws.Route53.Inputs.RecordWeightedRoutingPolicyArgs { Weight = 90, }, }, ZoneId = aws_route53_zone.Primary.Zone_id, }); }
public MyStack() { var exampleZone = new Aws.Route53.Zone("exampleZone", new Aws.Route53.ZoneArgs { }); var exampleRecord = new Aws.Route53.Record("exampleRecord", new Aws.Route53.RecordArgs { AllowOverwrite = true, Name = "test.example.com", Records = { exampleZone.NameServers.Apply(nameServers => nameServers[0]), exampleZone.NameServers.Apply(nameServers => nameServers[1]), exampleZone.NameServers.Apply(nameServers => nameServers[2]), exampleZone.NameServers.Apply(nameServers => nameServers[3]), }, Ttl = 30, Type = "NS", ZoneId = exampleZone.ZoneId, }); }
public MyStack() { // Example SES Domain Identity var exampleDomainIdentity = new Aws.Ses.DomainIdentity("exampleDomainIdentity", new Aws.Ses.DomainIdentityArgs { Domain = "example.com", }); var exampleMailFrom = new Aws.Ses.MailFrom("exampleMailFrom", new Aws.Ses.MailFromArgs { Domain = exampleDomainIdentity.Domain, MailFromDomain = exampleDomainIdentity.Domain.Apply(domain => $"bounce.{domain}"), }); // Example Route53 MX record var exampleSesDomainMailFromMx = new Aws.Route53.Record("exampleSesDomainMailFromMx", new Aws.Route53.RecordArgs { Name = exampleMailFrom.MailFromDomain, Records = { "10 feedback-smtp.us-east-1.amazonses.com", }, Ttl = 600, Type = "MX", ZoneId = aws_route53_zone.Example.Id, }); // Example Route53 TXT record for SPF var exampleSesDomainMailFromTxt = new Aws.Route53.Record("exampleSesDomainMailFromTxt", new Aws.Route53.RecordArgs { Name = exampleMailFrom.MailFromDomain, Records = { "v=spf1 include:amazonses.com -all", }, Ttl = 600, Type = "TXT", ZoneId = aws_route53_zone.Example.Id, }); }
public MyStack() { var certCertificate = new Aws.Acm.Certificate("certCertificate", new Aws.Acm.CertificateArgs { DomainName = "example.com", ValidationMethod = "DNS", }); var zone = Output.Create(Aws.Route53.GetZone.InvokeAsync(new Aws.Route53.GetZoneArgs { Name = "example.com.", PrivateZone = false, })); var certValidation = new Aws.Route53.Record("certValidation", new Aws.Route53.RecordArgs { Name = certCertificate.DomainValidationOptions.Apply(domainValidationOptions => domainValidationOptions[0].ResourceRecordName), Records = { certCertificate.DomainValidationOptions.Apply(domainValidationOptions => domainValidationOptions[0].ResourceRecordValue), }, Ttl = 60, Type = certCertificate.DomainValidationOptions.Apply(domainValidationOptions => domainValidationOptions[0].ResourceRecordType), ZoneId = zone.Apply(zone => zone.ZoneId), }); var certCertificateValidation = new Aws.Acm.CertificateValidation("certCertificateValidation", new Aws.Acm.CertificateValidationArgs { CertificateArn = certCertificate.Arn, ValidationRecordFqdns = { certValidation.Fqdn, }, }); var frontEnd = new Aws.LB.Listener("frontEnd", new Aws.LB.ListenerArgs { CertificateArn = certCertificateValidation.CertificateArn, }); }