DomainRecord

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

Examples

Basic

import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@lbrlabs/pulumi-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 lbrlabs_pulumi_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")
using System.Collections.Generic;
using Pulumi;
using Scaleway = Lbrlabs.PulumiPackage.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 main

import (
	"github.com/lbrlabs/pulumi-scaleway/sdk/go/scaleway"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

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
	})
}
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 "@lbrlabs/pulumi-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 lbrlabs_pulumi_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,
        ),
    ])
using System.Collections.Generic;
using Pulumi;
using Scaleway = Lbrlabs.PulumiPackage.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 main

import (
	"github.com/lbrlabs/pulumi-scaleway/sdk/go/scaleway"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

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
	})
}
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 "@lbrlabs/pulumi-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 lbrlabs_pulumi_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)
using System.Collections.Generic;
using Pulumi;
using Scaleway = Lbrlabs.PulumiPackage.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 main

import (
	"fmt"

	"github.com/lbrlabs/pulumi-scaleway/sdk/go/scaleway"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)

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
	})
}
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

new DomainRecord(name: string, args: DomainRecordArgs, opts?: CustomResourceOptions);
@overload
def DomainRecord(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 data: Optional[str] = None,
                 dns_zone: 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,
                 type: Optional[str] = None,
                 views: Optional[Sequence[DomainRecordViewArgs]] = None,
                 weighteds: Optional[Sequence[DomainRecordWeightedArgs]] = None)
@overload
def DomainRecord(resource_name: str,
                 args: DomainRecordArgs,
                 opts: Optional[ResourceOptions] = 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.

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.

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 data of the view record

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 Lbrlabs.PulumiPackage.Scaleway.Inputs.DomainRecordGeoIpArgs

The Geo IP feature provides DNS resolution, based on the user’s geographical location. You can define a default IP that resolves if no Geo IP rule matches, and specify IPs for each geographical zone. Documentation and usage example

HttpService Lbrlabs.PulumiPackage.Scaleway.Inputs.DomainRecordHttpServiceArgs

The DNS service checks the provided URL on the configured IPs and resolves the request to one of the IPs by excluding the ones not responding to the given string to check. Documentation and usage example

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<Lbrlabs.PulumiPackage.Scaleway.Inputs.DomainRecordViewArgs>

The answer to a DNS request is based on the client’s (resolver) subnet. (Can be more than 1) Documentation and usage example

Weighteds List<Lbrlabs.PulumiPackage.Scaleway.Inputs.DomainRecordWeightedArgs>

You provide a list of IPs with their corresponding weights. These weights are used to proportionally direct requests to each IP. Depending on the weight of a record more or fewer requests are answered with its related IP compared to the others in the list. (Can be more than 1) Documentation and usage example

Data string

The data of the view record

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

The Geo IP feature provides DNS resolution, based on the user’s geographical location. You can define a default IP that resolves if no Geo IP rule matches, and specify IPs for each geographical zone. Documentation and usage example

HttpService DomainRecordHttpServiceArgs

The DNS service checks the provided URL on the configured IPs and resolves the request to one of the IPs by excluding the ones not responding to the given string to check. Documentation and usage example

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

The answer to a DNS request is based on the client’s (resolver) subnet. (Can be more than 1) Documentation and usage example

Weighteds []DomainRecordWeightedArgs

You provide a list of IPs with their corresponding weights. These weights are used to proportionally direct requests to each IP. Depending on the weight of a record more or fewer requests are answered with its related IP compared to the others in the list. (Can be more than 1) Documentation and usage example

data String

The data of the view record

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

The Geo IP feature provides DNS resolution, based on the user’s geographical location. You can define a default IP that resolves if no Geo IP rule matches, and specify IPs for each geographical zone. Documentation and usage example

httpService DomainRecordHttpServiceArgs

The DNS service checks the provided URL on the configured IPs and resolves the request to one of the IPs by excluding the ones not responding to the given string to check. Documentation and usage example

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<DomainRecordViewArgs>

The answer to a DNS request is based on the client’s (resolver) subnet. (Can be more than 1) Documentation and usage example

weighteds List<DomainRecordWeightedArgs>

You provide a list of IPs with their corresponding weights. These weights are used to proportionally direct requests to each IP. Depending on the weight of a record more or fewer requests are answered with its related IP compared to the others in the list. (Can be more than 1) Documentation and usage example

data string

The data of the view record

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

The Geo IP feature provides DNS resolution, based on the user’s geographical location. You can define a default IP that resolves if no Geo IP rule matches, and specify IPs for each geographical zone. Documentation and usage example

httpService DomainRecordHttpServiceArgs

The DNS service checks the provided URL on the configured IPs and resolves the request to one of the IPs by excluding the ones not responding to the given string to check. Documentation and usage example

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 DomainRecordViewArgs[]

The answer to a DNS request is based on the client’s (resolver) subnet. (Can be more than 1) Documentation and usage example

weighteds DomainRecordWeightedArgs[]

You provide a list of IPs with their corresponding weights. These weights are used to proportionally direct requests to each IP. Depending on the weight of a record more or fewer requests are answered with its related IP compared to the others in the list. (Can be more than 1) Documentation and usage example

data str

The data of the view record

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

The Geo IP feature provides DNS resolution, based on the user’s geographical location. You can define a default IP that resolves if no Geo IP rule matches, and specify IPs for each geographical zone. Documentation and usage example

http_service DomainRecordHttpServiceArgs

The DNS service checks the provided URL on the configured IPs and resolves the request to one of the IPs by excluding the ones not responding to the given string to check. Documentation and usage example

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]

The answer to a DNS request is based on the client’s (resolver) subnet. (Can be more than 1) Documentation and usage example

weighteds Sequence[DomainRecordWeightedArgs]

You provide a list of IPs with their corresponding weights. These weights are used to proportionally direct requests to each IP. Depending on the weight of a record more or fewer requests are answered with its related IP compared to the others in the list. (Can be more than 1) Documentation and usage example

data String

The data of the view record

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

The Geo IP feature provides DNS resolution, based on the user’s geographical location. You can define a default IP that resolves if no Geo IP rule matches, and specify IPs for each geographical zone. Documentation and usage example

httpService Property Map

The DNS service checks the provided URL on the configured IPs and resolves the request to one of the IPs by excluding the ones not responding to the given string to check. Documentation and usage example

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>

The answer to a DNS request is based on the client’s (resolver) subnet. (Can be more than 1) Documentation and usage example

weighteds List<Property Map>

You provide a list of IPs with their corresponding weights. These weights are used to proportionally direct requests to each IP. Depending on the weight of a record more or fewer requests are answered with its related IP compared to the others in the list. (Can be more than 1) Documentation and usage example

Outputs

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

Id string

The provider-assigned unique ID for this managed resource.

RootZone bool

Does the DNS zone is the root zone or not

Id string

The provider-assigned unique ID for this managed resource.

RootZone bool

Does the DNS zone is the root zone or not

id String

The provider-assigned unique ID for this managed resource.

rootZone Boolean

Does the DNS zone is the root zone or not

id string

The provider-assigned unique ID for this managed resource.

rootZone boolean

Does the DNS zone is the root zone or not

id str

The provider-assigned unique ID for this managed resource.

root_zone bool

Does the DNS zone is the root zone or not

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,
        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 data of the view record

DnsZone string

The DNS Zone of the domain. If the DNS zone doesn't exist, it will be automatically created.

GeoIp Lbrlabs.PulumiPackage.Scaleway.Inputs.DomainRecordGeoIpArgs

The Geo IP feature provides DNS resolution, based on the user’s geographical location. You can define a default IP that resolves if no Geo IP rule matches, and specify IPs for each geographical zone. Documentation and usage example

HttpService Lbrlabs.PulumiPackage.Scaleway.Inputs.DomainRecordHttpServiceArgs

The DNS service checks the provided URL on the configured IPs and resolves the request to one of the IPs by excluding the ones not responding to the given string to check. Documentation and usage example

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<Lbrlabs.PulumiPackage.Scaleway.Inputs.DomainRecordViewArgs>

The answer to a DNS request is based on the client’s (resolver) subnet. (Can be more than 1) Documentation and usage example

Weighteds List<Lbrlabs.PulumiPackage.Scaleway.Inputs.DomainRecordWeightedArgs>

You provide a list of IPs with their corresponding weights. These weights are used to proportionally direct requests to each IP. Depending on the weight of a record more or fewer requests are answered with its related IP compared to the others in the list. (Can be more than 1) Documentation and usage example

Data string

The data of the view record

DnsZone string

The DNS Zone of the domain. If the DNS zone doesn't exist, it will be automatically created.

GeoIp DomainRecordGeoIpArgs

The Geo IP feature provides DNS resolution, based on the user’s geographical location. You can define a default IP that resolves if no Geo IP rule matches, and specify IPs for each geographical zone. Documentation and usage example

HttpService DomainRecordHttpServiceArgs

The DNS service checks the provided URL on the configured IPs and resolves the request to one of the IPs by excluding the ones not responding to the given string to check. Documentation and usage example

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

The answer to a DNS request is based on the client’s (resolver) subnet. (Can be more than 1) Documentation and usage example

Weighteds []DomainRecordWeightedArgs

You provide a list of IPs with their corresponding weights. These weights are used to proportionally direct requests to each IP. Depending on the weight of a record more or fewer requests are answered with its related IP compared to the others in the list. (Can be more than 1) Documentation and usage example

data String

The data of the view record

dnsZone String

The DNS Zone of the domain. If the DNS zone doesn't exist, it will be automatically created.

geoIp DomainRecordGeoIpArgs

The Geo IP feature provides DNS resolution, based on the user’s geographical location. You can define a default IP that resolves if no Geo IP rule matches, and specify IPs for each geographical zone. Documentation and usage example

httpService DomainRecordHttpServiceArgs

The DNS service checks the provided URL on the configured IPs and resolves the request to one of the IPs by excluding the ones not responding to the given string to check. Documentation and usage example

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<DomainRecordViewArgs>

The answer to a DNS request is based on the client’s (resolver) subnet. (Can be more than 1) Documentation and usage example

weighteds List<DomainRecordWeightedArgs>

You provide a list of IPs with their corresponding weights. These weights are used to proportionally direct requests to each IP. Depending on the weight of a record more or fewer requests are answered with its related IP compared to the others in the list. (Can be more than 1) Documentation and usage example

data string

The data of the view record

dnsZone string

The DNS Zone of the domain. If the DNS zone doesn't exist, it will be automatically created.

geoIp DomainRecordGeoIpArgs

The Geo IP feature provides DNS resolution, based on the user’s geographical location. You can define a default IP that resolves if no Geo IP rule matches, and specify IPs for each geographical zone. Documentation and usage example

httpService DomainRecordHttpServiceArgs

The DNS service checks the provided URL on the configured IPs and resolves the request to one of the IPs by excluding the ones not responding to the given string to check. Documentation and usage example

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 DomainRecordViewArgs[]

The answer to a DNS request is based on the client’s (resolver) subnet. (Can be more than 1) Documentation and usage example

weighteds DomainRecordWeightedArgs[]

You provide a list of IPs with their corresponding weights. These weights are used to proportionally direct requests to each IP. Depending on the weight of a record more or fewer requests are answered with its related IP compared to the others in the list. (Can be more than 1) Documentation and usage example

data str

The data of the view record

dns_zone str

The DNS Zone of the domain. If the DNS zone doesn't exist, it will be automatically created.

geo_ip DomainRecordGeoIpArgs

The Geo IP feature provides DNS resolution, based on the user’s geographical location. You can define a default IP that resolves if no Geo IP rule matches, and specify IPs for each geographical zone. Documentation and usage example

http_service DomainRecordHttpServiceArgs

The DNS service checks the provided URL on the configured IPs and resolves the request to one of the IPs by excluding the ones not responding to the given string to check. Documentation and usage example

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]

The answer to a DNS request is based on the client’s (resolver) subnet. (Can be more than 1) Documentation and usage example

weighteds Sequence[DomainRecordWeightedArgs]

You provide a list of IPs with their corresponding weights. These weights are used to proportionally direct requests to each IP. Depending on the weight of a record more or fewer requests are answered with its related IP compared to the others in the list. (Can be more than 1) Documentation and usage example

data String

The data of the view record

dnsZone String

The DNS Zone of the domain. If the DNS zone doesn't exist, it will be automatically created.

geoIp Property Map

The Geo IP feature provides DNS resolution, based on the user’s geographical location. You can define a default IP that resolves if no Geo IP rule matches, and specify IPs for each geographical zone. Documentation and usage example

httpService Property Map

The DNS service checks the provided URL on the configured IPs and resolves the request to one of the IPs by excluding the ones not responding to the given string to check. Documentation and usage example

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>

The answer to a DNS request is based on the client’s (resolver) subnet. (Can be more than 1) Documentation and usage example

weighteds List<Property Map>

You provide a list of IPs with their corresponding weights. These weights are used to proportionally direct requests to each IP. Depending on the weight of a record more or fewer requests are answered with its related IP compared to the others in the list. (Can be more than 1) Documentation and usage example

Supporting Types

DomainRecordGeoIp

Matches []DomainRecordGeoIpMatch

The list of matches. (Can be more than 1)

matches List<DomainRecordGeoIpMatch>

The list of matches. (Can be more than 1)

matches DomainRecordGeoIpMatch[]

The list of matches. (Can be more than 1)

matches Sequence[DomainRecordGeoIpMatch]

The list of matches. (Can be more than 1)

matches List<Property Map>

The list of matches. (Can be more than 1)

DomainRecordGeoIpMatch

Data string

The data of the view record

Continents List<string>

List of continents (eg: EU for Europe, NA for North America, AS for Asia...). List of all continents code

Countries List<string>

List of countries (eg: FR for France, US for the United States, GB for Great Britain...). List of all countries code

Data string

The data of the view record

Continents []string

List of continents (eg: EU for Europe, NA for North America, AS for Asia...). List of all continents code

Countries []string

List of countries (eg: FR for France, US for the United States, GB for Great Britain...). List of all countries code

data String

The data of the view record

continents List<String>

List of continents (eg: EU for Europe, NA for North America, AS for Asia...). List of all continents code

countries List<String>

List of countries (eg: FR for France, US for the United States, GB for Great Britain...). List of all countries code

data string

The data of the view record

continents string[]

List of continents (eg: EU for Europe, NA for North America, AS for Asia...). List of all continents code

countries string[]

List of countries (eg: FR for France, US for the United States, GB for Great Britain...). List of all countries code

data str

The data of the view record

continents Sequence[str]

List of continents (eg: EU for Europe, NA for North America, AS for Asia...). List of all continents code

countries Sequence[str]

List of countries (eg: FR for France, US for the United States, GB for Great Britain...). List of all countries code

data String

The data of the view record

continents List<String>

List of continents (eg: EU for Europe, NA for North America, AS for Asia...). List of all continents code

countries List<String>

List of countries (eg: FR for France, US for the United States, GB for Great Britain...). List of all countries code

DomainRecordHttpService

Ips List<string>

List of IPs to check

MustContain string

Text to search

Strategy string

Strategy to return an IP from the IPs list. Can be random or hashed

Url string

URL to match the must_contain text to validate an IP

UserAgent string

User-agent used when checking the URL

Ips []string

List of IPs to check

MustContain string

Text to search

Strategy string

Strategy to return an IP from the IPs list. Can be random or hashed

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>

List of IPs to check

mustContain String

Text to search

strategy String

Strategy to return an IP from the IPs list. Can be random or hashed

url String

URL to match the must_contain text to validate an IP

userAgent String

User-agent used when checking the URL

ips string[]

List of IPs to check

mustContain string

Text to search

strategy string

Strategy to return an IP from the IPs list. Can be random or hashed

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]

List of IPs to check

must_contain str

Text to search

strategy str

Strategy to return an IP from the IPs list. Can be random or hashed

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>

List of IPs to check

mustContain String

Text to search

strategy String

Strategy to return an IP from the IPs list. Can be random or hashed

url String

URL to match the must_contain text to validate an IP

userAgent String

User-agent used when checking the URL

DomainRecordView

Data string

The data of the view record

Subnet string

The subnet of the view

Data string

The data of the view record

Subnet string

The subnet of the view

data String

The data of the view record

subnet String

The subnet of the view

data string

The data of the view record

subnet string

The subnet of the view

data str

The data of the view record

subnet str

The subnet of the view

data String

The data of the view record

subnet String

The subnet of the view

DomainRecordWeighted

Ip string

The weighted IP

Weight int

The weight of the IP as an integer UInt32.

Ip string

The weighted IP

Weight int

The weight of the IP as an integer UInt32.

ip String

The weighted IP

weight Integer

The weight of the IP as an integer UInt32.

ip string

The weighted IP

weight number

The weight of the IP as an integer UInt32.

ip str

The weighted IP

weight int

The weight of the IP as an integer UInt32.

ip String

The weighted IP

weight Number

The weight of the IP as an integer UInt32.

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

Package Details

Repository
https://github.com/lbrlabs/pulumi-scaleway
License
Apache-2.0
Notes

This Pulumi package is based on the scaleway Terraform Provider.