Vultr v2.21.1 published on Monday, Jul 22, 2024 by dirien
vultr.getVpc2
Explore with Pulumi AI
Get information about a Vultr VPC 2.0.
Example Usage
Get the information for a VPC 2.0 by description
:
import * as pulumi from "@pulumi/pulumi";
import * as vultr from "@pulumi/vultr";
const myVpc2 = vultr.getVpc2({
filters: [{
name: "description",
values: ["my-vpc2-description"],
}],
});
import pulumi
import pulumi_vultr as vultr
my_vpc2 = vultr.get_vpc2(filters=[vultr.GetVpc2FilterArgs(
name="description",
values=["my-vpc2-description"],
)])
package main
import (
"github.com/dirien/pulumi-vultr/sdk/v2/go/vultr"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vultr.LookupVpc2(ctx, &vultr.LookupVpc2Args{
Filters: []vultr.GetVpc2Filter{
{
Name: "description",
Values: []string{
"my-vpc2-description",
},
},
},
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vultr = Pulumi.Vultr;
return await Deployment.RunAsync(() =>
{
var myVpc2 = Vultr.GetVpc2.Invoke(new()
{
Filters = new[]
{
new Vultr.Inputs.GetVpc2FilterInputArgs
{
Name = "description",
Values = new[]
{
"my-vpc2-description",
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vultr.VultrFunctions;
import com.pulumi.vultr.inputs.GetVpc2Args;
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 myVpc2 = VultrFunctions.getVpc2(GetVpc2Args.builder()
.filters(GetVpc2FilterArgs.builder()
.name("description")
.values("my-vpc2-description")
.build())
.build());
}
}
variables:
myVpc2:
fn::invoke:
Function: vultr:getVpc2
Arguments:
filters:
- name: description
values:
- my-vpc2-description
Using getVpc2
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 getVpc2(args: GetVpc2Args, opts?: InvokeOptions): Promise<GetVpc2Result>
function getVpc2Output(args: GetVpc2OutputArgs, opts?: InvokeOptions): Output<GetVpc2Result>
def get_vpc2(filters: Optional[Sequence[GetVpc2Filter]] = None,
opts: Optional[InvokeOptions] = None) -> GetVpc2Result
def get_vpc2_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetVpc2FilterArgs]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetVpc2Result]
func LookupVpc2(ctx *Context, args *LookupVpc2Args, opts ...InvokeOption) (*LookupVpc2Result, error)
func LookupVpc2Output(ctx *Context, args *LookupVpc2OutputArgs, opts ...InvokeOption) LookupVpc2ResultOutput
> Note: This function is named LookupVpc2
in the Go SDK.
public static class GetVpc2
{
public static Task<GetVpc2Result> InvokeAsync(GetVpc2Args args, InvokeOptions? opts = null)
public static Output<GetVpc2Result> Invoke(GetVpc2InvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetVpc2Result> getVpc2(GetVpc2Args args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: vultr:index/getVpc2:getVpc2
arguments:
# arguments dictionary
The following arguments are supported:
- Filters
List<ediri.
Vultr. Inputs. Get Vpc2Filter> - Query parameters for finding VPCs 2.0.
- Filters
[]Get
Vpc2Filter - Query parameters for finding VPCs 2.0.
- filters
List<Get
Vpc2Filter> - Query parameters for finding VPCs 2.0.
- filters
Get
Vpc2Filter[] - Query parameters for finding VPCs 2.0.
- filters
Sequence[Get
Vpc2Filter] - Query parameters for finding VPCs 2.0.
- filters List<Property Map>
- Query parameters for finding VPCs 2.0.
getVpc2 Result
The following output properties are available:
- Date
Created string - The date the VPC 2.0 was added to your Vultr account.
- Description string
- The VPC 2.0's description.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ip
Block string - The IPv4 network address. For example: 10.1.1.0.
- Prefix
Length int - The number of bits for the netmask in CIDR notation. Example: 20
- Region string
- The ID of the region that the VPC 2.0 is in.
- Filters
List<ediri.
Vultr. Outputs. Get Vpc2Filter>
- Date
Created string - The date the VPC 2.0 was added to your Vultr account.
- Description string
- The VPC 2.0's description.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ip
Block string - The IPv4 network address. For example: 10.1.1.0.
- Prefix
Length int - The number of bits for the netmask in CIDR notation. Example: 20
- Region string
- The ID of the region that the VPC 2.0 is in.
- Filters
[]Get
Vpc2Filter
- date
Created String - The date the VPC 2.0 was added to your Vultr account.
- description String
- The VPC 2.0's description.
- id String
- The provider-assigned unique ID for this managed resource.
- ip
Block String - The IPv4 network address. For example: 10.1.1.0.
- prefix
Length Integer - The number of bits for the netmask in CIDR notation. Example: 20
- region String
- The ID of the region that the VPC 2.0 is in.
- filters
List<Get
Vpc2Filter>
- date
Created string - The date the VPC 2.0 was added to your Vultr account.
- description string
- The VPC 2.0's description.
- id string
- The provider-assigned unique ID for this managed resource.
- ip
Block string - The IPv4 network address. For example: 10.1.1.0.
- prefix
Length number - The number of bits for the netmask in CIDR notation. Example: 20
- region string
- The ID of the region that the VPC 2.0 is in.
- filters
Get
Vpc2Filter[]
- date_
created str - The date the VPC 2.0 was added to your Vultr account.
- description str
- The VPC 2.0's description.
- id str
- The provider-assigned unique ID for this managed resource.
- ip_
block str - The IPv4 network address. For example: 10.1.1.0.
- prefix_
length int - The number of bits for the netmask in CIDR notation. Example: 20
- region str
- The ID of the region that the VPC 2.0 is in.
- filters
Sequence[Get
Vpc2Filter]
- date
Created String - The date the VPC 2.0 was added to your Vultr account.
- description String
- The VPC 2.0's description.
- id String
- The provider-assigned unique ID for this managed resource.
- ip
Block String - The IPv4 network address. For example: 10.1.1.0.
- prefix
Length Number - The number of bits for the netmask in CIDR notation. Example: 20
- region String
- The ID of the region that the VPC 2.0 is in.
- filters List<Property Map>
Supporting Types
GetVpc2Filter
Package Details
- Repository
- vultr dirien/pulumi-vultr
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
vultr
Terraform Provider.