1. Packages
  2. Scaleway
  3. API Docs
  4. DomainRecord
Scaleway v1.14.0 published on Thursday, Jun 6, 2024 by pulumiverse

scaleway.DomainRecord

Explore with Pulumi AI

scaleway logo
Scaleway v1.14.0 published on Thursday, Jun 6, 2024 by pulumiverse

    Creates and manages Scaleway Domain record.
    For more information, see the documentation.

    Example Usage

    Basic

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumiverse/scaleway";
    
    const www = new scaleway.DomainRecord("www", {
        data: "1.2.3.4",
        dnsZone: "domain.tld",
        ttl: 3600,
        type: "A",
    });
    const www2 = new scaleway.DomainRecord("www2", {
        data: "1.2.3.5",
        dnsZone: "domain.tld",
        ttl: 3600,
        type: "A",
    });
    const mx = new scaleway.DomainRecord("mx", {
        data: "mx.online.net.",
        dnsZone: "domain.tld",
        priority: 10,
        ttl: 3600,
        type: "MX",
    });
    const mx2 = new scaleway.DomainRecord("mx2", {
        data: "mx-cache.online.net.",
        dnsZone: "domain.tld",
        priority: 20,
        ttl: 3600,
        type: "MX",
    });
    
    import pulumi
    import pulumiverse_scaleway as scaleway
    
    www = scaleway.DomainRecord("www",
        data="1.2.3.4",
        dns_zone="domain.tld",
        ttl=3600,
        type="A")
    www2 = scaleway.DomainRecord("www2",
        data="1.2.3.5",
        dns_zone="domain.tld",
        ttl=3600,
        type="A")
    mx = scaleway.DomainRecord("mx",
        data="mx.online.net.",
        dns_zone="domain.tld",
        priority=10,
        ttl=3600,
        type="MX")
    mx2 = scaleway.DomainRecord("mx2",
        data="mx-cache.online.net.",
        dns_zone="domain.tld",
        priority=20,
        ttl=3600,
        type="MX")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := scaleway.NewDomainRecord(ctx, "www", &scaleway.DomainRecordArgs{
    			Data:    pulumi.String("1.2.3.4"),
    			DnsZone: pulumi.String("domain.tld"),
    			Ttl:     pulumi.Int(3600),
    			Type:    pulumi.String("A"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = scaleway.NewDomainRecord(ctx, "www2", &scaleway.DomainRecordArgs{
    			Data:    pulumi.String("1.2.3.5"),
    			DnsZone: pulumi.String("domain.tld"),
    			Ttl:     pulumi.Int(3600),
    			Type:    pulumi.String("A"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = scaleway.NewDomainRecord(ctx, "mx", &scaleway.DomainRecordArgs{
    			Data:     pulumi.String("mx.online.net."),
    			DnsZone:  pulumi.String("domain.tld"),
    			Priority: pulumi.Int(10),
    			Ttl:      pulumi.Int(3600),
    			Type:     pulumi.String("MX"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = scaleway.NewDomainRecord(ctx, "mx2", &scaleway.DomainRecordArgs{
    			Data:     pulumi.String("mx-cache.online.net."),
    			DnsZone:  pulumi.String("domain.tld"),
    			Priority: pulumi.Int(20),
    			Ttl:      pulumi.Int(3600),
    			Type:     pulumi.String("MX"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumiverse.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        var www = new Scaleway.DomainRecord("www", new()
        {
            Data = "1.2.3.4",
            DnsZone = "domain.tld",
            Ttl = 3600,
            Type = "A",
        });
    
        var www2 = new Scaleway.DomainRecord("www2", new()
        {
            Data = "1.2.3.5",
            DnsZone = "domain.tld",
            Ttl = 3600,
            Type = "A",
        });
    
        var mx = new Scaleway.DomainRecord("mx", new()
        {
            Data = "mx.online.net.",
            DnsZone = "domain.tld",
            Priority = 10,
            Ttl = 3600,
            Type = "MX",
        });
    
        var mx2 = new Scaleway.DomainRecord("mx2", new()
        {
            Data = "mx-cache.online.net.",
            DnsZone = "domain.tld",
            Priority = 20,
            Ttl = 3600,
            Type = "MX",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.DomainRecord;
    import com.pulumi.scaleway.DomainRecordArgs;
    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 www = new DomainRecord("www", DomainRecordArgs.builder()        
                .data("1.2.3.4")
                .dnsZone("domain.tld")
                .ttl(3600)
                .type("A")
                .build());
    
            var www2 = new DomainRecord("www2", DomainRecordArgs.builder()        
                .data("1.2.3.5")
                .dnsZone("domain.tld")
                .ttl(3600)
                .type("A")
                .build());
    
            var mx = new DomainRecord("mx", DomainRecordArgs.builder()        
                .data("mx.online.net.")
                .dnsZone("domain.tld")
                .priority(10)
                .ttl(3600)
                .type("MX")
                .build());
    
            var mx2 = new DomainRecord("mx2", DomainRecordArgs.builder()        
                .data("mx-cache.online.net.")
                .dnsZone("domain.tld")
                .priority(20)
                .ttl(3600)
                .type("MX")
                .build());
    
        }
    }
    
    resources:
      www:
        type: scaleway:DomainRecord
        properties:
          data: 1.2.3.4
          dnsZone: domain.tld
          ttl: 3600
          type: A
      www2:
        type: scaleway:DomainRecord
        properties:
          data: 1.2.3.5
          dnsZone: domain.tld
          ttl: 3600
          type: A
      mx:
        type: scaleway:DomainRecord
        properties:
          data: mx.online.net.
          dnsZone: domain.tld
          priority: 10
          ttl: 3600
          type: MX
      mx2:
        type: scaleway:DomainRecord
        properties:
          data: mx-cache.online.net.
          dnsZone: domain.tld
          priority: 20
          ttl: 3600
          type: MX
    

    With dynamic records

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumiverse/scaleway";
    
    const geoIp = new scaleway.DomainRecord("geoIp", {
        data: "1.2.3.4",
        dnsZone: "domain.tld",
        geoIp: {
            matches: [
                {
                    continents: ["EU"],
                    countries: ["FR"],
                    data: "1.2.3.5",
                },
                {
                    continents: ["NA"],
                    data: "4.3.2.1",
                },
            ],
        },
        ttl: 3600,
        type: "A",
    });
    const httpService = new scaleway.DomainRecord("httpService", {
        data: "1.2.3.4",
        dnsZone: "domain.tld",
        httpService: {
            ips: [
                "1.2.3.5",
                "1.2.3.6",
            ],
            mustContain: "up",
            strategy: "hashed",
            url: "http://mywebsite.com/health",
            userAgent: "scw_service_up",
        },
        ttl: 3600,
        type: "A",
    });
    const view = new scaleway.DomainRecord("view", {
        data: "1.2.3.4",
        dnsZone: "domain.tld",
        ttl: 3600,
        type: "A",
        views: [
            {
                data: "1.2.3.5",
                subnet: "100.0.0.0/16",
            },
            {
                data: "1.2.3.6",
                subnet: "100.1.0.0/16",
            },
        ],
    });
    const weighted = new scaleway.DomainRecord("weighted", {
        data: "1.2.3.4",
        dnsZone: "domain.tld",
        ttl: 3600,
        type: "A",
        weighteds: [
            {
                ip: "1.2.3.5",
                weight: 1,
            },
            {
                ip: "1.2.3.6",
                weight: 2,
            },
        ],
    });
    
    import pulumi
    import pulumiverse_scaleway as scaleway
    
    geo_ip = scaleway.DomainRecord("geoIp",
        data="1.2.3.4",
        dns_zone="domain.tld",
        geo_ip=scaleway.DomainRecordGeoIpArgs(
            matches=[
                scaleway.DomainRecordGeoIpMatchArgs(
                    continents=["EU"],
                    countries=["FR"],
                    data="1.2.3.5",
                ),
                scaleway.DomainRecordGeoIpMatchArgs(
                    continents=["NA"],
                    data="4.3.2.1",
                ),
            ],
        ),
        ttl=3600,
        type="A")
    http_service = scaleway.DomainRecord("httpService",
        data="1.2.3.4",
        dns_zone="domain.tld",
        http_service=scaleway.DomainRecordHttpServiceArgs(
            ips=[
                "1.2.3.5",
                "1.2.3.6",
            ],
            must_contain="up",
            strategy="hashed",
            url="http://mywebsite.com/health",
            user_agent="scw_service_up",
        ),
        ttl=3600,
        type="A")
    view = scaleway.DomainRecord("view",
        data="1.2.3.4",
        dns_zone="domain.tld",
        ttl=3600,
        type="A",
        views=[
            scaleway.DomainRecordViewArgs(
                data="1.2.3.5",
                subnet="100.0.0.0/16",
            ),
            scaleway.DomainRecordViewArgs(
                data="1.2.3.6",
                subnet="100.1.0.0/16",
            ),
        ])
    weighted = scaleway.DomainRecord("weighted",
        data="1.2.3.4",
        dns_zone="domain.tld",
        ttl=3600,
        type="A",
        weighteds=[
            scaleway.DomainRecordWeightedArgs(
                ip="1.2.3.5",
                weight=1,
            ),
            scaleway.DomainRecordWeightedArgs(
                ip="1.2.3.6",
                weight=2,
            ),
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := scaleway.NewDomainRecord(ctx, "geoIp", &scaleway.DomainRecordArgs{
    			Data:    pulumi.String("1.2.3.4"),
    			DnsZone: pulumi.String("domain.tld"),
    			GeoIp: &scaleway.DomainRecordGeoIpArgs{
    				Matches: scaleway.DomainRecordGeoIpMatchArray{
    					&scaleway.DomainRecordGeoIpMatchArgs{
    						Continents: pulumi.StringArray{
    							pulumi.String("EU"),
    						},
    						Countries: pulumi.StringArray{
    							pulumi.String("FR"),
    						},
    						Data: pulumi.String("1.2.3.5"),
    					},
    					&scaleway.DomainRecordGeoIpMatchArgs{
    						Continents: pulumi.StringArray{
    							pulumi.String("NA"),
    						},
    						Data: pulumi.String("4.3.2.1"),
    					},
    				},
    			},
    			Ttl:  pulumi.Int(3600),
    			Type: pulumi.String("A"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = scaleway.NewDomainRecord(ctx, "httpService", &scaleway.DomainRecordArgs{
    			Data:    pulumi.String("1.2.3.4"),
    			DnsZone: pulumi.String("domain.tld"),
    			HttpService: &scaleway.DomainRecordHttpServiceArgs{
    				Ips: pulumi.StringArray{
    					pulumi.String("1.2.3.5"),
    					pulumi.String("1.2.3.6"),
    				},
    				MustContain: pulumi.String("up"),
    				Strategy:    pulumi.String("hashed"),
    				Url:         pulumi.String("http://mywebsite.com/health"),
    				UserAgent:   pulumi.String("scw_service_up"),
    			},
    			Ttl:  pulumi.Int(3600),
    			Type: pulumi.String("A"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = scaleway.NewDomainRecord(ctx, "view", &scaleway.DomainRecordArgs{
    			Data:    pulumi.String("1.2.3.4"),
    			DnsZone: pulumi.String("domain.tld"),
    			Ttl:     pulumi.Int(3600),
    			Type:    pulumi.String("A"),
    			Views: scaleway.DomainRecordViewArray{
    				&scaleway.DomainRecordViewArgs{
    					Data:   pulumi.String("1.2.3.5"),
    					Subnet: pulumi.String("100.0.0.0/16"),
    				},
    				&scaleway.DomainRecordViewArgs{
    					Data:   pulumi.String("1.2.3.6"),
    					Subnet: pulumi.String("100.1.0.0/16"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = scaleway.NewDomainRecord(ctx, "weighted", &scaleway.DomainRecordArgs{
    			Data:    pulumi.String("1.2.3.4"),
    			DnsZone: pulumi.String("domain.tld"),
    			Ttl:     pulumi.Int(3600),
    			Type:    pulumi.String("A"),
    			Weighteds: scaleway.DomainRecordWeightedArray{
    				&scaleway.DomainRecordWeightedArgs{
    					Ip:     pulumi.String("1.2.3.5"),
    					Weight: pulumi.Int(1),
    				},
    				&scaleway.DomainRecordWeightedArgs{
    					Ip:     pulumi.String("1.2.3.6"),
    					Weight: pulumi.Int(2),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumiverse.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        var geoIp = new Scaleway.DomainRecord("geoIp", new()
        {
            Data = "1.2.3.4",
            DnsZone = "domain.tld",
            GeoIp = new Scaleway.Inputs.DomainRecordGeoIpArgs
            {
                Matches = new[]
                {
                    new Scaleway.Inputs.DomainRecordGeoIpMatchArgs
                    {
                        Continents = new[]
                        {
                            "EU",
                        },
                        Countries = new[]
                        {
                            "FR",
                        },
                        Data = "1.2.3.5",
                    },
                    new Scaleway.Inputs.DomainRecordGeoIpMatchArgs
                    {
                        Continents = new[]
                        {
                            "NA",
                        },
                        Data = "4.3.2.1",
                    },
                },
            },
            Ttl = 3600,
            Type = "A",
        });
    
        var httpService = new Scaleway.DomainRecord("httpService", new()
        {
            Data = "1.2.3.4",
            DnsZone = "domain.tld",
            HttpService = new Scaleway.Inputs.DomainRecordHttpServiceArgs
            {
                Ips = new[]
                {
                    "1.2.3.5",
                    "1.2.3.6",
                },
                MustContain = "up",
                Strategy = "hashed",
                Url = "http://mywebsite.com/health",
                UserAgent = "scw_service_up",
            },
            Ttl = 3600,
            Type = "A",
        });
    
        var view = new Scaleway.DomainRecord("view", new()
        {
            Data = "1.2.3.4",
            DnsZone = "domain.tld",
            Ttl = 3600,
            Type = "A",
            Views = new[]
            {
                new Scaleway.Inputs.DomainRecordViewArgs
                {
                    Data = "1.2.3.5",
                    Subnet = "100.0.0.0/16",
                },
                new Scaleway.Inputs.DomainRecordViewArgs
                {
                    Data = "1.2.3.6",
                    Subnet = "100.1.0.0/16",
                },
            },
        });
    
        var weighted = new Scaleway.DomainRecord("weighted", new()
        {
            Data = "1.2.3.4",
            DnsZone = "domain.tld",
            Ttl = 3600,
            Type = "A",
            Weighteds = new[]
            {
                new Scaleway.Inputs.DomainRecordWeightedArgs
                {
                    Ip = "1.2.3.5",
                    Weight = 1,
                },
                new Scaleway.Inputs.DomainRecordWeightedArgs
                {
                    Ip = "1.2.3.6",
                    Weight = 2,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.DomainRecord;
    import com.pulumi.scaleway.DomainRecordArgs;
    import com.pulumi.scaleway.inputs.DomainRecordGeoIpArgs;
    import com.pulumi.scaleway.inputs.DomainRecordHttpServiceArgs;
    import com.pulumi.scaleway.inputs.DomainRecordViewArgs;
    import com.pulumi.scaleway.inputs.DomainRecordWeightedArgs;
    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 geoIp = new DomainRecord("geoIp", DomainRecordArgs.builder()        
                .data("1.2.3.4")
                .dnsZone("domain.tld")
                .geoIp(DomainRecordGeoIpArgs.builder()
                    .matches(                
                        DomainRecordGeoIpMatchArgs.builder()
                            .continents("EU")
                            .countries("FR")
                            .data("1.2.3.5")
                            .build(),
                        DomainRecordGeoIpMatchArgs.builder()
                            .continents("NA")
                            .data("4.3.2.1")
                            .build())
                    .build())
                .ttl(3600)
                .type("A")
                .build());
    
            var httpService = new DomainRecord("httpService", DomainRecordArgs.builder()        
                .data("1.2.3.4")
                .dnsZone("domain.tld")
                .httpService(DomainRecordHttpServiceArgs.builder()
                    .ips(                
                        "1.2.3.5",
                        "1.2.3.6")
                    .mustContain("up")
                    .strategy("hashed")
                    .url("http://mywebsite.com/health")
                    .userAgent("scw_service_up")
                    .build())
                .ttl(3600)
                .type("A")
                .build());
    
            var view = new DomainRecord("view", DomainRecordArgs.builder()        
                .data("1.2.3.4")
                .dnsZone("domain.tld")
                .ttl(3600)
                .type("A")
                .views(            
                    DomainRecordViewArgs.builder()
                        .data("1.2.3.5")
                        .subnet("100.0.0.0/16")
                        .build(),
                    DomainRecordViewArgs.builder()
                        .data("1.2.3.6")
                        .subnet("100.1.0.0/16")
                        .build())
                .build());
    
            var weighted = new DomainRecord("weighted", DomainRecordArgs.builder()        
                .data("1.2.3.4")
                .dnsZone("domain.tld")
                .ttl(3600)
                .type("A")
                .weighteds(            
                    DomainRecordWeightedArgs.builder()
                        .ip("1.2.3.5")
                        .weight(1)
                        .build(),
                    DomainRecordWeightedArgs.builder()
                        .ip("1.2.3.6")
                        .weight(2)
                        .build())
                .build());
    
        }
    }
    
    resources:
      geoIp:
        type: scaleway:DomainRecord
        properties:
          data: 1.2.3.4
          dnsZone: domain.tld
          geoIp:
            matches:
              - continents:
                  - EU
                countries:
                  - FR
                data: 1.2.3.5
              - continents:
                  - NA
                data: 4.3.2.1
          ttl: 3600
          type: A
      httpService:
        type: scaleway:DomainRecord
        properties:
          data: 1.2.3.4
          dnsZone: domain.tld
          httpService:
            ips:
              - 1.2.3.5
              - 1.2.3.6
            mustContain: up
            strategy: hashed
            url: http://mywebsite.com/health
            userAgent: scw_service_up
          ttl: 3600
          type: A
      view:
        type: scaleway:DomainRecord
        properties:
          data: 1.2.3.4
          dnsZone: domain.tld
          ttl: 3600
          type: A
          views:
            - data: 1.2.3.5
              subnet: 100.0.0.0/16
            - data: 1.2.3.6
              subnet: 100.1.0.0/16
      weighted:
        type: scaleway:DomainRecord
        properties:
          data: 1.2.3.4
          dnsZone: domain.tld
          ttl: 3600
          type: A
          weighteds:
            - ip: 1.2.3.5
              weight: 1
            - ip: 1.2.3.6
              weight: 2
    

    Create an instance and add records with the new instance IP

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumiverse/scaleway";
    
    const config = new pulumi.Config();
    const projectId = config.require("projectId");
    const dnsZone = config.require("dnsZone");
    const publicIp = new scaleway.InstanceIp("publicIp", {projectId: projectId});
    const web = new scaleway.InstanceServer("web", {
        projectId: projectId,
        type: "DEV1-S",
        image: "ubuntu_jammy",
        tags: [
            "front",
            "web",
        ],
        ipId: publicIp.id,
        rootVolume: {
            sizeInGb: 20,
        },
    });
    const webA = new scaleway.DomainRecord("webA", {
        dnsZone: dnsZone,
        type: "A",
        data: web.publicIp,
        ttl: 3600,
    });
    const webCname = new scaleway.DomainRecord("webCname", {
        dnsZone: dnsZone,
        type: "CNAME",
        data: `web.${dnsZone}.`,
        ttl: 3600,
    });
    const webAlias = new scaleway.DomainRecord("webAlias", {
        dnsZone: dnsZone,
        type: "ALIAS",
        data: `web.${dnsZone}.`,
        ttl: 3600,
    });
    
    import pulumi
    import pulumiverse_scaleway as scaleway
    
    config = pulumi.Config()
    project_id = config.require("projectId")
    dns_zone = config.require("dnsZone")
    public_ip = scaleway.InstanceIp("publicIp", project_id=project_id)
    web = scaleway.InstanceServer("web",
        project_id=project_id,
        type="DEV1-S",
        image="ubuntu_jammy",
        tags=[
            "front",
            "web",
        ],
        ip_id=public_ip.id,
        root_volume=scaleway.InstanceServerRootVolumeArgs(
            size_in_gb=20,
        ))
    web_a = scaleway.DomainRecord("webA",
        dns_zone=dns_zone,
        type="A",
        data=web.public_ip,
        ttl=3600)
    web_cname = scaleway.DomainRecord("webCname",
        dns_zone=dns_zone,
        type="CNAME",
        data=f"web.{dns_zone}.",
        ttl=3600)
    web_alias = scaleway.DomainRecord("webAlias",
        dns_zone=dns_zone,
        type="ALIAS",
        data=f"web.{dns_zone}.",
        ttl=3600)
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		projectId := cfg.Require("projectId")
    		dnsZone := cfg.Require("dnsZone")
    		publicIp, err := scaleway.NewInstanceIp(ctx, "publicIp", &scaleway.InstanceIpArgs{
    			ProjectId: pulumi.String(projectId),
    		})
    		if err != nil {
    			return err
    		}
    		web, err := scaleway.NewInstanceServer(ctx, "web", &scaleway.InstanceServerArgs{
    			ProjectId: pulumi.String(projectId),
    			Type:      pulumi.String("DEV1-S"),
    			Image:     pulumi.String("ubuntu_jammy"),
    			Tags: pulumi.StringArray{
    				pulumi.String("front"),
    				pulumi.String("web"),
    			},
    			IpId: publicIp.ID(),
    			RootVolume: &scaleway.InstanceServerRootVolumeArgs{
    				SizeInGb: pulumi.Int(20),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = scaleway.NewDomainRecord(ctx, "webA", &scaleway.DomainRecordArgs{
    			DnsZone: pulumi.String(dnsZone),
    			Type:    pulumi.String("A"),
    			Data:    web.PublicIp,
    			Ttl:     pulumi.Int(3600),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = scaleway.NewDomainRecord(ctx, "webCname", &scaleway.DomainRecordArgs{
    			DnsZone: pulumi.String(dnsZone),
    			Type:    pulumi.String("CNAME"),
    			Data:    pulumi.String(fmt.Sprintf("web.%v.", dnsZone)),
    			Ttl:     pulumi.Int(3600),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = scaleway.NewDomainRecord(ctx, "webAlias", &scaleway.DomainRecordArgs{
    			DnsZone: pulumi.String(dnsZone),
    			Type:    pulumi.String("ALIAS"),
    			Data:    pulumi.String(fmt.Sprintf("web.%v.", dnsZone)),
    			Ttl:     pulumi.Int(3600),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumiverse.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var projectId = config.Require("projectId");
        var dnsZone = config.Require("dnsZone");
        var publicIp = new Scaleway.InstanceIp("publicIp", new()
        {
            ProjectId = projectId,
        });
    
        var web = new Scaleway.InstanceServer("web", new()
        {
            ProjectId = projectId,
            Type = "DEV1-S",
            Image = "ubuntu_jammy",
            Tags = new[]
            {
                "front",
                "web",
            },
            IpId = publicIp.Id,
            RootVolume = new Scaleway.Inputs.InstanceServerRootVolumeArgs
            {
                SizeInGb = 20,
            },
        });
    
        var webA = new Scaleway.DomainRecord("webA", new()
        {
            DnsZone = dnsZone,
            Type = "A",
            Data = web.PublicIp,
            Ttl = 3600,
        });
    
        var webCname = new Scaleway.DomainRecord("webCname", new()
        {
            DnsZone = dnsZone,
            Type = "CNAME",
            Data = $"web.{dnsZone}.",
            Ttl = 3600,
        });
    
        var webAlias = new Scaleway.DomainRecord("webAlias", new()
        {
            DnsZone = dnsZone,
            Type = "ALIAS",
            Data = $"web.{dnsZone}.",
            Ttl = 3600,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.InstanceIp;
    import com.pulumi.scaleway.InstanceIpArgs;
    import com.pulumi.scaleway.InstanceServer;
    import com.pulumi.scaleway.InstanceServerArgs;
    import com.pulumi.scaleway.inputs.InstanceServerRootVolumeArgs;
    import com.pulumi.scaleway.DomainRecord;
    import com.pulumi.scaleway.DomainRecordArgs;
    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) {
            final var config = ctx.config();
            final var projectId = config.get("projectId");
            final var dnsZone = config.get("dnsZone");
            var publicIp = new InstanceIp("publicIp", InstanceIpArgs.builder()        
                .projectId(projectId)
                .build());
    
            var web = new InstanceServer("web", InstanceServerArgs.builder()        
                .projectId(projectId)
                .type("DEV1-S")
                .image("ubuntu_jammy")
                .tags(            
                    "front",
                    "web")
                .ipId(publicIp.id())
                .rootVolume(InstanceServerRootVolumeArgs.builder()
                    .sizeInGb(20)
                    .build())
                .build());
    
            var webA = new DomainRecord("webA", DomainRecordArgs.builder()        
                .dnsZone(dnsZone)
                .type("A")
                .data(web.publicIp())
                .ttl(3600)
                .build());
    
            var webCname = new DomainRecord("webCname", DomainRecordArgs.builder()        
                .dnsZone(dnsZone)
                .type("CNAME")
                .data(String.format("web.%s.", dnsZone))
                .ttl(3600)
                .build());
    
            var webAlias = new DomainRecord("webAlias", DomainRecordArgs.builder()        
                .dnsZone(dnsZone)
                .type("ALIAS")
                .data(String.format("web.%s.", dnsZone))
                .ttl(3600)
                .build());
    
        }
    }
    
    configuration:
      projectId:
        type: string
      dnsZone:
        type: string
    resources:
      publicIp:
        type: scaleway:InstanceIp
        properties:
          projectId: ${projectId}
      web:
        type: scaleway:InstanceServer
        properties:
          projectId: ${projectId}
          type: DEV1-S
          image: ubuntu_jammy
          tags:
            - front
            - web
          ipId: ${publicIp.id}
          rootVolume:
            sizeInGb: 20
      webA:
        type: scaleway:DomainRecord
        properties:
          dnsZone: ${dnsZone}
          type: A
          data: ${web.publicIp}
          ttl: 3600
      webCname:
        type: scaleway:DomainRecord
        properties:
          dnsZone: ${dnsZone}
          type: CNAME
          data: web.${dnsZone}.
          ttl: 3600
      webAlias:
        type: scaleway:DomainRecord
        properties:
          dnsZone: ${dnsZone}
          type: ALIAS
          data: web.${dnsZone}.
          ttl: 3600
    

    Multiple records

    Some record types can have multiple data with the same name (eg: A, AAAA, MX, NS…).
    You can duplicate a resource scaleway.DomainRecord with the same name, the records will be added.

    Please note, some record (eg: CNAME, Multiple dynamic records of different types…) has to be unique.

    Create DomainRecord Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new DomainRecord(name: string, args: DomainRecordArgs, opts?: CustomResourceOptions);
    @overload
    def DomainRecord(resource_name: str,
                     args: DomainRecordArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def DomainRecord(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     data: Optional[str] = None,
                     dns_zone: Optional[str] = None,
                     type: Optional[str] = None,
                     geo_ip: Optional[DomainRecordGeoIpArgs] = None,
                     http_service: Optional[DomainRecordHttpServiceArgs] = None,
                     keep_empty_zone: Optional[bool] = None,
                     name: Optional[str] = None,
                     priority: Optional[int] = None,
                     project_id: Optional[str] = None,
                     ttl: Optional[int] = None,
                     views: Optional[Sequence[DomainRecordViewArgs]] = None,
                     weighteds: Optional[Sequence[DomainRecordWeightedArgs]] = None)
    func NewDomainRecord(ctx *Context, name string, args DomainRecordArgs, opts ...ResourceOption) (*DomainRecord, error)
    public DomainRecord(string name, DomainRecordArgs args, CustomResourceOptions? opts = null)
    public DomainRecord(String name, DomainRecordArgs args)
    public DomainRecord(String name, DomainRecordArgs args, CustomResourceOptions options)
    
    type: scaleway:DomainRecord
    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 DomainRecordArgs
    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 DomainRecordArgs
    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 DomainRecordArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DomainRecordArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DomainRecordArgs
    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 domainRecordResource = new Scaleway.DomainRecord("domainRecordResource", new()
    {
        Data = "string",
        DnsZone = "string",
        Type = "string",
        GeoIp = new Scaleway.Inputs.DomainRecordGeoIpArgs
        {
            Matches = new[]
            {
                new Scaleway.Inputs.DomainRecordGeoIpMatchArgs
                {
                    Data = "string",
                    Continents = new[]
                    {
                        "string",
                    },
                    Countries = new[]
                    {
                        "string",
                    },
                },
            },
        },
        HttpService = new Scaleway.Inputs.DomainRecordHttpServiceArgs
        {
            Ips = new[]
            {
                "string",
            },
            MustContain = "string",
            Strategy = "string",
            Url = "string",
            UserAgent = "string",
        },
        KeepEmptyZone = false,
        Name = "string",
        Priority = 0,
        ProjectId = "string",
        Ttl = 0,
        Views = new[]
        {
            new Scaleway.Inputs.DomainRecordViewArgs
            {
                Data = "string",
                Subnet = "string",
            },
        },
        Weighteds = new[]
        {
            new Scaleway.Inputs.DomainRecordWeightedArgs
            {
                Ip = "string",
                Weight = 0,
            },
        },
    });
    
    example, err := scaleway.NewDomainRecord(ctx, "domainRecordResource", &scaleway.DomainRecordArgs{
    	Data:    pulumi.String("string"),
    	DnsZone: pulumi.String("string"),
    	Type:    pulumi.String("string"),
    	GeoIp: &scaleway.DomainRecordGeoIpArgs{
    		Matches: scaleway.DomainRecordGeoIpMatchArray{
    			&scaleway.DomainRecordGeoIpMatchArgs{
    				Data: pulumi.String("string"),
    				Continents: pulumi.StringArray{
    					pulumi.String("string"),
    				},
    				Countries: pulumi.StringArray{
    					pulumi.String("string"),
    				},
    			},
    		},
    	},
    	HttpService: &scaleway.DomainRecordHttpServiceArgs{
    		Ips: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		MustContain: pulumi.String("string"),
    		Strategy:    pulumi.String("string"),
    		Url:         pulumi.String("string"),
    		UserAgent:   pulumi.String("string"),
    	},
    	KeepEmptyZone: pulumi.Bool(false),
    	Name:          pulumi.String("string"),
    	Priority:      pulumi.Int(0),
    	ProjectId:     pulumi.String("string"),
    	Ttl:           pulumi.Int(0),
    	Views: scaleway.DomainRecordViewArray{
    		&scaleway.DomainRecordViewArgs{
    			Data:   pulumi.String("string"),
    			Subnet: pulumi.String("string"),
    		},
    	},
    	Weighteds: scaleway.DomainRecordWeightedArray{
    		&scaleway.DomainRecordWeightedArgs{
    			Ip:     pulumi.String("string"),
    			Weight: pulumi.Int(0),
    		},
    	},
    })
    
    var domainRecordResource = new DomainRecord("domainRecordResource", DomainRecordArgs.builder()
        .data("string")
        .dnsZone("string")
        .type("string")
        .geoIp(DomainRecordGeoIpArgs.builder()
            .matches(DomainRecordGeoIpMatchArgs.builder()
                .data("string")
                .continents("string")
                .countries("string")
                .build())
            .build())
        .httpService(DomainRecordHttpServiceArgs.builder()
            .ips("string")
            .mustContain("string")
            .strategy("string")
            .url("string")
            .userAgent("string")
            .build())
        .keepEmptyZone(false)
        .name("string")
        .priority(0)
        .projectId("string")
        .ttl(0)
        .views(DomainRecordViewArgs.builder()
            .data("string")
            .subnet("string")
            .build())
        .weighteds(DomainRecordWeightedArgs.builder()
            .ip("string")
            .weight(0)
            .build())
        .build());
    
    domain_record_resource = scaleway.DomainRecord("domainRecordResource",
        data="string",
        dns_zone="string",
        type="string",
        geo_ip=scaleway.DomainRecordGeoIpArgs(
            matches=[scaleway.DomainRecordGeoIpMatchArgs(
                data="string",
                continents=["string"],
                countries=["string"],
            )],
        ),
        http_service=scaleway.DomainRecordHttpServiceArgs(
            ips=["string"],
            must_contain="string",
            strategy="string",
            url="string",
            user_agent="string",
        ),
        keep_empty_zone=False,
        name="string",
        priority=0,
        project_id="string",
        ttl=0,
        views=[scaleway.DomainRecordViewArgs(
            data="string",
            subnet="string",
        )],
        weighteds=[scaleway.DomainRecordWeightedArgs(
            ip="string",
            weight=0,
        )])
    
    const domainRecordResource = new scaleway.DomainRecord("domainRecordResource", {
        data: "string",
        dnsZone: "string",
        type: "string",
        geoIp: {
            matches: [{
                data: "string",
                continents: ["string"],
                countries: ["string"],
            }],
        },
        httpService: {
            ips: ["string"],
            mustContain: "string",
            strategy: "string",
            url: "string",
            userAgent: "string",
        },
        keepEmptyZone: false,
        name: "string",
        priority: 0,
        projectId: "string",
        ttl: 0,
        views: [{
            data: "string",
            subnet: "string",
        }],
        weighteds: [{
            ip: "string",
            weight: 0,
        }],
    });
    
    type: scaleway:DomainRecord
    properties:
        data: string
        dnsZone: string
        geoIp:
            matches:
                - continents:
                    - string
                  countries:
                    - string
                  data: string
        httpService:
            ips:
                - string
            mustContain: string
            strategy: string
            url: string
            userAgent: string
        keepEmptyZone: false
        name: string
        priority: 0
        projectId: string
        ttl: 0
        type: string
        views:
            - data: string
              subnet: string
        weighteds:
            - ip: string
              weight: 0
    

    DomainRecord 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 DomainRecord resource accepts the following input properties:

    Data string
    The content of the record (an IPv4 for an A, a string for a TXT...).
    DnsZone string
    The DNS Zone of the domain. If the DNS zone doesn't exist, it will be automatically created.
    Type string
    The type of the record (A, AAAA, MX, CNAME, DNAME, ALIAS, NS, PTR, SRV, TXT, TLSA, or CAA).
    GeoIp Pulumiverse.Scaleway.Inputs.DomainRecordGeoIp
    Return record based on client localisation
    HttpService Pulumiverse.Scaleway.Inputs.DomainRecordHttpService
    Return record based on client localisation
    KeepEmptyZone bool
    When destroying a resource, if only NS records remain and this is set to false, the zone will be deleted. Please note, each zone not deleted will cost you money
    Name string
    The name of the record (can be an empty string for a root record).
    Priority int
    The priority of the record (mostly used with an MX record)
    ProjectId string
    The project_id you want to attach the resource to
    Ttl int
    Time To Live of the record in seconds.
    Views List<Pulumiverse.Scaleway.Inputs.DomainRecordView>
    Return record based on client subnet
    Weighteds List<Pulumiverse.Scaleway.Inputs.DomainRecordWeighted>
    Return record based on weight
    Data string
    The content of the record (an IPv4 for an A, a string for a TXT...).
    DnsZone string
    The DNS Zone of the domain. If the DNS zone doesn't exist, it will be automatically created.
    Type string
    The type of the record (A, AAAA, MX, CNAME, DNAME, ALIAS, NS, PTR, SRV, TXT, TLSA, or CAA).
    GeoIp DomainRecordGeoIpArgs
    Return record based on client localisation
    HttpService DomainRecordHttpServiceArgs
    Return record based on client localisation
    KeepEmptyZone bool
    When destroying a resource, if only NS records remain and this is set to false, the zone will be deleted. Please note, each zone not deleted will cost you money
    Name string
    The name of the record (can be an empty string for a root record).
    Priority int
    The priority of the record (mostly used with an MX record)
    ProjectId string
    The project_id you want to attach the resource to
    Ttl int
    Time To Live of the record in seconds.
    Views []DomainRecordViewArgs
    Return record based on client subnet
    Weighteds []DomainRecordWeightedArgs
    Return record based on weight
    data String
    The content of the record (an IPv4 for an A, a string for a TXT...).
    dnsZone String
    The DNS Zone of the domain. If the DNS zone doesn't exist, it will be automatically created.
    type String
    The type of the record (A, AAAA, MX, CNAME, DNAME, ALIAS, NS, PTR, SRV, TXT, TLSA, or CAA).
    geoIp DomainRecordGeoIp
    Return record based on client localisation
    httpService DomainRecordHttpService
    Return record based on client localisation
    keepEmptyZone Boolean
    When destroying a resource, if only NS records remain and this is set to false, the zone will be deleted. Please note, each zone not deleted will cost you money
    name String
    The name of the record (can be an empty string for a root record).
    priority Integer
    The priority of the record (mostly used with an MX record)
    projectId String
    The project_id you want to attach the resource to
    ttl Integer
    Time To Live of the record in seconds.
    views List<DomainRecordView>
    Return record based on client subnet
    weighteds List<DomainRecordWeighted>
    Return record based on weight
    data string
    The content of the record (an IPv4 for an A, a string for a TXT...).
    dnsZone string
    The DNS Zone of the domain. If the DNS zone doesn't exist, it will be automatically created.
    type string
    The type of the record (A, AAAA, MX, CNAME, DNAME, ALIAS, NS, PTR, SRV, TXT, TLSA, or CAA).
    geoIp DomainRecordGeoIp
    Return record based on client localisation
    httpService DomainRecordHttpService
    Return record based on client localisation
    keepEmptyZone boolean
    When destroying a resource, if only NS records remain and this is set to false, the zone will be deleted. Please note, each zone not deleted will cost you money
    name string
    The name of the record (can be an empty string for a root record).
    priority number
    The priority of the record (mostly used with an MX record)
    projectId string
    The project_id you want to attach the resource to
    ttl number
    Time To Live of the record in seconds.
    views DomainRecordView[]
    Return record based on client subnet
    weighteds DomainRecordWeighted[]
    Return record based on weight
    data str
    The content of the record (an IPv4 for an A, a string for a TXT...).
    dns_zone str
    The DNS Zone of the domain. If the DNS zone doesn't exist, it will be automatically created.
    type str
    The type of the record (A, AAAA, MX, CNAME, DNAME, ALIAS, NS, PTR, SRV, TXT, TLSA, or CAA).
    geo_ip DomainRecordGeoIpArgs
    Return record based on client localisation
    http_service DomainRecordHttpServiceArgs
    Return record based on client localisation
    keep_empty_zone bool
    When destroying a resource, if only NS records remain and this is set to false, the zone will be deleted. Please note, each zone not deleted will cost you money
    name str
    The name of the record (can be an empty string for a root record).
    priority int
    The priority of the record (mostly used with an MX record)
    project_id str
    The project_id you want to attach the resource to
    ttl int
    Time To Live of the record in seconds.
    views Sequence[DomainRecordViewArgs]
    Return record based on client subnet
    weighteds Sequence[DomainRecordWeightedArgs]
    Return record based on weight
    data String
    The content of the record (an IPv4 for an A, a string for a TXT...).
    dnsZone String
    The DNS Zone of the domain. If the DNS zone doesn't exist, it will be automatically created.
    type String
    The type of the record (A, AAAA, MX, CNAME, DNAME, ALIAS, NS, PTR, SRV, TXT, TLSA, or CAA).
    geoIp Property Map
    Return record based on client localisation
    httpService Property Map
    Return record based on client localisation
    keepEmptyZone Boolean
    When destroying a resource, if only NS records remain and this is set to false, the zone will be deleted. Please note, each zone not deleted will cost you money
    name String
    The name of the record (can be an empty string for a root record).
    priority Number
    The priority of the record (mostly used with an MX record)
    projectId String
    The project_id you want to attach the resource to
    ttl Number
    Time To Live of the record in seconds.
    views List<Property Map>
    Return record based on client subnet
    weighteds List<Property Map>
    Return record based on weight

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DomainRecord resource produces the following output properties:

    Fqdn string
    The FQDN of the record.
    Id string
    The provider-assigned unique ID for this managed resource.
    RootZone bool
    Does the DNS zone is the root zone or not
    Fqdn string
    The FQDN of the record.
    Id string
    The provider-assigned unique ID for this managed resource.
    RootZone bool
    Does the DNS zone is the root zone or not
    fqdn String
    The FQDN of the record.
    id String
    The provider-assigned unique ID for this managed resource.
    rootZone Boolean
    Does the DNS zone is the root zone or not
    fqdn string
    The FQDN of the record.
    id string
    The provider-assigned unique ID for this managed resource.
    rootZone boolean
    Does the DNS zone is the root zone or not
    fqdn str
    The FQDN of the record.
    id str
    The provider-assigned unique ID for this managed resource.
    root_zone bool
    Does the DNS zone is the root zone or not
    fqdn String
    The FQDN of the record.
    id String
    The provider-assigned unique ID for this managed resource.
    rootZone Boolean
    Does the DNS zone is the root zone or not

    Look up Existing DomainRecord Resource

    Get an existing DomainRecord 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?: DomainRecordState, opts?: CustomResourceOptions): DomainRecord
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            data: Optional[str] = None,
            dns_zone: Optional[str] = None,
            fqdn: Optional[str] = None,
            geo_ip: Optional[DomainRecordGeoIpArgs] = None,
            http_service: Optional[DomainRecordHttpServiceArgs] = None,
            keep_empty_zone: Optional[bool] = None,
            name: Optional[str] = None,
            priority: Optional[int] = None,
            project_id: Optional[str] = None,
            root_zone: Optional[bool] = None,
            ttl: Optional[int] = None,
            type: Optional[str] = None,
            views: Optional[Sequence[DomainRecordViewArgs]] = None,
            weighteds: Optional[Sequence[DomainRecordWeightedArgs]] = None) -> DomainRecord
    func GetDomainRecord(ctx *Context, name string, id IDInput, state *DomainRecordState, opts ...ResourceOption) (*DomainRecord, error)
    public static DomainRecord Get(string name, Input<string> id, DomainRecordState? state, CustomResourceOptions? opts = null)
    public static DomainRecord get(String name, Output<String> id, DomainRecordState 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.
    The following state arguments are supported:
    Data string
    The content of the record (an IPv4 for an A, a string for a TXT...).
    DnsZone string
    The DNS Zone of the domain. If the DNS zone doesn't exist, it will be automatically created.
    Fqdn string
    The FQDN of the record.
    GeoIp Pulumiverse.Scaleway.Inputs.DomainRecordGeoIp
    Return record based on client localisation
    HttpService Pulumiverse.Scaleway.Inputs.DomainRecordHttpService
    Return record based on client localisation
    KeepEmptyZone bool
    When destroying a resource, if only NS records remain and this is set to false, the zone will be deleted. Please note, each zone not deleted will cost you money
    Name string
    The name of the record (can be an empty string for a root record).
    Priority int
    The priority of the record (mostly used with an MX record)
    ProjectId string
    The project_id you want to attach the resource to
    RootZone bool
    Does the DNS zone is the root zone or not
    Ttl int
    Time To Live of the record in seconds.
    Type string
    The type of the record (A, AAAA, MX, CNAME, DNAME, ALIAS, NS, PTR, SRV, TXT, TLSA, or CAA).
    Views List<Pulumiverse.Scaleway.Inputs.DomainRecordView>
    Return record based on client subnet
    Weighteds List<Pulumiverse.Scaleway.Inputs.DomainRecordWeighted>
    Return record based on weight
    Data string
    The content of the record (an IPv4 for an A, a string for a TXT...).
    DnsZone string
    The DNS Zone of the domain. If the DNS zone doesn't exist, it will be automatically created.
    Fqdn string
    The FQDN of the record.
    GeoIp DomainRecordGeoIpArgs
    Return record based on client localisation
    HttpService DomainRecordHttpServiceArgs
    Return record based on client localisation
    KeepEmptyZone bool
    When destroying a resource, if only NS records remain and this is set to false, the zone will be deleted. Please note, each zone not deleted will cost you money
    Name string
    The name of the record (can be an empty string for a root record).
    Priority int
    The priority of the record (mostly used with an MX record)
    ProjectId string
    The project_id you want to attach the resource to
    RootZone bool
    Does the DNS zone is the root zone or not
    Ttl int
    Time To Live of the record in seconds.
    Type string
    The type of the record (A, AAAA, MX, CNAME, DNAME, ALIAS, NS, PTR, SRV, TXT, TLSA, or CAA).
    Views []DomainRecordViewArgs
    Return record based on client subnet
    Weighteds []DomainRecordWeightedArgs
    Return record based on weight
    data String
    The content of the record (an IPv4 for an A, a string for a TXT...).
    dnsZone String
    The DNS Zone of the domain. If the DNS zone doesn't exist, it will be automatically created.
    fqdn String
    The FQDN of the record.
    geoIp DomainRecordGeoIp
    Return record based on client localisation
    httpService DomainRecordHttpService
    Return record based on client localisation
    keepEmptyZone Boolean
    When destroying a resource, if only NS records remain and this is set to false, the zone will be deleted. Please note, each zone not deleted will cost you money
    name String
    The name of the record (can be an empty string for a root record).
    priority Integer
    The priority of the record (mostly used with an MX record)
    projectId String
    The project_id you want to attach the resource to
    rootZone Boolean
    Does the DNS zone is the root zone or not
    ttl Integer
    Time To Live of the record in seconds.
    type String
    The type of the record (A, AAAA, MX, CNAME, DNAME, ALIAS, NS, PTR, SRV, TXT, TLSA, or CAA).
    views List<DomainRecordView>
    Return record based on client subnet
    weighteds List<DomainRecordWeighted>
    Return record based on weight
    data string
    The content of the record (an IPv4 for an A, a string for a TXT...).
    dnsZone string
    The DNS Zone of the domain. If the DNS zone doesn't exist, it will be automatically created.
    fqdn string
    The FQDN of the record.
    geoIp DomainRecordGeoIp
    Return record based on client localisation
    httpService DomainRecordHttpService
    Return record based on client localisation
    keepEmptyZone boolean
    When destroying a resource, if only NS records remain and this is set to false, the zone will be deleted. Please note, each zone not deleted will cost you money
    name string
    The name of the record (can be an empty string for a root record).
    priority number
    The priority of the record (mostly used with an MX record)
    projectId string
    The project_id you want to attach the resource to
    rootZone boolean
    Does the DNS zone is the root zone or not
    ttl number
    Time To Live of the record in seconds.
    type string
    The type of the record (A, AAAA, MX, CNAME, DNAME, ALIAS, NS, PTR, SRV, TXT, TLSA, or CAA).
    views DomainRecordView[]
    Return record based on client subnet
    weighteds DomainRecordWeighted[]
    Return record based on weight
    data str
    The content of the record (an IPv4 for an A, a string for a TXT...).
    dns_zone str
    The DNS Zone of the domain. If the DNS zone doesn't exist, it will be automatically created.
    fqdn str
    The FQDN of the record.
    geo_ip DomainRecordGeoIpArgs
    Return record based on client localisation
    http_service DomainRecordHttpServiceArgs
    Return record based on client localisation
    keep_empty_zone bool
    When destroying a resource, if only NS records remain and this is set to false, the zone will be deleted. Please note, each zone not deleted will cost you money
    name str
    The name of the record (can be an empty string for a root record).
    priority int
    The priority of the record (mostly used with an MX record)
    project_id str
    The project_id you want to attach the resource to
    root_zone bool
    Does the DNS zone is the root zone or not
    ttl int
    Time To Live of the record in seconds.
    type str
    The type of the record (A, AAAA, MX, CNAME, DNAME, ALIAS, NS, PTR, SRV, TXT, TLSA, or CAA).
    views Sequence[DomainRecordViewArgs]
    Return record based on client subnet
    weighteds Sequence[DomainRecordWeightedArgs]
    Return record based on weight
    data String
    The content of the record (an IPv4 for an A, a string for a TXT...).
    dnsZone String
    The DNS Zone of the domain. If the DNS zone doesn't exist, it will be automatically created.
    fqdn String
    The FQDN of the record.
    geoIp Property Map
    Return record based on client localisation
    httpService Property Map
    Return record based on client localisation
    keepEmptyZone Boolean
    When destroying a resource, if only NS records remain and this is set to false, the zone will be deleted. Please note, each zone not deleted will cost you money
    name String
    The name of the record (can be an empty string for a root record).
    priority Number
    The priority of the record (mostly used with an MX record)
    projectId String
    The project_id you want to attach the resource to
    rootZone Boolean
    Does the DNS zone is the root zone or not
    ttl Number
    Time To Live of the record in seconds.
    type String
    The type of the record (A, AAAA, MX, CNAME, DNAME, ALIAS, NS, PTR, SRV, TXT, TLSA, or CAA).
    views List<Property Map>
    Return record based on client subnet
    weighteds List<Property Map>
    Return record based on weight

    Supporting Types

    DomainRecordGeoIp, DomainRecordGeoIpArgs

    matches List<Property Map>
    The list of matches

    DomainRecordGeoIpMatch, DomainRecordGeoIpMatchArgs

    Data string
    The content of the record (an IPv4 for an A, a string for a TXT...).
    Continents List<string>
    List of continents (eg: EU for Europe, NA for North America, AS for Asia...). List of all continents code: https://api.scaleway.com/domain-private/v2beta1/continents
    Countries List<string>
    List of countries (eg: FR for France, US for the United States, GB for Great Britain...). List of all countries code: https://api.scaleway.com/domain-private/v2beta1/countries
    Data string
    The content of the record (an IPv4 for an A, a string for a TXT...).
    Continents []string
    List of continents (eg: EU for Europe, NA for North America, AS for Asia...). List of all continents code: https://api.scaleway.com/domain-private/v2beta1/continents
    Countries []string
    List of countries (eg: FR for France, US for the United States, GB for Great Britain...). List of all countries code: https://api.scaleway.com/domain-private/v2beta1/countries
    data String
    The content of the record (an IPv4 for an A, a string for a TXT...).
    continents List<String>
    List of continents (eg: EU for Europe, NA for North America, AS for Asia...). List of all continents code: https://api.scaleway.com/domain-private/v2beta1/continents
    countries List<String>
    List of countries (eg: FR for France, US for the United States, GB for Great Britain...). List of all countries code: https://api.scaleway.com/domain-private/v2beta1/countries
    data string
    The content of the record (an IPv4 for an A, a string for a TXT...).
    continents string[]
    List of continents (eg: EU for Europe, NA for North America, AS for Asia...). List of all continents code: https://api.scaleway.com/domain-private/v2beta1/continents
    countries string[]
    List of countries (eg: FR for France, US for the United States, GB for Great Britain...). List of all countries code: https://api.scaleway.com/domain-private/v2beta1/countries
    data str
    The content of the record (an IPv4 for an A, a string for a TXT...).
    continents Sequence[str]
    List of continents (eg: EU for Europe, NA for North America, AS for Asia...). List of all continents code: https://api.scaleway.com/domain-private/v2beta1/continents
    countries Sequence[str]
    List of countries (eg: FR for France, US for the United States, GB for Great Britain...). List of all countries code: https://api.scaleway.com/domain-private/v2beta1/countries
    data String
    The content of the record (an IPv4 for an A, a string for a TXT...).
    continents List<String>
    List of continents (eg: EU for Europe, NA for North America, AS for Asia...). List of all continents code: https://api.scaleway.com/domain-private/v2beta1/continents
    countries List<String>
    List of countries (eg: FR for France, US for the United States, GB for Great Britain...). List of all countries code: https://api.scaleway.com/domain-private/v2beta1/countries

    DomainRecordHttpService, DomainRecordHttpServiceArgs

    Ips List<string>
    IPs to check
    MustContain string
    Text to search
    Strategy string
    Strategy to return an IP from the IPs list
    Url string
    URL to match the must_contain text to validate an IP
    UserAgent string
    User-agent used when checking the URL
    Ips []string
    IPs to check
    MustContain string
    Text to search
    Strategy string
    Strategy to return an IP from the IPs list
    Url string
    URL to match the must_contain text to validate an IP
    UserAgent string
    User-agent used when checking the URL
    ips List<String>
    IPs to check
    mustContain String
    Text to search
    strategy String
    Strategy to return an IP from the IPs list
    url String
    URL to match the must_contain text to validate an IP
    userAgent String
    User-agent used when checking the URL
    ips string[]
    IPs to check
    mustContain string
    Text to search
    strategy string
    Strategy to return an IP from the IPs list
    url string
    URL to match the must_contain text to validate an IP
    userAgent string
    User-agent used when checking the URL
    ips Sequence[str]
    IPs to check
    must_contain str
    Text to search
    strategy str
    Strategy to return an IP from the IPs list
    url str
    URL to match the must_contain text to validate an IP
    user_agent str
    User-agent used when checking the URL
    ips List<String>
    IPs to check
    mustContain String
    Text to search
    strategy String
    Strategy to return an IP from the IPs list
    url String
    URL to match the must_contain text to validate an IP
    userAgent String
    User-agent used when checking the URL

    DomainRecordView, DomainRecordViewArgs

    Data string
    The content of the record (an IPv4 for an A, a string for a TXT...).
    Subnet string
    The subnet of the view
    Data string
    The content of the record (an IPv4 for an A, a string for a TXT...).
    Subnet string
    The subnet of the view
    data String
    The content of the record (an IPv4 for an A, a string for a TXT...).
    subnet String
    The subnet of the view
    data string
    The content of the record (an IPv4 for an A, a string for a TXT...).
    subnet string
    The subnet of the view
    data str
    The content of the record (an IPv4 for an A, a string for a TXT...).
    subnet str
    The subnet of the view
    data String
    The content of the record (an IPv4 for an A, a string for a TXT...).
    subnet String
    The subnet of the view

    DomainRecordWeighted, DomainRecordWeightedArgs

    Ip string
    The weighted IP
    Weight int
    The weight of the IP
    Ip string
    The weighted IP
    Weight int
    The weight of the IP
    ip String
    The weighted IP
    weight Integer
    The weight of the IP
    ip string
    The weighted IP
    weight number
    The weight of the IP
    ip str
    The weighted IP
    weight int
    The weight of the IP
    ip String
    The weighted IP
    weight Number
    The weight of the IP

    Import

    Record can be imported using the {dns_zone}/{id}, e.g.

    bash

    $ pulumi import scaleway:index/domainRecord:DomainRecord www subdomain.domain.tld/11111111-1111-1111-1111-111111111111
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    scaleway pulumiverse/pulumi-scaleway
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the scaleway Terraform Provider.
    scaleway logo
    Scaleway v1.14.0 published on Thursday, Jun 6, 2024 by pulumiverse