1. Packages
  2. Scaleway
  3. API Docs
  4. InstanceIpReverseDns
Scaleway v1.20.0 published on Monday, Nov 4, 2024 by pulumiverse

scaleway.InstanceIpReverseDns

Explore with Pulumi AI

scaleway logo
Scaleway v1.20.0 published on Monday, Nov 4, 2024 by pulumiverse

    Manages Scaleway compute Instance IPs Reverse DNS.

    Please check our guide for more details

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumiverse/scaleway";
    
    const serverIp = new scaleway.InstanceIp("server_ip", {});
    const tfA = new scaleway.DomainRecord("tf_A", {
        dnsZone: "scaleway.com",
        name: "www",
        type: "A",
        data: serverIp.address,
        ttl: 3600,
        priority: 1,
    });
    const reverse = new scaleway.InstanceIpReverseDns("reverse", {
        ipId: serverIp.id,
        reverse: "www.scaleway.com",
    });
    
    import pulumi
    import pulumiverse_scaleway as scaleway
    
    server_ip = scaleway.InstanceIp("server_ip")
    tf_a = scaleway.DomainRecord("tf_A",
        dns_zone="scaleway.com",
        name="www",
        type="A",
        data=server_ip.address,
        ttl=3600,
        priority=1)
    reverse = scaleway.InstanceIpReverseDns("reverse",
        ip_id=server_ip.id,
        reverse="www.scaleway.com")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		serverIp, err := scaleway.NewInstanceIp(ctx, "server_ip", nil)
    		if err != nil {
    			return err
    		}
    		_, err = scaleway.NewDomainRecord(ctx, "tf_A", &scaleway.DomainRecordArgs{
    			DnsZone:  pulumi.String("scaleway.com"),
    			Name:     pulumi.String("www"),
    			Type:     pulumi.String("A"),
    			Data:     serverIp.Address,
    			Ttl:      pulumi.Int(3600),
    			Priority: pulumi.Int(1),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = scaleway.NewInstanceIpReverseDns(ctx, "reverse", &scaleway.InstanceIpReverseDnsArgs{
    			IpId:    serverIp.ID(),
    			Reverse: pulumi.String("www.scaleway.com"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumiverse.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        var serverIp = new Scaleway.InstanceIp("server_ip");
    
        var tfA = new Scaleway.DomainRecord("tf_A", new()
        {
            DnsZone = "scaleway.com",
            Name = "www",
            Type = "A",
            Data = serverIp.Address,
            Ttl = 3600,
            Priority = 1,
        });
    
        var reverse = new Scaleway.InstanceIpReverseDns("reverse", new()
        {
            IpId = serverIp.Id,
            Reverse = "www.scaleway.com",
        });
    
    });
    
    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.DomainRecord;
    import com.pulumi.scaleway.DomainRecordArgs;
    import com.pulumi.scaleway.InstanceIpReverseDns;
    import com.pulumi.scaleway.InstanceIpReverseDnsArgs;
    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 serverIp = new InstanceIp("serverIp");
    
            var tfA = new DomainRecord("tfA", DomainRecordArgs.builder()
                .dnsZone("scaleway.com")
                .name("www")
                .type("A")
                .data(serverIp.address())
                .ttl(3600)
                .priority(1)
                .build());
    
            var reverse = new InstanceIpReverseDns("reverse", InstanceIpReverseDnsArgs.builder()
                .ipId(serverIp.id())
                .reverse("www.scaleway.com")
                .build());
    
        }
    }
    
    resources:
      serverIp:
        type: scaleway:InstanceIp
        name: server_ip
      tfA:
        type: scaleway:DomainRecord
        name: tf_A
        properties:
          dnsZone: scaleway.com
          name: www
          type: A
          data: ${serverIp.address}
          ttl: 3600
          priority: 1
      reverse:
        type: scaleway:InstanceIpReverseDns
        properties:
          ipId: ${serverIp.id}
          reverse: www.scaleway.com
    

    Create InstanceIpReverseDns Resource

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

    Constructor syntax

    new InstanceIpReverseDns(name: string, args: InstanceIpReverseDnsArgs, opts?: CustomResourceOptions);
    @overload
    def InstanceIpReverseDns(resource_name: str,
                             args: InstanceIpReverseDnsArgs,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def InstanceIpReverseDns(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             ip_id: Optional[str] = None,
                             reverse: Optional[str] = None,
                             zone: Optional[str] = None)
    func NewInstanceIpReverseDns(ctx *Context, name string, args InstanceIpReverseDnsArgs, opts ...ResourceOption) (*InstanceIpReverseDns, error)
    public InstanceIpReverseDns(string name, InstanceIpReverseDnsArgs args, CustomResourceOptions? opts = null)
    public InstanceIpReverseDns(String name, InstanceIpReverseDnsArgs args)
    public InstanceIpReverseDns(String name, InstanceIpReverseDnsArgs args, CustomResourceOptions options)
    
    type: scaleway:InstanceIpReverseDns
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args InstanceIpReverseDnsArgs
    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 InstanceIpReverseDnsArgs
    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 InstanceIpReverseDnsArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args InstanceIpReverseDnsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args InstanceIpReverseDnsArgs
    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 instanceIpReverseDnsResource = new Scaleway.InstanceIpReverseDns("instanceIpReverseDnsResource", new()
    {
        IpId = "string",
        Reverse = "string",
        Zone = "string",
    });
    
    example, err := scaleway.NewInstanceIpReverseDns(ctx, "instanceIpReverseDnsResource", &scaleway.InstanceIpReverseDnsArgs{
    	IpId:    pulumi.String("string"),
    	Reverse: pulumi.String("string"),
    	Zone:    pulumi.String("string"),
    })
    
    var instanceIpReverseDnsResource = new InstanceIpReverseDns("instanceIpReverseDnsResource", InstanceIpReverseDnsArgs.builder()
        .ipId("string")
        .reverse("string")
        .zone("string")
        .build());
    
    instance_ip_reverse_dns_resource = scaleway.InstanceIpReverseDns("instanceIpReverseDnsResource",
        ip_id="string",
        reverse="string",
        zone="string")
    
    const instanceIpReverseDnsResource = new scaleway.InstanceIpReverseDns("instanceIpReverseDnsResource", {
        ipId: "string",
        reverse: "string",
        zone: "string",
    });
    
    type: scaleway:InstanceIpReverseDns
    properties:
        ipId: string
        reverse: string
        zone: string
    

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

    IpId string
    The IP ID
    Reverse string
    The reverse DNS for this IP.
    Zone string
    zone) The zone in which the IP should be reserved.
    IpId string
    The IP ID
    Reverse string
    The reverse DNS for this IP.
    Zone string
    zone) The zone in which the IP should be reserved.
    ipId String
    The IP ID
    reverse String
    The reverse DNS for this IP.
    zone String
    zone) The zone in which the IP should be reserved.
    ipId string
    The IP ID
    reverse string
    The reverse DNS for this IP.
    zone string
    zone) The zone in which the IP should be reserved.
    ip_id str
    The IP ID
    reverse str
    The reverse DNS for this IP.
    zone str
    zone) The zone in which the IP should be reserved.
    ipId String
    The IP ID
    reverse String
    The reverse DNS for this IP.
    zone String
    zone) The zone in which the IP should be reserved.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing InstanceIpReverseDns Resource

    Get an existing InstanceIpReverseDns 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?: InstanceIpReverseDnsState, opts?: CustomResourceOptions): InstanceIpReverseDns
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            ip_id: Optional[str] = None,
            reverse: Optional[str] = None,
            zone: Optional[str] = None) -> InstanceIpReverseDns
    func GetInstanceIpReverseDns(ctx *Context, name string, id IDInput, state *InstanceIpReverseDnsState, opts ...ResourceOption) (*InstanceIpReverseDns, error)
    public static InstanceIpReverseDns Get(string name, Input<string> id, InstanceIpReverseDnsState? state, CustomResourceOptions? opts = null)
    public static InstanceIpReverseDns get(String name, Output<String> id, InstanceIpReverseDnsState 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:
    IpId string
    The IP ID
    Reverse string
    The reverse DNS for this IP.
    Zone string
    zone) The zone in which the IP should be reserved.
    IpId string
    The IP ID
    Reverse string
    The reverse DNS for this IP.
    Zone string
    zone) The zone in which the IP should be reserved.
    ipId String
    The IP ID
    reverse String
    The reverse DNS for this IP.
    zone String
    zone) The zone in which the IP should be reserved.
    ipId string
    The IP ID
    reverse string
    The reverse DNS for this IP.
    zone string
    zone) The zone in which the IP should be reserved.
    ip_id str
    The IP ID
    reverse str
    The reverse DNS for this IP.
    zone str
    zone) The zone in which the IP should be reserved.
    ipId String
    The IP ID
    reverse String
    The reverse DNS for this IP.
    zone String
    zone) The zone in which the IP should be reserved.

    Import

    IPs reverse DNS can be imported using the {zone}/{id}, e.g.

    bash

    $ pulumi import scaleway:index/instanceIpReverseDns:InstanceIpReverseDns reverse fr-par-1/11111111-1111-1111-1111-111111111111
    

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

    Package Details

    Repository
    scaleway pulumiverse/pulumi-scaleway
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the scaleway Terraform Provider.
    scaleway logo
    Scaleway v1.20.0 published on Monday, Nov 4, 2024 by pulumiverse