1. Packages
  2. Scaleway
  3. API Docs
  4. domain
  5. Record
Scaleway v1.26.0 published on Friday, Mar 28, 2025 by pulumiverse

scaleway.domain.Record

Explore with Pulumi AI

The scaleway.domain.Record resource allows you to create and manage DNS records for Scaleway domains.

Refer to the Domains and DNS product documentation and API documentation for more information.

Example Usage

Create basic DNS records

The folllowing commands allow you to:

  • create an A record for the www.domain.tld domain, pointing to 1.2.3.4 and another one pointing to 1.2.3.5

  • create an MX record with the mx.online.net. mail server and a priority of 10, and another one with the mx-cache.online.net. mail server and a priority of 20

import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumiverse/scaleway";

const www = new scaleway.domain.Record("www", {
    dnsZone: "domain.tld",
    name: "www",
    type: "A",
    data: "1.2.3.4",
    ttl: 3600,
});
const www2 = new scaleway.domain.Record("www2", {
    dnsZone: "domain.tld",
    name: "www",
    type: "A",
    data: "1.2.3.5",
    ttl: 3600,
});
const mx = new scaleway.domain.Record("mx", {
    dnsZone: "domain.tld",
    name: "",
    type: "MX",
    data: "mx.online.net.",
    ttl: 3600,
    priority: 10,
});
const mx2 = new scaleway.domain.Record("mx2", {
    dnsZone: "domain.tld",
    name: "",
    type: "MX",
    data: "mx-cache.online.net.",
    ttl: 3600,
    priority: 20,
});
Copy
import pulumi
import pulumiverse_scaleway as scaleway

www = scaleway.domain.Record("www",
    dns_zone="domain.tld",
    name="www",
    type="A",
    data="1.2.3.4",
    ttl=3600)
www2 = scaleway.domain.Record("www2",
    dns_zone="domain.tld",
    name="www",
    type="A",
    data="1.2.3.5",
    ttl=3600)
mx = scaleway.domain.Record("mx",
    dns_zone="domain.tld",
    name="",
    type="MX",
    data="mx.online.net.",
    ttl=3600,
    priority=10)
mx2 = scaleway.domain.Record("mx2",
    dns_zone="domain.tld",
    name="",
    type="MX",
    data="mx-cache.online.net.",
    ttl=3600,
    priority=20)
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := domain.NewRecord(ctx, "www", &domain.RecordArgs{
			DnsZone: pulumi.String("domain.tld"),
			Name:    pulumi.String("www"),
			Type:    pulumi.String("A"),
			Data:    pulumi.String("1.2.3.4"),
			Ttl:     pulumi.Int(3600),
		})
		if err != nil {
			return err
		}
		_, err = domain.NewRecord(ctx, "www2", &domain.RecordArgs{
			DnsZone: pulumi.String("domain.tld"),
			Name:    pulumi.String("www"),
			Type:    pulumi.String("A"),
			Data:    pulumi.String("1.2.3.5"),
			Ttl:     pulumi.Int(3600),
		})
		if err != nil {
			return err
		}
		_, err = domain.NewRecord(ctx, "mx", &domain.RecordArgs{
			DnsZone:  pulumi.String("domain.tld"),
			Name:     pulumi.String(""),
			Type:     pulumi.String("MX"),
			Data:     pulumi.String("mx.online.net."),
			Ttl:      pulumi.Int(3600),
			Priority: pulumi.Int(10),
		})
		if err != nil {
			return err
		}
		_, err = domain.NewRecord(ctx, "mx2", &domain.RecordArgs{
			DnsZone:  pulumi.String("domain.tld"),
			Name:     pulumi.String(""),
			Type:     pulumi.String("MX"),
			Data:     pulumi.String("mx-cache.online.net."),
			Ttl:      pulumi.Int(3600),
			Priority: pulumi.Int(20),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumiverse.Scaleway;

return await Deployment.RunAsync(() => 
{
    var www = new Scaleway.Domain.Record("www", new()
    {
        DnsZone = "domain.tld",
        Name = "www",
        Type = "A",
        Data = "1.2.3.4",
        Ttl = 3600,
    });

    var www2 = new Scaleway.Domain.Record("www2", new()
    {
        DnsZone = "domain.tld",
        Name = "www",
        Type = "A",
        Data = "1.2.3.5",
        Ttl = 3600,
    });

    var mx = new Scaleway.Domain.Record("mx", new()
    {
        DnsZone = "domain.tld",
        Name = "",
        Type = "MX",
        Data = "mx.online.net.",
        Ttl = 3600,
        Priority = 10,
    });

    var mx2 = new Scaleway.Domain.Record("mx2", new()
    {
        DnsZone = "domain.tld",
        Name = "",
        Type = "MX",
        Data = "mx-cache.online.net.",
        Ttl = 3600,
        Priority = 20,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.domain.Record;
import com.pulumi.scaleway.domain.RecordArgs;
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 Record("www", RecordArgs.builder()
            .dnsZone("domain.tld")
            .name("www")
            .type("A")
            .data("1.2.3.4")
            .ttl(3600)
            .build());

        var www2 = new Record("www2", RecordArgs.builder()
            .dnsZone("domain.tld")
            .name("www")
            .type("A")
            .data("1.2.3.5")
            .ttl(3600)
            .build());

        var mx = new Record("mx", RecordArgs.builder()
            .dnsZone("domain.tld")
            .name("")
            .type("MX")
            .data("mx.online.net.")
            .ttl(3600)
            .priority(10)
            .build());

        var mx2 = new Record("mx2", RecordArgs.builder()
            .dnsZone("domain.tld")
            .name("")
            .type("MX")
            .data("mx-cache.online.net.")
            .ttl(3600)
            .priority(20)
            .build());

    }
}
Copy
resources:
  www:
    type: scaleway:domain:Record
    properties:
      dnsZone: domain.tld
      name: www
      type: A
      data: 1.2.3.4
      ttl: 3600
  www2:
    type: scaleway:domain:Record
    properties:
      dnsZone: domain.tld
      name: www
      type: A
      data: 1.2.3.5
      ttl: 3600
  mx:
    type: scaleway:domain:Record
    properties:
      dnsZone: domain.tld
      name: ""
      type: MX
      data: mx.online.net.
      ttl: 3600
      priority: 10
  mx2:
    type: scaleway:domain:Record
    properties:
      dnsZone: domain.tld
      name: ""
      type: MX
      data: mx-cache.online.net.
      ttl: 3600
      priority: 20
Copy

Create dynamic records

The folllowing commands allow you to:

  • create a Geo IP record for images.domain.tld that points to different IPs based on the user’s location: 1.2.3.5 for users in France (EU), and 4.3.2.1 for users in North America (NA)

  • create an HTTP service record for app.domain.tld that checks the health of specified IPs and responds based on their status.

  • create view-based records for db.domain.tld that resolve differently based on the client’s subnet.

  • create a weighted record for web.domain.tld that directs traffic to different IPs based on their weights.

import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumiverse/scaleway";

const geoIp = new scaleway.domain.Record("geo_ip", {
    dnsZone: "domain.tld",
    name: "images",
    type: "A",
    data: "1.2.3.4",
    ttl: 3600,
    geoIp: {
        matches: [
            {
                continents: ["EU"],
                countries: ["FR"],
                data: "1.2.3.5",
            },
            {
                continents: ["NA"],
                data: "4.3.2.1",
            },
        ],
    },
});
const httpService = new scaleway.domain.Record("http_service", {
    dnsZone: "domain.tld",
    name: "app",
    type: "A",
    data: "1.2.3.4",
    ttl: 3600,
    httpService: {
        ips: [
            "1.2.3.5",
            "1.2.3.6",
        ],
        mustContain: "up",
        url: "http://mywebsite.com/health",
        userAgent: "scw_service_up",
        strategy: "hashed",
    },
});
const view = new scaleway.domain.Record("view", {
    dnsZone: "domain.tld",
    name: "db",
    type: "A",
    data: "1.2.3.4",
    ttl: 3600,
    views: [
        {
            subnet: "100.0.0.0/16",
            data: "1.2.3.5",
        },
        {
            subnet: "100.1.0.0/16",
            data: "1.2.3.6",
        },
    ],
});
const weighted = new scaleway.domain.Record("weighted", {
    dnsZone: "domain.tld",
    name: "web",
    type: "A",
    data: "1.2.3.4",
    ttl: 3600,
    weighteds: [
        {
            ip: "1.2.3.5",
            weight: 1,
        },
        {
            ip: "1.2.3.6",
            weight: 2,
        },
    ],
});
Copy
import pulumi
import pulumiverse_scaleway as scaleway

geo_ip = scaleway.domain.Record("geo_ip",
    dns_zone="domain.tld",
    name="images",
    type="A",
    data="1.2.3.4",
    ttl=3600,
    geo_ip={
        "matches": [
            {
                "continents": ["EU"],
                "countries": ["FR"],
                "data": "1.2.3.5",
            },
            {
                "continents": ["NA"],
                "data": "4.3.2.1",
            },
        ],
    })
http_service = scaleway.domain.Record("http_service",
    dns_zone="domain.tld",
    name="app",
    type="A",
    data="1.2.3.4",
    ttl=3600,
    http_service={
        "ips": [
            "1.2.3.5",
            "1.2.3.6",
        ],
        "must_contain": "up",
        "url": "http://mywebsite.com/health",
        "user_agent": "scw_service_up",
        "strategy": "hashed",
    })
view = scaleway.domain.Record("view",
    dns_zone="domain.tld",
    name="db",
    type="A",
    data="1.2.3.4",
    ttl=3600,
    views=[
        {
            "subnet": "100.0.0.0/16",
            "data": "1.2.3.5",
        },
        {
            "subnet": "100.1.0.0/16",
            "data": "1.2.3.6",
        },
    ])
weighted = scaleway.domain.Record("weighted",
    dns_zone="domain.tld",
    name="web",
    type="A",
    data="1.2.3.4",
    ttl=3600,
    weighteds=[
        {
            "ip": "1.2.3.5",
            "weight": 1,
        },
        {
            "ip": "1.2.3.6",
            "weight": 2,
        },
    ])
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := domain.NewRecord(ctx, "geo_ip", &domain.RecordArgs{
			DnsZone: pulumi.String("domain.tld"),
			Name:    pulumi.String("images"),
			Type:    pulumi.String("A"),
			Data:    pulumi.String("1.2.3.4"),
			Ttl:     pulumi.Int(3600),
			GeoIp: &domain.RecordGeoIpArgs{
				Matches: domain.RecordGeoIpMatchArray{
					&domain.RecordGeoIpMatchArgs{
						Continents: pulumi.StringArray{
							pulumi.String("EU"),
						},
						Countries: pulumi.StringArray{
							pulumi.String("FR"),
						},
						Data: pulumi.String("1.2.3.5"),
					},
					&domain.RecordGeoIpMatchArgs{
						Continents: pulumi.StringArray{
							pulumi.String("NA"),
						},
						Data: pulumi.String("4.3.2.1"),
					},
				},
			},
		})
		if err != nil {
			return err
		}
		_, err = domain.NewRecord(ctx, "http_service", &domain.RecordArgs{
			DnsZone: pulumi.String("domain.tld"),
			Name:    pulumi.String("app"),
			Type:    pulumi.String("A"),
			Data:    pulumi.String("1.2.3.4"),
			Ttl:     pulumi.Int(3600),
			HttpService: &domain.RecordHttpServiceArgs{
				Ips: pulumi.StringArray{
					pulumi.String("1.2.3.5"),
					pulumi.String("1.2.3.6"),
				},
				MustContain: pulumi.String("up"),
				Url:         pulumi.String("http://mywebsite.com/health"),
				UserAgent:   pulumi.String("scw_service_up"),
				Strategy:    pulumi.String("hashed"),
			},
		})
		if err != nil {
			return err
		}
		_, err = domain.NewRecord(ctx, "view", &domain.RecordArgs{
			DnsZone: pulumi.String("domain.tld"),
			Name:    pulumi.String("db"),
			Type:    pulumi.String("A"),
			Data:    pulumi.String("1.2.3.4"),
			Ttl:     pulumi.Int(3600),
			Views: domain.RecordViewArray{
				&domain.RecordViewArgs{
					Subnet: pulumi.String("100.0.0.0/16"),
					Data:   pulumi.String("1.2.3.5"),
				},
				&domain.RecordViewArgs{
					Subnet: pulumi.String("100.1.0.0/16"),
					Data:   pulumi.String("1.2.3.6"),
				},
			},
		})
		if err != nil {
			return err
		}
		_, err = domain.NewRecord(ctx, "weighted", &domain.RecordArgs{
			DnsZone: pulumi.String("domain.tld"),
			Name:    pulumi.String("web"),
			Type:    pulumi.String("A"),
			Data:    pulumi.String("1.2.3.4"),
			Ttl:     pulumi.Int(3600),
			Weighteds: domain.RecordWeightedArray{
				&domain.RecordWeightedArgs{
					Ip:     pulumi.String("1.2.3.5"),
					Weight: pulumi.Int(1),
				},
				&domain.RecordWeightedArgs{
					Ip:     pulumi.String("1.2.3.6"),
					Weight: pulumi.Int(2),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumiverse.Scaleway;

return await Deployment.RunAsync(() => 
{
    var geoIp = new Scaleway.Domain.Record("geo_ip", new()
    {
        DnsZone = "domain.tld",
        Name = "images",
        Type = "A",
        Data = "1.2.3.4",
        Ttl = 3600,
        GeoIp = new Scaleway.Domain.Inputs.RecordGeoIpArgs
        {
            Matches = new[]
            {
                new Scaleway.Domain.Inputs.RecordGeoIpMatchArgs
                {
                    Continents = new[]
                    {
                        "EU",
                    },
                    Countries = new[]
                    {
                        "FR",
                    },
                    Data = "1.2.3.5",
                },
                new Scaleway.Domain.Inputs.RecordGeoIpMatchArgs
                {
                    Continents = new[]
                    {
                        "NA",
                    },
                    Data = "4.3.2.1",
                },
            },
        },
    });

    var httpService = new Scaleway.Domain.Record("http_service", new()
    {
        DnsZone = "domain.tld",
        Name = "app",
        Type = "A",
        Data = "1.2.3.4",
        Ttl = 3600,
        HttpService = new Scaleway.Domain.Inputs.RecordHttpServiceArgs
        {
            Ips = new[]
            {
                "1.2.3.5",
                "1.2.3.6",
            },
            MustContain = "up",
            Url = "http://mywebsite.com/health",
            UserAgent = "scw_service_up",
            Strategy = "hashed",
        },
    });

    var view = new Scaleway.Domain.Record("view", new()
    {
        DnsZone = "domain.tld",
        Name = "db",
        Type = "A",
        Data = "1.2.3.4",
        Ttl = 3600,
        Views = new[]
        {
            new Scaleway.Domain.Inputs.RecordViewArgs
            {
                Subnet = "100.0.0.0/16",
                Data = "1.2.3.5",
            },
            new Scaleway.Domain.Inputs.RecordViewArgs
            {
                Subnet = "100.1.0.0/16",
                Data = "1.2.3.6",
            },
        },
    });

    var weighted = new Scaleway.Domain.Record("weighted", new()
    {
        DnsZone = "domain.tld",
        Name = "web",
        Type = "A",
        Data = "1.2.3.4",
        Ttl = 3600,
        Weighteds = new[]
        {
            new Scaleway.Domain.Inputs.RecordWeightedArgs
            {
                Ip = "1.2.3.5",
                Weight = 1,
            },
            new Scaleway.Domain.Inputs.RecordWeightedArgs
            {
                Ip = "1.2.3.6",
                Weight = 2,
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.domain.Record;
import com.pulumi.scaleway.domain.RecordArgs;
import com.pulumi.scaleway.domain.inputs.RecordGeoIpArgs;
import com.pulumi.scaleway.domain.inputs.RecordHttpServiceArgs;
import com.pulumi.scaleway.domain.inputs.RecordViewArgs;
import com.pulumi.scaleway.domain.inputs.RecordWeightedArgs;
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 Record("geoIp", RecordArgs.builder()
            .dnsZone("domain.tld")
            .name("images")
            .type("A")
            .data("1.2.3.4")
            .ttl(3600)
            .geoIp(RecordGeoIpArgs.builder()
                .matches(                
                    RecordGeoIpMatchArgs.builder()
                        .continents("EU")
                        .countries("FR")
                        .data("1.2.3.5")
                        .build(),
                    RecordGeoIpMatchArgs.builder()
                        .continents("NA")
                        .data("4.3.2.1")
                        .build())
                .build())
            .build());

        var httpService = new Record("httpService", RecordArgs.builder()
            .dnsZone("domain.tld")
            .name("app")
            .type("A")
            .data("1.2.3.4")
            .ttl(3600)
            .httpService(RecordHttpServiceArgs.builder()
                .ips(                
                    "1.2.3.5",
                    "1.2.3.6")
                .mustContain("up")
                .url("http://mywebsite.com/health")
                .userAgent("scw_service_up")
                .strategy("hashed")
                .build())
            .build());

        var view = new Record("view", RecordArgs.builder()
            .dnsZone("domain.tld")
            .name("db")
            .type("A")
            .data("1.2.3.4")
            .ttl(3600)
            .views(            
                RecordViewArgs.builder()
                    .subnet("100.0.0.0/16")
                    .data("1.2.3.5")
                    .build(),
                RecordViewArgs.builder()
                    .subnet("100.1.0.0/16")
                    .data("1.2.3.6")
                    .build())
            .build());

        var weighted = new Record("weighted", RecordArgs.builder()
            .dnsZone("domain.tld")
            .name("web")
            .type("A")
            .data("1.2.3.4")
            .ttl(3600)
            .weighteds(            
                RecordWeightedArgs.builder()
                    .ip("1.2.3.5")
                    .weight(1)
                    .build(),
                RecordWeightedArgs.builder()
                    .ip("1.2.3.6")
                    .weight(2)
                    .build())
            .build());

    }
}
Copy
resources:
  geoIp:
    type: scaleway:domain:Record
    name: geo_ip
    properties:
      dnsZone: domain.tld
      name: images
      type: A
      data: 1.2.3.4
      ttl: 3600
      geoIp:
        matches:
          - continents:
              - EU
            countries:
              - FR
            data: 1.2.3.5
          - continents:
              - NA
            data: 4.3.2.1
  httpService:
    type: scaleway:domain:Record
    name: http_service
    properties:
      dnsZone: domain.tld
      name: app
      type: A
      data: 1.2.3.4
      ttl: 3600
      httpService:
        ips:
          - 1.2.3.5
          - 1.2.3.6
        mustContain: up
        url: http://mywebsite.com/health
        userAgent: scw_service_up
        strategy: hashed
  view:
    type: scaleway:domain:Record
    properties:
      dnsZone: domain.tld
      name: db
      type: A
      data: 1.2.3.4
      ttl: 3600
      views:
        - subnet: 100.0.0.0/16
          data: 1.2.3.5
        - subnet: 100.1.0.0/16
          data: 1.2.3.6
  weighted:
    type: scaleway:domain:Record
    properties:
      dnsZone: domain.tld
      name: web
      type: A
      data: 1.2.3.4
      ttl: 3600
      weighteds:
        - ip: 1.2.3.5
          weight: 1
        - ip: 1.2.3.6
          weight: 2
Copy

Create an Instance and add records with the new Instance IP

The following commands allow you to:

  • create a Scaleway Instance
  • assign The Instance’s IP address to various DNS records for a specified DNS zone
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumiverse/scaleway";

const config = new pulumi.Config();
// Your project ID.
const projectId = config.require("projectId");
// The DNS Zone used for testing records.
const dnsZone = config.require("dnsZone");
const publicIp = new scaleway.instance.Ip("public_ip", {projectId: projectId});
const web = new scaleway.instance.Server("web", {
    projectId: projectId,
    type: "DEV1-S",
    image: "ubuntu_jammy",
    tags: [
        "front",
        "web",
    ],
    ipId: publicIp.id,
    rootVolume: {
        sizeInGb: 20,
    },
});
const webA = new scaleway.domain.Record("web_A", {
    dnsZone: dnsZone,
    name: "web",
    type: "A",
    data: web.publicIp,
    ttl: 3600,
});
const webCname = new scaleway.domain.Record("web_cname", {
    dnsZone: dnsZone,
    name: "www",
    type: "CNAME",
    data: `web.${dnsZone}.`,
    ttl: 3600,
});
const webAlias = new scaleway.domain.Record("web_alias", {
    dnsZone: dnsZone,
    name: "",
    type: "ALIAS",
    data: `web.${dnsZone}.`,
    ttl: 3600,
});
Copy
import pulumi
import pulumiverse_scaleway as scaleway

config = pulumi.Config()
# Your project ID.
project_id = config.require("projectId")
# The DNS Zone used for testing records.
dns_zone = config.require("dnsZone")
public_ip = scaleway.instance.Ip("public_ip", project_id=project_id)
web = scaleway.instance.Server("web",
    project_id=project_id,
    type="DEV1-S",
    image="ubuntu_jammy",
    tags=[
        "front",
        "web",
    ],
    ip_id=public_ip.id,
    root_volume={
        "size_in_gb": 20,
    })
web_a = scaleway.domain.Record("web_A",
    dns_zone=dns_zone,
    name="web",
    type="A",
    data=web.public_ip,
    ttl=3600)
web_cname = scaleway.domain.Record("web_cname",
    dns_zone=dns_zone,
    name="www",
    type="CNAME",
    data=f"web.{dns_zone}.",
    ttl=3600)
web_alias = scaleway.domain.Record("web_alias",
    dns_zone=dns_zone,
    name="",
    type="ALIAS",
    data=f"web.{dns_zone}.",
    ttl=3600)
Copy
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/domain"
	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/instance"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		// Your project ID.
		projectId := cfg.Require("projectId")
		// The DNS Zone used for testing records.
		dnsZone := cfg.Require("dnsZone")
		publicIp, err := instance.NewIp(ctx, "public_ip", &instance.IpArgs{
			ProjectId: pulumi.String(projectId),
		})
		if err != nil {
			return err
		}
		web, err := instance.NewServer(ctx, "web", &instance.ServerArgs{
			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: &instance.ServerRootVolumeArgs{
				SizeInGb: pulumi.Int(20),
			},
		})
		if err != nil {
			return err
		}
		_, err = domain.NewRecord(ctx, "web_A", &domain.RecordArgs{
			DnsZone: pulumi.String(dnsZone),
			Name:    pulumi.String("web"),
			Type:    pulumi.String("A"),
			Data:    web.PublicIp,
			Ttl:     pulumi.Int(3600),
		})
		if err != nil {
			return err
		}
		_, err = domain.NewRecord(ctx, "web_cname", &domain.RecordArgs{
			DnsZone: pulumi.String(dnsZone),
			Name:    pulumi.String("www"),
			Type:    pulumi.String("CNAME"),
			Data:    pulumi.Sprintf("web.%v.", dnsZone),
			Ttl:     pulumi.Int(3600),
		})
		if err != nil {
			return err
		}
		_, err = domain.NewRecord(ctx, "web_alias", &domain.RecordArgs{
			DnsZone: pulumi.String(dnsZone),
			Name:    pulumi.String(""),
			Type:    pulumi.String("ALIAS"),
			Data:    pulumi.Sprintf("web.%v.", dnsZone),
			Ttl:     pulumi.Int(3600),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumiverse.Scaleway;

return await Deployment.RunAsync(() => 
{
    var config = new Config();
    // Your project ID.
    var projectId = config.Require("projectId");
    // The DNS Zone used for testing records.
    var dnsZone = config.Require("dnsZone");
    var publicIp = new Scaleway.Instance.Ip("public_ip", new()
    {
        ProjectId = projectId,
    });

    var web = new Scaleway.Instance.Server("web", new()
    {
        ProjectId = projectId,
        Type = "DEV1-S",
        Image = "ubuntu_jammy",
        Tags = new[]
        {
            "front",
            "web",
        },
        IpId = publicIp.Id,
        RootVolume = new Scaleway.Instance.Inputs.ServerRootVolumeArgs
        {
            SizeInGb = 20,
        },
    });

    var webA = new Scaleway.Domain.Record("web_A", new()
    {
        DnsZone = dnsZone,
        Name = "web",
        Type = "A",
        Data = web.PublicIp,
        Ttl = 3600,
    });

    var webCname = new Scaleway.Domain.Record("web_cname", new()
    {
        DnsZone = dnsZone,
        Name = "www",
        Type = "CNAME",
        Data = $"web.{dnsZone}.",
        Ttl = 3600,
    });

    var webAlias = new Scaleway.Domain.Record("web_alias", new()
    {
        DnsZone = dnsZone,
        Name = "",
        Type = "ALIAS",
        Data = $"web.{dnsZone}.",
        Ttl = 3600,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.instance.Ip;
import com.pulumi.scaleway.instance.IpArgs;
import com.pulumi.scaleway.instance.Server;
import com.pulumi.scaleway.instance.ServerArgs;
import com.pulumi.scaleway.instance.inputs.ServerRootVolumeArgs;
import com.pulumi.scaleway.domain.Record;
import com.pulumi.scaleway.domain.RecordArgs;
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 Ip("publicIp", IpArgs.builder()
            .projectId(projectId)
            .build());

        var web = new Server("web", ServerArgs.builder()
            .projectId(projectId)
            .type("DEV1-S")
            .image("ubuntu_jammy")
            .tags(            
                "front",
                "web")
            .ipId(publicIp.id())
            .rootVolume(ServerRootVolumeArgs.builder()
                .sizeInGb(20)
                .build())
            .build());

        var webA = new Record("webA", RecordArgs.builder()
            .dnsZone(dnsZone)
            .name("web")
            .type("A")
            .data(web.publicIp())
            .ttl(3600)
            .build());

        var webCname = new Record("webCname", RecordArgs.builder()
            .dnsZone(dnsZone)
            .name("www")
            .type("CNAME")
            .data(String.format("web.%s.", dnsZone))
            .ttl(3600)
            .build());

        var webAlias = new Record("webAlias", RecordArgs.builder()
            .dnsZone(dnsZone)
            .name("")
            .type("ALIAS")
            .data(String.format("web.%s.", dnsZone))
            .ttl(3600)
            .build());

    }
}
Copy
configuration:
  projectId:
    type: string
  dnsZone:
    type: string
resources:
  publicIp:
    type: scaleway:instance:Ip
    name: public_ip
    properties:
      projectId: ${projectId}
  web:
    type: scaleway:instance:Server
    properties:
      projectId: ${projectId}
      type: DEV1-S
      image: ubuntu_jammy
      tags:
        - front
        - web
      ipId: ${publicIp.id}
      rootVolume:
        sizeInGb: 20
  webA:
    type: scaleway:domain:Record
    name: web_A
    properties:
      dnsZone: ${dnsZone}
      name: web
      type: A
      data: ${web.publicIp}
      ttl: 3600
  webCname:
    type: scaleway:domain:Record
    name: web_cname
    properties:
      dnsZone: ${dnsZone}
      name: www
      type: CNAME
      data: web.${dnsZone}.
      ttl: 3600
  webAlias:
    type: scaleway:domain:Record
    name: web_alias
    properties:
      dnsZone: ${dnsZone}
      name: ""
      type: ALIAS
      data: web.${dnsZone}.
      ttl: 3600
Copy

Multiple records

Some record types can have multiple data with the same name (e.g., A, AAAA, MX, NS, etc.). You can duplicate a scaleway.domain.Record resource with the same name, and the records will be added.

Note however, that some records (e.g., CNAME, multiple dynamic records of different types) must be unique.

Create Record Resource

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

Constructor syntax

new Record(name: string, args: RecordArgs, opts?: CustomResourceOptions);
@overload
def Record(resource_name: str,
           args: RecordArgs,
           opts: Optional[ResourceOptions] = None)

@overload
def Record(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           data: Optional[str] = None,
           dns_zone: Optional[str] = None,
           type: Optional[str] = None,
           geo_ip: Optional[RecordGeoIpArgs] = None,
           http_service: Optional[RecordHttpServiceArgs] = 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[RecordViewArgs]] = None,
           weighteds: Optional[Sequence[RecordWeightedArgs]] = None)
func NewRecord(ctx *Context, name string, args RecordArgs, opts ...ResourceOption) (*Record, error)
public Record(string name, RecordArgs args, CustomResourceOptions? opts = null)
public Record(String name, RecordArgs args)
public Record(String name, RecordArgs args, CustomResourceOptions options)
type: scaleway:domain:Record
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. RecordArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. RecordArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. RecordArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. RecordArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. RecordArgs
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 recordResource = new Scaleway.Domain.Record("recordResource", new()
{
    Data = "string",
    DnsZone = "string",
    Type = "string",
    GeoIp = new Scaleway.Domain.Inputs.RecordGeoIpArgs
    {
        Matches = new[]
        {
            new Scaleway.Domain.Inputs.RecordGeoIpMatchArgs
            {
                Data = "string",
                Continents = new[]
                {
                    "string",
                },
                Countries = new[]
                {
                    "string",
                },
            },
        },
    },
    HttpService = new Scaleway.Domain.Inputs.RecordHttpServiceArgs
    {
        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.Domain.Inputs.RecordViewArgs
        {
            Data = "string",
            Subnet = "string",
        },
    },
    Weighteds = new[]
    {
        new Scaleway.Domain.Inputs.RecordWeightedArgs
        {
            Ip = "string",
            Weight = 0,
        },
    },
});
Copy
example, err := domain.NewRecord(ctx, "recordResource", &domain.RecordArgs{
	Data:    pulumi.String("string"),
	DnsZone: pulumi.String("string"),
	Type:    pulumi.String("string"),
	GeoIp: &domain.RecordGeoIpArgs{
		Matches: domain.RecordGeoIpMatchArray{
			&domain.RecordGeoIpMatchArgs{
				Data: pulumi.String("string"),
				Continents: pulumi.StringArray{
					pulumi.String("string"),
				},
				Countries: pulumi.StringArray{
					pulumi.String("string"),
				},
			},
		},
	},
	HttpService: &domain.RecordHttpServiceArgs{
		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: domain.RecordViewArray{
		&domain.RecordViewArgs{
			Data:   pulumi.String("string"),
			Subnet: pulumi.String("string"),
		},
	},
	Weighteds: domain.RecordWeightedArray{
		&domain.RecordWeightedArgs{
			Ip:     pulumi.String("string"),
			Weight: pulumi.Int(0),
		},
	},
})
Copy
var recordResource = new Record("recordResource", RecordArgs.builder()
    .data("string")
    .dnsZone("string")
    .type("string")
    .geoIp(RecordGeoIpArgs.builder()
        .matches(RecordGeoIpMatchArgs.builder()
            .data("string")
            .continents("string")
            .countries("string")
            .build())
        .build())
    .httpService(RecordHttpServiceArgs.builder()
        .ips("string")
        .mustContain("string")
        .strategy("string")
        .url("string")
        .userAgent("string")
        .build())
    .keepEmptyZone(false)
    .name("string")
    .priority(0)
    .projectId("string")
    .ttl(0)
    .views(RecordViewArgs.builder()
        .data("string")
        .subnet("string")
        .build())
    .weighteds(RecordWeightedArgs.builder()
        .ip("string")
        .weight(0)
        .build())
    .build());
Copy
record_resource = scaleway.domain.Record("recordResource",
    data="string",
    dns_zone="string",
    type="string",
    geo_ip={
        "matches": [{
            "data": "string",
            "continents": ["string"],
            "countries": ["string"],
        }],
    },
    http_service={
        "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=[{
        "data": "string",
        "subnet": "string",
    }],
    weighteds=[{
        "ip": "string",
        "weight": 0,
    }])
Copy
const recordResource = new scaleway.domain.Record("recordResource", {
    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,
    }],
});
Copy
type: scaleway:domain:Record
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
Copy

Record Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Record resource accepts the following input properties:

Data This property is required. string
The content of the record (an IPv4 for an A record, a string for a TXT record, etc.).
DnsZone
This property is required.
Changes to this property will trigger replacement.
string
The DNS zone of the domain. If the domain has no DNS zone, one will be automatically created.
Type
This property is required.
Changes to this property will trigger replacement.
string
The type of the record (A, AAAA, MX, CNAME, DNAME, ALIAS, NS, PTR, SRV, TXT, TLSA, or CAA).
GeoIp Pulumiverse.Scaleway.Domain.Inputs.RecordGeoIp
Return record based on client localisation
HttpService Pulumiverse.Scaleway.Domain.Inputs.RecordHttpService
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. Note that each zone not deleted will be billed.
Name Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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.Domain.Inputs.RecordView>
Return record based on client subnet
Weighteds List<Pulumiverse.Scaleway.Domain.Inputs.RecordWeighted>
Return record based on weight
Data This property is required. string
The content of the record (an IPv4 for an A record, a string for a TXT record, etc.).
DnsZone
This property is required.
Changes to this property will trigger replacement.
string
The DNS zone of the domain. If the domain has no DNS zone, one will be automatically created.
Type
This property is required.
Changes to this property will trigger replacement.
string
The type of the record (A, AAAA, MX, CNAME, DNAME, ALIAS, NS, PTR, SRV, TXT, TLSA, or CAA).
GeoIp RecordGeoIpArgs
Return record based on client localisation
HttpService RecordHttpServiceArgs
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. Note that each zone not deleted will be billed.
Name Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
The project_id you want to attach the resource to
Ttl int
Time To Live of the record in seconds.
Views []RecordViewArgs
Return record based on client subnet
Weighteds []RecordWeightedArgs
Return record based on weight
data This property is required. String
The content of the record (an IPv4 for an A record, a string for a TXT record, etc.).
dnsZone
This property is required.
Changes to this property will trigger replacement.
String
The DNS zone of the domain. If the domain has no DNS zone, one will be automatically created.
type
This property is required.
Changes to this property will trigger replacement.
String
The type of the record (A, AAAA, MX, CNAME, DNAME, ALIAS, NS, PTR, SRV, TXT, TLSA, or CAA).
geoIp RecordGeoIp
Return record based on client localisation
httpService RecordHttpService
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. Note that each zone not deleted will be billed.
name Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. String
The project_id you want to attach the resource to
ttl Integer
Time To Live of the record in seconds.
views List<RecordView>
Return record based on client subnet
weighteds List<RecordWeighted>
Return record based on weight
data This property is required. string
The content of the record (an IPv4 for an A record, a string for a TXT record, etc.).
dnsZone
This property is required.
Changes to this property will trigger replacement.
string
The DNS zone of the domain. If the domain has no DNS zone, one will be automatically created.
type
This property is required.
Changes to this property will trigger replacement.
string
The type of the record (A, AAAA, MX, CNAME, DNAME, ALIAS, NS, PTR, SRV, TXT, TLSA, or CAA).
geoIp RecordGeoIp
Return record based on client localisation
httpService RecordHttpService
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. Note that each zone not deleted will be billed.
name Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
The project_id you want to attach the resource to
ttl number
Time To Live of the record in seconds.
views RecordView[]
Return record based on client subnet
weighteds RecordWeighted[]
Return record based on weight
data This property is required. str
The content of the record (an IPv4 for an A record, a string for a TXT record, etc.).
dns_zone
This property is required.
Changes to this property will trigger replacement.
str
The DNS zone of the domain. If the domain has no DNS zone, one will be automatically created.
type
This property is required.
Changes to this property will trigger replacement.
str
The type of the record (A, AAAA, MX, CNAME, DNAME, ALIAS, NS, PTR, SRV, TXT, TLSA, or CAA).
geo_ip RecordGeoIpArgs
Return record based on client localisation
http_service RecordHttpServiceArgs
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. Note that each zone not deleted will be billed.
name Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. str
The project_id you want to attach the resource to
ttl int
Time To Live of the record in seconds.
views Sequence[RecordViewArgs]
Return record based on client subnet
weighteds Sequence[RecordWeightedArgs]
Return record based on weight
data This property is required. String
The content of the record (an IPv4 for an A record, a string for a TXT record, etc.).
dnsZone
This property is required.
Changes to this property will trigger replacement.
String
The DNS zone of the domain. If the domain has no DNS zone, one will be automatically created.
type
This property is required.
Changes to this property will trigger replacement.
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. Note that each zone not deleted will be billed.
name Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Record 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 Record Resource

Get an existing Record 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?: RecordState, opts?: CustomResourceOptions): Record
@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[RecordGeoIpArgs] = None,
        http_service: Optional[RecordHttpServiceArgs] = 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[RecordViewArgs]] = None,
        weighteds: Optional[Sequence[RecordWeightedArgs]] = None) -> Record
func GetRecord(ctx *Context, name string, id IDInput, state *RecordState, opts ...ResourceOption) (*Record, error)
public static Record Get(string name, Input<string> id, RecordState? state, CustomResourceOptions? opts = null)
public static Record get(String name, Output<String> id, RecordState state, CustomResourceOptions options)
resources:  _:    type: scaleway:domain:Record    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 record, a string for a TXT record, etc.).
DnsZone Changes to this property will trigger replacement. string
The DNS zone of the domain. If the domain has no DNS zone, one will be automatically created.
Fqdn string
The FQDN of the record.
GeoIp Pulumiverse.Scaleway.Domain.Inputs.RecordGeoIp
Return record based on client localisation
HttpService Pulumiverse.Scaleway.Domain.Inputs.RecordHttpService
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. Note that each zone not deleted will be billed.
Name Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
The type of the record (A, AAAA, MX, CNAME, DNAME, ALIAS, NS, PTR, SRV, TXT, TLSA, or CAA).
Views List<Pulumiverse.Scaleway.Domain.Inputs.RecordView>
Return record based on client subnet
Weighteds List<Pulumiverse.Scaleway.Domain.Inputs.RecordWeighted>
Return record based on weight
Data string
The content of the record (an IPv4 for an A record, a string for a TXT record, etc.).
DnsZone Changes to this property will trigger replacement. string
The DNS zone of the domain. If the domain has no DNS zone, one will be automatically created.
Fqdn string
The FQDN of the record.
GeoIp RecordGeoIpArgs
Return record based on client localisation
HttpService RecordHttpServiceArgs
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. Note that each zone not deleted will be billed.
Name Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
The type of the record (A, AAAA, MX, CNAME, DNAME, ALIAS, NS, PTR, SRV, TXT, TLSA, or CAA).
Views []RecordViewArgs
Return record based on client subnet
Weighteds []RecordWeightedArgs
Return record based on weight
data String
The content of the record (an IPv4 for an A record, a string for a TXT record, etc.).
dnsZone Changes to this property will trigger replacement. String
The DNS zone of the domain. If the domain has no DNS zone, one will be automatically created.
fqdn String
The FQDN of the record.
geoIp RecordGeoIp
Return record based on client localisation
httpService RecordHttpService
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. Note that each zone not deleted will be billed.
name Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. String
The type of the record (A, AAAA, MX, CNAME, DNAME, ALIAS, NS, PTR, SRV, TXT, TLSA, or CAA).
views List<RecordView>
Return record based on client subnet
weighteds List<RecordWeighted>
Return record based on weight
data string
The content of the record (an IPv4 for an A record, a string for a TXT record, etc.).
dnsZone Changes to this property will trigger replacement. string
The DNS zone of the domain. If the domain has no DNS zone, one will be automatically created.
fqdn string
The FQDN of the record.
geoIp RecordGeoIp
Return record based on client localisation
httpService RecordHttpService
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. Note that each zone not deleted will be billed.
name Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
The type of the record (A, AAAA, MX, CNAME, DNAME, ALIAS, NS, PTR, SRV, TXT, TLSA, or CAA).
views RecordView[]
Return record based on client subnet
weighteds RecordWeighted[]
Return record based on weight
data str
The content of the record (an IPv4 for an A record, a string for a TXT record, etc.).
dns_zone Changes to this property will trigger replacement. str
The DNS zone of the domain. If the domain has no DNS zone, one will be automatically created.
fqdn str
The FQDN of the record.
geo_ip RecordGeoIpArgs
Return record based on client localisation
http_service RecordHttpServiceArgs
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. Note that each zone not deleted will be billed.
name Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. str
The type of the record (A, AAAA, MX, CNAME, DNAME, ALIAS, NS, PTR, SRV, TXT, TLSA, or CAA).
views Sequence[RecordViewArgs]
Return record based on client subnet
weighteds Sequence[RecordWeightedArgs]
Return record based on weight
data String
The content of the record (an IPv4 for an A record, a string for a TXT record, etc.).
dnsZone Changes to this property will trigger replacement. String
The DNS zone of the domain. If the domain has no DNS zone, one 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. Note that each zone not deleted will be billed.
name Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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

RecordGeoIp
, RecordGeoIpArgs

Matches This property is required. List<Pulumiverse.Scaleway.Domain.Inputs.RecordGeoIpMatch>
The list of matches
Matches This property is required. []RecordGeoIpMatch
The list of matches
matches This property is required. List<RecordGeoIpMatch>
The list of matches
matches This property is required. RecordGeoIpMatch[]
The list of matches
matches This property is required. Sequence[RecordGeoIpMatch]
The list of matches
matches This property is required. List<Property Map>
The list of matches

RecordGeoIpMatch
, RecordGeoIpMatchArgs

Data This property is required. string
The content of the record (an IPv4 for an A record, a string for a TXT record, etc.).
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 This property is required. string
The content of the record (an IPv4 for an A record, a string for a TXT record, etc.).
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 This property is required. String
The content of the record (an IPv4 for an A record, a string for a TXT record, etc.).
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 This property is required. string
The content of the record (an IPv4 for an A record, a string for a TXT record, etc.).
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 This property is required. str
The content of the record (an IPv4 for an A record, a string for a TXT record, etc.).
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 This property is required. String
The content of the record (an IPv4 for an A record, a string for a TXT record, etc.).
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

RecordHttpService
, RecordHttpServiceArgs

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

RecordView
, RecordViewArgs

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

RecordWeighted
, RecordWeightedArgs

Ip This property is required. string
The weighted IP
Weight This property is required. int
The weight of the IP
Ip This property is required. string
The weighted IP
Weight This property is required. int
The weight of the IP
ip This property is required. String
The weighted IP
weight This property is required. Integer
The weight of the IP
ip This property is required. string
The weighted IP
weight This property is required. number
The weight of the IP
ip This property is required. str
The weighted IP
weight This property is required. int
The weight of the IP
ip This property is required. String
The weighted IP
weight This property is required. Number
The weight of the IP

Import

This section explains how to import a record using the {dns_zone}/{id} format.

bash

$ pulumi import scaleway:domain/record:Record www subdomain.domain.tld/11111111-1111-1111-1111-111111111111
Copy

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.