1. Packages
  2. Scaleway
  3. API Docs
  4. getVpcGatewayNetwork
Scaleway v1.10.0 published on Saturday, Jul 1, 2023 by lbrlabs

scaleway.getVpcGatewayNetwork

Explore with Pulumi AI

scaleway logo
Scaleway v1.10.0 published on Saturday, Jul 1, 2023 by lbrlabs

    Gets information about a gateway network.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Lbrlabs.PulumiPackage.Scaleway;
    using Scaleway = Pulumi.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        var main = new Scaleway.VpcGatewayNetwork("main", new()
        {
            GatewayId = scaleway_vpc_public_gateway.Pg01.Id,
            PrivateNetworkId = scaleway_vpc_private_network.Pn01.Id,
            DhcpId = scaleway_vpc_public_gateway_dhcp.Dhcp01.Id,
            CleanupDhcp = true,
            EnableMasquerade = true,
        });
    
        var byId = Scaleway.GetVpcGatewayNetwork.Invoke(new()
        {
            GatewayNetworkId = main.Id,
        });
    
        var byGatewayAndPn = Scaleway.GetVpcGatewayNetwork.Invoke(new()
        {
            GatewayId = scaleway_vpc_public_gateway.Pg01.Id,
            PrivateNetworkId = scaleway_vpc_private_network.Pn01.Id,
        });
    
    });
    
    package main
    
    import (
    	"github.com/lbrlabs/pulumi-scaleway/sdk/go/scaleway"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		main, err := scaleway.NewVpcGatewayNetwork(ctx, "main", &scaleway.VpcGatewayNetworkArgs{
    			GatewayId:        pulumi.Any(scaleway_vpc_public_gateway.Pg01.Id),
    			PrivateNetworkId: pulumi.Any(scaleway_vpc_private_network.Pn01.Id),
    			DhcpId:           pulumi.Any(scaleway_vpc_public_gateway_dhcp.Dhcp01.Id),
    			CleanupDhcp:      pulumi.Bool(true),
    			EnableMasquerade: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		_ = scaleway.LookupVpcGatewayNetworkOutput(ctx, scaleway.GetVpcGatewayNetworkOutputArgs{
    			GatewayNetworkId: main.ID(),
    		}, nil)
    		_, err = scaleway.LookupVpcGatewayNetwork(ctx, &scaleway.LookupVpcGatewayNetworkArgs{
    			GatewayId:        pulumi.StringRef(scaleway_vpc_public_gateway.Pg01.Id),
    			PrivateNetworkId: pulumi.StringRef(scaleway_vpc_private_network.Pn01.Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.VpcGatewayNetwork;
    import com.pulumi.scaleway.VpcGatewayNetworkArgs;
    import com.pulumi.scaleway.ScalewayFunctions;
    import com.pulumi.scaleway.inputs.GetVpcGatewayNetworkArgs;
    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 main = new VpcGatewayNetwork("main", VpcGatewayNetworkArgs.builder()        
                .gatewayId(scaleway_vpc_public_gateway.pg01().id())
                .privateNetworkId(scaleway_vpc_private_network.pn01().id())
                .dhcpId(scaleway_vpc_public_gateway_dhcp.dhcp01().id())
                .cleanupDhcp(true)
                .enableMasquerade(true)
                .build());
    
            final var byId = ScalewayFunctions.getVpcGatewayNetwork(GetVpcGatewayNetworkArgs.builder()
                .gatewayNetworkId(main.id())
                .build());
    
            final var byGatewayAndPn = ScalewayFunctions.getVpcGatewayNetwork(GetVpcGatewayNetworkArgs.builder()
                .gatewayId(scaleway_vpc_public_gateway.pg01().id())
                .privateNetworkId(scaleway_vpc_private_network.pn01().id())
                .build());
    
        }
    }
    
    import pulumi
    import lbrlabs_pulumi_scaleway as scaleway
    import pulumi_scaleway as scaleway
    
    main = scaleway.VpcGatewayNetwork("main",
        gateway_id=scaleway_vpc_public_gateway["pg01"]["id"],
        private_network_id=scaleway_vpc_private_network["pn01"]["id"],
        dhcp_id=scaleway_vpc_public_gateway_dhcp["dhcp01"]["id"],
        cleanup_dhcp=True,
        enable_masquerade=True)
    by_id = scaleway.get_vpc_gateway_network_output(gateway_network_id=main.id)
    by_gateway_and_pn = scaleway.get_vpc_gateway_network(gateway_id=scaleway_vpc_public_gateway["pg01"]["id"],
        private_network_id=scaleway_vpc_private_network["pn01"]["id"])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@lbrlabs/pulumi-scaleway";
    import * as scaleway from "@pulumi/scaleway";
    
    const main = new scaleway.VpcGatewayNetwork("main", {
        gatewayId: scaleway_vpc_public_gateway.pg01.id,
        privateNetworkId: scaleway_vpc_private_network.pn01.id,
        dhcpId: scaleway_vpc_public_gateway_dhcp.dhcp01.id,
        cleanupDhcp: true,
        enableMasquerade: true,
    });
    const byId = scaleway.getVpcGatewayNetworkOutput({
        gatewayNetworkId: main.id,
    });
    const byGatewayAndPn = scaleway.getVpcGatewayNetwork({
        gatewayId: scaleway_vpc_public_gateway.pg01.id,
        privateNetworkId: scaleway_vpc_private_network.pn01.id,
    });
    
    resources:
      main:
        type: scaleway:VpcGatewayNetwork
        properties:
          gatewayId: ${scaleway_vpc_public_gateway.pg01.id}
          privateNetworkId: ${scaleway_vpc_private_network.pn01.id}
          dhcpId: ${scaleway_vpc_public_gateway_dhcp.dhcp01.id}
          cleanupDhcp: true
          enableMasquerade: true
    variables:
      byId:
        fn::invoke:
          Function: scaleway:getVpcGatewayNetwork
          Arguments:
            gatewayNetworkId: ${main.id}
      byGatewayAndPn:
        fn::invoke:
          Function: scaleway:getVpcGatewayNetwork
          Arguments:
            gatewayId: ${scaleway_vpc_public_gateway.pg01.id}
            privateNetworkId: ${scaleway_vpc_private_network.pn01.id}
    

    Using getVpcGatewayNetwork

    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 getVpcGatewayNetwork(args: GetVpcGatewayNetworkArgs, opts?: InvokeOptions): Promise<GetVpcGatewayNetworkResult>
    function getVpcGatewayNetworkOutput(args: GetVpcGatewayNetworkOutputArgs, opts?: InvokeOptions): Output<GetVpcGatewayNetworkResult>
    def get_vpc_gateway_network(dhcp_id: Optional[str] = None,
                                enable_masquerade: Optional[bool] = None,
                                gateway_id: Optional[str] = None,
                                gateway_network_id: Optional[str] = None,
                                private_network_id: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetVpcGatewayNetworkResult
    def get_vpc_gateway_network_output(dhcp_id: Optional[pulumi.Input[str]] = None,
                                enable_masquerade: Optional[pulumi.Input[bool]] = None,
                                gateway_id: Optional[pulumi.Input[str]] = None,
                                gateway_network_id: Optional[pulumi.Input[str]] = None,
                                private_network_id: Optional[pulumi.Input[str]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetVpcGatewayNetworkResult]
    func LookupVpcGatewayNetwork(ctx *Context, args *LookupVpcGatewayNetworkArgs, opts ...InvokeOption) (*LookupVpcGatewayNetworkResult, error)
    func LookupVpcGatewayNetworkOutput(ctx *Context, args *LookupVpcGatewayNetworkOutputArgs, opts ...InvokeOption) LookupVpcGatewayNetworkResultOutput

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

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

    The following arguments are supported:

    DhcpId string

    ID of the public gateway DHCP config

    EnableMasquerade bool

    If masquerade is enabled on requested network

    GatewayId string

    ID of the public gateway the gateway network is linked to

    GatewayNetworkId string

    ID of the gateway network.

    Only one of gateway_network_id or filters should be specified. You can use all the filters you want.

    PrivateNetworkId string

    ID of the private network the gateway network is linked to

    DhcpId string

    ID of the public gateway DHCP config

    EnableMasquerade bool

    If masquerade is enabled on requested network

    GatewayId string

    ID of the public gateway the gateway network is linked to

    GatewayNetworkId string

    ID of the gateway network.

    Only one of gateway_network_id or filters should be specified. You can use all the filters you want.

    PrivateNetworkId string

    ID of the private network the gateway network is linked to

    dhcpId String

    ID of the public gateway DHCP config

    enableMasquerade Boolean

    If masquerade is enabled on requested network

    gatewayId String

    ID of the public gateway the gateway network is linked to

    gatewayNetworkId String

    ID of the gateway network.

    Only one of gateway_network_id or filters should be specified. You can use all the filters you want.

    privateNetworkId String

    ID of the private network the gateway network is linked to

    dhcpId string

    ID of the public gateway DHCP config

    enableMasquerade boolean

    If masquerade is enabled on requested network

    gatewayId string

    ID of the public gateway the gateway network is linked to

    gatewayNetworkId string

    ID of the gateway network.

    Only one of gateway_network_id or filters should be specified. You can use all the filters you want.

    privateNetworkId string

    ID of the private network the gateway network is linked to

    dhcp_id str

    ID of the public gateway DHCP config

    enable_masquerade bool

    If masquerade is enabled on requested network

    gateway_id str

    ID of the public gateway the gateway network is linked to

    gateway_network_id str

    ID of the gateway network.

    Only one of gateway_network_id or filters should be specified. You can use all the filters you want.

    private_network_id str

    ID of the private network the gateway network is linked to

    dhcpId String

    ID of the public gateway DHCP config

    enableMasquerade Boolean

    If masquerade is enabled on requested network

    gatewayId String

    ID of the public gateway the gateway network is linked to

    gatewayNetworkId String

    ID of the gateway network.

    Only one of gateway_network_id or filters should be specified. You can use all the filters you want.

    privateNetworkId String

    ID of the private network the gateway network is linked to

    getVpcGatewayNetwork Result

    The following output properties are available:

    CleanupDhcp bool
    CreatedAt string
    EnableDhcp bool
    Id string

    The provider-assigned unique ID for this managed resource.

    MacAddress string
    StaticAddress string
    UpdatedAt string
    Zone string
    DhcpId string
    EnableMasquerade bool
    GatewayId string
    GatewayNetworkId string
    PrivateNetworkId string
    CleanupDhcp bool
    CreatedAt string
    EnableDhcp bool
    Id string

    The provider-assigned unique ID for this managed resource.

    MacAddress string
    StaticAddress string
    UpdatedAt string
    Zone string
    DhcpId string
    EnableMasquerade bool
    GatewayId string
    GatewayNetworkId string
    PrivateNetworkId string
    cleanupDhcp Boolean
    createdAt String
    enableDhcp Boolean
    id String

    The provider-assigned unique ID for this managed resource.

    macAddress String
    staticAddress String
    updatedAt String
    zone String
    dhcpId String
    enableMasquerade Boolean
    gatewayId String
    gatewayNetworkId String
    privateNetworkId String
    cleanupDhcp boolean
    createdAt string
    enableDhcp boolean
    id string

    The provider-assigned unique ID for this managed resource.

    macAddress string
    staticAddress string
    updatedAt string
    zone string
    dhcpId string
    enableMasquerade boolean
    gatewayId string
    gatewayNetworkId string
    privateNetworkId string
    cleanup_dhcp bool
    created_at str
    enable_dhcp bool
    id str

    The provider-assigned unique ID for this managed resource.

    mac_address str
    static_address str
    updated_at str
    zone str
    dhcp_id str
    enable_masquerade bool
    gateway_id str
    gateway_network_id str
    private_network_id str
    cleanupDhcp Boolean
    createdAt String
    enableDhcp Boolean
    id String

    The provider-assigned unique ID for this managed resource.

    macAddress String
    staticAddress String
    updatedAt String
    zone String
    dhcpId String
    enableMasquerade Boolean
    gatewayId String
    gatewayNetworkId String
    privateNetworkId String

    Package Details

    Repository
    scaleway lbrlabs/pulumi-scaleway
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the scaleway Terraform Provider.

    scaleway logo
    Scaleway v1.10.0 published on Saturday, Jul 1, 2023 by lbrlabs