Scaleway v1.20.0 published on Monday, Nov 4, 2024 by pulumiverse
scaleway.getVpcGatewayNetwork
Explore with Pulumi AI
Gets information about a GatewayNetwork (a connection between a Public Gateway and a Private Network).
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumi/scaleway";
import * as scaleway from "@pulumiverse/scaleway";
const main = new scaleway.VpcGatewayNetwork("main", {
gatewayId: pg01.id,
privateNetworkId: pn01.id,
dhcpId: dhcp01.id,
cleanupDhcp: true,
enableMasquerade: true,
});
const byId = scaleway.getVpcGatewayNetworkOutput({
gatewayNetworkId: main.id,
});
const byGatewayAndPn = scaleway.getVpcGatewayNetwork({
gatewayId: pg01.id,
privateNetworkId: pn01.id,
});
import pulumi
import pulumi_scaleway as scaleway
import pulumiverse_scaleway as scaleway
main = scaleway.VpcGatewayNetwork("main",
gateway_id=pg01["id"],
private_network_id=pn01["id"],
dhcp_id=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=pg01["id"],
private_network_id=pn01["id"])
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 {
main, err := scaleway.NewVpcGatewayNetwork(ctx, "main", &scaleway.VpcGatewayNetworkArgs{
GatewayId: pulumi.Any(pg01.Id),
PrivateNetworkId: pulumi.Any(pn01.Id),
DhcpId: pulumi.Any(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(pg01.Id),
PrivateNetworkId: pulumi.StringRef(pn01.Id),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumi.Scaleway;
using Scaleway = Pulumiverse.Scaleway;
return await Deployment.RunAsync(() =>
{
var main = new Scaleway.VpcGatewayNetwork("main", new()
{
GatewayId = pg01.Id,
PrivateNetworkId = pn01.Id,
DhcpId = dhcp01.Id,
CleanupDhcp = true,
EnableMasquerade = true,
});
var byId = Scaleway.GetVpcGatewayNetwork.Invoke(new()
{
GatewayNetworkId = main.Id,
});
var byGatewayAndPn = Scaleway.GetVpcGatewayNetwork.Invoke(new()
{
GatewayId = pg01.Id,
PrivateNetworkId = pn01.Id,
});
});
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(pg01.id())
.privateNetworkId(pn01.id())
.dhcpId(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(pg01.id())
.privateNetworkId(pn01.id())
.build());
}
}
resources:
main:
type: scaleway:VpcGatewayNetwork
properties:
gatewayId: ${pg01.id}
privateNetworkId: ${pn01.id}
dhcpId: ${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: ${pg01.id}
privateNetworkId: ${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:
- Dhcp
Id string - Enable
Masquerade bool - Gateway
Id string - Gateway
Network stringId - ID of the GatewayNetwork.
- Private
Network stringId
- Dhcp
Id string - Enable
Masquerade bool - Gateway
Id string - Gateway
Network stringId - ID of the GatewayNetwork.
- Private
Network stringId
- dhcp
Id String - enable
Masquerade Boolean - gateway
Id String - gateway
Network StringId - ID of the GatewayNetwork.
- private
Network StringId
- dhcp
Id string - enable
Masquerade boolean - gateway
Id string - gateway
Network stringId - ID of the GatewayNetwork.
- private
Network stringId
- dhcp_
id str - enable_
masquerade bool - gateway_
id str - gateway_
network_ strid - ID of the GatewayNetwork.
- private_
network_ strid
- dhcp
Id String - enable
Masquerade Boolean - gateway
Id String - gateway
Network StringId - ID of the GatewayNetwork.
- private
Network StringId
getVpcGatewayNetwork Result
The following output properties are available:
- Cleanup
Dhcp bool - Created
At string - Enable
Dhcp bool - Id string
- The provider-assigned unique ID for this managed resource.
- Ipam
Configs List<Pulumiverse.Scaleway. Outputs. Get Vpc Gateway Network Ipam Config> - Mac
Address string - Static
Address string - Status string
- Updated
At string - Zone string
- Dhcp
Id string - Enable
Masquerade bool - Gateway
Id string - Gateway
Network stringId - Private
Network stringId
- Cleanup
Dhcp bool - Created
At string - Enable
Dhcp bool - Id string
- The provider-assigned unique ID for this managed resource.
- Ipam
Configs []GetVpc Gateway Network Ipam Config - Mac
Address string - Static
Address string - Status string
- Updated
At string - Zone string
- Dhcp
Id string - Enable
Masquerade bool - Gateway
Id string - Gateway
Network stringId - Private
Network stringId
- cleanup
Dhcp Boolean - created
At String - enable
Dhcp Boolean - id String
- The provider-assigned unique ID for this managed resource.
- ipam
Configs List<GetVpc Gateway Network Ipam Config> - mac
Address String - static
Address String - status String
- updated
At String - zone String
- dhcp
Id String - enable
Masquerade Boolean - gateway
Id String - gateway
Network StringId - private
Network StringId
- cleanup
Dhcp boolean - created
At string - enable
Dhcp boolean - id string
- The provider-assigned unique ID for this managed resource.
- ipam
Configs GetVpc Gateway Network Ipam Config[] - mac
Address string - static
Address string - status string
- updated
At string - zone string
- dhcp
Id string - enable
Masquerade boolean - gateway
Id string - gateway
Network stringId - private
Network stringId
- cleanup_
dhcp bool - created_
at str - enable_
dhcp bool - id str
- The provider-assigned unique ID for this managed resource.
- ipam_
configs Sequence[GetVpc Gateway Network Ipam Config] - mac_
address str - static_
address str - status str
- updated_
at str - zone str
- dhcp_
id str - enable_
masquerade bool - gateway_
id str - gateway_
network_ strid - private_
network_ strid
- cleanup
Dhcp Boolean - created
At String - enable
Dhcp Boolean - id String
- The provider-assigned unique ID for this managed resource.
- ipam
Configs List<Property Map> - mac
Address String - static
Address String - status String
- updated
At String - zone String
- dhcp
Id String - enable
Masquerade Boolean - gateway
Id String - gateway
Network StringId - private
Network StringId
Supporting Types
GetVpcGatewayNetworkIpamConfig
- Ipam
Ip stringId - Use this IPAM-booked IP ID as the Gateway's IP in this Private Network
- Push
Default boolRoute - Defines whether the default route is enabled on that Gateway Network
- Ipam
Ip stringId - Use this IPAM-booked IP ID as the Gateway's IP in this Private Network
- Push
Default boolRoute - Defines whether the default route is enabled on that Gateway Network
- ipam
Ip StringId - Use this IPAM-booked IP ID as the Gateway's IP in this Private Network
- push
Default BooleanRoute - Defines whether the default route is enabled on that Gateway Network
- ipam
Ip stringId - Use this IPAM-booked IP ID as the Gateway's IP in this Private Network
- push
Default booleanRoute - Defines whether the default route is enabled on that Gateway Network
- ipam_
ip_ strid - Use this IPAM-booked IP ID as the Gateway's IP in this Private Network
- push_
default_ boolroute - Defines whether the default route is enabled on that Gateway Network
- ipam
Ip StringId - Use this IPAM-booked IP ID as the Gateway's IP in this Private Network
- push
Default BooleanRoute - Defines whether the default route is enabled on that Gateway Network
Package Details
- Repository
- scaleway pulumiverse/pulumi-scaleway
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
scaleway
Terraform Provider.