Scaleway v1.20.0 published on Monday, Nov 4, 2024 by pulumiverse
scaleway.getIpamIps
Explore with Pulumi AI
Gets information about multiple IP addresses managed by Scaleway’s IP Address Management (IPAM) service.
For more information about IPAM, see the main documentation.
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", {name: "my vpc"});
const pn01 = new scaleway.VpcPrivateNetwork("pn01", {
vpcId: vpc01.id,
ipv4Subnet: {
subnet: "172.16.32.0/22",
},
});
const redis01 = new scaleway.RedisCluster("redis01", {
name: "my_redis_cluster",
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", name="my vpc")
pn01 = scaleway.VpcPrivateNetwork("pn01",
vpc_id=vpc01.id,
ipv4_subnet={
"subnet": "172.16.32.0/22",
})
redis01 = scaleway.RedisCluster("redis01",
name="my_redis_cluster",
version="7.0.5",
node_type="RED1-XS",
user_name="my_initial_user",
password="thiZ_is_v&ry_s3cret",
cluster_size=3,
private_networks=[{
"id": pn01.id,
}])
by_type_and_resource = scaleway.get_ipam_ips_output(type="ipv4",
resource={
"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", &scaleway.VpcArgs{
Name: pulumi.String("my vpc"),
})
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{
Name: pulumi.String("my_redis_cluster"),
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", new()
{
Name = "my vpc",
});
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()
{
Name = "my_redis_cluster",
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.VpcArgs;
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", VpcArgs.builder()
.name("my vpc")
.build());
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()
.name("my_redis_cluster")
.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
properties:
name: my vpc
pn01:
type: scaleway:VpcPrivateNetwork
properties:
vpcId: ${vpc01.id}
ipv4Subnet:
subnet: 172.16.32.0/22
redis01:
type: scaleway:RedisCluster
properties:
name: my_redis_cluster
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.
- Mac
Address string - The linked MAC address to filter for.
- Private
Network stringId - The ID of the Private Network to filter for.
- Project
Id string - The ID of the Project to filter for.
- Region string
- The region to filter for.
- Resource
Pulumiverse.
Scaleway. Inputs. Get Ipam Ips Resource - Filter for a resource attached to the IP, using resource ID, type or name.
- List<string>
- The IP tags to filter for.
- Type string
- The type of IP to filter for (
ipv4
oripv6
). - 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 linked MAC address to filter for.
- Private
Network stringId - The ID of the Private Network to filter for.
- Project
Id string - The ID of the Project to filter for.
- Region string
- The region to filter for.
- Resource
Get
Ipam Ips Resource - Filter for a resource attached to the IP, using resource ID, type or name.
- []string
- The IP tags to filter for.
- Type string
- The type of IP to filter for (
ipv4
oripv6
). - 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 linked MAC address to filter for.
- private
Network StringId - The ID of the Private Network to filter for.
- project
Id String - The ID of the Project to filter for.
- region String
- The region to filter for.
- resource
Get
Ipam Ips Resource - Filter for a resource attached to the IP, using resource ID, type or name.
- List<String>
- The IP tags to filter for.
- type String
- The type of IP to filter for (
ipv4
oripv6
). - 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 linked MAC address to filter for.
- private
Network stringId - The ID of the Private Network to filter for.
- project
Id string - The ID of the Project to filter for.
- region string
- The region to filter for.
- resource
Get
Ipam Ips Resource - Filter for a resource attached to the IP, using resource ID, type or name.
- string[]
- The IP tags to filter for.
- type string
- The type of IP to filter for (
ipv4
oripv6
). - 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 linked MAC address to filter for.
- private_
network_ strid - The ID of the Private Network to filter for.
- project_
id str - The ID of the Project to filter for.
- region str
- The region to filter for.
- resource
Get
Ipam Ips Resource - Filter for a resource attached to the IP, using resource ID, type or name.
- Sequence[str]
- The IP tags to filter for.
- type str
- The type of IP to filter for (
ipv4
oripv6
). - 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 linked MAC address to filter for.
- private
Network StringId - The ID of the Private Network to filter for.
- project
Id String - The ID of the Project to filter for.
- region String
- The region to filter for.
- resource Property Map
- Filter for a resource attached to the IP, using resource ID, type or name.
- List<String>
- The IP tags to filter for.
- type String
- The type of IP to filter for (
ipv4
oripv6
). - 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 resource is associated with.
- Region string
- The region of the IP.
- Zonal string
- Attached bool
- Mac
Address string - The associated MAC address.
- Private
Network stringId - Resource
Pulumiverse.
Scaleway. Outputs. Get Ipam Ips Resource - The list of public IPs attached to the resource.
- 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 resource is associated with.
- Region string
- The region of the IP.
- Zonal string
- Attached bool
- Mac
Address string - The associated MAC address.
- Private
Network stringId - Resource
Get
Ipam Ips Resource - The list of public IPs attached to the resource.
- []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 resource is associated with.
- region String
- The region of the IP.
- zonal String
- attached Boolean
- mac
Address String - The associated MAC address.
- private
Network StringId - resource
Get
Ipam Ips Resource - The list of public IPs attached to the resource.
- 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 resource is associated with.
- region string
- The region of the IP.
- zonal string
- attached boolean
- mac
Address string - The associated MAC address.
- private
Network stringId - resource
Get
Ipam Ips Resource - The list of public IPs attached to the resource.
- 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 resource is associated with.
- region str
- The region of the IP.
- zonal str
- attached bool
- mac_
address str - The associated MAC address.
- private_
network_ strid - resource
Get
Ipam Ips Resource - The list of public IPs attached to the resource.
- 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 resource is associated with.
- region String
- The region of the IP.
- zonal String
- attached Boolean
- mac
Address String - The associated MAC address.
- private
Network StringId - resource Property Map
- The list of public IPs attached to the resource.
- 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 resource.
- 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 to filter for.
- Region string
- The region to filter for.
- Resources
List<Pulumiverse.
Scaleway. Inputs. Get Ipam Ips Ip Resource> - Filter for a resource attached to the IP, using resource ID, type or name.
- List<string>
- The IP tags to filter for.
- Updated
At string - The date and time of the last update of the IP.
- Zone string
- The zone of the IP.
- Address string
- The Scaleway internal IP address of the resource.
- 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 to filter for.
- Region string
- The region to filter for.
- Resources
[]Get
Ipam Ips Ip Resource - Filter for a resource attached to the IP, using resource ID, type or name.
- []string
- The IP tags to filter for.
- Updated
At string - The date and time of the last update of the IP.
- Zone string
- The zone of the IP.
- address String
- The Scaleway internal IP address of the resource.
- 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 to filter for.
- region String
- The region to filter for.
- resources
List<Get
Ipam Ips Ip Resource> - Filter for a resource attached to the IP, using resource ID, type or name.
- List<String>
- The IP tags to filter for.
- updated
At String - The date and time of the last update of the IP.
- zone String
- The zone of the IP.
- address string
- The Scaleway internal IP address of the resource.
- 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 to filter for.
- region string
- The region to filter for.
- resources
Get
Ipam Ips Ip Resource[] - Filter for a resource attached to the IP, using resource ID, type or name.
- string[]
- The IP tags to filter for.
- updated
At string - The date and time of the last update of the IP.
- zone string
- The zone of the IP.
- address str
- The Scaleway internal IP address of the resource.
- 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 to filter for.
- region str
- The region to filter for.
- resources
Sequence[Get
Ipam Ips Ip Resource] - Filter for a resource attached to the IP, using resource ID, type or name.
- Sequence[str]
- The IP tags to filter for.
- updated_
at str - The date and time of the last update of the IP.
- zone str
- The zone of the IP.
- address String
- The Scaleway internal IP address of the resource.
- 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 to filter for.
- region String
- The region to filter for.
- resources List<Property Map>
- Filter for a resource attached to the IP, using resource ID, type or name.
- List<String>
- The IP tags to filter for.
- updated
At String - The date and time of the last update of the IP.
- zone String
- The zone of the IP.
GetIpamIpsIpResource
- Id string
- The ID of the attached resource.
- Mac
Address string - The linked MAC address to filter for.
- Name string
- The name of the attached resource.
- Type string
- The type of the attached resource. Documentation with type list.
- Id string
- The ID of the attached resource.
- Mac
Address string - The linked MAC address to filter for.
- Name string
- The name of the attached resource.
- Type string
- The type of the attached resource. Documentation with type list.
- id String
- The ID of the attached resource.
- mac
Address String - The linked MAC address to filter for.
- name String
- The name of the attached resource.
- type String
- The type of the attached resource. Documentation with type list.
- id string
- The ID of the attached resource.
- mac
Address string - The linked MAC address to filter for.
- name string
- The name of the attached resource.
- type string
- The type of the attached resource. Documentation with type list.
- id str
- The ID of the attached resource.
- mac_
address str - The linked MAC address to filter for.
- name str
- The name of the attached resource.
- type str
- The type of the attached resource. Documentation with type list.
- id String
- The ID of the attached resource.
- mac
Address String - The linked MAC address to filter for.
- name String
- The name of the attached resource.
- type String
- The type of the attached resource. Documentation with type list.
GetIpamIpsResource
- Type string
- The type of the attached resource. Documentation with type list.
- Id string
- The ID of the attached resource.
- Name string
- The name of the attached resource.
- Type string
- The type of the attached resource. Documentation with type list.
- Id string
- The ID of the attached resource.
- Name string
- The name of the attached resource.
- type String
- The type of the attached resource. Documentation with type list.
- id String
- The ID of the attached resource.
- name String
- The name of the attached resource.
- type string
- The type of the attached resource. Documentation with type list.
- id string
- The ID of the attached resource.
- name string
- The name of the attached resource.
- type str
- The type of the attached resource. Documentation with type list.
- id str
- The ID of the attached resource.
- name str
- The name of the attached resource.
- type String
- The type of the attached resource. Documentation with type list.
- id String
- The ID of the attached resource.
- name String
- The name of the attached resource.
Package Details
- Repository
- scaleway pulumiverse/pulumi-scaleway
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
scaleway
Terraform Provider.