1. Packages
  2. Scaleway
  3. API Docs
  4. getIpamIps
Scaleway v1.12.1 published on Monday, Apr 15, 2024 by pulumiverse

scaleway.getIpamIps

Explore with Pulumi AI

scaleway logo
Scaleway v1.12.1 published on Monday, Apr 15, 2024 by pulumiverse

    Gets information about multiple IPs managed by IPAM service.

    Examples

    By tag

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumi/scaleway";
    
    const byTag = scaleway.getIpamIps({
        tags: ["tag"],
    });
    
    import pulumi
    import pulumi_scaleway as scaleway
    
    by_tag = scaleway.get_ipam_ips(tags=["tag"])
    
    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.GetIpamIps(ctx, &scaleway.GetIpamIpsArgs{
    			Tags: []string{
    				"tag",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumi.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        var byTag = Scaleway.GetIpamIps.Invoke(new()
        {
            Tags = new[]
            {
                "tag",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.ScalewayFunctions;
    import com.pulumi.scaleway.inputs.GetIpamIpsArgs;
    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 byTag = ScalewayFunctions.getIpamIps(GetIpamIpsArgs.builder()
                .tags("tag")
                .build());
    
        }
    }
    
    variables:
      byTag:
        fn::invoke:
          Function: scaleway:getIpamIps
          Arguments:
            tags:
              - tag
    

    By type and resource

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumi/scaleway";
    import * as scaleway from "@pulumiverse/scaleway";
    
    const vpc01 = new scaleway.Vpc("vpc01", {});
    const pn01 = new scaleway.VpcPrivateNetwork("pn01", {
        vpcId: vpc01.id,
        ipv4Subnet: {
            subnet: "172.16.32.0/22",
        },
    });
    const redis01 = new scaleway.RedisCluster("redis01", {
        version: "7.0.5",
        nodeType: "RED1-XS",
        userName: "my_initial_user",
        password: "thiZ_is_v&ry_s3cret",
        clusterSize: 3,
        privateNetworks: [{
            id: pn01.id,
        }],
    });
    const byTypeAndResource = scaleway.getIpamIpsOutput({
        type: "ipv4",
        resource: {
            id: redis01.id,
            type: "redis_cluster",
        },
    });
    
    import pulumi
    import pulumi_scaleway as scaleway
    import pulumiverse_scaleway as scaleway
    
    vpc01 = scaleway.Vpc("vpc01")
    pn01 = scaleway.VpcPrivateNetwork("pn01",
        vpc_id=vpc01.id,
        ipv4_subnet=scaleway.VpcPrivateNetworkIpv4SubnetArgs(
            subnet="172.16.32.0/22",
        ))
    redis01 = scaleway.RedisCluster("redis01",
        version="7.0.5",
        node_type="RED1-XS",
        user_name="my_initial_user",
        password="thiZ_is_v&ry_s3cret",
        cluster_size=3,
        private_networks=[scaleway.RedisClusterPrivateNetworkArgs(
            id=pn01.id,
        )])
    by_type_and_resource = scaleway.get_ipam_ips_output(type="ipv4",
        resource=scaleway.GetIpamIpsResourceArgs(
            id=redis01.id,
            type="redis_cluster",
        ))
    
    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 {
    		vpc01, err := scaleway.NewVpc(ctx, "vpc01", nil)
    		if err != nil {
    			return err
    		}
    		pn01, err := scaleway.NewVpcPrivateNetwork(ctx, "pn01", &scaleway.VpcPrivateNetworkArgs{
    			VpcId: vpc01.ID(),
    			Ipv4Subnet: &scaleway.VpcPrivateNetworkIpv4SubnetArgs{
    				Subnet: pulumi.String("172.16.32.0/22"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		redis01, err := scaleway.NewRedisCluster(ctx, "redis01", &scaleway.RedisClusterArgs{
    			Version:     pulumi.String("7.0.5"),
    			NodeType:    pulumi.String("RED1-XS"),
    			UserName:    pulumi.String("my_initial_user"),
    			Password:    pulumi.String("thiZ_is_v&ry_s3cret"),
    			ClusterSize: pulumi.Int(3),
    			PrivateNetworks: scaleway.RedisClusterPrivateNetworkArray{
    				&scaleway.RedisClusterPrivateNetworkArgs{
    					Id: pn01.ID(),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_ = scaleway.GetIpamIpsOutput(ctx, scaleway.GetIpamIpsOutputArgs{
    			Type: pulumi.String("ipv4"),
    			Resource: &scaleway.GetIpamIpsResourceArgs{
    				Id:   redis01.ID(),
    				Type: pulumi.String("redis_cluster"),
    			},
    		}, nil)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumi.Scaleway;
    using Scaleway = Pulumiverse.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        var vpc01 = new Scaleway.Vpc("vpc01");
    
        var pn01 = new Scaleway.VpcPrivateNetwork("pn01", new()
        {
            VpcId = vpc01.Id,
            Ipv4Subnet = new Scaleway.Inputs.VpcPrivateNetworkIpv4SubnetArgs
            {
                Subnet = "172.16.32.0/22",
            },
        });
    
        var redis01 = new Scaleway.RedisCluster("redis01", new()
        {
            Version = "7.0.5",
            NodeType = "RED1-XS",
            UserName = "my_initial_user",
            Password = "thiZ_is_v&ry_s3cret",
            ClusterSize = 3,
            PrivateNetworks = new[]
            {
                new Scaleway.Inputs.RedisClusterPrivateNetworkArgs
                {
                    Id = pn01.Id,
                },
            },
        });
    
        var byTypeAndResource = Scaleway.GetIpamIps.Invoke(new()
        {
            Type = "ipv4",
            Resource = new Scaleway.Inputs.GetIpamIpsResourceInputArgs
            {
                Id = redis01.Id,
                Type = "redis_cluster",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.Vpc;
    import com.pulumi.scaleway.VpcPrivateNetwork;
    import com.pulumi.scaleway.VpcPrivateNetworkArgs;
    import com.pulumi.scaleway.inputs.VpcPrivateNetworkIpv4SubnetArgs;
    import com.pulumi.scaleway.RedisCluster;
    import com.pulumi.scaleway.RedisClusterArgs;
    import com.pulumi.scaleway.inputs.RedisClusterPrivateNetworkArgs;
    import com.pulumi.scaleway.ScalewayFunctions;
    import com.pulumi.scaleway.inputs.GetIpamIpsArgs;
    import com.pulumi.scaleway.inputs.GetIpamIpsResourceArgs;
    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 vpc01 = new Vpc("vpc01");
    
            var pn01 = new VpcPrivateNetwork("pn01", VpcPrivateNetworkArgs.builder()        
                .vpcId(vpc01.id())
                .ipv4Subnet(VpcPrivateNetworkIpv4SubnetArgs.builder()
                    .subnet("172.16.32.0/22")
                    .build())
                .build());
    
            var redis01 = new RedisCluster("redis01", RedisClusterArgs.builder()        
                .version("7.0.5")
                .nodeType("RED1-XS")
                .userName("my_initial_user")
                .password("thiZ_is_v&ry_s3cret")
                .clusterSize(3)
                .privateNetworks(RedisClusterPrivateNetworkArgs.builder()
                    .id(pn01.id())
                    .build())
                .build());
    
            final var byTypeAndResource = ScalewayFunctions.getIpamIps(GetIpamIpsArgs.builder()
                .type("ipv4")
                .resource(GetIpamIpsResourceArgs.builder()
                    .id(redis01.id())
                    .type("redis_cluster")
                    .build())
                .build());
    
        }
    }
    
    resources:
      vpc01:
        type: scaleway:Vpc
      pn01:
        type: scaleway:VpcPrivateNetwork
        properties:
          vpcId: ${vpc01.id}
          ipv4Subnet:
            subnet: 172.16.32.0/22
      redis01:
        type: scaleway:RedisCluster
        properties:
          version: 7.0.5
          nodeType: RED1-XS
          userName: my_initial_user
          password: thiZ_is_v&ry_s3cret
          clusterSize: 3
          privateNetworks:
            - id: ${pn01.id}
    variables:
      byTypeAndResource:
        fn::invoke:
          Function: scaleway:getIpamIps
          Arguments:
            type: ipv4
            resource:
              id: ${redis01.id}
              type: redis_cluster
    

    Using getIpamIps

    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 getIpamIps(args: GetIpamIpsArgs, opts?: InvokeOptions): Promise<GetIpamIpsResult>
    function getIpamIpsOutput(args: GetIpamIpsOutputArgs, opts?: InvokeOptions): Output<GetIpamIpsResult>
    def get_ipam_ips(attached: Optional[bool] = None,
                     mac_address: Optional[str] = None,
                     private_network_id: Optional[str] = None,
                     project_id: Optional[str] = None,
                     region: Optional[str] = None,
                     resource: Optional[GetIpamIpsResource] = None,
                     tags: Optional[Sequence[str]] = None,
                     type: Optional[str] = None,
                     zonal: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetIpamIpsResult
    def get_ipam_ips_output(attached: Optional[pulumi.Input[bool]] = None,
                     mac_address: Optional[pulumi.Input[str]] = None,
                     private_network_id: Optional[pulumi.Input[str]] = None,
                     project_id: Optional[pulumi.Input[str]] = None,
                     region: Optional[pulumi.Input[str]] = None,
                     resource: Optional[pulumi.Input[GetIpamIpsResourceArgs]] = None,
                     tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                     type: Optional[pulumi.Input[str]] = None,
                     zonal: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetIpamIpsResult]
    func GetIpamIps(ctx *Context, args *GetIpamIpsArgs, opts ...InvokeOption) (*GetIpamIpsResult, error)
    func GetIpamIpsOutput(ctx *Context, args *GetIpamIpsOutputArgs, opts ...InvokeOption) GetIpamIpsResultOutput

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

    public static class GetIpamIps 
    {
        public static Task<GetIpamIpsResult> InvokeAsync(GetIpamIpsArgs args, InvokeOptions? opts = null)
        public static Output<GetIpamIpsResult> Invoke(GetIpamIpsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetIpamIpsResult> getIpamIps(GetIpamIpsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: scaleway:index/getIpamIps:getIpamIps
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Attached bool
    Defines whether to filter only for IPs which are attached to a resource.
    MacAddress string
    The Mac Address used as filter.
    PrivateNetworkId string
    The ID of the private network used as filter.
    ProjectId string
    The ID of the project used as filter.
    Region string
    The region used as filter.
    Resource Pulumiverse.Scaleway.Inputs.GetIpamIpsResource
    Filter by resource ID, type or name.
    Tags List<string>
    The tags used as filter.
    Type string
    The type of the resource to get the IP from. Documentation with type list.
    Zonal string
    Only IPs that are zonal, and in this zone, will be returned.
    Attached bool
    Defines whether to filter only for IPs which are attached to a resource.
    MacAddress string
    The Mac Address used as filter.
    PrivateNetworkId string
    The ID of the private network used as filter.
    ProjectId string
    The ID of the project used as filter.
    Region string
    The region used as filter.
    Resource GetIpamIpsResource
    Filter by resource ID, type or name.
    Tags []string
    The tags used as filter.
    Type string
    The type of the resource to get the IP from. Documentation with type list.
    Zonal string
    Only IPs that are zonal, and in this zone, will be returned.
    attached Boolean
    Defines whether to filter only for IPs which are attached to a resource.
    macAddress String
    The Mac Address used as filter.
    privateNetworkId String
    The ID of the private network used as filter.
    projectId String
    The ID of the project used as filter.
    region String
    The region used as filter.
    resource GetIpamIpsResource
    Filter by resource ID, type or name.
    tags List<String>
    The tags used as filter.
    type String
    The type of the resource to get the IP from. Documentation with type list.
    zonal String
    Only IPs that are zonal, and in this zone, will be returned.
    attached boolean
    Defines whether to filter only for IPs which are attached to a resource.
    macAddress string
    The Mac Address used as filter.
    privateNetworkId string
    The ID of the private network used as filter.
    projectId string
    The ID of the project used as filter.
    region string
    The region used as filter.
    resource GetIpamIpsResource
    Filter by resource ID, type or name.
    tags string[]
    The tags used as filter.
    type string
    The type of the resource to get the IP from. Documentation with type list.
    zonal string
    Only IPs that are zonal, and in this zone, will be returned.
    attached bool
    Defines whether to filter only for IPs which are attached to a resource.
    mac_address str
    The Mac Address used as filter.
    private_network_id str
    The ID of the private network used as filter.
    project_id str
    The ID of the project used as filter.
    region str
    The region used as filter.
    resource GetIpamIpsResource
    Filter by resource ID, type or name.
    tags Sequence[str]
    The tags used as filter.
    type str
    The type of the resource to get the IP from. Documentation with type list.
    zonal str
    Only IPs that are zonal, and in this zone, will be returned.
    attached Boolean
    Defines whether to filter only for IPs which are attached to a resource.
    macAddress String
    The Mac Address used as filter.
    privateNetworkId String
    The ID of the private network used as filter.
    projectId String
    The ID of the project used as filter.
    region String
    The region used as filter.
    resource Property Map
    Filter by resource ID, type or name.
    tags List<String>
    The tags used as filter.
    type String
    The type of the resource to get the IP from. Documentation with type list.
    zonal String
    Only IPs that are zonal, and in this zone, will be returned.

    getIpamIps Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Ips List<Pulumiverse.Scaleway.Outputs.GetIpamIpsIp>
    List of found IPs
    OrganizationId string
    ProjectId string
    The ID of the project the server is associated with.
    Region string
    The region in which the IP is.
    Zonal string
    Attached bool
    MacAddress string
    The mac address.
    PrivateNetworkId string
    Resource Pulumiverse.Scaleway.Outputs.GetIpamIpsResource
    The list of public IPs of the server.
    Tags List<string>
    The tags associated with the IP.
    Type string
    The type of resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    Ips []GetIpamIpsIp
    List of found IPs
    OrganizationId string
    ProjectId string
    The ID of the project the server is associated with.
    Region string
    The region in which the IP is.
    Zonal string
    Attached bool
    MacAddress string
    The mac address.
    PrivateNetworkId string
    Resource GetIpamIpsResource
    The list of public IPs of the server.
    Tags []string
    The tags associated with the IP.
    Type string
    The type of resource.
    id String
    The provider-assigned unique ID for this managed resource.
    ips List<GetIpamIpsIp>
    List of found IPs
    organizationId String
    projectId String
    The ID of the project the server is associated with.
    region String
    The region in which the IP is.
    zonal String
    attached Boolean
    macAddress String
    The mac address.
    privateNetworkId String
    resource GetIpamIpsResource
    The list of public IPs of the server.
    tags List<String>
    The tags associated with the IP.
    type String
    The type of resource.
    id string
    The provider-assigned unique ID for this managed resource.
    ips GetIpamIpsIp[]
    List of found IPs
    organizationId string
    projectId string
    The ID of the project the server is associated with.
    region string
    The region in which the IP is.
    zonal string
    attached boolean
    macAddress string
    The mac address.
    privateNetworkId string
    resource GetIpamIpsResource
    The list of public IPs of the server.
    tags string[]
    The tags associated with the IP.
    type string
    The type of resource.
    id str
    The provider-assigned unique ID for this managed resource.
    ips Sequence[GetIpamIpsIp]
    List of found IPs
    organization_id str
    project_id str
    The ID of the project the server is associated with.
    region str
    The region in which the IP is.
    zonal str
    attached bool
    mac_address str
    The mac address.
    private_network_id str
    resource GetIpamIpsResource
    The list of public IPs of the server.
    tags Sequence[str]
    The tags associated with the IP.
    type str
    The type of resource.
    id String
    The provider-assigned unique ID for this managed resource.
    ips List<Property Map>
    List of found IPs
    organizationId String
    projectId String
    The ID of the project the server is associated with.
    region String
    The region in which the IP is.
    zonal String
    attached Boolean
    macAddress String
    The mac address.
    privateNetworkId String
    resource Property Map
    The list of public IPs of the server.
    tags List<String>
    The tags associated with the IP.
    type String
    The type of resource.

    Supporting Types

    GetIpamIpsIp

    Address string
    The Scaleway internal IP address of the server.
    CreatedAt string
    The date and time of the creation of the IP.
    Id string
    The ID of the resource that the IP is bound to.
    ProjectId string
    The ID of the project used as filter.
    Region string
    The region used as filter.
    Resources List<Pulumiverse.Scaleway.Inputs.GetIpamIpsIpResource>
    Filter by resource ID, type or name.
    Tags List<string>
    The tags used as filter.
    UpdatedAt string
    The date and time of the last update of the IP.
    Zone string
    The zone in which the IP is.
    Address string
    The Scaleway internal IP address of the server.
    CreatedAt string
    The date and time of the creation of the IP.
    Id string
    The ID of the resource that the IP is bound to.
    ProjectId string
    The ID of the project used as filter.
    Region string
    The region used as filter.
    Resources []GetIpamIpsIpResource
    Filter by resource ID, type or name.
    Tags []string
    The tags used as filter.
    UpdatedAt string
    The date and time of the last update of the IP.
    Zone string
    The zone in which the IP is.
    address String
    The Scaleway internal IP address of the server.
    createdAt String
    The date and time of the creation of the IP.
    id String
    The ID of the resource that the IP is bound to.
    projectId String
    The ID of the project used as filter.
    region String
    The region used as filter.
    resources List<GetIpamIpsIpResource>
    Filter by resource ID, type or name.
    tags List<String>
    The tags used as filter.
    updatedAt String
    The date and time of the last update of the IP.
    zone String
    The zone in which the IP is.
    address string
    The Scaleway internal IP address of the server.
    createdAt string
    The date and time of the creation of the IP.
    id string
    The ID of the resource that the IP is bound to.
    projectId string
    The ID of the project used as filter.
    region string
    The region used as filter.
    resources GetIpamIpsIpResource[]
    Filter by resource ID, type or name.
    tags string[]
    The tags used as filter.
    updatedAt string
    The date and time of the last update of the IP.
    zone string
    The zone in which the IP is.
    address str
    The Scaleway internal IP address of the server.
    created_at str
    The date and time of the creation of the IP.
    id str
    The ID of the resource that the IP is bound to.
    project_id str
    The ID of the project used as filter.
    region str
    The region used as filter.
    resources Sequence[GetIpamIpsIpResource]
    Filter by resource ID, type or name.
    tags Sequence[str]
    The tags used as filter.
    updated_at str
    The date and time of the last update of the IP.
    zone str
    The zone in which the IP is.
    address String
    The Scaleway internal IP address of the server.
    createdAt String
    The date and time of the creation of the IP.
    id String
    The ID of the resource that the IP is bound to.
    projectId String
    The ID of the project used as filter.
    region String
    The region used as filter.
    resources List<Property Map>
    Filter by resource ID, type or name.
    tags List<String>
    The tags used as filter.
    updatedAt String
    The date and time of the last update of the IP.
    zone String
    The zone in which the IP is.

    GetIpamIpsIpResource

    Id string
    The ID of the resource that the IP is bound to.
    MacAddress string
    The Mac Address used as filter.
    Name string
    The name of the resource to get the IP from.
    Type string
    The type of the resource to get the IP from. Documentation with type list.
    Id string
    The ID of the resource that the IP is bound to.
    MacAddress string
    The Mac Address used as filter.
    Name string
    The name of the resource to get the IP from.
    Type string
    The type of the resource to get the IP from. Documentation with type list.
    id String
    The ID of the resource that the IP is bound to.
    macAddress String
    The Mac Address used as filter.
    name String
    The name of the resource to get the IP from.
    type String
    The type of the resource to get the IP from. Documentation with type list.
    id string
    The ID of the resource that the IP is bound to.
    macAddress string
    The Mac Address used as filter.
    name string
    The name of the resource to get the IP from.
    type string
    The type of the resource to get the IP from. Documentation with type list.
    id str
    The ID of the resource that the IP is bound to.
    mac_address str
    The Mac Address used as filter.
    name str
    The name of the resource to get the IP from.
    type str
    The type of the resource to get the IP from. Documentation with type list.
    id String
    The ID of the resource that the IP is bound to.
    macAddress String
    The Mac Address used as filter.
    name String
    The name of the resource to get the IP from.
    type String
    The type of the resource to get the IP from. Documentation with type list.

    GetIpamIpsResource

    Type string
    The type of the resource to get the IP from. Documentation with type list.
    Id string
    The ID of the resource that the IP is bound to.
    Name string
    The name of the resource to get the IP from.
    Type string
    The type of the resource to get the IP from. Documentation with type list.
    Id string
    The ID of the resource that the IP is bound to.
    Name string
    The name of the resource to get the IP from.
    type String
    The type of the resource to get the IP from. Documentation with type list.
    id String
    The ID of the resource that the IP is bound to.
    name String
    The name of the resource to get the IP from.
    type string
    The type of the resource to get the IP from. Documentation with type list.
    id string
    The ID of the resource that the IP is bound to.
    name string
    The name of the resource to get the IP from.
    type str
    The type of the resource to get the IP from. Documentation with type list.
    id str
    The ID of the resource that the IP is bound to.
    name str
    The name of the resource to get the IP from.
    type String
    The type of the resource to get the IP from. Documentation with type list.
    id String
    The ID of the resource that the IP is bound to.
    name String
    The name of the resource to get the IP from.

    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.12.1 published on Monday, Apr 15, 2024 by pulumiverse