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

scaleway.InstanceIp

Explore with Pulumi AI

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

    Creates and manages Scaleway compute Instance IPs. For more information, see the documentation.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumiverse/scaleway";
    
    const serverIp = new scaleway.InstanceIp("server_ip", {});
    
    import pulumi
    import pulumiverse_scaleway as scaleway
    
    server_ip = scaleway.InstanceIp("server_ip")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := scaleway.NewInstanceIp(ctx, "server_ip", 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(() => 
    {
        var serverIp = new Scaleway.InstanceIp("server_ip");
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.InstanceIp;
    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");
    
        }
    }
    
    resources:
      serverIp:
        type: scaleway:InstanceIp
        name: server_ip
    

    Create InstanceIp Resource

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

    Constructor syntax

    new InstanceIp(name: string, args?: InstanceIpArgs, opts?: CustomResourceOptions);
    @overload
    def InstanceIp(resource_name: str,
                   args: Optional[InstanceIpArgs] = None,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def InstanceIp(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   project_id: Optional[str] = None,
                   tags: Optional[Sequence[str]] = None,
                   type: Optional[str] = None,
                   zone: Optional[str] = None)
    func NewInstanceIp(ctx *Context, name string, args *InstanceIpArgs, opts ...ResourceOption) (*InstanceIp, error)
    public InstanceIp(string name, InstanceIpArgs? args = null, CustomResourceOptions? opts = null)
    public InstanceIp(String name, InstanceIpArgs args)
    public InstanceIp(String name, InstanceIpArgs args, CustomResourceOptions options)
    
    type: scaleway:InstanceIp
    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 InstanceIpArgs
    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 InstanceIpArgs
    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 InstanceIpArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args InstanceIpArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args InstanceIpArgs
    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 instanceIpResource = new Scaleway.InstanceIp("instanceIpResource", new()
    {
        ProjectId = "string",
        Tags = new[]
        {
            "string",
        },
        Type = "string",
        Zone = "string",
    });
    
    example, err := scaleway.NewInstanceIp(ctx, "instanceIpResource", &scaleway.InstanceIpArgs{
    	ProjectId: pulumi.String("string"),
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Type: pulumi.String("string"),
    	Zone: pulumi.String("string"),
    })
    
    var instanceIpResource = new InstanceIp("instanceIpResource", InstanceIpArgs.builder()
        .projectId("string")
        .tags("string")
        .type("string")
        .zone("string")
        .build());
    
    instance_ip_resource = scaleway.InstanceIp("instanceIpResource",
        project_id="string",
        tags=["string"],
        type="string",
        zone="string")
    
    const instanceIpResource = new scaleway.InstanceIp("instanceIpResource", {
        projectId: "string",
        tags: ["string"],
        type: "string",
        zone: "string",
    });
    
    type: scaleway:InstanceIp
    properties:
        projectId: string
        tags:
            - string
        type: string
        zone: string
    

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

    ProjectId string
    project_id) The ID of the project the IP is associated with.
    Tags List<string>
    The tags associated with the IP.
    Type string

    The type of the IP (nat, routed_ipv4, routed_ipv6), more information in the documentation

    Important: An IP can migrate from nat to routed_ipv4 but cannot be converted back

    Zone string
    zone) The zone in which the IP should be reserved.
    ProjectId string
    project_id) The ID of the project the IP is associated with.
    Tags []string
    The tags associated with the IP.
    Type string

    The type of the IP (nat, routed_ipv4, routed_ipv6), more information in the documentation

    Important: An IP can migrate from nat to routed_ipv4 but cannot be converted back

    Zone string
    zone) The zone in which the IP should be reserved.
    projectId String
    project_id) The ID of the project the IP is associated with.
    tags List<String>
    The tags associated with the IP.
    type String

    The type of the IP (nat, routed_ipv4, routed_ipv6), more information in the documentation

    Important: An IP can migrate from nat to routed_ipv4 but cannot be converted back

    zone String
    zone) The zone in which the IP should be reserved.
    projectId string
    project_id) The ID of the project the IP is associated with.
    tags string[]
    The tags associated with the IP.
    type string

    The type of the IP (nat, routed_ipv4, routed_ipv6), more information in the documentation

    Important: An IP can migrate from nat to routed_ipv4 but cannot be converted back

    zone string
    zone) The zone in which the IP should be reserved.
    project_id str
    project_id) The ID of the project the IP is associated with.
    tags Sequence[str]
    The tags associated with the IP.
    type str

    The type of the IP (nat, routed_ipv4, routed_ipv6), more information in the documentation

    Important: An IP can migrate from nat to routed_ipv4 but cannot be converted back

    zone str
    zone) The zone in which the IP should be reserved.
    projectId String
    project_id) The ID of the project the IP is associated with.
    tags List<String>
    The tags associated with the IP.
    type String

    The type of the IP (nat, routed_ipv4, routed_ipv6), more information in the documentation

    Important: An IP can migrate from nat to routed_ipv4 but cannot be converted back

    zone String
    zone) The zone in which the IP should be reserved.

    Outputs

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

    Address string
    The IP address.
    Id string
    The provider-assigned unique ID for this managed resource.
    OrganizationId string
    The organization ID the IP is associated with.
    Prefix string
    The IP Prefix.
    Reverse string
    The reverse dns attached to this IP
    ServerId string
    The server associated with this IP
    Address string
    The IP address.
    Id string
    The provider-assigned unique ID for this managed resource.
    OrganizationId string
    The organization ID the IP is associated with.
    Prefix string
    The IP Prefix.
    Reverse string
    The reverse dns attached to this IP
    ServerId string
    The server associated with this IP
    address String
    The IP address.
    id String
    The provider-assigned unique ID for this managed resource.
    organizationId String
    The organization ID the IP is associated with.
    prefix String
    The IP Prefix.
    reverse String
    The reverse dns attached to this IP
    serverId String
    The server associated with this IP
    address string
    The IP address.
    id string
    The provider-assigned unique ID for this managed resource.
    organizationId string
    The organization ID the IP is associated with.
    prefix string
    The IP Prefix.
    reverse string
    The reverse dns attached to this IP
    serverId string
    The server associated with this IP
    address str
    The IP address.
    id str
    The provider-assigned unique ID for this managed resource.
    organization_id str
    The organization ID the IP is associated with.
    prefix str
    The IP Prefix.
    reverse str
    The reverse dns attached to this IP
    server_id str
    The server associated with this IP
    address String
    The IP address.
    id String
    The provider-assigned unique ID for this managed resource.
    organizationId String
    The organization ID the IP is associated with.
    prefix String
    The IP Prefix.
    reverse String
    The reverse dns attached to this IP
    serverId String
    The server associated with this IP

    Look up Existing InstanceIp Resource

    Get an existing InstanceIp 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?: InstanceIpState, opts?: CustomResourceOptions): InstanceIp
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            address: Optional[str] = None,
            organization_id: Optional[str] = None,
            prefix: Optional[str] = None,
            project_id: Optional[str] = None,
            reverse: Optional[str] = None,
            server_id: Optional[str] = None,
            tags: Optional[Sequence[str]] = None,
            type: Optional[str] = None,
            zone: Optional[str] = None) -> InstanceIp
    func GetInstanceIp(ctx *Context, name string, id IDInput, state *InstanceIpState, opts ...ResourceOption) (*InstanceIp, error)
    public static InstanceIp Get(string name, Input<string> id, InstanceIpState? state, CustomResourceOptions? opts = null)
    public static InstanceIp get(String name, Output<String> id, InstanceIpState 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:
    Address string
    The IP address.
    OrganizationId string
    The organization ID the IP is associated with.
    Prefix string
    The IP Prefix.
    ProjectId string
    project_id) The ID of the project the IP is associated with.
    Reverse string
    The reverse dns attached to this IP
    ServerId string
    The server associated with this IP
    Tags List<string>
    The tags associated with the IP.
    Type string

    The type of the IP (nat, routed_ipv4, routed_ipv6), more information in the documentation

    Important: An IP can migrate from nat to routed_ipv4 but cannot be converted back

    Zone string
    zone) The zone in which the IP should be reserved.
    Address string
    The IP address.
    OrganizationId string
    The organization ID the IP is associated with.
    Prefix string
    The IP Prefix.
    ProjectId string
    project_id) The ID of the project the IP is associated with.
    Reverse string
    The reverse dns attached to this IP
    ServerId string
    The server associated with this IP
    Tags []string
    The tags associated with the IP.
    Type string

    The type of the IP (nat, routed_ipv4, routed_ipv6), more information in the documentation

    Important: An IP can migrate from nat to routed_ipv4 but cannot be converted back

    Zone string
    zone) The zone in which the IP should be reserved.
    address String
    The IP address.
    organizationId String
    The organization ID the IP is associated with.
    prefix String
    The IP Prefix.
    projectId String
    project_id) The ID of the project the IP is associated with.
    reverse String
    The reverse dns attached to this IP
    serverId String
    The server associated with this IP
    tags List<String>
    The tags associated with the IP.
    type String

    The type of the IP (nat, routed_ipv4, routed_ipv6), more information in the documentation

    Important: An IP can migrate from nat to routed_ipv4 but cannot be converted back

    zone String
    zone) The zone in which the IP should be reserved.
    address string
    The IP address.
    organizationId string
    The organization ID the IP is associated with.
    prefix string
    The IP Prefix.
    projectId string
    project_id) The ID of the project the IP is associated with.
    reverse string
    The reverse dns attached to this IP
    serverId string
    The server associated with this IP
    tags string[]
    The tags associated with the IP.
    type string

    The type of the IP (nat, routed_ipv4, routed_ipv6), more information in the documentation

    Important: An IP can migrate from nat to routed_ipv4 but cannot be converted back

    zone string
    zone) The zone in which the IP should be reserved.
    address str
    The IP address.
    organization_id str
    The organization ID the IP is associated with.
    prefix str
    The IP Prefix.
    project_id str
    project_id) The ID of the project the IP is associated with.
    reverse str
    The reverse dns attached to this IP
    server_id str
    The server associated with this IP
    tags Sequence[str]
    The tags associated with the IP.
    type str

    The type of the IP (nat, routed_ipv4, routed_ipv6), more information in the documentation

    Important: An IP can migrate from nat to routed_ipv4 but cannot be converted back

    zone str
    zone) The zone in which the IP should be reserved.
    address String
    The IP address.
    organizationId String
    The organization ID the IP is associated with.
    prefix String
    The IP Prefix.
    projectId String
    project_id) The ID of the project the IP is associated with.
    reverse String
    The reverse dns attached to this IP
    serverId String
    The server associated with this IP
    tags List<String>
    The tags associated with the IP.
    type String

    The type of the IP (nat, routed_ipv4, routed_ipv6), more information in the documentation

    Important: An IP can migrate from nat to routed_ipv4 but cannot be converted back

    zone String
    zone) The zone in which the IP should be reserved.

    Import

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

    bash

    $ pulumi import scaleway:index/instanceIp:InstanceIp server_ip 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