@pulumiverse/scaleway
Version:
A Pulumi package for creating and managing Scaleway cloud resources.
244 lines • 11 kB
JavaScript
"use strict";
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.getVpcPublicGatewayDhcpReservationOutput = exports.getVpcPublicGatewayDhcpReservation = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("./utilities");
/**
* > **Important:** The data source `scaleway.network.PublicGatewayDhcpReservation` has been deprecated and will no longer be supported.
* In 2023, DHCP functionality was moved from Public Gateways to Private Networks, DHCP resources are now no longer needed.
* You can use IPAM to manage your IPs. For more information, please refer to the dedicated guide.
*
* Gets information about a DHCP entry. For further information, please see the
* [API documentation](https://www.scaleway.com/en/developers/api/public-gateway/#path-dhcp-entries-list-dhcp-entries).
*
* ## Example Dynamic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumi/scaleway";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const main = new scaleway.network.PrivateNetwork("main", {});
* const mainServer = new scaleway.instance.Server("main", {
* image: "ubuntu_jammy",
* type: "DEV1-S",
* zone: "fr-par-1",
* });
* const mainPrivateNic = new scaleway.instance.PrivateNic("main", {
* serverId: mainServer.id,
* privateNetworkId: main.id,
* });
* const mainPublicGatewayIp = new scaleway.network.PublicGatewayIp("main", {});
* const mainPublicGatewayDhcp = new scaleway.network.PublicGatewayDhcp("main", {subnet: "192.168.1.0/24"});
* const mainPublicGateway = new scaleway.network.PublicGateway("main", {
* name: "foobar",
* type: "VPC-GW-S",
* ipId: mainPublicGatewayIp.id,
* });
* const mainGatewayNetwork = new scaleway.network.GatewayNetwork("main", {
* gatewayId: mainPublicGateway.id,
* privateNetworkId: main.id,
* dhcpId: mainPublicGatewayDhcp.id,
* cleanupDhcp: true,
* enableMasquerade: true,
* });
* //# Retrieve the dynamic entries generated by mac address & gateway network
* const byMacAddressAndGwNetwork = scaleway.network.getPublicGatewayDhcpReservationOutput({
* macAddress: mainPrivateNic.macAddress,
* gatewayNetworkId: mainGatewayNetwork.id,
* });
* ```
*
* ## Example Static and PAT Rule
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumi/scaleway";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const main = new scaleway.network.PrivateNetwork("main", {});
* const mainSecurityGroup = new scaleway.instance.SecurityGroup("main", {
* inboundDefaultPolicy: "drop",
* outboundDefaultPolicy: "accept",
* inboundRules: [{
* action: "accept",
* port: 22,
* }],
* });
* const mainServer = new scaleway.instance.Server("main", {
* image: "ubuntu_jammy",
* type: "DEV1-S",
* zone: "fr-par-1",
* securityGroupId: mainSecurityGroup.id,
* });
* const mainPrivateNic = new scaleway.instance.PrivateNic("main", {
* serverId: mainServer.id,
* privateNetworkId: main.id,
* });
* const mainPublicGatewayIp = new scaleway.network.PublicGatewayIp("main", {});
* const mainPublicGatewayDhcp = new scaleway.network.PublicGatewayDhcp("main", {subnet: "192.168.1.0/24"});
* const mainPublicGateway = new scaleway.network.PublicGateway("main", {
* name: "foobar",
* type: "VPC-GW-S",
* ipId: mainPublicGatewayIp.id,
* });
* const mainGatewayNetwork = new scaleway.network.GatewayNetwork("main", {
* gatewayId: mainPublicGateway.id,
* privateNetworkId: main.id,
* dhcpId: mainPublicGatewayDhcp.id,
* cleanupDhcp: true,
* enableMasquerade: true,
* });
* const mainPublicGatewayDhcpReservation = new scaleway.network.PublicGatewayDhcpReservation("main", {
* gatewayNetworkId: mainGatewayNetwork.id,
* macAddress: mainPrivateNic.macAddress,
* ipAddress: "192.168.1.4",
* });
* //## VPC PAT RULE
* const mainPublicGatewayPatRule = new scaleway.network.PublicGatewayPatRule("main", {
* gatewayId: mainPublicGateway.id,
* privateIp: mainPublicGatewayDhcpReservation.ipAddress,
* privatePort: 22,
* publicPort: 2222,
* protocol: "tcp",
* });
* const byId = scaleway.network.getPublicGatewayDhcpReservationOutput({
* reservationId: mainPublicGatewayDhcpReservation.id,
* });
* ```
*/
/** @deprecated scaleway.index/getvpcpublicgatewaydhcpreservation.getVpcPublicGatewayDhcpReservation has been deprecated in favor of scaleway.network/getpublicgatewaydhcpreservation.getPublicGatewayDhcpReservation */
function getVpcPublicGatewayDhcpReservation(args, opts) {
pulumi.log.warn("getVpcPublicGatewayDhcpReservation is deprecated: scaleway.index/getvpcpublicgatewaydhcpreservation.getVpcPublicGatewayDhcpReservation has been deprecated in favor of scaleway.network/getpublicgatewaydhcpreservation.getPublicGatewayDhcpReservation");
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("scaleway:index/getVpcPublicGatewayDhcpReservation:getVpcPublicGatewayDhcpReservation", {
"gatewayNetworkId": args.gatewayNetworkId,
"macAddress": args.macAddress,
"reservationId": args.reservationId,
"waitForDhcp": args.waitForDhcp,
"zone": args.zone,
}, opts);
}
exports.getVpcPublicGatewayDhcpReservation = getVpcPublicGatewayDhcpReservation;
/**
* > **Important:** The data source `scaleway.network.PublicGatewayDhcpReservation` has been deprecated and will no longer be supported.
* In 2023, DHCP functionality was moved from Public Gateways to Private Networks, DHCP resources are now no longer needed.
* You can use IPAM to manage your IPs. For more information, please refer to the dedicated guide.
*
* Gets information about a DHCP entry. For further information, please see the
* [API documentation](https://www.scaleway.com/en/developers/api/public-gateway/#path-dhcp-entries-list-dhcp-entries).
*
* ## Example Dynamic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumi/scaleway";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const main = new scaleway.network.PrivateNetwork("main", {});
* const mainServer = new scaleway.instance.Server("main", {
* image: "ubuntu_jammy",
* type: "DEV1-S",
* zone: "fr-par-1",
* });
* const mainPrivateNic = new scaleway.instance.PrivateNic("main", {
* serverId: mainServer.id,
* privateNetworkId: main.id,
* });
* const mainPublicGatewayIp = new scaleway.network.PublicGatewayIp("main", {});
* const mainPublicGatewayDhcp = new scaleway.network.PublicGatewayDhcp("main", {subnet: "192.168.1.0/24"});
* const mainPublicGateway = new scaleway.network.PublicGateway("main", {
* name: "foobar",
* type: "VPC-GW-S",
* ipId: mainPublicGatewayIp.id,
* });
* const mainGatewayNetwork = new scaleway.network.GatewayNetwork("main", {
* gatewayId: mainPublicGateway.id,
* privateNetworkId: main.id,
* dhcpId: mainPublicGatewayDhcp.id,
* cleanupDhcp: true,
* enableMasquerade: true,
* });
* //# Retrieve the dynamic entries generated by mac address & gateway network
* const byMacAddressAndGwNetwork = scaleway.network.getPublicGatewayDhcpReservationOutput({
* macAddress: mainPrivateNic.macAddress,
* gatewayNetworkId: mainGatewayNetwork.id,
* });
* ```
*
* ## Example Static and PAT Rule
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumi/scaleway";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const main = new scaleway.network.PrivateNetwork("main", {});
* const mainSecurityGroup = new scaleway.instance.SecurityGroup("main", {
* inboundDefaultPolicy: "drop",
* outboundDefaultPolicy: "accept",
* inboundRules: [{
* action: "accept",
* port: 22,
* }],
* });
* const mainServer = new scaleway.instance.Server("main", {
* image: "ubuntu_jammy",
* type: "DEV1-S",
* zone: "fr-par-1",
* securityGroupId: mainSecurityGroup.id,
* });
* const mainPrivateNic = new scaleway.instance.PrivateNic("main", {
* serverId: mainServer.id,
* privateNetworkId: main.id,
* });
* const mainPublicGatewayIp = new scaleway.network.PublicGatewayIp("main", {});
* const mainPublicGatewayDhcp = new scaleway.network.PublicGatewayDhcp("main", {subnet: "192.168.1.0/24"});
* const mainPublicGateway = new scaleway.network.PublicGateway("main", {
* name: "foobar",
* type: "VPC-GW-S",
* ipId: mainPublicGatewayIp.id,
* });
* const mainGatewayNetwork = new scaleway.network.GatewayNetwork("main", {
* gatewayId: mainPublicGateway.id,
* privateNetworkId: main.id,
* dhcpId: mainPublicGatewayDhcp.id,
* cleanupDhcp: true,
* enableMasquerade: true,
* });
* const mainPublicGatewayDhcpReservation = new scaleway.network.PublicGatewayDhcpReservation("main", {
* gatewayNetworkId: mainGatewayNetwork.id,
* macAddress: mainPrivateNic.macAddress,
* ipAddress: "192.168.1.4",
* });
* //## VPC PAT RULE
* const mainPublicGatewayPatRule = new scaleway.network.PublicGatewayPatRule("main", {
* gatewayId: mainPublicGateway.id,
* privateIp: mainPublicGatewayDhcpReservation.ipAddress,
* privatePort: 22,
* publicPort: 2222,
* protocol: "tcp",
* });
* const byId = scaleway.network.getPublicGatewayDhcpReservationOutput({
* reservationId: mainPublicGatewayDhcpReservation.id,
* });
* ```
*/
/** @deprecated scaleway.index/getvpcpublicgatewaydhcpreservation.getVpcPublicGatewayDhcpReservation has been deprecated in favor of scaleway.network/getpublicgatewaydhcpreservation.getPublicGatewayDhcpReservation */
function getVpcPublicGatewayDhcpReservationOutput(args, opts) {
pulumi.log.warn("getVpcPublicGatewayDhcpReservation is deprecated: scaleway.index/getvpcpublicgatewaydhcpreservation.getVpcPublicGatewayDhcpReservation has been deprecated in favor of scaleway.network/getpublicgatewaydhcpreservation.getPublicGatewayDhcpReservation");
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("scaleway:index/getVpcPublicGatewayDhcpReservation:getVpcPublicGatewayDhcpReservation", {
"gatewayNetworkId": args.gatewayNetworkId,
"macAddress": args.macAddress,
"reservationId": args.reservationId,
"waitForDhcp": args.waitForDhcp,
"zone": args.zone,
}, opts);
}
exports.getVpcPublicGatewayDhcpReservationOutput = getVpcPublicGatewayDhcpReservationOutput;
//# sourceMappingURL=getVpcPublicGatewayDhcpReservation.js.map