@upcloud/pulumi-upcloud 0.0.5
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 +61 -0
- package/config/index.d.ts +1 -0
- package/config/index.js +21 -0
- package/config/index.js.map +1 -0
- package/config/vars.d.ts +25 -0
- package/config/vars.js +43 -0
- package/config/vars.js.map +1 -0
- package/floatingIpAddress.d.ts +128 -0
- package/floatingIpAddress.js +90 -0
- package/floatingIpAddress.js.map +1 -0
- package/gateway.d.ts +206 -0
- package/gateway.js +111 -0
- package/gateway.js.map +1 -0
- package/gatewayConnection.d.ts +157 -0
- package/gatewayConnection.js +105 -0
- package/gatewayConnection.js.map +1 -0
- package/gatewayConnectionTunnel.d.ts +129 -0
- package/gatewayConnectionTunnel.js +78 -0
- package/gatewayConnectionTunnel.js.map +1 -0
- package/getHosts.d.ts +55 -0
- package/getHosts.js +52 -0
- package/getHosts.js.map +1 -0
- package/getIpAddresses.d.ts +51 -0
- package/getIpAddresses.js +48 -0
- package/getIpAddresses.js.map +1 -0
- package/getKubernetesCluster.d.ts +33 -0
- package/getKubernetesCluster.js +28 -0
- package/getKubernetesCluster.js.map +1 -0
- package/getLoadBalancerDnsChallengeDomain.d.ts +40 -0
- package/getLoadBalancerDnsChallengeDomain.js +42 -0
- package/getLoadBalancerDnsChallengeDomain.js.map +1 -0
- package/getManagedDatabaseMysqlSessions.d.ts +83 -0
- package/getManagedDatabaseMysqlSessions.js +74 -0
- package/getManagedDatabaseMysqlSessions.js.map +1 -0
- package/getManagedDatabaseOpensearchIndices.d.ts +82 -0
- package/getManagedDatabaseOpensearchIndices.js +76 -0
- package/getManagedDatabaseOpensearchIndices.js.map +1 -0
- package/getManagedDatabasePostgresqlSessions.d.ts +83 -0
- package/getManagedDatabasePostgresqlSessions.js +74 -0
- package/getManagedDatabasePostgresqlSessions.js.map +1 -0
- package/getManagedDatabaseRedisSessions.d.ts +87 -0
- package/getManagedDatabaseRedisSessions.js +78 -0
- package/getManagedDatabaseRedisSessions.js.map +1 -0
- package/getManagedDatabaseValkeySessions.d.ts +83 -0
- package/getManagedDatabaseValkeySessions.js +74 -0
- package/getManagedDatabaseValkeySessions.js.map +1 -0
- package/getManagedObjectStoragePolicies.d.ts +33 -0
- package/getManagedObjectStoragePolicies.js +28 -0
- package/getManagedObjectStoragePolicies.js.map +1 -0
- package/getManagedObjectStorageRegions.d.ts +33 -0
- package/getManagedObjectStorageRegions.js +30 -0
- package/getManagedObjectStorageRegions.js.map +1 -0
- package/getNetworks.d.ts +60 -0
- package/getNetworks.js +56 -0
- package/getNetworks.js.map +1 -0
- package/getStorage.d.ts +163 -0
- package/getStorage.js +122 -0
- package/getStorage.js.map +1 -0
- package/getTags.d.ts +20 -0
- package/getTags.js +24 -0
- package/getTags.js.map +1 -0
- package/getZone.d.ts +42 -0
- package/getZone.js +32 -0
- package/getZone.js.map +1 -0
- package/getZones.d.ts +29 -0
- package/getZones.js +30 -0
- package/getZones.js.map +1 -0
- package/index.d.ts +177 -0
- package/index.js +287 -0
- package/index.js.map +1 -0
- package/kubernetesCluster.d.ts +237 -0
- package/kubernetesCluster.js +131 -0
- package/kubernetesCluster.js.map +1 -0
- package/kubernetesNodeGroup.d.ts +243 -0
- package/kubernetesNodeGroup.js +120 -0
- package/kubernetesNodeGroup.js.map +1 -0
- package/loadbalancer.d.ts +261 -0
- package/loadbalancer.js +122 -0
- package/loadbalancer.js.map +1 -0
- package/loadbalancerBackend.d.ts +121 -0
- package/loadbalancerBackend.js +90 -0
- package/loadbalancerBackend.js.map +1 -0
- package/loadbalancerBackendTlsConfig.d.ts +75 -0
- package/loadbalancerBackendTlsConfig.js +62 -0
- package/loadbalancerBackendTlsConfig.js.map +1 -0
- package/loadbalancerDynamicBackendMember.d.ts +169 -0
- package/loadbalancerDynamicBackendMember.js +119 -0
- package/loadbalancerDynamicBackendMember.js.map +1 -0
- package/loadbalancerDynamicCertificateBundle.d.ts +114 -0
- package/loadbalancerDynamicCertificateBundle.js +83 -0
- package/loadbalancerDynamicCertificateBundle.js.map +1 -0
- package/loadbalancerFrontend.d.ts +184 -0
- package/loadbalancerFrontend.js +126 -0
- package/loadbalancerFrontend.js.map +1 -0
- package/loadbalancerFrontendRule.d.ts +170 -0
- package/loadbalancerFrontendRule.js +125 -0
- package/loadbalancerFrontendRule.js.map +1 -0
- package/loadbalancerFrontendTlsConfig.d.ts +114 -0
- package/loadbalancerFrontendTlsConfig.js +101 -0
- package/loadbalancerFrontendTlsConfig.js.map +1 -0
- package/loadbalancerManualCertificateBundle.d.ts +111 -0
- package/loadbalancerManualCertificateBundle.js +72 -0
- package/loadbalancerManualCertificateBundle.js.map +1 -0
- package/loadbalancerResolver.d.ts +171 -0
- package/loadbalancerResolver.js +120 -0
- package/loadbalancerResolver.js.map +1 -0
- package/loadbalancerStaticBackendMember.d.ts +156 -0
- package/loadbalancerStaticBackendMember.js +106 -0
- package/loadbalancerStaticBackendMember.js.map +1 -0
- package/managedDatabaseLogicalDatabase.d.ts +109 -0
- package/managedDatabaseLogicalDatabase.js +83 -0
- package/managedDatabaseLogicalDatabase.js.map +1 -0
- package/managedDatabaseMysql.d.ts +298 -0
- package/managedDatabaseMysql.js +139 -0
- package/managedDatabaseMysql.js.map +1 -0
- package/managedDatabaseOpensearch.d.ts +317 -0
- package/managedDatabaseOpensearch.js +132 -0
- package/managedDatabaseOpensearch.js.map +1 -0
- package/managedDatabasePostgresql.d.ts +295 -0
- package/managedDatabasePostgresql.js +130 -0
- package/managedDatabasePostgresql.js.map +1 -0
- package/managedDatabaseRedis.d.ts +287 -0
- package/managedDatabaseRedis.js +128 -0
- package/managedDatabaseRedis.js.map +1 -0
- package/managedDatabaseUser.d.ts +163 -0
- package/managedDatabaseUser.js +94 -0
- package/managedDatabaseUser.js.map +1 -0
- package/managedDatabaseValkey.d.ts +285 -0
- package/managedDatabaseValkey.js +126 -0
- package/managedDatabaseValkey.js.map +1 -0
- package/managedObjectStorage.d.ts +178 -0
- package/managedObjectStorage.js +107 -0
- package/managedObjectStorage.js.map +1 -0
- package/managedObjectStorageBucket.d.ts +94 -0
- package/managedObjectStorageBucket.js +76 -0
- package/managedObjectStorageBucket.js.map +1 -0
- package/managedObjectStorageCustomDomain.d.ts +105 -0
- package/managedObjectStorageCustomDomain.js +89 -0
- package/managedObjectStorageCustomDomain.js.map +1 -0
- package/managedObjectStoragePolicy.d.ts +155 -0
- package/managedObjectStoragePolicy.js +93 -0
- package/managedObjectStoragePolicy.js.map +1 -0
- package/managedObjectStorageUser.d.ts +101 -0
- package/managedObjectStorageUser.js +80 -0
- package/managedObjectStorageUser.js.map +1 -0
- package/managedObjectStorageUserAccessKey.d.ts +128 -0
- package/managedObjectStorageUserAccessKey.js +96 -0
- package/managedObjectStorageUserAccessKey.js.map +1 -0
- package/managedObjectStorageUserPolicy.d.ts +100 -0
- package/managedObjectStorageUserPolicy.js +87 -0
- package/managedObjectStorageUserPolicy.js.map +1 -0
- package/network.d.ts +142 -0
- package/network.js +95 -0
- package/network.js.map +1 -0
- package/networkPeering.d.ts +137 -0
- package/networkPeering.js +96 -0
- package/networkPeering.js.map +1 -0
- package/objectStorage.d.ts +196 -0
- package/objectStorage.js +132 -0
- package/objectStorage.js.map +1 -0
- package/package.json +29 -0
- package/provider.d.ts +60 -0
- package/provider.js +50 -0
- package/provider.js.map +1 -0
- package/router.d.ts +124 -0
- package/router.js +77 -0
- package/router.js.map +1 -0
- package/server.d.ts +332 -0
- package/server.js +106 -0
- package/server.js.map +1 -0
- package/serverFirewallRules.d.ts +124 -0
- package/serverFirewallRules.js +107 -0
- package/serverFirewallRules.js.map +1 -0
- package/serverGroup.d.ts +160 -0
- package/serverGroup.js +91 -0
- package/serverGroup.js.map +1 -0
- package/storage.d.ts +210 -0
- package/storage.js +91 -0
- package/storage.js.map +1 -0
- package/storageTemplate.d.ts +151 -0
- package/storageTemplate.js +90 -0
- package/storageTemplate.js.map +1 -0
- package/tag.d.ts +75 -0
- package/tag.js +56 -0
- package/tag.js.map +1 -0
- package/types/index.d.ts +3 -0
- package/types/index.js +11 -0
- package/types/index.js.map +1 -0
- package/types/input.d.ts +3721 -0
- package/types/input.js +5 -0
- package/types/input.js.map +1 -0
- package/types/output.d.ts +3459 -0
- package/types/output.js +5 -0
- package/types/output.js.map +1 -0
- package/utilities.d.ts +8 -0
- package/utilities.js +101 -0
- package/utilities.js.map +1 -0
|
@@ -0,0 +1,107 @@
|
|
|
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
|
+
exports.ServerFirewallRules = void 0;
|
|
6
|
+
const pulumi = require("@pulumi/pulumi");
|
|
7
|
+
const utilities = require("./utilities");
|
|
8
|
+
/**
|
|
9
|
+
* This resource represents a generated list of UpCloud firewall rules.
|
|
10
|
+
* Firewall rules are used in conjunction with UpCloud servers.
|
|
11
|
+
* Each server has its own firewall rules.
|
|
12
|
+
* The firewall is enabled on all network interfaces except ones attached to private virtual networks.
|
|
13
|
+
* The maximum number of firewall rules per server is 1000.
|
|
14
|
+
*
|
|
15
|
+
* ## Example Usage
|
|
16
|
+
*
|
|
17
|
+
* ```typescript
|
|
18
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
19
|
+
* import * as upcloud from "@upcloud/pulumi-upcloud";
|
|
20
|
+
*
|
|
21
|
+
* // The following example defines a server and then links the server to a single firewall rule.
|
|
22
|
+
* // The list of firewall rules applied to the server can be expanded by providing additional server_firewall_rules blocks.
|
|
23
|
+
* const exampleServer = new upcloud.Server("exampleServer", {
|
|
24
|
+
* firewall: true,
|
|
25
|
+
* hostname: "terraform.example.tld",
|
|
26
|
+
* zone: "de-fra1",
|
|
27
|
+
* plan: "1xCPU-1GB",
|
|
28
|
+
* template: {
|
|
29
|
+
* storage: "Ubuntu Server 20.04 LTS (Focal Fossa)",
|
|
30
|
+
* size: 25,
|
|
31
|
+
* },
|
|
32
|
+
* networkInterfaces: [{
|
|
33
|
+
* type: "utility",
|
|
34
|
+
* }],
|
|
35
|
+
* });
|
|
36
|
+
* const exampleServerFirewallRules = new upcloud.ServerFirewallRules("exampleServerFirewallRules", {
|
|
37
|
+
* serverId: exampleServer.id,
|
|
38
|
+
* firewallRules: [{
|
|
39
|
+
* action: "accept",
|
|
40
|
+
* comment: "Allow SSH from this network",
|
|
41
|
+
* destinationPortEnd: "22",
|
|
42
|
+
* destinationPortStart: "22",
|
|
43
|
+
* direction: "in",
|
|
44
|
+
* family: "IPv4",
|
|
45
|
+
* protocol: "tcp",
|
|
46
|
+
* sourceAddressEnd: "192.168.1.255",
|
|
47
|
+
* sourceAddressStart: "192.168.1.1",
|
|
48
|
+
* }],
|
|
49
|
+
* });
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
52
|
+
* ## Import
|
|
53
|
+
*
|
|
54
|
+
* ```sh
|
|
55
|
+
* $ pulumi import upcloud:index/serverFirewallRules:ServerFirewallRules my_example_rules 049d7ca2-757e-4fb1-a833-f87ee056547a
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
class ServerFirewallRules extends pulumi.CustomResource {
|
|
59
|
+
/**
|
|
60
|
+
* Get an existing ServerFirewallRules resource's state with the given name, ID, and optional extra
|
|
61
|
+
* properties used to qualify the lookup.
|
|
62
|
+
*
|
|
63
|
+
* @param name The _unique_ name of the resulting resource.
|
|
64
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
65
|
+
* @param state Any extra arguments used during the lookup.
|
|
66
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
67
|
+
*/
|
|
68
|
+
static get(name, id, state, opts) {
|
|
69
|
+
return new ServerFirewallRules(name, state, Object.assign(Object.assign({}, opts), { id: id }));
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Returns true if the given object is an instance of ServerFirewallRules. This is designed to work even
|
|
73
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
74
|
+
*/
|
|
75
|
+
static isInstance(obj) {
|
|
76
|
+
if (obj === undefined || obj === null) {
|
|
77
|
+
return false;
|
|
78
|
+
}
|
|
79
|
+
return obj['__pulumiType'] === ServerFirewallRules.__pulumiType;
|
|
80
|
+
}
|
|
81
|
+
constructor(name, argsOrState, opts) {
|
|
82
|
+
let resourceInputs = {};
|
|
83
|
+
opts = opts || {};
|
|
84
|
+
if (opts.id) {
|
|
85
|
+
const state = argsOrState;
|
|
86
|
+
resourceInputs["firewallRules"] = state ? state.firewallRules : undefined;
|
|
87
|
+
resourceInputs["serverId"] = state ? state.serverId : undefined;
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
const args = argsOrState;
|
|
91
|
+
if ((!args || args.firewallRules === undefined) && !opts.urn) {
|
|
92
|
+
throw new Error("Missing required property 'firewallRules'");
|
|
93
|
+
}
|
|
94
|
+
if ((!args || args.serverId === undefined) && !opts.urn) {
|
|
95
|
+
throw new Error("Missing required property 'serverId'");
|
|
96
|
+
}
|
|
97
|
+
resourceInputs["firewallRules"] = args ? args.firewallRules : undefined;
|
|
98
|
+
resourceInputs["serverId"] = args ? args.serverId : undefined;
|
|
99
|
+
}
|
|
100
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
101
|
+
super(ServerFirewallRules.__pulumiType, name, resourceInputs, opts);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
exports.ServerFirewallRules = ServerFirewallRules;
|
|
105
|
+
/** @internal */
|
|
106
|
+
ServerFirewallRules.__pulumiType = 'upcloud:index/serverFirewallRules:ServerFirewallRules';
|
|
107
|
+
//# sourceMappingURL=serverFirewallRules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serverFirewallRules.js","sourceRoot":"","sources":["../serverFirewallRules.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,MAAa,mBAAoB,SAAQ,MAAM,CAAC,cAAc;IAC1D;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAgC,EAAE,IAAmC;QAC9H,OAAO,IAAI,mBAAmB,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IAC1E,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,mBAAmB,CAAC,YAAY,CAAC;IACpE,CAAC;IAuBD,YAAY,IAAY,EAAE,WAAgE,EAAE,IAAmC;QAC3H,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,EAAE,EAAE;YACT,MAAM,KAAK,GAAG,WAAmD,CAAC;YAClE,cAAc,CAAC,eAAe,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC;YAC1E,cAAc,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;SACnE;aAAM;YACH,MAAM,IAAI,GAAG,WAAkD,CAAC;YAChE,IAAI,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,aAAa,KAAK,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;gBAC1D,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;aAChE;YACD,IAAI,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;gBACrD,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;aAC3D;YACD,cAAc,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC;YACxE,cAAc,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;SACjE;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,mBAAmB,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IACxE,CAAC;;AArEL,kDAsEC;AAxDG,gBAAgB;AACO,gCAAY,GAAG,uDAAuD,CAAC"}
|
package/serverGroup.d.ts
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
/**
|
|
3
|
+
* Server groups allow grouping servers and defining anti-affinity for the servers.
|
|
4
|
+
*
|
|
5
|
+
* ## Example Usage
|
|
6
|
+
*
|
|
7
|
+
* ```typescript
|
|
8
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
9
|
+
* import * as upcloud from "@upcloud/pulumi-upcloud";
|
|
10
|
+
*
|
|
11
|
+
* const main = new upcloud.ServerGroup("main", {
|
|
12
|
+
* antiAffinityPolicy: "yes",
|
|
13
|
+
* labels: {
|
|
14
|
+
* key1: "val1",
|
|
15
|
+
* key2: "val2",
|
|
16
|
+
* key3: "val3",
|
|
17
|
+
* },
|
|
18
|
+
* members: [
|
|
19
|
+
* "00b51165-fb58-4b77-bb8c-552277be1764",
|
|
20
|
+
* "00d56575-3821-3301-9de4-2b2bc7e35pqf",
|
|
21
|
+
* "000012dc-fe8c-a3y6-91f9-0db1215c36cf",
|
|
22
|
+
* ],
|
|
23
|
+
* title: "main_group",
|
|
24
|
+
* });
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* ## Import
|
|
28
|
+
*
|
|
29
|
+
* ```sh
|
|
30
|
+
* $ pulumi import upcloud:index/serverGroup:ServerGroup main ead4544f-10bf-42a3-b98a-a0fea2e2ad14
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export declare class ServerGroup extends pulumi.CustomResource {
|
|
34
|
+
/**
|
|
35
|
+
* Get an existing ServerGroup resource's state with the given name, ID, and optional extra
|
|
36
|
+
* properties used to qualify the lookup.
|
|
37
|
+
*
|
|
38
|
+
* @param name The _unique_ name of the resulting resource.
|
|
39
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
40
|
+
* @param state Any extra arguments used during the lookup.
|
|
41
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
42
|
+
*/
|
|
43
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ServerGroupState, opts?: pulumi.CustomResourceOptions): ServerGroup;
|
|
44
|
+
/**
|
|
45
|
+
* Returns true if the given object is an instance of ServerGroup. This is designed to work even
|
|
46
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
47
|
+
*/
|
|
48
|
+
static isInstance(obj: any): obj is ServerGroup;
|
|
49
|
+
/**
|
|
50
|
+
* Defines if a server group is an anti-affinity group. Setting this to `strict` or `yes` will result in all servers in the
|
|
51
|
+
* group being placed on separate compute hosts. The value can be `strict`, `yes`, or `no`. * `strict` policy doesn't allow
|
|
52
|
+
* servers in the same server group to be on the same host * `yes` refers to best-effort policy and tries to put servers on
|
|
53
|
+
* different hosts, but this is not guaranteed * `no` refers to having no policy and thus no effect on server host affinity
|
|
54
|
+
* To verify if the anti-affinity policies are met by requesting a server group details from API. For more information
|
|
55
|
+
* please see UpCloud API documentation on server groups. Plese also note that anti-affinity policies are only applied on
|
|
56
|
+
* server start. This means that if anti-affinity policies in server group are not met, you need to manually restart the
|
|
57
|
+
* servers in said group, for example via API, UpCloud Control Panel or upctl (UpCloud CLI)
|
|
58
|
+
*/
|
|
59
|
+
readonly antiAffinityPolicy: pulumi.Output<string>;
|
|
60
|
+
/**
|
|
61
|
+
* User defined key-value pairs to classify the server group.
|
|
62
|
+
*/
|
|
63
|
+
readonly labels: pulumi.Output<{
|
|
64
|
+
[key: string]: string;
|
|
65
|
+
}>;
|
|
66
|
+
/**
|
|
67
|
+
* UUIDs of the servers that are members of this group. Servers can also be attached to the server group via `serverGroup`
|
|
68
|
+
* property of `upcloud.Server`. See also `trackMembers` property.
|
|
69
|
+
*/
|
|
70
|
+
readonly members: pulumi.Output<string[] | undefined>;
|
|
71
|
+
/**
|
|
72
|
+
* Title of your server group
|
|
73
|
+
*/
|
|
74
|
+
readonly title: pulumi.Output<string>;
|
|
75
|
+
/**
|
|
76
|
+
* Controls if members of the server group are being tracked in this resource. Set to `false` when using `serverGroup`
|
|
77
|
+
* property of `upcloud.Server` to attach servers to the server group to avoid delayed state updates.
|
|
78
|
+
*/
|
|
79
|
+
readonly trackMembers: pulumi.Output<boolean>;
|
|
80
|
+
/**
|
|
81
|
+
* Create a ServerGroup resource with the given unique name, arguments, and options.
|
|
82
|
+
*
|
|
83
|
+
* @param name The _unique_ name of the resource.
|
|
84
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
85
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
86
|
+
*/
|
|
87
|
+
constructor(name: string, args: ServerGroupArgs, opts?: pulumi.CustomResourceOptions);
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Input properties used for looking up and filtering ServerGroup resources.
|
|
91
|
+
*/
|
|
92
|
+
export interface ServerGroupState {
|
|
93
|
+
/**
|
|
94
|
+
* Defines if a server group is an anti-affinity group. Setting this to `strict` or `yes` will result in all servers in the
|
|
95
|
+
* group being placed on separate compute hosts. The value can be `strict`, `yes`, or `no`. * `strict` policy doesn't allow
|
|
96
|
+
* servers in the same server group to be on the same host * `yes` refers to best-effort policy and tries to put servers on
|
|
97
|
+
* different hosts, but this is not guaranteed * `no` refers to having no policy and thus no effect on server host affinity
|
|
98
|
+
* To verify if the anti-affinity policies are met by requesting a server group details from API. For more information
|
|
99
|
+
* please see UpCloud API documentation on server groups. Plese also note that anti-affinity policies are only applied on
|
|
100
|
+
* server start. This means that if anti-affinity policies in server group are not met, you need to manually restart the
|
|
101
|
+
* servers in said group, for example via API, UpCloud Control Panel or upctl (UpCloud CLI)
|
|
102
|
+
*/
|
|
103
|
+
antiAffinityPolicy?: pulumi.Input<string>;
|
|
104
|
+
/**
|
|
105
|
+
* User defined key-value pairs to classify the server group.
|
|
106
|
+
*/
|
|
107
|
+
labels?: pulumi.Input<{
|
|
108
|
+
[key: string]: pulumi.Input<string>;
|
|
109
|
+
}>;
|
|
110
|
+
/**
|
|
111
|
+
* UUIDs of the servers that are members of this group. Servers can also be attached to the server group via `serverGroup`
|
|
112
|
+
* property of `upcloud.Server`. See also `trackMembers` property.
|
|
113
|
+
*/
|
|
114
|
+
members?: pulumi.Input<pulumi.Input<string>[]>;
|
|
115
|
+
/**
|
|
116
|
+
* Title of your server group
|
|
117
|
+
*/
|
|
118
|
+
title?: pulumi.Input<string>;
|
|
119
|
+
/**
|
|
120
|
+
* Controls if members of the server group are being tracked in this resource. Set to `false` when using `serverGroup`
|
|
121
|
+
* property of `upcloud.Server` to attach servers to the server group to avoid delayed state updates.
|
|
122
|
+
*/
|
|
123
|
+
trackMembers?: pulumi.Input<boolean>;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* The set of arguments for constructing a ServerGroup resource.
|
|
127
|
+
*/
|
|
128
|
+
export interface ServerGroupArgs {
|
|
129
|
+
/**
|
|
130
|
+
* Defines if a server group is an anti-affinity group. Setting this to `strict` or `yes` will result in all servers in the
|
|
131
|
+
* group being placed on separate compute hosts. The value can be `strict`, `yes`, or `no`. * `strict` policy doesn't allow
|
|
132
|
+
* servers in the same server group to be on the same host * `yes` refers to best-effort policy and tries to put servers on
|
|
133
|
+
* different hosts, but this is not guaranteed * `no` refers to having no policy and thus no effect on server host affinity
|
|
134
|
+
* To verify if the anti-affinity policies are met by requesting a server group details from API. For more information
|
|
135
|
+
* please see UpCloud API documentation on server groups. Plese also note that anti-affinity policies are only applied on
|
|
136
|
+
* server start. This means that if anti-affinity policies in server group are not met, you need to manually restart the
|
|
137
|
+
* servers in said group, for example via API, UpCloud Control Panel or upctl (UpCloud CLI)
|
|
138
|
+
*/
|
|
139
|
+
antiAffinityPolicy?: pulumi.Input<string>;
|
|
140
|
+
/**
|
|
141
|
+
* User defined key-value pairs to classify the server group.
|
|
142
|
+
*/
|
|
143
|
+
labels?: pulumi.Input<{
|
|
144
|
+
[key: string]: pulumi.Input<string>;
|
|
145
|
+
}>;
|
|
146
|
+
/**
|
|
147
|
+
* UUIDs of the servers that are members of this group. Servers can also be attached to the server group via `serverGroup`
|
|
148
|
+
* property of `upcloud.Server`. See also `trackMembers` property.
|
|
149
|
+
*/
|
|
150
|
+
members?: pulumi.Input<pulumi.Input<string>[]>;
|
|
151
|
+
/**
|
|
152
|
+
* Title of your server group
|
|
153
|
+
*/
|
|
154
|
+
title: pulumi.Input<string>;
|
|
155
|
+
/**
|
|
156
|
+
* Controls if members of the server group are being tracked in this resource. Set to `false` when using `serverGroup`
|
|
157
|
+
* property of `upcloud.Server` to attach servers to the server group to avoid delayed state updates.
|
|
158
|
+
*/
|
|
159
|
+
trackMembers?: pulumi.Input<boolean>;
|
|
160
|
+
}
|
package/serverGroup.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
|
+
exports.ServerGroup = void 0;
|
|
6
|
+
const pulumi = require("@pulumi/pulumi");
|
|
7
|
+
const utilities = require("./utilities");
|
|
8
|
+
/**
|
|
9
|
+
* Server groups allow grouping servers and defining anti-affinity for the servers.
|
|
10
|
+
*
|
|
11
|
+
* ## Example Usage
|
|
12
|
+
*
|
|
13
|
+
* ```typescript
|
|
14
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
15
|
+
* import * as upcloud from "@upcloud/pulumi-upcloud";
|
|
16
|
+
*
|
|
17
|
+
* const main = new upcloud.ServerGroup("main", {
|
|
18
|
+
* antiAffinityPolicy: "yes",
|
|
19
|
+
* labels: {
|
|
20
|
+
* key1: "val1",
|
|
21
|
+
* key2: "val2",
|
|
22
|
+
* key3: "val3",
|
|
23
|
+
* },
|
|
24
|
+
* members: [
|
|
25
|
+
* "00b51165-fb58-4b77-bb8c-552277be1764",
|
|
26
|
+
* "00d56575-3821-3301-9de4-2b2bc7e35pqf",
|
|
27
|
+
* "000012dc-fe8c-a3y6-91f9-0db1215c36cf",
|
|
28
|
+
* ],
|
|
29
|
+
* title: "main_group",
|
|
30
|
+
* });
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* ## Import
|
|
34
|
+
*
|
|
35
|
+
* ```sh
|
|
36
|
+
* $ pulumi import upcloud:index/serverGroup:ServerGroup main ead4544f-10bf-42a3-b98a-a0fea2e2ad14
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
class ServerGroup extends pulumi.CustomResource {
|
|
40
|
+
/**
|
|
41
|
+
* Get an existing ServerGroup resource's state with the given name, ID, and optional extra
|
|
42
|
+
* properties used to qualify the lookup.
|
|
43
|
+
*
|
|
44
|
+
* @param name The _unique_ name of the resulting resource.
|
|
45
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
46
|
+
* @param state Any extra arguments used during the lookup.
|
|
47
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
48
|
+
*/
|
|
49
|
+
static get(name, id, state, opts) {
|
|
50
|
+
return new ServerGroup(name, state, Object.assign(Object.assign({}, opts), { id: id }));
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Returns true if the given object is an instance of ServerGroup. This is designed to work even
|
|
54
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
55
|
+
*/
|
|
56
|
+
static isInstance(obj) {
|
|
57
|
+
if (obj === undefined || obj === null) {
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
return obj['__pulumiType'] === ServerGroup.__pulumiType;
|
|
61
|
+
}
|
|
62
|
+
constructor(name, argsOrState, opts) {
|
|
63
|
+
let resourceInputs = {};
|
|
64
|
+
opts = opts || {};
|
|
65
|
+
if (opts.id) {
|
|
66
|
+
const state = argsOrState;
|
|
67
|
+
resourceInputs["antiAffinityPolicy"] = state ? state.antiAffinityPolicy : undefined;
|
|
68
|
+
resourceInputs["labels"] = state ? state.labels : undefined;
|
|
69
|
+
resourceInputs["members"] = state ? state.members : undefined;
|
|
70
|
+
resourceInputs["title"] = state ? state.title : undefined;
|
|
71
|
+
resourceInputs["trackMembers"] = state ? state.trackMembers : undefined;
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
const args = argsOrState;
|
|
75
|
+
if ((!args || args.title === undefined) && !opts.urn) {
|
|
76
|
+
throw new Error("Missing required property 'title'");
|
|
77
|
+
}
|
|
78
|
+
resourceInputs["antiAffinityPolicy"] = args ? args.antiAffinityPolicy : undefined;
|
|
79
|
+
resourceInputs["labels"] = args ? args.labels : undefined;
|
|
80
|
+
resourceInputs["members"] = args ? args.members : undefined;
|
|
81
|
+
resourceInputs["title"] = args ? args.title : undefined;
|
|
82
|
+
resourceInputs["trackMembers"] = args ? args.trackMembers : undefined;
|
|
83
|
+
}
|
|
84
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
85
|
+
super(ServerGroup.__pulumiType, name, resourceInputs, opts);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
exports.ServerGroup = ServerGroup;
|
|
89
|
+
/** @internal */
|
|
90
|
+
ServerGroup.__pulumiType = 'upcloud:index/serverGroup:ServerGroup';
|
|
91
|
+
//# sourceMappingURL=serverGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serverGroup.js","sourceRoot":"","sources":["../serverGroup.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAa,WAAY,SAAQ,MAAM,CAAC,cAAc;IAClD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAwB,EAAE,IAAmC;QACtH,OAAO,IAAI,WAAW,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IAClE,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,WAAW,CAAC,YAAY,CAAC;IAC5D,CAAC;IAwCD,YAAY,IAAY,EAAE,WAAgD,EAAE,IAAmC;QAC3G,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,EAAE,EAAE;YACT,MAAM,KAAK,GAAG,WAA2C,CAAC;YAC1D,cAAc,CAAC,oBAAoB,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC,CAAC,SAAS,CAAC;YACpF,cAAc,CAAC,QAAQ,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;YAC5D,cAAc,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;YAC9D,cAAc,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;YAC1D,cAAc,CAAC,cAAc,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC;SAC3E;aAAM;YACH,MAAM,IAAI,GAAG,WAA0C,CAAC;YACxD,IAAI,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;gBAClD,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;aACxD;YACD,cAAc,CAAC,oBAAoB,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,SAAS,CAAC;YAClF,cAAc,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;YAC1D,cAAc,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;YAC5D,cAAc,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;YACxD,cAAc,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC;SACzE;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,WAAW,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAChE,CAAC;;AAzFL,kCA0FC;AA5EG,gBAAgB;AACO,wBAAY,GAAG,uCAAuC,CAAC"}
|
package/storage.d.ts
ADDED
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
import * as inputs from "./types/input";
|
|
3
|
+
import * as outputs from "./types/output";
|
|
4
|
+
/**
|
|
5
|
+
* Manages UpCloud [Block Storage](https://upcloud.com/products/block-storage) devices.
|
|
6
|
+
*
|
|
7
|
+
* ## Import
|
|
8
|
+
*
|
|
9
|
+
* ```sh
|
|
10
|
+
* $ pulumi import upcloud:index/storage:Storage example_storage 0128ae5a-91dd-4ebf-bd1e-304c47f2c652
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
export declare class Storage extends pulumi.CustomResource {
|
|
14
|
+
/**
|
|
15
|
+
* Get an existing Storage resource's state with the given name, ID, and optional extra
|
|
16
|
+
* properties used to qualify the lookup.
|
|
17
|
+
*
|
|
18
|
+
* @param name The _unique_ name of the resulting resource.
|
|
19
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
20
|
+
* @param state Any extra arguments used during the lookup.
|
|
21
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
22
|
+
*/
|
|
23
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: StorageState, opts?: pulumi.CustomResourceOptions): Storage;
|
|
24
|
+
/**
|
|
25
|
+
* Returns true if the given object is an instance of Storage. This is designed to work even
|
|
26
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
27
|
+
*/
|
|
28
|
+
static isInstance(obj: any): obj is Storage;
|
|
29
|
+
readonly backupRule: pulumi.Output<outputs.StorageBackupRule | undefined>;
|
|
30
|
+
/**
|
|
31
|
+
* Block defining another storage/template to clone to storage.
|
|
32
|
+
*/
|
|
33
|
+
readonly clone: pulumi.Output<outputs.StorageClone | undefined>;
|
|
34
|
+
/**
|
|
35
|
+
* If set to true, the backup taken before the partition and filesystem resize attempt will be deleted immediately after
|
|
36
|
+
* success.
|
|
37
|
+
*/
|
|
38
|
+
readonly deleteAutoresizeBackup: pulumi.Output<boolean>;
|
|
39
|
+
/**
|
|
40
|
+
* Sets if the storage is encrypted at rest.
|
|
41
|
+
*/
|
|
42
|
+
readonly encrypt: pulumi.Output<boolean>;
|
|
43
|
+
/**
|
|
44
|
+
* If set to true, provider will attempt to resize partition and filesystem when the size of the storage changes. Please
|
|
45
|
+
* note that before the resize attempt is made, backup of the storage will be taken. If the resize attempt fails, the
|
|
46
|
+
* backup will be used to restore the storage and then deleted. If the resize attempt succeeds, backup will be kept (unless
|
|
47
|
+
* `deleteAutoresizeBackup` option is set to true). Taking and keeping backups incure costs.
|
|
48
|
+
*/
|
|
49
|
+
readonly filesystemAutoresize: pulumi.Output<boolean>;
|
|
50
|
+
/**
|
|
51
|
+
* Block defining external data to import to storage
|
|
52
|
+
*/
|
|
53
|
+
readonly import: pulumi.Output<outputs.StorageImport | undefined>;
|
|
54
|
+
/**
|
|
55
|
+
* User defined key-value pairs to classify the storage.
|
|
56
|
+
*/
|
|
57
|
+
readonly labels: pulumi.Output<{
|
|
58
|
+
[key: string]: string;
|
|
59
|
+
}>;
|
|
60
|
+
/**
|
|
61
|
+
* The size of the storage in gigabytes.
|
|
62
|
+
*/
|
|
63
|
+
readonly size: pulumi.Output<number>;
|
|
64
|
+
/**
|
|
65
|
+
* System defined key-value pairs to classify the storage. The keys of system defined labels are prefixed with underscore
|
|
66
|
+
* and can not be modified by the user.
|
|
67
|
+
*/
|
|
68
|
+
readonly systemLabels: pulumi.Output<{
|
|
69
|
+
[key: string]: string;
|
|
70
|
+
}>;
|
|
71
|
+
/**
|
|
72
|
+
* The tier of the storage.
|
|
73
|
+
*/
|
|
74
|
+
readonly tier: pulumi.Output<string>;
|
|
75
|
+
/**
|
|
76
|
+
* The title of the storage.
|
|
77
|
+
*/
|
|
78
|
+
readonly title: pulumi.Output<string>;
|
|
79
|
+
/**
|
|
80
|
+
* The type of the storage.
|
|
81
|
+
*/
|
|
82
|
+
readonly type: pulumi.Output<string>;
|
|
83
|
+
/**
|
|
84
|
+
* The zone the storage is in, e.g. `de-fra1`. You can list available zones with `upctl zone list`.
|
|
85
|
+
*/
|
|
86
|
+
readonly zone: pulumi.Output<string>;
|
|
87
|
+
/**
|
|
88
|
+
* Create a Storage resource with the given unique name, arguments, and options.
|
|
89
|
+
*
|
|
90
|
+
* @param name The _unique_ name of the resource.
|
|
91
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
92
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
93
|
+
*/
|
|
94
|
+
constructor(name: string, args: StorageArgs, opts?: pulumi.CustomResourceOptions);
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Input properties used for looking up and filtering Storage resources.
|
|
98
|
+
*/
|
|
99
|
+
export interface StorageState {
|
|
100
|
+
backupRule?: pulumi.Input<inputs.StorageBackupRule>;
|
|
101
|
+
/**
|
|
102
|
+
* Block defining another storage/template to clone to storage.
|
|
103
|
+
*/
|
|
104
|
+
clone?: pulumi.Input<inputs.StorageClone>;
|
|
105
|
+
/**
|
|
106
|
+
* If set to true, the backup taken before the partition and filesystem resize attempt will be deleted immediately after
|
|
107
|
+
* success.
|
|
108
|
+
*/
|
|
109
|
+
deleteAutoresizeBackup?: pulumi.Input<boolean>;
|
|
110
|
+
/**
|
|
111
|
+
* Sets if the storage is encrypted at rest.
|
|
112
|
+
*/
|
|
113
|
+
encrypt?: pulumi.Input<boolean>;
|
|
114
|
+
/**
|
|
115
|
+
* If set to true, provider will attempt to resize partition and filesystem when the size of the storage changes. Please
|
|
116
|
+
* note that before the resize attempt is made, backup of the storage will be taken. If the resize attempt fails, the
|
|
117
|
+
* backup will be used to restore the storage and then deleted. If the resize attempt succeeds, backup will be kept (unless
|
|
118
|
+
* `deleteAutoresizeBackup` option is set to true). Taking and keeping backups incure costs.
|
|
119
|
+
*/
|
|
120
|
+
filesystemAutoresize?: pulumi.Input<boolean>;
|
|
121
|
+
/**
|
|
122
|
+
* Block defining external data to import to storage
|
|
123
|
+
*/
|
|
124
|
+
import?: pulumi.Input<inputs.StorageImport>;
|
|
125
|
+
/**
|
|
126
|
+
* User defined key-value pairs to classify the storage.
|
|
127
|
+
*/
|
|
128
|
+
labels?: pulumi.Input<{
|
|
129
|
+
[key: string]: pulumi.Input<string>;
|
|
130
|
+
}>;
|
|
131
|
+
/**
|
|
132
|
+
* The size of the storage in gigabytes.
|
|
133
|
+
*/
|
|
134
|
+
size?: pulumi.Input<number>;
|
|
135
|
+
/**
|
|
136
|
+
* System defined key-value pairs to classify the storage. The keys of system defined labels are prefixed with underscore
|
|
137
|
+
* and can not be modified by the user.
|
|
138
|
+
*/
|
|
139
|
+
systemLabels?: pulumi.Input<{
|
|
140
|
+
[key: string]: pulumi.Input<string>;
|
|
141
|
+
}>;
|
|
142
|
+
/**
|
|
143
|
+
* The tier of the storage.
|
|
144
|
+
*/
|
|
145
|
+
tier?: pulumi.Input<string>;
|
|
146
|
+
/**
|
|
147
|
+
* The title of the storage.
|
|
148
|
+
*/
|
|
149
|
+
title?: pulumi.Input<string>;
|
|
150
|
+
/**
|
|
151
|
+
* The type of the storage.
|
|
152
|
+
*/
|
|
153
|
+
type?: pulumi.Input<string>;
|
|
154
|
+
/**
|
|
155
|
+
* The zone the storage is in, e.g. `de-fra1`. You can list available zones with `upctl zone list`.
|
|
156
|
+
*/
|
|
157
|
+
zone?: pulumi.Input<string>;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* The set of arguments for constructing a Storage resource.
|
|
161
|
+
*/
|
|
162
|
+
export interface StorageArgs {
|
|
163
|
+
backupRule?: pulumi.Input<inputs.StorageBackupRule>;
|
|
164
|
+
/**
|
|
165
|
+
* Block defining another storage/template to clone to storage.
|
|
166
|
+
*/
|
|
167
|
+
clone?: pulumi.Input<inputs.StorageClone>;
|
|
168
|
+
/**
|
|
169
|
+
* If set to true, the backup taken before the partition and filesystem resize attempt will be deleted immediately after
|
|
170
|
+
* success.
|
|
171
|
+
*/
|
|
172
|
+
deleteAutoresizeBackup?: pulumi.Input<boolean>;
|
|
173
|
+
/**
|
|
174
|
+
* Sets if the storage is encrypted at rest.
|
|
175
|
+
*/
|
|
176
|
+
encrypt?: pulumi.Input<boolean>;
|
|
177
|
+
/**
|
|
178
|
+
* If set to true, provider will attempt to resize partition and filesystem when the size of the storage changes. Please
|
|
179
|
+
* note that before the resize attempt is made, backup of the storage will be taken. If the resize attempt fails, the
|
|
180
|
+
* backup will be used to restore the storage and then deleted. If the resize attempt succeeds, backup will be kept (unless
|
|
181
|
+
* `deleteAutoresizeBackup` option is set to true). Taking and keeping backups incure costs.
|
|
182
|
+
*/
|
|
183
|
+
filesystemAutoresize?: pulumi.Input<boolean>;
|
|
184
|
+
/**
|
|
185
|
+
* Block defining external data to import to storage
|
|
186
|
+
*/
|
|
187
|
+
import?: pulumi.Input<inputs.StorageImport>;
|
|
188
|
+
/**
|
|
189
|
+
* User defined key-value pairs to classify the storage.
|
|
190
|
+
*/
|
|
191
|
+
labels?: pulumi.Input<{
|
|
192
|
+
[key: string]: pulumi.Input<string>;
|
|
193
|
+
}>;
|
|
194
|
+
/**
|
|
195
|
+
* The size of the storage in gigabytes.
|
|
196
|
+
*/
|
|
197
|
+
size: pulumi.Input<number>;
|
|
198
|
+
/**
|
|
199
|
+
* The tier of the storage.
|
|
200
|
+
*/
|
|
201
|
+
tier?: pulumi.Input<string>;
|
|
202
|
+
/**
|
|
203
|
+
* The title of the storage.
|
|
204
|
+
*/
|
|
205
|
+
title: pulumi.Input<string>;
|
|
206
|
+
/**
|
|
207
|
+
* The zone the storage is in, e.g. `de-fra1`. You can list available zones with `upctl zone list`.
|
|
208
|
+
*/
|
|
209
|
+
zone: pulumi.Input<string>;
|
|
210
|
+
}
|
package/storage.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
|
+
exports.Storage = void 0;
|
|
6
|
+
const pulumi = require("@pulumi/pulumi");
|
|
7
|
+
const utilities = require("./utilities");
|
|
8
|
+
/**
|
|
9
|
+
* Manages UpCloud [Block Storage](https://upcloud.com/products/block-storage) devices.
|
|
10
|
+
*
|
|
11
|
+
* ## Import
|
|
12
|
+
*
|
|
13
|
+
* ```sh
|
|
14
|
+
* $ pulumi import upcloud:index/storage:Storage example_storage 0128ae5a-91dd-4ebf-bd1e-304c47f2c652
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
class Storage extends pulumi.CustomResource {
|
|
18
|
+
/**
|
|
19
|
+
* Get an existing Storage resource's state with the given name, ID, and optional extra
|
|
20
|
+
* properties used to qualify the lookup.
|
|
21
|
+
*
|
|
22
|
+
* @param name The _unique_ name of the resulting resource.
|
|
23
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
24
|
+
* @param state Any extra arguments used during the lookup.
|
|
25
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
26
|
+
*/
|
|
27
|
+
static get(name, id, state, opts) {
|
|
28
|
+
return new Storage(name, state, Object.assign(Object.assign({}, opts), { id: id }));
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Returns true if the given object is an instance of Storage. This is designed to work even
|
|
32
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
33
|
+
*/
|
|
34
|
+
static isInstance(obj) {
|
|
35
|
+
if (obj === undefined || obj === null) {
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
return obj['__pulumiType'] === Storage.__pulumiType;
|
|
39
|
+
}
|
|
40
|
+
constructor(name, argsOrState, opts) {
|
|
41
|
+
let resourceInputs = {};
|
|
42
|
+
opts = opts || {};
|
|
43
|
+
if (opts.id) {
|
|
44
|
+
const state = argsOrState;
|
|
45
|
+
resourceInputs["backupRule"] = state ? state.backupRule : undefined;
|
|
46
|
+
resourceInputs["clone"] = state ? state.clone : undefined;
|
|
47
|
+
resourceInputs["deleteAutoresizeBackup"] = state ? state.deleteAutoresizeBackup : undefined;
|
|
48
|
+
resourceInputs["encrypt"] = state ? state.encrypt : undefined;
|
|
49
|
+
resourceInputs["filesystemAutoresize"] = state ? state.filesystemAutoresize : undefined;
|
|
50
|
+
resourceInputs["import"] = state ? state.import : undefined;
|
|
51
|
+
resourceInputs["labels"] = state ? state.labels : undefined;
|
|
52
|
+
resourceInputs["size"] = state ? state.size : undefined;
|
|
53
|
+
resourceInputs["systemLabels"] = state ? state.systemLabels : undefined;
|
|
54
|
+
resourceInputs["tier"] = state ? state.tier : undefined;
|
|
55
|
+
resourceInputs["title"] = state ? state.title : undefined;
|
|
56
|
+
resourceInputs["type"] = state ? state.type : undefined;
|
|
57
|
+
resourceInputs["zone"] = state ? state.zone : undefined;
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
const args = argsOrState;
|
|
61
|
+
if ((!args || args.size === undefined) && !opts.urn) {
|
|
62
|
+
throw new Error("Missing required property 'size'");
|
|
63
|
+
}
|
|
64
|
+
if ((!args || args.title === undefined) && !opts.urn) {
|
|
65
|
+
throw new Error("Missing required property 'title'");
|
|
66
|
+
}
|
|
67
|
+
if ((!args || args.zone === undefined) && !opts.urn) {
|
|
68
|
+
throw new Error("Missing required property 'zone'");
|
|
69
|
+
}
|
|
70
|
+
resourceInputs["backupRule"] = args ? args.backupRule : undefined;
|
|
71
|
+
resourceInputs["clone"] = args ? args.clone : undefined;
|
|
72
|
+
resourceInputs["deleteAutoresizeBackup"] = args ? args.deleteAutoresizeBackup : undefined;
|
|
73
|
+
resourceInputs["encrypt"] = args ? args.encrypt : undefined;
|
|
74
|
+
resourceInputs["filesystemAutoresize"] = args ? args.filesystemAutoresize : undefined;
|
|
75
|
+
resourceInputs["import"] = args ? args.import : undefined;
|
|
76
|
+
resourceInputs["labels"] = args ? args.labels : undefined;
|
|
77
|
+
resourceInputs["size"] = args ? args.size : undefined;
|
|
78
|
+
resourceInputs["tier"] = args ? args.tier : undefined;
|
|
79
|
+
resourceInputs["title"] = args ? args.title : undefined;
|
|
80
|
+
resourceInputs["zone"] = args ? args.zone : undefined;
|
|
81
|
+
resourceInputs["systemLabels"] = undefined /*out*/;
|
|
82
|
+
resourceInputs["type"] = undefined /*out*/;
|
|
83
|
+
}
|
|
84
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
85
|
+
super(Storage.__pulumiType, name, resourceInputs, opts);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
exports.Storage = Storage;
|
|
89
|
+
/** @internal */
|
|
90
|
+
Storage.__pulumiType = 'upcloud:index/storage:Storage';
|
|
91
|
+
//# sourceMappingURL=storage.js.map
|