@pulumi/digitalocean 4.7.0-alpha.1633346817
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/README.md +68 -0
- package/app.d.ts +203 -0
- package/app.js +174 -0
- package/app.js.map +1 -0
- package/cdn.d.ts +169 -0
- package/cdn.js +116 -0
- package/cdn.js.map +1 -0
- package/certificate.d.ts +225 -0
- package/certificate.js +137 -0
- package/certificate.js.map +1 -0
- package/config/index.d.ts +1 -0
- package/config/index.js +10 -0
- package/config/index.js.map +1 -0
- package/config/vars.d.ts +20 -0
- package/config/vars.js +28 -0
- package/config/vars.js.map +1 -0
- package/containerRegistry.d.ts +88 -0
- package/containerRegistry.js +83 -0
- package/containerRegistry.js.map +1 -0
- package/containerRegistryDockerCredentials.d.ts +108 -0
- package/containerRegistryDockerCredentials.js +93 -0
- package/containerRegistryDockerCredentials.js.map +1 -0
- package/customImage.d.ts +155 -0
- package/customImage.js +113 -0
- package/customImage.js.map +1 -0
- package/databaseCluster.d.ts +306 -0
- package/databaseCluster.js +165 -0
- package/databaseCluster.js.map +1 -0
- package/databaseConnectionPool.d.ts +189 -0
- package/databaseConnectionPool.js +120 -0
- package/databaseConnectionPool.js.map +1 -0
- package/databaseDb.d.ts +87 -0
- package/databaseDb.js +82 -0
- package/databaseDb.js.map +1 -0
- package/databaseFirewall.d.ts +129 -0
- package/databaseFirewall.js +126 -0
- package/databaseFirewall.js.map +1 -0
- package/databaseReplica.d.ts +204 -0
- package/databaseReplica.js +110 -0
- package/databaseReplica.js.map +1 -0
- package/databaseUser.d.ts +117 -0
- package/databaseUser.js +90 -0
- package/databaseUser.js.map +1 -0
- package/dnsRecord.d.ts +200 -0
- package/dnsRecord.js +114 -0
- package/dnsRecord.js.map +1 -0
- package/domain.d.ts +103 -0
- package/domain.js +83 -0
- package/domain.js.map +1 -0
- package/droplet.d.ts +386 -0
- package/droplet.js +137 -0
- package/droplet.js.map +1 -0
- package/dropletSnapshot.d.ts +117 -0
- package/dropletSnapshot.js +88 -0
- package/dropletSnapshot.js.map +1 -0
- package/firewall.d.ts +226 -0
- package/firewall.js +150 -0
- package/firewall.js.map +1 -0
- package/floatingIp.d.ts +112 -0
- package/floatingIp.js +91 -0
- package/floatingIp.js.map +1 -0
- package/floatingIpAssignment.d.ts +85 -0
- package/floatingIpAssignment.js +83 -0
- package/floatingIpAssignment.js.map +1 -0
- package/getAccount.d.ts +32 -0
- package/getAccount.js +31 -0
- package/getAccount.js.map +1 -0
- package/getApp.d.ts +63 -0
- package/getApp.js +36 -0
- package/getApp.js.map +1 -0
- package/getCertificate.d.ts +48 -0
- package/getCertificate.js +40 -0
- package/getCertificate.js.map +1 -0
- package/getContainerRegistry.d.ts +54 -0
- package/getContainerRegistry.js +41 -0
- package/getContainerRegistry.js.map +1 -0
- package/getDatabaseCluster.d.ts +103 -0
- package/getDatabaseCluster.js +35 -0
- package/getDatabaseCluster.js.map +1 -0
- package/getDatabaseReplica.d.ts +87 -0
- package/getDatabaseReplica.js +40 -0
- package/getDatabaseReplica.js.map +1 -0
- package/getDomain.d.ts +37 -0
- package/getDomain.js +28 -0
- package/getDomain.js.map +1 -0
- package/getDomains.d.ts +61 -0
- package/getDomains.js +49 -0
- package/getDomains.js.map +1 -0
- package/getDroplet.d.ts +161 -0
- package/getDroplet.js +67 -0
- package/getDroplet.js.map +1 -0
- package/getDropletSnapshot.d.ts +76 -0
- package/getDropletSnapshot.js +43 -0
- package/getDropletSnapshot.js.map +1 -0
- package/getDroplets.d.ts +85 -0
- package/getDroplets.js +73 -0
- package/getDroplets.js.map +1 -0
- package/getFirewall.d.ts +83 -0
- package/getFirewall.js +40 -0
- package/getFirewall.js.map +1 -0
- package/getFloatingIp.d.ts +48 -0
- package/getFloatingIp.js +43 -0
- package/getFloatingIp.js.map +1 -0
- package/getImage.d.ts +110 -0
- package/getImage.js +71 -0
- package/getImage.js.map +1 -0
- package/getImages.d.ts +90 -0
- package/getImages.js +74 -0
- package/getImages.js.map +1 -0
- package/getKubernetesCluster.d.ts +95 -0
- package/getKubernetesCluster.js +23 -0
- package/getKubernetesCluster.js.map +1 -0
- package/getKubernetesVersions.d.ts +79 -0
- package/getKubernetesVersions.js +70 -0
- package/getKubernetesVersions.js.map +1 -0
- package/getLoadBalancer.d.ts +59 -0
- package/getLoadBalancer.js +41 -0
- package/getLoadBalancer.js.map +1 -0
- package/getProject.d.ts +72 -0
- package/getProject.js +37 -0
- package/getProject.js.map +1 -0
- package/getProjects.d.ts +85 -0
- package/getProjects.js +72 -0
- package/getProjects.js.map +1 -0
- package/getRecord.d.ts +42 -0
- package/getRecord.js +28 -0
- package/getRecord.js.map +1 -0
- package/getRecords.d.ts +39 -0
- package/getRecords.js +25 -0
- package/getRecords.js.map +1 -0
- package/getRegion.d.ts +56 -0
- package/getRegion.js +35 -0
- package/getRegion.js.map +1 -0
- package/getRegions.d.ts +82 -0
- package/getRegions.js +70 -0
- package/getRegions.js.map +1 -0
- package/getSizes.d.ts +35 -0
- package/getSizes.js +26 -0
- package/getSizes.js.map +1 -0
- package/getSpacesBucket.d.ts +59 -0
- package/getSpacesBucket.js +39 -0
- package/getSpacesBucket.js.map +1 -0
- package/getSpacesBucketObject.d.ts +125 -0
- package/getSpacesBucketObject.js +53 -0
- package/getSpacesBucketObject.js.map +1 -0
- package/getSpacesBucketObjects.d.ts +83 -0
- package/getSpacesBucketObjects.js +49 -0
- package/getSpacesBucketObjects.js.map +1 -0
- package/getSpacesBuckets.d.ts +75 -0
- package/getSpacesBuckets.js +63 -0
- package/getSpacesBuckets.js.map +1 -0
- package/getSshKey.d.ts +47 -0
- package/getSshKey.js +46 -0
- package/getSshKey.js.map +1 -0
- package/getSshKeys.d.ts +58 -0
- package/getSshKeys.js +46 -0
- package/getSshKeys.js.map +1 -0
- package/getTag.d.ts +71 -0
- package/getTag.js +45 -0
- package/getTag.js.map +1 -0
- package/getTags.d.ts +50 -0
- package/getTags.js +41 -0
- package/getTags.js.map +1 -0
- package/getVolume.d.ts +98 -0
- package/getVolume.js +64 -0
- package/getVolume.js.map +1 -0
- package/getVolumeSnapshot.d.ts +98 -0
- package/getVolumeSnapshot.js +61 -0
- package/getVolumeSnapshot.js.map +1 -0
- package/getVpc.d.ts +95 -0
- package/getVpc.js +61 -0
- package/getVpc.js.map +1 -0
- package/index.d.ts +74 -0
- package/index.js +240 -0
- package/index.js.map +1 -0
- package/kubernetesCluster.d.ts +220 -0
- package/kubernetesCluster.js +102 -0
- package/kubernetesCluster.js.map +1 -0
- package/kubernetesNodePool.d.ts +242 -0
- package/kubernetesNodePool.js +141 -0
- package/kubernetesNodePool.js.map +1 -0
- package/loadBalancer.d.ts +307 -0
- package/loadBalancer.js +161 -0
- package/loadBalancer.js.map +1 -0
- package/monitorAlert.d.ts +193 -0
- package/monitorAlert.js +99 -0
- package/monitorAlert.js.map +1 -0
- package/package.json +28 -0
- package/package.json.bak +27 -0
- package/package.json.dev +27 -0
- package/project.d.ts +191 -0
- package/project.js +129 -0
- package/project.js.map +1 -0
- package/projectResources.d.ts +100 -0
- package/projectResources.js +98 -0
- package/projectResources.js.map +1 -0
- package/provider.d.ts +67 -0
- package/provider.js +51 -0
- package/provider.js.map +1 -0
- package/scripts/install-pulumi-plugin.js +21 -0
- package/spacesBucket.d.ts +210 -0
- package/spacesBucket.js +139 -0
- package/spacesBucket.js.map +1 -0
- package/spacesBucketObject.d.ts +293 -0
- package/spacesBucketObject.js +139 -0
- package/spacesBucketObject.js.map +1 -0
- package/sshKey.d.ts +103 -0
- package/sshKey.js +89 -0
- package/sshKey.js.map +1 -0
- package/tag.d.ts +127 -0
- package/tag.js +93 -0
- package/tag.js.map +1 -0
- package/types/enums/index.d.ts +151 -0
- package/types/enums/index.js +148 -0
- package/types/enums/index.js.map +1 -0
- package/types/index.d.ts +4 -0
- package/types/index.js +12 -0
- package/types/index.js.map +1 -0
- package/types/input.d.ts +1584 -0
- package/types/input.js +5 -0
- package/types/input.js.map +1 -0
- package/types/output.d.ts +2730 -0
- package/types/output.js +5 -0
- package/types/output.js.map +1 -0
- package/utilities.d.ts +4 -0
- package/utilities.js +51 -0
- package/utilities.js.map +1 -0
- package/volume.d.ts +225 -0
- package/volume.js +128 -0
- package/volume.js.map +1 -0
- package/volumeAttachment.d.ts +88 -0
- package/volumeAttachment.js +86 -0
- package/volumeAttachment.js.map +1 -0
- package/volumeSnapshot.d.ts +129 -0
- package/volumeSnapshot.js +90 -0
- package/volumeSnapshot.js.map +1 -0
- package/vpc.d.ts +152 -0
- package/vpc.js +109 -0
- package/vpc.js.map +1 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
|
3
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
const pulumi = require("@pulumi/pulumi");
|
|
6
|
+
const utilities = require("./utilities");
|
|
7
|
+
/**
|
|
8
|
+
* Provides a resource which can be used to create a snapshot from an existing DigitalOcean Droplet.
|
|
9
|
+
*
|
|
10
|
+
* ## Example Usage
|
|
11
|
+
*
|
|
12
|
+
* ```typescript
|
|
13
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
14
|
+
* import * as digitalocean from "@pulumi/digitalocean";
|
|
15
|
+
*
|
|
16
|
+
* const web = new digitalocean.Droplet("web", {
|
|
17
|
+
* size: "s-1vcpu-1gb",
|
|
18
|
+
* image: "centos-7-x64",
|
|
19
|
+
* region: "nyc3",
|
|
20
|
+
* });
|
|
21
|
+
* const web_snapshot = new digitalocean.DropletSnapshot("web-snapshot", {dropletId: web.id});
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* ## Import
|
|
25
|
+
*
|
|
26
|
+
* Droplet Snapshots can be imported using the `snapshot id`, e.g.
|
|
27
|
+
*
|
|
28
|
+
* ```sh
|
|
29
|
+
* $ pulumi import digitalocean:index/dropletSnapshot:DropletSnapshot mysnapshot 123456
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
class DropletSnapshot extends pulumi.CustomResource {
|
|
33
|
+
constructor(name, argsOrState, opts) {
|
|
34
|
+
let inputs = {};
|
|
35
|
+
opts = opts || {};
|
|
36
|
+
if (opts.id) {
|
|
37
|
+
const state = argsOrState;
|
|
38
|
+
inputs["createdAt"] = state ? state.createdAt : undefined;
|
|
39
|
+
inputs["dropletId"] = state ? state.dropletId : undefined;
|
|
40
|
+
inputs["minDiskSize"] = state ? state.minDiskSize : undefined;
|
|
41
|
+
inputs["name"] = state ? state.name : undefined;
|
|
42
|
+
inputs["regions"] = state ? state.regions : undefined;
|
|
43
|
+
inputs["size"] = state ? state.size : undefined;
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
const args = argsOrState;
|
|
47
|
+
if ((!args || args.dropletId === undefined) && !opts.urn) {
|
|
48
|
+
throw new Error("Missing required property 'dropletId'");
|
|
49
|
+
}
|
|
50
|
+
inputs["dropletId"] = args ? args.dropletId : undefined;
|
|
51
|
+
inputs["name"] = args ? args.name : undefined;
|
|
52
|
+
inputs["createdAt"] = undefined /*out*/;
|
|
53
|
+
inputs["minDiskSize"] = undefined /*out*/;
|
|
54
|
+
inputs["regions"] = undefined /*out*/;
|
|
55
|
+
inputs["size"] = undefined /*out*/;
|
|
56
|
+
}
|
|
57
|
+
if (!opts.version) {
|
|
58
|
+
opts = pulumi.mergeOptions(opts, { version: utilities.getVersion() });
|
|
59
|
+
}
|
|
60
|
+
super(DropletSnapshot.__pulumiType, name, inputs, opts);
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Get an existing DropletSnapshot resource's state with the given name, ID, and optional extra
|
|
64
|
+
* properties used to qualify the lookup.
|
|
65
|
+
*
|
|
66
|
+
* @param name The _unique_ name of the resulting resource.
|
|
67
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
68
|
+
* @param state Any extra arguments used during the lookup.
|
|
69
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
70
|
+
*/
|
|
71
|
+
static get(name, id, state, opts) {
|
|
72
|
+
return new DropletSnapshot(name, state, Object.assign(Object.assign({}, opts), { id: id }));
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Returns true if the given object is an instance of DropletSnapshot. This is designed to work even
|
|
76
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
77
|
+
*/
|
|
78
|
+
static isInstance(obj) {
|
|
79
|
+
if (obj === undefined || obj === null) {
|
|
80
|
+
return false;
|
|
81
|
+
}
|
|
82
|
+
return obj['__pulumiType'] === DropletSnapshot.__pulumiType;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
exports.DropletSnapshot = DropletSnapshot;
|
|
86
|
+
/** @internal */
|
|
87
|
+
DropletSnapshot.__pulumiType = 'digitalocean:index/dropletSnapshot:DropletSnapshot';
|
|
88
|
+
//# sourceMappingURL=dropletSnapshot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropletSnapshot.js","sourceRoot":"","sources":["../dropletSnapshot.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAa,eAAgB,SAAQ,MAAM,CAAC,cAAc;IA6DtD,YAAY,IAAY,EAAE,WAAwD,EAAE,IAAmC;QACnH,IAAI,MAAM,GAAkB,EAAE,CAAC;QAC/B,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,EAAE,EAAE;YACT,MAAM,KAAK,GAAG,WAA+C,CAAC;YAC9D,MAAM,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;YAC1D,MAAM,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC,CAAC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AM,CAAC,YAAY,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,SAAS,CAAC,UAAU,EAAE,EAAC,CAAC,CAAC;SACxE;QACD,KAAK,CAAC,eAAe,CAAC,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IAC5D,CAAC;IAvFD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAA4B,EAAE,IAAmC;QAC1H,OAAO,IAAI,eAAe,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IACtE,CAAC;IAKD;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,GAAQ;QAC7B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,EAAE;YACnC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,GAAG,CAAC,cAAc,CAAC,KAAK,eAAe,CAAC,YAAY,CAAC;IAChE,CAAC;;AA1BL,0CAyFC;AA3EG,gBAAgB;AACO,4BAAY,GAAG,oDAAoD,CAAC"}
|
package/firewall.d.ts
ADDED
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
import { input as inputs, output as outputs } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* Provides a DigitalOcean Cloud Firewall resource. This can be used to create,
|
|
5
|
+
* modify, and delete Firewalls.
|
|
6
|
+
*
|
|
7
|
+
* ## Example Usage
|
|
8
|
+
*
|
|
9
|
+
* ```typescript
|
|
10
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
11
|
+
* import * as digitalocean from "@pulumi/digitalocean";
|
|
12
|
+
*
|
|
13
|
+
* const webDroplet = new digitalocean.Droplet("webDroplet", {
|
|
14
|
+
* size: "s-1vcpu-1gb",
|
|
15
|
+
* image: "ubuntu-18-04-x64",
|
|
16
|
+
* region: "nyc3",
|
|
17
|
+
* });
|
|
18
|
+
* const webFirewall = new digitalocean.Firewall("webFirewall", {
|
|
19
|
+
* dropletIds: [webDroplet.id],
|
|
20
|
+
* inboundRules: [
|
|
21
|
+
* {
|
|
22
|
+
* protocol: "tcp",
|
|
23
|
+
* portRange: "22",
|
|
24
|
+
* sourceAddresses: [
|
|
25
|
+
* "192.168.1.0/24",
|
|
26
|
+
* "2002:1:2::/48",
|
|
27
|
+
* ],
|
|
28
|
+
* },
|
|
29
|
+
* {
|
|
30
|
+
* protocol: "tcp",
|
|
31
|
+
* portRange: "80",
|
|
32
|
+
* sourceAddresses: [
|
|
33
|
+
* "0.0.0.0/0",
|
|
34
|
+
* "::/0",
|
|
35
|
+
* ],
|
|
36
|
+
* },
|
|
37
|
+
* {
|
|
38
|
+
* protocol: "tcp",
|
|
39
|
+
* portRange: "443",
|
|
40
|
+
* sourceAddresses: [
|
|
41
|
+
* "0.0.0.0/0",
|
|
42
|
+
* "::/0",
|
|
43
|
+
* ],
|
|
44
|
+
* },
|
|
45
|
+
* {
|
|
46
|
+
* protocol: "icmp",
|
|
47
|
+
* sourceAddresses: [
|
|
48
|
+
* "0.0.0.0/0",
|
|
49
|
+
* "::/0",
|
|
50
|
+
* ],
|
|
51
|
+
* },
|
|
52
|
+
* ],
|
|
53
|
+
* outboundRules: [
|
|
54
|
+
* {
|
|
55
|
+
* protocol: "tcp",
|
|
56
|
+
* portRange: "53",
|
|
57
|
+
* destinationAddresses: [
|
|
58
|
+
* "0.0.0.0/0",
|
|
59
|
+
* "::/0",
|
|
60
|
+
* ],
|
|
61
|
+
* },
|
|
62
|
+
* {
|
|
63
|
+
* protocol: "udp",
|
|
64
|
+
* portRange: "53",
|
|
65
|
+
* destinationAddresses: [
|
|
66
|
+
* "0.0.0.0/0",
|
|
67
|
+
* "::/0",
|
|
68
|
+
* ],
|
|
69
|
+
* },
|
|
70
|
+
* {
|
|
71
|
+
* protocol: "icmp",
|
|
72
|
+
* destinationAddresses: [
|
|
73
|
+
* "0.0.0.0/0",
|
|
74
|
+
* "::/0",
|
|
75
|
+
* ],
|
|
76
|
+
* },
|
|
77
|
+
* ],
|
|
78
|
+
* });
|
|
79
|
+
* ```
|
|
80
|
+
*
|
|
81
|
+
* ## Import
|
|
82
|
+
*
|
|
83
|
+
* Firewalls can be imported using the firewall `id`, e.g.
|
|
84
|
+
*
|
|
85
|
+
* ```sh
|
|
86
|
+
* $ pulumi import digitalocean:index/firewall:Firewall myfirewall b8ecd2ab-2267-4a5e-8692-cbf1d32583e3
|
|
87
|
+
* ```
|
|
88
|
+
*/
|
|
89
|
+
export declare class Firewall extends pulumi.CustomResource {
|
|
90
|
+
/**
|
|
91
|
+
* Get an existing Firewall resource's state with the given name, ID, and optional extra
|
|
92
|
+
* properties used to qualify the lookup.
|
|
93
|
+
*
|
|
94
|
+
* @param name The _unique_ name of the resulting resource.
|
|
95
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
96
|
+
* @param state Any extra arguments used during the lookup.
|
|
97
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
98
|
+
*/
|
|
99
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: FirewallState, opts?: pulumi.CustomResourceOptions): Firewall;
|
|
100
|
+
/**
|
|
101
|
+
* Returns true if the given object is an instance of Firewall. This is designed to work even
|
|
102
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
103
|
+
*/
|
|
104
|
+
static isInstance(obj: any): obj is Firewall;
|
|
105
|
+
/**
|
|
106
|
+
* A time value given in ISO8601 combined date and time format
|
|
107
|
+
* that represents when the Firewall was created.
|
|
108
|
+
*/
|
|
109
|
+
readonly createdAt: pulumi.Output<string>;
|
|
110
|
+
/**
|
|
111
|
+
* The list of the IDs of the Droplets assigned
|
|
112
|
+
* to the Firewall.
|
|
113
|
+
*/
|
|
114
|
+
readonly dropletIds: pulumi.Output<number[] | undefined>;
|
|
115
|
+
/**
|
|
116
|
+
* The inbound access rule block for the Firewall.
|
|
117
|
+
* The `inboundRule` block is documented below.
|
|
118
|
+
*/
|
|
119
|
+
readonly inboundRules: pulumi.Output<outputs.FirewallInboundRule[] | undefined>;
|
|
120
|
+
/**
|
|
121
|
+
* The Firewall name
|
|
122
|
+
*/
|
|
123
|
+
readonly name: pulumi.Output<string>;
|
|
124
|
+
/**
|
|
125
|
+
* The outbound access rule block for the Firewall.
|
|
126
|
+
* The `outboundRule` block is documented below.
|
|
127
|
+
*/
|
|
128
|
+
readonly outboundRules: pulumi.Output<outputs.FirewallOutboundRule[] | undefined>;
|
|
129
|
+
/**
|
|
130
|
+
* An list of object containing the fields, "dropletId",
|
|
131
|
+
* "removing", and "status". It is provided to detail exactly which Droplets
|
|
132
|
+
* are having their security policies updated. When empty, all changes
|
|
133
|
+
* have been successfully applied.
|
|
134
|
+
*/
|
|
135
|
+
readonly pendingChanges: pulumi.Output<outputs.FirewallPendingChange[]>;
|
|
136
|
+
/**
|
|
137
|
+
* A status string indicating the current state of the Firewall.
|
|
138
|
+
* This can be "waiting", "succeeded", or "failed".
|
|
139
|
+
*/
|
|
140
|
+
readonly status: pulumi.Output<string>;
|
|
141
|
+
/**
|
|
142
|
+
* The names of the Tags assigned to the Firewall.
|
|
143
|
+
*/
|
|
144
|
+
readonly tags: pulumi.Output<string[] | undefined>;
|
|
145
|
+
/**
|
|
146
|
+
* Create a Firewall resource with the given unique name, arguments, and options.
|
|
147
|
+
*
|
|
148
|
+
* @param name The _unique_ name of the resource.
|
|
149
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
150
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
151
|
+
*/
|
|
152
|
+
constructor(name: string, args?: FirewallArgs, opts?: pulumi.CustomResourceOptions);
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Input properties used for looking up and filtering Firewall resources.
|
|
156
|
+
*/
|
|
157
|
+
export interface FirewallState {
|
|
158
|
+
/**
|
|
159
|
+
* A time value given in ISO8601 combined date and time format
|
|
160
|
+
* that represents when the Firewall was created.
|
|
161
|
+
*/
|
|
162
|
+
createdAt?: pulumi.Input<string>;
|
|
163
|
+
/**
|
|
164
|
+
* The list of the IDs of the Droplets assigned
|
|
165
|
+
* to the Firewall.
|
|
166
|
+
*/
|
|
167
|
+
dropletIds?: pulumi.Input<pulumi.Input<number>[]>;
|
|
168
|
+
/**
|
|
169
|
+
* The inbound access rule block for the Firewall.
|
|
170
|
+
* The `inboundRule` block is documented below.
|
|
171
|
+
*/
|
|
172
|
+
inboundRules?: pulumi.Input<pulumi.Input<inputs.FirewallInboundRule>[]>;
|
|
173
|
+
/**
|
|
174
|
+
* The Firewall name
|
|
175
|
+
*/
|
|
176
|
+
name?: pulumi.Input<string>;
|
|
177
|
+
/**
|
|
178
|
+
* The outbound access rule block for the Firewall.
|
|
179
|
+
* The `outboundRule` block is documented below.
|
|
180
|
+
*/
|
|
181
|
+
outboundRules?: pulumi.Input<pulumi.Input<inputs.FirewallOutboundRule>[]>;
|
|
182
|
+
/**
|
|
183
|
+
* An list of object containing the fields, "dropletId",
|
|
184
|
+
* "removing", and "status". It is provided to detail exactly which Droplets
|
|
185
|
+
* are having their security policies updated. When empty, all changes
|
|
186
|
+
* have been successfully applied.
|
|
187
|
+
*/
|
|
188
|
+
pendingChanges?: pulumi.Input<pulumi.Input<inputs.FirewallPendingChange>[]>;
|
|
189
|
+
/**
|
|
190
|
+
* A status string indicating the current state of the Firewall.
|
|
191
|
+
* This can be "waiting", "succeeded", or "failed".
|
|
192
|
+
*/
|
|
193
|
+
status?: pulumi.Input<string>;
|
|
194
|
+
/**
|
|
195
|
+
* The names of the Tags assigned to the Firewall.
|
|
196
|
+
*/
|
|
197
|
+
tags?: pulumi.Input<pulumi.Input<string>[]>;
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* The set of arguments for constructing a Firewall resource.
|
|
201
|
+
*/
|
|
202
|
+
export interface FirewallArgs {
|
|
203
|
+
/**
|
|
204
|
+
* The list of the IDs of the Droplets assigned
|
|
205
|
+
* to the Firewall.
|
|
206
|
+
*/
|
|
207
|
+
dropletIds?: pulumi.Input<pulumi.Input<number>[]>;
|
|
208
|
+
/**
|
|
209
|
+
* The inbound access rule block for the Firewall.
|
|
210
|
+
* The `inboundRule` block is documented below.
|
|
211
|
+
*/
|
|
212
|
+
inboundRules?: pulumi.Input<pulumi.Input<inputs.FirewallInboundRule>[]>;
|
|
213
|
+
/**
|
|
214
|
+
* The Firewall name
|
|
215
|
+
*/
|
|
216
|
+
name?: pulumi.Input<string>;
|
|
217
|
+
/**
|
|
218
|
+
* The outbound access rule block for the Firewall.
|
|
219
|
+
* The `outboundRule` block is documented below.
|
|
220
|
+
*/
|
|
221
|
+
outboundRules?: pulumi.Input<pulumi.Input<inputs.FirewallOutboundRule>[]>;
|
|
222
|
+
/**
|
|
223
|
+
* The names of the Tags assigned to the Firewall.
|
|
224
|
+
*/
|
|
225
|
+
tags?: pulumi.Input<pulumi.Input<string>[]>;
|
|
226
|
+
}
|
package/firewall.js
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
|
3
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
const pulumi = require("@pulumi/pulumi");
|
|
6
|
+
const utilities = require("./utilities");
|
|
7
|
+
/**
|
|
8
|
+
* Provides a DigitalOcean Cloud Firewall resource. This can be used to create,
|
|
9
|
+
* modify, and delete Firewalls.
|
|
10
|
+
*
|
|
11
|
+
* ## Example Usage
|
|
12
|
+
*
|
|
13
|
+
* ```typescript
|
|
14
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
15
|
+
* import * as digitalocean from "@pulumi/digitalocean";
|
|
16
|
+
*
|
|
17
|
+
* const webDroplet = new digitalocean.Droplet("webDroplet", {
|
|
18
|
+
* size: "s-1vcpu-1gb",
|
|
19
|
+
* image: "ubuntu-18-04-x64",
|
|
20
|
+
* region: "nyc3",
|
|
21
|
+
* });
|
|
22
|
+
* const webFirewall = new digitalocean.Firewall("webFirewall", {
|
|
23
|
+
* dropletIds: [webDroplet.id],
|
|
24
|
+
* inboundRules: [
|
|
25
|
+
* {
|
|
26
|
+
* protocol: "tcp",
|
|
27
|
+
* portRange: "22",
|
|
28
|
+
* sourceAddresses: [
|
|
29
|
+
* "192.168.1.0/24",
|
|
30
|
+
* "2002:1:2::/48",
|
|
31
|
+
* ],
|
|
32
|
+
* },
|
|
33
|
+
* {
|
|
34
|
+
* protocol: "tcp",
|
|
35
|
+
* portRange: "80",
|
|
36
|
+
* sourceAddresses: [
|
|
37
|
+
* "0.0.0.0/0",
|
|
38
|
+
* "::/0",
|
|
39
|
+
* ],
|
|
40
|
+
* },
|
|
41
|
+
* {
|
|
42
|
+
* protocol: "tcp",
|
|
43
|
+
* portRange: "443",
|
|
44
|
+
* sourceAddresses: [
|
|
45
|
+
* "0.0.0.0/0",
|
|
46
|
+
* "::/0",
|
|
47
|
+
* ],
|
|
48
|
+
* },
|
|
49
|
+
* {
|
|
50
|
+
* protocol: "icmp",
|
|
51
|
+
* sourceAddresses: [
|
|
52
|
+
* "0.0.0.0/0",
|
|
53
|
+
* "::/0",
|
|
54
|
+
* ],
|
|
55
|
+
* },
|
|
56
|
+
* ],
|
|
57
|
+
* outboundRules: [
|
|
58
|
+
* {
|
|
59
|
+
* protocol: "tcp",
|
|
60
|
+
* portRange: "53",
|
|
61
|
+
* destinationAddresses: [
|
|
62
|
+
* "0.0.0.0/0",
|
|
63
|
+
* "::/0",
|
|
64
|
+
* ],
|
|
65
|
+
* },
|
|
66
|
+
* {
|
|
67
|
+
* protocol: "udp",
|
|
68
|
+
* portRange: "53",
|
|
69
|
+
* destinationAddresses: [
|
|
70
|
+
* "0.0.0.0/0",
|
|
71
|
+
* "::/0",
|
|
72
|
+
* ],
|
|
73
|
+
* },
|
|
74
|
+
* {
|
|
75
|
+
* protocol: "icmp",
|
|
76
|
+
* destinationAddresses: [
|
|
77
|
+
* "0.0.0.0/0",
|
|
78
|
+
* "::/0",
|
|
79
|
+
* ],
|
|
80
|
+
* },
|
|
81
|
+
* ],
|
|
82
|
+
* });
|
|
83
|
+
* ```
|
|
84
|
+
*
|
|
85
|
+
* ## Import
|
|
86
|
+
*
|
|
87
|
+
* Firewalls can be imported using the firewall `id`, e.g.
|
|
88
|
+
*
|
|
89
|
+
* ```sh
|
|
90
|
+
* $ pulumi import digitalocean:index/firewall:Firewall myfirewall b8ecd2ab-2267-4a5e-8692-cbf1d32583e3
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
93
|
+
class Firewall extends pulumi.CustomResource {
|
|
94
|
+
constructor(name, argsOrState, opts) {
|
|
95
|
+
let inputs = {};
|
|
96
|
+
opts = opts || {};
|
|
97
|
+
if (opts.id) {
|
|
98
|
+
const state = argsOrState;
|
|
99
|
+
inputs["createdAt"] = state ? state.createdAt : undefined;
|
|
100
|
+
inputs["dropletIds"] = state ? state.dropletIds : undefined;
|
|
101
|
+
inputs["inboundRules"] = state ? state.inboundRules : undefined;
|
|
102
|
+
inputs["name"] = state ? state.name : undefined;
|
|
103
|
+
inputs["outboundRules"] = state ? state.outboundRules : undefined;
|
|
104
|
+
inputs["pendingChanges"] = state ? state.pendingChanges : undefined;
|
|
105
|
+
inputs["status"] = state ? state.status : undefined;
|
|
106
|
+
inputs["tags"] = state ? state.tags : undefined;
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
const args = argsOrState;
|
|
110
|
+
inputs["dropletIds"] = args ? args.dropletIds : undefined;
|
|
111
|
+
inputs["inboundRules"] = args ? args.inboundRules : undefined;
|
|
112
|
+
inputs["name"] = args ? args.name : undefined;
|
|
113
|
+
inputs["outboundRules"] = args ? args.outboundRules : undefined;
|
|
114
|
+
inputs["tags"] = args ? args.tags : undefined;
|
|
115
|
+
inputs["createdAt"] = undefined /*out*/;
|
|
116
|
+
inputs["pendingChanges"] = undefined /*out*/;
|
|
117
|
+
inputs["status"] = undefined /*out*/;
|
|
118
|
+
}
|
|
119
|
+
if (!opts.version) {
|
|
120
|
+
opts = pulumi.mergeOptions(opts, { version: utilities.getVersion() });
|
|
121
|
+
}
|
|
122
|
+
super(Firewall.__pulumiType, name, inputs, opts);
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Get an existing Firewall resource's state with the given name, ID, and optional extra
|
|
126
|
+
* properties used to qualify the lookup.
|
|
127
|
+
*
|
|
128
|
+
* @param name The _unique_ name of the resulting resource.
|
|
129
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
130
|
+
* @param state Any extra arguments used during the lookup.
|
|
131
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
132
|
+
*/
|
|
133
|
+
static get(name, id, state, opts) {
|
|
134
|
+
return new Firewall(name, state, Object.assign(Object.assign({}, opts), { id: id }));
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Returns true if the given object is an instance of Firewall. This is designed to work even
|
|
138
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
139
|
+
*/
|
|
140
|
+
static isInstance(obj) {
|
|
141
|
+
if (obj === undefined || obj === null) {
|
|
142
|
+
return false;
|
|
143
|
+
}
|
|
144
|
+
return obj['__pulumiType'] === Firewall.__pulumiType;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
exports.Firewall = Firewall;
|
|
148
|
+
/** @internal */
|
|
149
|
+
Firewall.__pulumiType = 'digitalocean:index/firewall:Firewall';
|
|
150
|
+
//# sourceMappingURL=firewall.js.map
|
package/firewall.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"firewall.js","sourceRoot":"","sources":["../firewall.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;AAEjF,yCAAyC;AAEzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AS,IAAI,GAAG,KAAK,IAAI,EAAE;YACnC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,GAAG,CAAC,cAAc,CAAC,KAAK,QAAQ,CAAC,YAAY,CAAC;IACzD,CAAC;;AA1BL,4BA0GC;AA5FG,gBAAgB;AACO,qBAAY,GAAG,sCAAsC,CAAC"}
|
package/floatingIp.d.ts
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
/**
|
|
3
|
+
* Provides a DigitalOcean Floating IP to represent a publicly-accessible static IP addresses that can be mapped to one of your Droplets.
|
|
4
|
+
*
|
|
5
|
+
* > **NOTE:** Floating IPs can be assigned to a Droplet either directly on the `digitalocean.FloatingIp` resource by setting a `dropletId` or using the `digitalocean.FloatingIpAssignment` resource, but the two cannot be used together.
|
|
6
|
+
*
|
|
7
|
+
* ## Example Usage
|
|
8
|
+
*
|
|
9
|
+
* ```typescript
|
|
10
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
11
|
+
* import * as digitalocean from "@pulumi/digitalocean";
|
|
12
|
+
*
|
|
13
|
+
* const foobarDroplet = new digitalocean.Droplet("foobarDroplet", {
|
|
14
|
+
* size: "s-1vcpu-1gb",
|
|
15
|
+
* image: "ubuntu-18-04-x64",
|
|
16
|
+
* region: "sgp1",
|
|
17
|
+
* ipv6: true,
|
|
18
|
+
* privateNetworking: true,
|
|
19
|
+
* });
|
|
20
|
+
* const foobarFloatingIp = new digitalocean.FloatingIp("foobarFloatingIp", {
|
|
21
|
+
* dropletId: foobarDroplet.id,
|
|
22
|
+
* region: foobarDroplet.region,
|
|
23
|
+
* });
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* ## Import
|
|
27
|
+
*
|
|
28
|
+
* Floating IPs can be imported using the `ip`, e.g.
|
|
29
|
+
*
|
|
30
|
+
* ```sh
|
|
31
|
+
* $ pulumi import digitalocean:index/floatingIp:FloatingIp myip 192.168.0.1
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
export declare class FloatingIp extends pulumi.CustomResource {
|
|
35
|
+
/**
|
|
36
|
+
* Get an existing FloatingIp resource's state with the given name, ID, and optional extra
|
|
37
|
+
* properties used to qualify the lookup.
|
|
38
|
+
*
|
|
39
|
+
* @param name The _unique_ name of the resulting resource.
|
|
40
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
41
|
+
* @param state Any extra arguments used during the lookup.
|
|
42
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
43
|
+
*/
|
|
44
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: FloatingIpState, opts?: pulumi.CustomResourceOptions): FloatingIp;
|
|
45
|
+
/**
|
|
46
|
+
* Returns true if the given object is an instance of FloatingIp. This is designed to work even
|
|
47
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
48
|
+
*/
|
|
49
|
+
static isInstance(obj: any): obj is FloatingIp;
|
|
50
|
+
/**
|
|
51
|
+
* The ID of Droplet that the Floating IP will be assigned to.
|
|
52
|
+
*/
|
|
53
|
+
readonly dropletId: pulumi.Output<number | undefined>;
|
|
54
|
+
/**
|
|
55
|
+
* The uniform resource name of the floating ip
|
|
56
|
+
*/
|
|
57
|
+
readonly floatingIpUrn: pulumi.Output<string>;
|
|
58
|
+
/**
|
|
59
|
+
* The IP Address of the resource
|
|
60
|
+
*/
|
|
61
|
+
readonly ipAddress: pulumi.Output<string>;
|
|
62
|
+
/**
|
|
63
|
+
* The region that the Floating IP is reserved to.
|
|
64
|
+
*/
|
|
65
|
+
readonly region: pulumi.Output<string>;
|
|
66
|
+
/**
|
|
67
|
+
* Create a FloatingIp resource with the given unique name, arguments, and options.
|
|
68
|
+
*
|
|
69
|
+
* @param name The _unique_ name of the resource.
|
|
70
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
71
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
72
|
+
*/
|
|
73
|
+
constructor(name: string, args: FloatingIpArgs, opts?: pulumi.CustomResourceOptions);
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Input properties used for looking up and filtering FloatingIp resources.
|
|
77
|
+
*/
|
|
78
|
+
export interface FloatingIpState {
|
|
79
|
+
/**
|
|
80
|
+
* The ID of Droplet that the Floating IP will be assigned to.
|
|
81
|
+
*/
|
|
82
|
+
dropletId?: pulumi.Input<number>;
|
|
83
|
+
/**
|
|
84
|
+
* The uniform resource name of the floating ip
|
|
85
|
+
*/
|
|
86
|
+
floatingIpUrn?: pulumi.Input<string>;
|
|
87
|
+
/**
|
|
88
|
+
* The IP Address of the resource
|
|
89
|
+
*/
|
|
90
|
+
ipAddress?: pulumi.Input<string>;
|
|
91
|
+
/**
|
|
92
|
+
* The region that the Floating IP is reserved to.
|
|
93
|
+
*/
|
|
94
|
+
region?: pulumi.Input<string>;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* The set of arguments for constructing a FloatingIp resource.
|
|
98
|
+
*/
|
|
99
|
+
export interface FloatingIpArgs {
|
|
100
|
+
/**
|
|
101
|
+
* The ID of Droplet that the Floating IP will be assigned to.
|
|
102
|
+
*/
|
|
103
|
+
dropletId?: pulumi.Input<number>;
|
|
104
|
+
/**
|
|
105
|
+
* The IP Address of the resource
|
|
106
|
+
*/
|
|
107
|
+
ipAddress?: pulumi.Input<string>;
|
|
108
|
+
/**
|
|
109
|
+
* The region that the Floating IP is reserved to.
|
|
110
|
+
*/
|
|
111
|
+
region: pulumi.Input<string>;
|
|
112
|
+
}
|
package/floatingIp.js
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
|
3
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
const pulumi = require("@pulumi/pulumi");
|
|
6
|
+
const utilities = require("./utilities");
|
|
7
|
+
/**
|
|
8
|
+
* Provides a DigitalOcean Floating IP to represent a publicly-accessible static IP addresses that can be mapped to one of your Droplets.
|
|
9
|
+
*
|
|
10
|
+
* > **NOTE:** Floating IPs can be assigned to a Droplet either directly on the `digitalocean.FloatingIp` resource by setting a `dropletId` or using the `digitalocean.FloatingIpAssignment` resource, but the two cannot be used together.
|
|
11
|
+
*
|
|
12
|
+
* ## Example Usage
|
|
13
|
+
*
|
|
14
|
+
* ```typescript
|
|
15
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
16
|
+
* import * as digitalocean from "@pulumi/digitalocean";
|
|
17
|
+
*
|
|
18
|
+
* const foobarDroplet = new digitalocean.Droplet("foobarDroplet", {
|
|
19
|
+
* size: "s-1vcpu-1gb",
|
|
20
|
+
* image: "ubuntu-18-04-x64",
|
|
21
|
+
* region: "sgp1",
|
|
22
|
+
* ipv6: true,
|
|
23
|
+
* privateNetworking: true,
|
|
24
|
+
* });
|
|
25
|
+
* const foobarFloatingIp = new digitalocean.FloatingIp("foobarFloatingIp", {
|
|
26
|
+
* dropletId: foobarDroplet.id,
|
|
27
|
+
* region: foobarDroplet.region,
|
|
28
|
+
* });
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* ## Import
|
|
32
|
+
*
|
|
33
|
+
* Floating IPs can be imported using the `ip`, e.g.
|
|
34
|
+
*
|
|
35
|
+
* ```sh
|
|
36
|
+
* $ pulumi import digitalocean:index/floatingIp:FloatingIp myip 192.168.0.1
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
class FloatingIp extends pulumi.CustomResource {
|
|
40
|
+
constructor(name, argsOrState, opts) {
|
|
41
|
+
let inputs = {};
|
|
42
|
+
opts = opts || {};
|
|
43
|
+
if (opts.id) {
|
|
44
|
+
const state = argsOrState;
|
|
45
|
+
inputs["dropletId"] = state ? state.dropletId : undefined;
|
|
46
|
+
inputs["floatingIpUrn"] = state ? state.floatingIpUrn : undefined;
|
|
47
|
+
inputs["ipAddress"] = state ? state.ipAddress : undefined;
|
|
48
|
+
inputs["region"] = state ? state.region : undefined;
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
const args = argsOrState;
|
|
52
|
+
if ((!args || args.region === undefined) && !opts.urn) {
|
|
53
|
+
throw new Error("Missing required property 'region'");
|
|
54
|
+
}
|
|
55
|
+
inputs["dropletId"] = args ? args.dropletId : undefined;
|
|
56
|
+
inputs["ipAddress"] = args ? args.ipAddress : undefined;
|
|
57
|
+
inputs["region"] = args ? args.region : undefined;
|
|
58
|
+
inputs["floatingIpUrn"] = undefined /*out*/;
|
|
59
|
+
}
|
|
60
|
+
if (!opts.version) {
|
|
61
|
+
opts = pulumi.mergeOptions(opts, { version: utilities.getVersion() });
|
|
62
|
+
}
|
|
63
|
+
super(FloatingIp.__pulumiType, name, inputs, opts);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Get an existing FloatingIp resource's state with the given name, ID, and optional extra
|
|
67
|
+
* properties used to qualify the lookup.
|
|
68
|
+
*
|
|
69
|
+
* @param name The _unique_ name of the resulting resource.
|
|
70
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
71
|
+
* @param state Any extra arguments used during the lookup.
|
|
72
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
73
|
+
*/
|
|
74
|
+
static get(name, id, state, opts) {
|
|
75
|
+
return new FloatingIp(name, state, Object.assign(Object.assign({}, opts), { id: id }));
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Returns true if the given object is an instance of FloatingIp. This is designed to work even
|
|
79
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
80
|
+
*/
|
|
81
|
+
static isInstance(obj) {
|
|
82
|
+
if (obj === undefined || obj === null) {
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
85
|
+
return obj['__pulumiType'] === FloatingIp.__pulumiType;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
exports.FloatingIp = FloatingIp;
|
|
89
|
+
/** @internal */
|
|
90
|
+
FloatingIp.__pulumiType = 'digitalocean:index/floatingIp:FloatingIp';
|
|
91
|
+
//# sourceMappingURL=floatingIp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"floatingIp.js","sourceRoot":"","sources":["../floatingIp.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAa,UAAW,SAAQ,MAAM,CAAC,cAAc;IAqDjD,YAAY,IAAY,EAAE,WAA8C,EAAE,IAAmC;QACzG,IAAI,MAAM,GAAkB,EAAE,CAAC;QAC/B,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,EAAE,EAAE;YACT,MAAM,KAAK,GAAG,WAA0C,CAAC;YACzD,MAAM,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;YAC1D,MAAM,CAAC,eAAe,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC;YAClE,MAAM,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;YAC1D,MAAM,CAAC,QAAQ,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;SACvD;aAAM;YACH,MAAM,IAAI,GAAG,WAAyC,CAAC;YACvD,IAAI,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;gBACnD,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;aACzD;YACD,MAAM,CAAC,WAAW,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