Scaleway v1.27.0 published on Monday, Apr 21, 2025 by pulumiverse
scaleway.network.getVpc
Explore with Pulumi AI
Gets information about a Scaleway Virtual Private Cloud.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumi/scaleway";
// Get info by name
const byName = scaleway.network.getVpc({
    name: "foobar",
});
// Get info by ID
const byId = scaleway.network.getVpc({
    vpcId: "11111111-1111-1111-1111-111111111111",
});
// Get default VPC info
const _default = scaleway.network.getVpc({
    isDefault: true,
});
import pulumi
import pulumi_scaleway as scaleway
# Get info by name
by_name = scaleway.network.get_vpc(name="foobar")
# Get info by ID
by_id = scaleway.network.get_vpc(vpc_id="11111111-1111-1111-1111-111111111111")
# Get default VPC info
default = scaleway.network.get_vpc(is_default=True)
package main
import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/network"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// Get info by name
		_, err := network.LookupVpc(ctx, &network.LookupVpcArgs{
			Name: pulumi.StringRef("foobar"),
		}, nil)
		if err != nil {
			return err
		}
		// Get info by ID
		_, err = network.LookupVpc(ctx, &network.LookupVpcArgs{
			VpcId: pulumi.StringRef("11111111-1111-1111-1111-111111111111"),
		}, nil)
		if err != nil {
			return err
		}
		// Get default VPC info
		_, err = network.LookupVpc(ctx, &network.LookupVpcArgs{
			IsDefault: pulumi.BoolRef(true),
		}, 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(() => 
{
    // Get info by name
    var byName = Scaleway.Network.GetVpc.Invoke(new()
    {
        Name = "foobar",
    });
    // Get info by ID
    var byId = Scaleway.Network.GetVpc.Invoke(new()
    {
        VpcId = "11111111-1111-1111-1111-111111111111",
    });
    // Get default VPC info
    var @default = Scaleway.Network.GetVpc.Invoke(new()
    {
        IsDefault = true,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.network.NetworkFunctions;
import com.pulumi.scaleway.network.inputs.GetVpcArgs;
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) {
        // Get info by name
        final var byName = NetworkFunctions.getVpc(GetVpcArgs.builder()
            .name("foobar")
            .build());
        // Get info by ID
        final var byId = NetworkFunctions.getVpc(GetVpcArgs.builder()
            .vpcId("11111111-1111-1111-1111-111111111111")
            .build());
        // Get default VPC info
        final var default = NetworkFunctions.getVpc(GetVpcArgs.builder()
            .isDefault(true)
            .build());
    }
}
variables:
  # Get info by name
  byName:
    fn::invoke:
      function: scaleway:network:getVpc
      arguments:
        name: foobar
  # Get info by ID
  byId:
    fn::invoke:
      function: scaleway:network:getVpc
      arguments:
        vpcId: 11111111-1111-1111-1111-111111111111
  # Get default VPC info
  default:
    fn::invoke:
      function: scaleway:network:getVpc
      arguments:
        isDefault: true
Using getVpc
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 getVpc(args: GetVpcArgs, opts?: InvokeOptions): Promise<GetVpcResult>
function getVpcOutput(args: GetVpcOutputArgs, opts?: InvokeOptions): Output<GetVpcResult>def get_vpc(is_default: Optional[bool] = None,
            name: Optional[str] = None,
            organization_id: Optional[str] = None,
            project_id: Optional[str] = None,
            region: Optional[str] = None,
            vpc_id: Optional[str] = None,
            opts: Optional[InvokeOptions] = None) -> GetVpcResult
def get_vpc_output(is_default: Optional[pulumi.Input[bool]] = None,
            name: Optional[pulumi.Input[str]] = None,
            organization_id: Optional[pulumi.Input[str]] = None,
            project_id: Optional[pulumi.Input[str]] = None,
            region: Optional[pulumi.Input[str]] = None,
            vpc_id: Optional[pulumi.Input[str]] = None,
            opts: Optional[InvokeOptions] = None) -> Output[GetVpcResult]func LookupVpc(ctx *Context, args *LookupVpcArgs, opts ...InvokeOption) (*LookupVpcResult, error)
func LookupVpcOutput(ctx *Context, args *LookupVpcOutputArgs, opts ...InvokeOption) LookupVpcResultOutput> Note: This function is named LookupVpc in the Go SDK.
public static class GetVpc 
{
    public static Task<GetVpcResult> InvokeAsync(GetVpcArgs args, InvokeOptions? opts = null)
    public static Output<GetVpcResult> Invoke(GetVpcInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetVpcResult> getVpc(GetVpcArgs args, InvokeOptions options)
public static Output<GetVpcResult> getVpc(GetVpcArgs args, InvokeOptions options)
fn::invoke:
  function: scaleway:network/getVpc:getVpc
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Is
Default bool - Whether the targeted VPC is the default VPC.
 - Name string
 - Name of the VPC. A maximum of one of 
nameandvpc_idshould be specified. - Organization
Id string - The ID of the Organization the VPC is associated with.
 - Project
Id string project_id) The ID of the Project the VPC is associated with.- Region string
 - Vpc
Id string - ID of the VPC. A maximum of one of 
nameandvpc_idshould be specified. 
- Is
Default bool - Whether the targeted VPC is the default VPC.
 - Name string
 - Name of the VPC. A maximum of one of 
nameandvpc_idshould be specified. - Organization
Id string - The ID of the Organization the VPC is associated with.
 - Project
Id string project_id) The ID of the Project the VPC is associated with.- Region string
 - Vpc
Id string - ID of the VPC. A maximum of one of 
nameandvpc_idshould be specified. 
- is
Default Boolean - Whether the targeted VPC is the default VPC.
 - name String
 - Name of the VPC. A maximum of one of 
nameandvpc_idshould be specified. - organization
Id String - The ID of the Organization the VPC is associated with.
 - project
Id String project_id) The ID of the Project the VPC is associated with.- region String
 - vpc
Id String - ID of the VPC. A maximum of one of 
nameandvpc_idshould be specified. 
- is
Default boolean - Whether the targeted VPC is the default VPC.
 - name string
 - Name of the VPC. A maximum of one of 
nameandvpc_idshould be specified. - organization
Id string - The ID of the Organization the VPC is associated with.
 - project
Id string project_id) The ID of the Project the VPC is associated with.- region string
 - vpc
Id string - ID of the VPC. A maximum of one of 
nameandvpc_idshould be specified. 
- is_
default bool - Whether the targeted VPC is the default VPC.
 - name str
 - Name of the VPC. A maximum of one of 
nameandvpc_idshould be specified. - organization_
id str - The ID of the Organization the VPC is associated with.
 - project_
id str project_id) The ID of the Project the VPC is associated with.- region str
 - vpc_
id str - ID of the VPC. A maximum of one of 
nameandvpc_idshould be specified. 
- is
Default Boolean - Whether the targeted VPC is the default VPC.
 - name String
 - Name of the VPC. A maximum of one of 
nameandvpc_idshould be specified. - organization
Id String - The ID of the Organization the VPC is associated with.
 - project
Id String project_id) The ID of the Project the VPC is associated with.- region String
 - vpc
Id String - ID of the VPC. A maximum of one of 
nameandvpc_idshould be specified. 
getVpc Result
The following output properties are available:
- Created
At string - Enable
Routing bool - Id string
 - The provider-assigned unique ID for this managed resource.
 - Organization
Id string - List<string>
 - Updated
At string - Is
Default bool - Name string
 - Project
Id string - Region string
 - Vpc
Id string 
- Created
At string - Enable
Routing bool - Id string
 - The provider-assigned unique ID for this managed resource.
 - Organization
Id string - []string
 - Updated
At string - Is
Default bool - Name string
 - Project
Id string - Region string
 - Vpc
Id string 
- created
At String - enable
Routing Boolean - id String
 - The provider-assigned unique ID for this managed resource.
 - organization
Id String - List<String>
 - updated
At String - is
Default Boolean - name String
 - project
Id String - region String
 - vpc
Id String 
- created
At string - enable
Routing boolean - id string
 - The provider-assigned unique ID for this managed resource.
 - organization
Id string - string[]
 - updated
At string - is
Default boolean - name string
 - project
Id string - region string
 - vpc
Id string 
- created_
at str - enable_
routing bool - id str
 - The provider-assigned unique ID for this managed resource.
 - organization_
id str - Sequence[str]
 - updated_
at str - is_
default bool - name str
 - project_
id str - region str
 - vpc_
id str 
- created
At String - enable
Routing Boolean - id String
 - The provider-assigned unique ID for this managed resource.
 - organization
Id String - List<String>
 - updated
At String - is
Default Boolean - name String
 - project
Id String - region String
 - vpc
Id String 
Package Details
- Repository
 - scaleway pulumiverse/pulumi-scaleway
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
scalewayTerraform Provider.