UNPKG

@pulumiverse/scaleway

Version:

A Pulumi package for creating and managing Scaleway cloud resources.

200 lines 6.97 kB
import * as pulumi from "@pulumi/pulumi"; /** * Creates and manages Scaleway Public Gateway PAT (Port Address Translation). * For more information, see the [API documentation](https://www.scaleway.com/en/developers/api/public-gateway/#pat-rules-e75d10). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@pulumiverse/scaleway"; * * const sg01 = new scaleway.instance.SecurityGroup("sg01", { * inboundDefaultPolicy: "drop", * outboundDefaultPolicy: "accept", * inboundRules: [{ * action: "accept", * port: 22, * protocol: "TCP", * }], * }); * const srv01 = new scaleway.instance.Server("srv01", { * name: "my-server", * type: "PLAY2-NANO", * image: "ubuntu_jammy", * securityGroupId: sg01.id, * }); * const pn01 = new scaleway.network.PrivateNetwork("pn01", {name: "my-pn"}); * const pnic01 = new scaleway.instance.PrivateNic("pnic01", { * serverId: srv01.id, * privateNetworkId: pn01.id, * }); * const dhcp01 = new scaleway.network.PublicGatewayDhcp("dhcp01", {subnet: "192.168.0.0/24"}); * const ip01 = new scaleway.network.PublicGatewayIp("ip01", {}); * const pg01 = new scaleway.network.PublicGateway("pg01", { * name: "my-pg", * type: "VPC-GW-S", * ipId: ip01.id, * }); * const gn01 = new scaleway.network.GatewayNetwork("gn01", { * gatewayId: pg01.id, * privateNetworkId: pn01.id, * dhcpId: dhcp01.id, * cleanupDhcp: true, * enableMasquerade: true, * }); * const rsv01 = new scaleway.network.PublicGatewayDhcpReservation("rsv01", { * gatewayNetworkId: gn01.id, * macAddress: pnic01.macAddress, * ipAddress: "192.168.0.7", * }); * // PAT rule for SSH traffic * const pat01 = new scaleway.network.PublicGatewayPatRule("pat01", { * gatewayId: pg01.id, * privateIp: rsv01.ipAddress, * privatePort: 22, * publicPort: 2202, * protocol: "tcp", * }); * ``` * * ## Import * * Public Gateway PAT rule configurations can be imported using `{zone}/{id}`, e.g. * * ```sh * $ pulumi import scaleway:network/publicGatewayPatRule:PublicGatewayPatRule main fr-par-1/11111111-1111-1111-1111-111111111111 * ``` */ export declare class PublicGatewayPatRule extends pulumi.CustomResource { /** * Get an existing PublicGatewayPatRule 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?: PublicGatewayPatRuleState, opts?: pulumi.CustomResourceOptions): PublicGatewayPatRule; /** * Returns true if the given object is an instance of PublicGatewayPatRule. 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 PublicGatewayPatRule; /** * The date and time of the creation of the PAT rule configuration. */ readonly createdAt: pulumi.Output<string>; /** * The ID of the Public Gateway. */ readonly gatewayId: pulumi.Output<string>; /** * The Organization ID the PAT rule configuration is associated with. */ readonly organizationId: pulumi.Output<string>; /** * The private IP address to forward data to. */ readonly privateIp: pulumi.Output<string>; /** * The private port to translate to. */ readonly privatePort: pulumi.Output<number>; /** * The protocol the rule should apply to. Possible values are `both`, `tcp` and `udp`. */ readonly protocol: pulumi.Output<string | undefined>; /** * The public port to listen on. */ readonly publicPort: pulumi.Output<number>; /** * The date and time of the last update of the PAT rule configuration. */ readonly updatedAt: pulumi.Output<string>; /** * `zone`) The zone in which the Public Gateway DHCP configuration should be created. */ readonly zone: pulumi.Output<string | undefined>; /** * Create a PublicGatewayPatRule 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: PublicGatewayPatRuleArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering PublicGatewayPatRule resources. */ export interface PublicGatewayPatRuleState { /** * The date and time of the creation of the PAT rule configuration. */ createdAt?: pulumi.Input<string | undefined>; /** * The ID of the Public Gateway. */ gatewayId?: pulumi.Input<string | undefined>; /** * The Organization ID the PAT rule configuration is associated with. */ organizationId?: pulumi.Input<string | undefined>; /** * The private IP address to forward data to. */ privateIp?: pulumi.Input<string | undefined>; /** * The private port to translate to. */ privatePort?: pulumi.Input<number | undefined>; /** * The protocol the rule should apply to. Possible values are `both`, `tcp` and `udp`. */ protocol?: pulumi.Input<string | undefined>; /** * The public port to listen on. */ publicPort?: pulumi.Input<number | undefined>; /** * The date and time of the last update of the PAT rule configuration. */ updatedAt?: pulumi.Input<string | undefined>; /** * `zone`) The zone in which the Public Gateway DHCP configuration should be created. */ zone?: pulumi.Input<string | undefined>; } /** * The set of arguments for constructing a PublicGatewayPatRule resource. */ export interface PublicGatewayPatRuleArgs { /** * The ID of the Public Gateway. */ gatewayId: pulumi.Input<string>; /** * The private IP address to forward data to. */ privateIp: pulumi.Input<string>; /** * The private port to translate to. */ privatePort: pulumi.Input<number>; /** * The protocol the rule should apply to. Possible values are `both`, `tcp` and `udp`. */ protocol?: pulumi.Input<string | undefined>; /** * The public port to listen on. */ publicPort: pulumi.Input<number>; /** * `zone`) The zone in which the Public Gateway DHCP configuration should be created. */ zone?: pulumi.Input<string | undefined>; } //# sourceMappingURL=publicGatewayPatRule.d.ts.map