@lbrlabs/pulumi-scaleway
Version:
A Pulumi package for creating and managing scaleway cloud resources.
260 lines (259 loc) • 9.09 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
* Creates and manages Scaleway VPC Public Gateway Network.
* It allows attaching Private Networks to the VPC Public Gateway and your DHCP config
* For more information, see [the documentation](https://developers.scaleway.com/en/products/vpc-gw/api/v1/#step-3-attach-private-networks-to-the-vpc-public-gateway).
*
* ## Example
*
* ### Create a gateway network with DHCP
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@lbrlabs/pulumi-scaleway";
*
* const pn01 = new scaleway.VpcPrivateNetwork("pn01", {});
* const gw01 = new scaleway.VpcPublicGatewayIp("gw01", {});
* const dhcp01 = new scaleway.VpcPublicGatewayDhcp("dhcp01", {
* subnet: "192.168.1.0/24",
* pushDefaultRoute: true,
* });
* const pg01 = new scaleway.VpcPublicGateway("pg01", {
* type: "VPC-GW-S",
* ipId: gw01.id,
* });
* const main = new scaleway.VpcGatewayNetwork("main", {
* gatewayId: pg01.id,
* privateNetworkId: pn01.id,
* dhcpId: dhcp01.id,
* cleanupDhcp: true,
* enableMasquerade: true,
* });
* ```
*
* ### Create a gateway network with a static IP address
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@lbrlabs/pulumi-scaleway";
*
* const pn01 = new scaleway.VpcPrivateNetwork("pn01", {});
* const pg01 = new scaleway.VpcPublicGateway("pg01", {type: "VPC-GW-S"});
* const main = new scaleway.VpcGatewayNetwork("main", {
* gatewayId: pg01.id,
* privateNetworkId: pn01.id,
* enableDhcp: false,
* enableMasquerade: true,
* staticAddress: "192.168.1.42/24",
* });
* ```
*
* ### Create a gateway network with IPAM config
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@lbrlabs/pulumi-scaleway";
*
* const vpc01 = new scaleway.Vpc("vpc01", {});
* const pn01 = new scaleway.VpcPrivateNetwork("pn01", {
* ipv4Subnet: {
* subnet: "172.16.64.0/22",
* },
* vpcId: vpc01.id,
* });
* const pg01 = new scaleway.VpcPublicGateway("pg01", {type: "VPC-GW-S"});
* const main = new scaleway.VpcGatewayNetwork("main", {
* gatewayId: pg01.id,
* privateNetworkId: pn01.id,
* enableMasquerade: true,
* ipamConfigs: [{
* pushDefaultRoute: true,
* }],
* });
* ```
*
* ## Import
*
* Gateway network can be imported using the `{zone}/{id}`, e.g. bash
*
* ```sh
* $ pulumi import scaleway:index/vpcGatewayNetwork:VpcGatewayNetwork main fr-par-1/11111111-1111-1111-1111-111111111111
* ```
*/
export declare class VpcGatewayNetwork extends pulumi.CustomResource {
/**
* Get an existing VpcGatewayNetwork resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: VpcGatewayNetworkState, opts?: pulumi.CustomResourceOptions): VpcGatewayNetwork;
/**
* Returns true if the given object is an instance of VpcGatewayNetwork. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is VpcGatewayNetwork;
/**
* Remove DHCP config on this network on destroy. It requires DHCP id.
*/
readonly cleanupDhcp: pulumi.Output<boolean | undefined>;
/**
* The date and time of the creation of the gateway network.
*/
readonly createdAt: pulumi.Output<string>;
/**
* The ID of the public gateway DHCP config. Only one of `dhcpId`, `staticAddress` and `ipamConfig` should be specified.
*/
readonly dhcpId: pulumi.Output<string | undefined>;
/**
* Enable DHCP config on this network. It requires DHCP id.
*/
readonly enableDhcp: pulumi.Output<boolean | undefined>;
/**
* Enable masquerade on this network
*/
readonly enableMasquerade: pulumi.Output<boolean | undefined>;
/**
* The ID of the public gateway.
*/
readonly gatewayId: pulumi.Output<string>;
/**
* Auto-configure the Gateway Network using Scaleway's IPAM (IP address management service).
*/
readonly ipamConfigs: pulumi.Output<outputs.VpcGatewayNetworkIpamConfig[] | undefined>;
/**
* The mac address of the creation of the gateway network.
*/
readonly macAddress: pulumi.Output<string>;
/**
* The ID of the private network.
*/
readonly privateNetworkId: pulumi.Output<string>;
/**
* Enable DHCP config on this network. Only one of `dhcpId`, `staticAddress` and `ipamConfig` should be specified.
*/
readonly staticAddress: pulumi.Output<string>;
/**
* The status of the Public Gateway's connection to the Private Network.
*/
readonly status: pulumi.Output<string>;
/**
* The date and time of the last update of the gateway network.
*/
readonly updatedAt: pulumi.Output<string>;
/**
* `zone`) The zone in which the gateway network should be created.
*/
readonly zone: pulumi.Output<string>;
/**
* Create a VpcGatewayNetwork resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: VpcGatewayNetworkArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering VpcGatewayNetwork resources.
*/
export interface VpcGatewayNetworkState {
/**
* Remove DHCP config on this network on destroy. It requires DHCP id.
*/
cleanupDhcp?: pulumi.Input<boolean>;
/**
* The date and time of the creation of the gateway network.
*/
createdAt?: pulumi.Input<string>;
/**
* The ID of the public gateway DHCP config. Only one of `dhcpId`, `staticAddress` and `ipamConfig` should be specified.
*/
dhcpId?: pulumi.Input<string>;
/**
* Enable DHCP config on this network. It requires DHCP id.
*/
enableDhcp?: pulumi.Input<boolean>;
/**
* Enable masquerade on this network
*/
enableMasquerade?: pulumi.Input<boolean>;
/**
* The ID of the public gateway.
*/
gatewayId?: pulumi.Input<string>;
/**
* Auto-configure the Gateway Network using Scaleway's IPAM (IP address management service).
*/
ipamConfigs?: pulumi.Input<pulumi.Input<inputs.VpcGatewayNetworkIpamConfig>[]>;
/**
* The mac address of the creation of the gateway network.
*/
macAddress?: pulumi.Input<string>;
/**
* The ID of the private network.
*/
privateNetworkId?: pulumi.Input<string>;
/**
* Enable DHCP config on this network. Only one of `dhcpId`, `staticAddress` and `ipamConfig` should be specified.
*/
staticAddress?: pulumi.Input<string>;
/**
* The status of the Public Gateway's connection to the Private Network.
*/
status?: pulumi.Input<string>;
/**
* The date and time of the last update of the gateway network.
*/
updatedAt?: pulumi.Input<string>;
/**
* `zone`) The zone in which the gateway network should be created.
*/
zone?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a VpcGatewayNetwork resource.
*/
export interface VpcGatewayNetworkArgs {
/**
* Remove DHCP config on this network on destroy. It requires DHCP id.
*/
cleanupDhcp?: pulumi.Input<boolean>;
/**
* The ID of the public gateway DHCP config. Only one of `dhcpId`, `staticAddress` and `ipamConfig` should be specified.
*/
dhcpId?: pulumi.Input<string>;
/**
* Enable DHCP config on this network. It requires DHCP id.
*/
enableDhcp?: pulumi.Input<boolean>;
/**
* Enable masquerade on this network
*/
enableMasquerade?: pulumi.Input<boolean>;
/**
* The ID of the public gateway.
*/
gatewayId: pulumi.Input<string>;
/**
* Auto-configure the Gateway Network using Scaleway's IPAM (IP address management service).
*/
ipamConfigs?: pulumi.Input<pulumi.Input<inputs.VpcGatewayNetworkIpamConfig>[]>;
/**
* The ID of the private network.
*/
privateNetworkId: pulumi.Input<string>;
/**
* Enable DHCP config on this network. Only one of `dhcpId`, `staticAddress` and `ipamConfig` should be specified.
*/
staticAddress?: pulumi.Input<string>;
/**
* `zone`) The zone in which the gateway network should be created.
*/
zone?: pulumi.Input<string>;
}