Scaleway v1.14.0 published on Thursday, Jun 6, 2024 by pulumiverse
scaleway.getIpamIps
Explore with Pulumi AI
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 dictionaryThe following arguments are supported:
- Attached bool
 - Defines whether to filter only for IPs which are attached to a resource.
 - Mac
Address string - The Mac Address used as filter.
 - Private
Network stringId  - The ID of the private network used as filter.
 - Project
Id string - The ID of the project used as filter.
 - Region string
 - The region used as filter.
 - Resource
Pulumiverse.
Scaleway. Inputs. Get Ipam Ips Resource  - Filter by resource ID, type or name.
 - List<string>
 - The tags used as filter.
 - Type string
 - The type of IP used as filter (ipv4, ipv6).
 - 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 string - The Mac Address used as filter.
 - Private
Network stringId  - The ID of the private network used as filter.
 - Project
Id string - The ID of the project used as filter.
 - Region string
 - The region used as filter.
 - Resource
Get
Ipam Ips Resource  - Filter by resource ID, type or name.
 - []string
 - The tags used as filter.
 - Type string
 - The type of IP used as filter (ipv4, ipv6).
 - 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.
 - mac
Address String - The Mac Address used as filter.
 - private
Network StringId  - The ID of the private network used as filter.
 - project
Id String - The ID of the project used as filter.
 - region String
 - The region used as filter.
 - resource
Get
Ipam Ips Resource  - Filter by resource ID, type or name.
 - List<String>
 - The tags used as filter.
 - type String
 - The type of IP used as filter (ipv4, ipv6).
 - 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.
 - mac
Address string - The Mac Address used as filter.
 - private
Network stringId  - The ID of the private network used as filter.
 - project
Id string - The ID of the project used as filter.
 - region string
 - The region used as filter.
 - resource
Get
Ipam Ips Resource  - Filter by resource ID, type or name.
 - string[]
 - The tags used as filter.
 - type string
 - The type of IP used as filter (ipv4, ipv6).
 - 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_ strid  - 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
Get
Ipam Ips Resource  - Filter by resource ID, type or name.
 - Sequence[str]
 - The tags used as filter.
 - type str
 - The type of IP used as filter (ipv4, ipv6).
 - 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.
 - mac
Address String - The Mac Address used as filter.
 - private
Network StringId  - The ID of the private network used as filter.
 - project
Id 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.
 - List<String>
 - The tags used as filter.
 - type String
 - The type of IP used as filter (ipv4, ipv6).
 - 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. Get Ipam Ips Ip>  - List of found IPs
 - Organization
Id string - Project
Id string - The ID of the project the server is associated with.
 - Region string
 - The region in which the IP is.
 - Zonal string
 - Attached bool
 - Mac
Address string - The mac address.
 - Private
Network stringId  - Resource
Pulumiverse.
Scaleway. Outputs. Get Ipam Ips Resource  - The list of public IPs of the server.
 - 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
[]Get
Ipam Ips Ip  - List of found IPs
 - Organization
Id string - Project
Id string - The ID of the project the server is associated with.
 - Region string
 - The region in which the IP is.
 - Zonal string
 - Attached bool
 - Mac
Address string - The mac address.
 - Private
Network stringId  - Resource
Get
Ipam Ips Resource  - The list of public IPs of the server.
 - []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<Get
Ipam Ips Ip>  - List of found IPs
 - organization
Id String - project
Id String - The ID of the project the server is associated with.
 - region String
 - The region in which the IP is.
 - zonal String
 - attached Boolean
 - mac
Address String - The mac address.
 - private
Network StringId  - resource
Get
Ipam Ips Resource  - The list of public IPs of the server.
 - 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
Get
Ipam Ips Ip[]  - List of found IPs
 - organization
Id string - project
Id string - The ID of the project the server is associated with.
 - region string
 - The region in which the IP is.
 - zonal string
 - attached boolean
 - mac
Address string - The mac address.
 - private
Network stringId  - resource
Get
Ipam Ips Resource  - The list of public IPs of the server.
 - 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[Get
Ipam Ips Ip]  - 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_ strid  - resource
Get
Ipam Ips Resource  - The list of public IPs of the server.
 - 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
 - organization
Id String - project
Id String - The ID of the project the server is associated with.
 - region String
 - The region in which the IP is.
 - zonal String
 - attached Boolean
 - mac
Address String - The mac address.
 - private
Network StringId  - resource Property Map
 - The list of public IPs of the server.
 - 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.
 - Created
At string - The date and time of the creation of the IP.
 - Id string
 - The ID of the resource.
 - Project
Id string - The ID of the project used as filter.
 - Region string
 - The region used as filter.
 - Resources
List<Pulumiverse.
Scaleway. Inputs. Get Ipam Ips Ip Resource>  - Filter by resource ID, type or name.
 - List<string>
 - The tags used as filter.
 - Updated
At 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.
 - Created
At string - The date and time of the creation of the IP.
 - Id string
 - The ID of the resource.
 - Project
Id string - The ID of the project used as filter.
 - Region string
 - The region used as filter.
 - Resources
[]Get
Ipam Ips Ip Resource  - Filter by resource ID, type or name.
 - []string
 - The tags used as filter.
 - Updated
At 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.
 - created
At String - The date and time of the creation of the IP.
 - id String
 - The ID of the resource.
 - project
Id String - The ID of the project used as filter.
 - region String
 - The region used as filter.
 - resources
List<Get
Ipam Ips Ip Resource>  - Filter by resource ID, type or name.
 - List<String>
 - The tags used as filter.
 - updated
At 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.
 - created
At string - The date and time of the creation of the IP.
 - id string
 - The ID of the resource.
 - project
Id string - The ID of the project used as filter.
 - region string
 - The region used as filter.
 - resources
Get
Ipam Ips Ip Resource[]  - Filter by resource ID, type or name.
 - string[]
 - The tags used as filter.
 - updated
At 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.
 - project_
id str - The ID of the project used as filter.
 - region str
 - The region used as filter.
 - resources
Sequence[Get
Ipam Ips Ip Resource]  - Filter by resource ID, type or name.
 - 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.
 - created
At String - The date and time of the creation of the IP.
 - id String
 - The ID of the resource.
 - project
Id 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.
 - List<String>
 - The tags used as filter.
 - updated
At 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.
 - Mac
Address 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.
 - Mac
Address 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.
 - mac
Address 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.
 - mac
Address 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.
 - mac
Address 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 
scalewayTerraform Provider.