1. Packages
  2. Packages
  3. Scaleway
  4. API Docs
  5. getDomainZone
Viewing docs for Scaleway v1.48.0
published on Wednesday, Apr 29, 2026 by pulumiverse
scaleway logo
Viewing docs for Scaleway v1.48.0
published on Wednesday, Apr 29, 2026 by pulumiverse
    Deprecated: scaleway.index/getdomainzone.getDomainZone has been deprecated in favor of scaleway.domain/getzone.getZone

    The scaleway.domain.Zone data source is used to get information about a DNS zone within a specific domain and subdomain in Scaleway Domains and DNS.

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

    Example Usage

    Query a domain zone

    The following command allows you to retrieve information about the DNS zone for the subdomain test within the domain scaleway-terraform.com.

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumiverse/scaleway";
    
    // Get zone
    const main = scaleway.domain.getZone({
        domain: "scaleway-terraform.com",
        subdomain: "test",
    });
    
    import pulumi
    import pulumi_scaleway as scaleway
    
    # Get zone
    main = scaleway.domain.get_zone(domain="scaleway-terraform.com",
        subdomain="test")
    
    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 {
    		// Get zone
    		_, err := domain.LookupZone(ctx, &domain.LookupZoneArgs{
    			Domain:    pulumi.StringRef("scaleway-terraform.com"),
    			Subdomain: pulumi.StringRef("test"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumiverse.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        // Get zone
        var main = Scaleway.Domain.GetZone.Invoke(new()
        {
            Domain = "scaleway-terraform.com",
            Subdomain = "test",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.domain.DomainFunctions;
    import com.pulumi.scaleway.domain.inputs.GetZoneArgs;
    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) {
            // Get zone
            final var main = DomainFunctions.getZone(GetZoneArgs.builder()
                .domain("scaleway-terraform.com")
                .subdomain("test")
                .build());
    
        }
    }
    
    variables:
      # Get zone
      main:
        fn::invoke:
          function: scaleway:domain:getZone
          arguments:
            domain: scaleway-terraform.com
            subdomain: test
    

    Using getDomainZone

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getDomainZone(args: GetDomainZoneArgs, opts?: InvokeOptions): Promise<GetDomainZoneResult>
    function getDomainZoneOutput(args: GetDomainZoneOutputArgs, opts?: InvokeOptions): Output<GetDomainZoneResult>
    def get_domain_zone(domain: Optional[str] = None,
                        project_id: Optional[str] = None,
                        subdomain: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetDomainZoneResult
    def get_domain_zone_output(domain: pulumi.Input[Optional[str]] = None,
                        project_id: pulumi.Input[Optional[str]] = None,
                        subdomain: pulumi.Input[Optional[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetDomainZoneResult]
    func LookupDomainZone(ctx *Context, args *LookupDomainZoneArgs, opts ...InvokeOption) (*LookupDomainZoneResult, error)
    func LookupDomainZoneOutput(ctx *Context, args *LookupDomainZoneOutputArgs, opts ...InvokeOption) LookupDomainZoneResultOutput

    > Note: This function is named LookupDomainZone in the Go SDK.

    public static class GetDomainZone 
    {
        public static Task<GetDomainZoneResult> InvokeAsync(GetDomainZoneArgs args, InvokeOptions? opts = null)
        public static Output<GetDomainZoneResult> Invoke(GetDomainZoneInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetDomainZoneResult> getDomainZone(GetDomainZoneArgs args, InvokeOptions options)
    public static Output<GetDomainZoneResult> getDomainZone(GetDomainZoneArgs args, InvokeOptions options)
    
    fn::invoke:
      function: scaleway:index/getDomainZone:getDomainZone
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Domain string
    The primary domain name where the DNS zone is located. This is a mandatory field.
    ProjectId string
    ). The ID of the Scaleway Project associated with the domain. If not specified, it defaults to the projectId set in the provider configuration.
    Subdomain string
    The subdomain (or zone name) within the primary domain. This is a mandatory field.
    Domain string
    The primary domain name where the DNS zone is located. This is a mandatory field.
    ProjectId string
    ). The ID of the Scaleway Project associated with the domain. If not specified, it defaults to the projectId set in the provider configuration.
    Subdomain string
    The subdomain (or zone name) within the primary domain. This is a mandatory field.
    domain String
    The primary domain name where the DNS zone is located. This is a mandatory field.
    projectId String
    ). The ID of the Scaleway Project associated with the domain. If not specified, it defaults to the projectId set in the provider configuration.
    subdomain String
    The subdomain (or zone name) within the primary domain. This is a mandatory field.
    domain string
    The primary domain name where the DNS zone is located. This is a mandatory field.
    projectId string
    ). The ID of the Scaleway Project associated with the domain. If not specified, it defaults to the projectId set in the provider configuration.
    subdomain string
    The subdomain (or zone name) within the primary domain. This is a mandatory field.
    domain str
    The primary domain name where the DNS zone is located. This is a mandatory field.
    project_id str
    ). The ID of the Scaleway Project associated with the domain. If not specified, it defaults to the projectId set in the provider configuration.
    subdomain str
    The subdomain (or zone name) within the primary domain. This is a mandatory field.
    domain String
    The primary domain name where the DNS zone is located. This is a mandatory field.
    projectId String
    ). The ID of the Scaleway Project associated with the domain. If not specified, it defaults to the projectId set in the provider configuration.
    subdomain String
    The subdomain (or zone name) within the primary domain. This is a mandatory field.

    getDomainZone Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Message string
    Message associated with the domain zone (typically used for status or error messages).
    Ns List<string>
    The list of name servers for the zone.
    NsDefaults List<string>
    The default list of name servers for the zone.
    NsMasters List<string>
    The master list of name servers for the zone.
    Status string
    The status of the domain zone.
    UpdatedAt string
    The date and time of the last update to the DNS zone.
    Domain string
    ProjectId string
    Subdomain string
    Id string
    The provider-assigned unique ID for this managed resource.
    Message string
    Message associated with the domain zone (typically used for status or error messages).
    Ns []string
    The list of name servers for the zone.
    NsDefaults []string
    The default list of name servers for the zone.
    NsMasters []string
    The master list of name servers for the zone.
    Status string
    The status of the domain zone.
    UpdatedAt string
    The date and time of the last update to the DNS zone.
    Domain string
    ProjectId string
    Subdomain string
    id String
    The provider-assigned unique ID for this managed resource.
    message String
    Message associated with the domain zone (typically used for status or error messages).
    ns List<String>
    The list of name servers for the zone.
    nsDefaults List<String>
    The default list of name servers for the zone.
    nsMasters List<String>
    The master list of name servers for the zone.
    status String
    The status of the domain zone.
    updatedAt String
    The date and time of the last update to the DNS zone.
    domain String
    projectId String
    subdomain String
    id string
    The provider-assigned unique ID for this managed resource.
    message string
    Message associated with the domain zone (typically used for status or error messages).
    ns string[]
    The list of name servers for the zone.
    nsDefaults string[]
    The default list of name servers for the zone.
    nsMasters string[]
    The master list of name servers for the zone.
    status string
    The status of the domain zone.
    updatedAt string
    The date and time of the last update to the DNS zone.
    domain string
    projectId string
    subdomain string
    id str
    The provider-assigned unique ID for this managed resource.
    message str
    Message associated with the domain zone (typically used for status or error messages).
    ns Sequence[str]
    The list of name servers for the zone.
    ns_defaults Sequence[str]
    The default list of name servers for the zone.
    ns_masters Sequence[str]
    The master list of name servers for the zone.
    status str
    The status of the domain zone.
    updated_at str
    The date and time of the last update to the DNS zone.
    domain str
    project_id str
    subdomain str
    id String
    The provider-assigned unique ID for this managed resource.
    message String
    Message associated with the domain zone (typically used for status or error messages).
    ns List<String>
    The list of name servers for the zone.
    nsDefaults List<String>
    The default list of name servers for the zone.
    nsMasters List<String>
    The master list of name servers for the zone.
    status String
    The status of the domain zone.
    updatedAt String
    The date and time of the last update to the DNS zone.
    domain String
    projectId String
    subdomain String

    Package Details

    Repository
    scaleway pulumiverse/pulumi-scaleway
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the scaleway Terraform Provider.
    scaleway logo
    Viewing docs for Scaleway v1.48.0
    published on Wednesday, Apr 29, 2026 by pulumiverse
      Try Pulumi Cloud free. Your team will thank you.