@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
package/router.js
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
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.Router = void 0;
|
|
6
|
+
const pulumi = require("@pulumi/pulumi");
|
|
7
|
+
const utilities = require("./utilities");
|
|
8
|
+
/**
|
|
9
|
+
* Routers can be used to connect multiple Private Networks. UpCloud Servers on any attached network can communicate directly with each other.
|
|
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 myExampleRouter = new upcloud.Router("myExampleRouter", {});
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* ## Import
|
|
21
|
+
*
|
|
22
|
+
* ```sh
|
|
23
|
+
* $ pulumi import upcloud:index/router:Router my_example_router 049d7ca2-757e-4fb1-a833-f87ee056547a
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
class Router extends pulumi.CustomResource {
|
|
27
|
+
/**
|
|
28
|
+
* Get an existing Router resource's state with the given name, ID, and optional extra
|
|
29
|
+
* properties used to qualify the lookup.
|
|
30
|
+
*
|
|
31
|
+
* @param name The _unique_ name of the resulting resource.
|
|
32
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
33
|
+
* @param state Any extra arguments used during the lookup.
|
|
34
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
35
|
+
*/
|
|
36
|
+
static get(name, id, state, opts) {
|
|
37
|
+
return new Router(name, state, Object.assign(Object.assign({}, opts), { id: id }));
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Returns true if the given object is an instance of Router. This is designed to work even
|
|
41
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
42
|
+
*/
|
|
43
|
+
static isInstance(obj) {
|
|
44
|
+
if (obj === undefined || obj === null) {
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
return obj['__pulumiType'] === Router.__pulumiType;
|
|
48
|
+
}
|
|
49
|
+
constructor(name, argsOrState, opts) {
|
|
50
|
+
let resourceInputs = {};
|
|
51
|
+
opts = opts || {};
|
|
52
|
+
if (opts.id) {
|
|
53
|
+
const state = argsOrState;
|
|
54
|
+
resourceInputs["attachedNetworks"] = state ? state.attachedNetworks : undefined;
|
|
55
|
+
resourceInputs["labels"] = state ? state.labels : undefined;
|
|
56
|
+
resourceInputs["name"] = state ? state.name : undefined;
|
|
57
|
+
resourceInputs["staticRoute"] = state ? state.staticRoute : undefined;
|
|
58
|
+
resourceInputs["staticRoutes"] = state ? state.staticRoutes : undefined;
|
|
59
|
+
resourceInputs["type"] = state ? state.type : undefined;
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
const args = argsOrState;
|
|
63
|
+
resourceInputs["labels"] = args ? args.labels : undefined;
|
|
64
|
+
resourceInputs["name"] = args ? args.name : undefined;
|
|
65
|
+
resourceInputs["staticRoute"] = args ? args.staticRoute : undefined;
|
|
66
|
+
resourceInputs["attachedNetworks"] = undefined /*out*/;
|
|
67
|
+
resourceInputs["staticRoutes"] = undefined /*out*/;
|
|
68
|
+
resourceInputs["type"] = undefined /*out*/;
|
|
69
|
+
}
|
|
70
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
71
|
+
super(Router.__pulumiType, name, resourceInputs, opts);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
exports.Router = Router;
|
|
75
|
+
/** @internal */
|
|
76
|
+
Router.__pulumiType = 'upcloud:index/router:Router';
|
|
77
|
+
//# sourceMappingURL=router.js.map
|
package/router.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"router.js","sourceRoot":"","sources":["../router.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAa,MAAO,SAAQ,MAAM,CAAC,cAAc;IAC7C;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAmB,EAAE,IAAmC;QACjH,OAAO,IAAI,MAAM,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IAC7D,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,MAAM,CAAC,YAAY,CAAC;IACvD,CAAC;IAoCD,YAAY,IAAY,EAAE,WAAsC,EAAE,IAAmC;QACjG,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,EAAE,EAAE;YACT,MAAM,KAAK,GAAG,WAAsC,CAAC;YACrD,cAAc,CAAC,kBAAkB,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,SAAS,CAAC;YAChF,cAAc,CAAC,QAAQ,CAAC,GAAG,KAAK,C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AC,CAAC;IAC3D,CAAC;;AApFL,wBAqFC;AAvEG,gBAAgB;AACO,mBAAY,GAAG,6BAA6B,CAAC"}
|
package/server.d.ts
ADDED
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
import * as inputs from "./types/input";
|
|
3
|
+
import * as outputs from "./types/output";
|
|
4
|
+
/**
|
|
5
|
+
* The UpCloud server resource allows the creation, update and deletion of a [cloud server](https://upcloud.com/products/cloud-servers).
|
|
6
|
+
*
|
|
7
|
+
* ## Import
|
|
8
|
+
*
|
|
9
|
+
* ```sh
|
|
10
|
+
* $ pulumi import upcloud:index/server:Server example_server ead4544f-10bf-42a3-b98a-a0fea2e2ad14
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
export declare class Server extends pulumi.CustomResource {
|
|
14
|
+
/**
|
|
15
|
+
* Get an existing Server 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?: ServerState, opts?: pulumi.CustomResourceOptions): Server;
|
|
24
|
+
/**
|
|
25
|
+
* Returns true if the given object is an instance of Server. 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 Server;
|
|
29
|
+
/**
|
|
30
|
+
* The boot device order, `cdrom`|`disk`|`network` or comma separated combination of those values. Defaults to `disk`
|
|
31
|
+
*/
|
|
32
|
+
readonly bootOrder: pulumi.Output<string>;
|
|
33
|
+
/**
|
|
34
|
+
* The number of CPU cores for the server
|
|
35
|
+
*/
|
|
36
|
+
readonly cpu: pulumi.Output<number>;
|
|
37
|
+
/**
|
|
38
|
+
* Are firewall rules active for the server
|
|
39
|
+
*/
|
|
40
|
+
readonly firewall: pulumi.Output<boolean>;
|
|
41
|
+
/**
|
|
42
|
+
* Use this to start the VM on a specific host. Refers to value from host -attribute. Only available for private cloud
|
|
43
|
+
* hosts
|
|
44
|
+
*/
|
|
45
|
+
readonly host: pulumi.Output<number | undefined>;
|
|
46
|
+
/**
|
|
47
|
+
* The hostname of the server.
|
|
48
|
+
*/
|
|
49
|
+
readonly hostname: pulumi.Output<string>;
|
|
50
|
+
/**
|
|
51
|
+
* User defined key-value pairs to classify the server.
|
|
52
|
+
*/
|
|
53
|
+
readonly labels: pulumi.Output<{
|
|
54
|
+
[key: string]: string;
|
|
55
|
+
}>;
|
|
56
|
+
/**
|
|
57
|
+
* Configure access credentials to the server
|
|
58
|
+
*/
|
|
59
|
+
readonly login: pulumi.Output<outputs.ServerLogin | undefined>;
|
|
60
|
+
/**
|
|
61
|
+
* The amount of memory for the server (in megabytes)
|
|
62
|
+
*/
|
|
63
|
+
readonly mem: pulumi.Output<number>;
|
|
64
|
+
/**
|
|
65
|
+
* Is metadata service active for the server
|
|
66
|
+
*/
|
|
67
|
+
readonly metadata: pulumi.Output<boolean | undefined>;
|
|
68
|
+
/**
|
|
69
|
+
* One or more blocks describing the network interfaces of the server. In addition to list order, the configured network
|
|
70
|
+
* interfaces are matched to the server's actual network interfaces by `index` and `ipAddress` fields. This is to avoid
|
|
71
|
+
* public and utility network interfaces being re-assigned when the server is updated. This might result to inaccurate
|
|
72
|
+
* diffs in the plan, when interfaces are re-ordered or when interface is removed from the middle of the list. We recommend
|
|
73
|
+
* explicitly setting the value for `index` in configuration, when re-ordering interfaces or when removing interface from
|
|
74
|
+
* middle of the list.
|
|
75
|
+
*/
|
|
76
|
+
readonly networkInterfaces: pulumi.Output<outputs.ServerNetworkInterface[] | undefined>;
|
|
77
|
+
/**
|
|
78
|
+
* The model of the server's network interfaces
|
|
79
|
+
*/
|
|
80
|
+
readonly nicModel: pulumi.Output<string>;
|
|
81
|
+
/**
|
|
82
|
+
* The pricing plan used for the server. You can list available server plans with `upctl server plans`
|
|
83
|
+
*/
|
|
84
|
+
readonly plan: pulumi.Output<string>;
|
|
85
|
+
/**
|
|
86
|
+
* The UUID of a server group to attach this server to. Note that the server can also be attached to a server group via the
|
|
87
|
+
* `members` property of `upcloud.ServerGroup`. Only one of the these should be defined at a time. This value is only
|
|
88
|
+
* updated if it has been set to non-zero value.
|
|
89
|
+
*/
|
|
90
|
+
readonly serverGroup: pulumi.Output<string | undefined>;
|
|
91
|
+
readonly simpleBackup: pulumi.Output<outputs.ServerSimpleBackup | undefined>;
|
|
92
|
+
/**
|
|
93
|
+
* A set of storage devices associated with the server
|
|
94
|
+
*/
|
|
95
|
+
readonly storageDevices: pulumi.Output<outputs.ServerStorageDevice[] | undefined>;
|
|
96
|
+
/**
|
|
97
|
+
* The server related tags
|
|
98
|
+
*/
|
|
99
|
+
readonly tags: pulumi.Output<string[]>;
|
|
100
|
+
/**
|
|
101
|
+
* Block describing the preconfigured operating system
|
|
102
|
+
*/
|
|
103
|
+
readonly template: pulumi.Output<outputs.ServerTemplate | undefined>;
|
|
104
|
+
/**
|
|
105
|
+
* The timezone of the server. The timezone must be a valid timezone string, e.g. `Europe/Helsinki`.
|
|
106
|
+
*/
|
|
107
|
+
readonly timezone: pulumi.Output<string>;
|
|
108
|
+
/**
|
|
109
|
+
* A short, informational description of the server.
|
|
110
|
+
*/
|
|
111
|
+
readonly title: pulumi.Output<string>;
|
|
112
|
+
/**
|
|
113
|
+
* Defines URL for a server setup script, or the script body itself
|
|
114
|
+
*/
|
|
115
|
+
readonly userData: pulumi.Output<string | undefined>;
|
|
116
|
+
/**
|
|
117
|
+
* The model of the server's video interface
|
|
118
|
+
*/
|
|
119
|
+
readonly videoModel: pulumi.Output<string>;
|
|
120
|
+
/**
|
|
121
|
+
* The zone in which the server will be hosted, e.g. `de-fra1`. You can list available zones with `upctl zone list`.
|
|
122
|
+
*/
|
|
123
|
+
readonly zone: pulumi.Output<string>;
|
|
124
|
+
/**
|
|
125
|
+
* Create a Server resource with the given unique name, arguments, and options.
|
|
126
|
+
*
|
|
127
|
+
* @param name The _unique_ name of the resource.
|
|
128
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
129
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
130
|
+
*/
|
|
131
|
+
constructor(name: string, args: ServerArgs, opts?: pulumi.CustomResourceOptions);
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Input properties used for looking up and filtering Server resources.
|
|
135
|
+
*/
|
|
136
|
+
export interface ServerState {
|
|
137
|
+
/**
|
|
138
|
+
* The boot device order, `cdrom`|`disk`|`network` or comma separated combination of those values. Defaults to `disk`
|
|
139
|
+
*/
|
|
140
|
+
bootOrder?: pulumi.Input<string>;
|
|
141
|
+
/**
|
|
142
|
+
* The number of CPU cores for the server
|
|
143
|
+
*/
|
|
144
|
+
cpu?: pulumi.Input<number>;
|
|
145
|
+
/**
|
|
146
|
+
* Are firewall rules active for the server
|
|
147
|
+
*/
|
|
148
|
+
firewall?: pulumi.Input<boolean>;
|
|
149
|
+
/**
|
|
150
|
+
* Use this to start the VM on a specific host. Refers to value from host -attribute. Only available for private cloud
|
|
151
|
+
* hosts
|
|
152
|
+
*/
|
|
153
|
+
host?: pulumi.Input<number>;
|
|
154
|
+
/**
|
|
155
|
+
* The hostname of the server.
|
|
156
|
+
*/
|
|
157
|
+
hostname?: pulumi.Input<string>;
|
|
158
|
+
/**
|
|
159
|
+
* User defined key-value pairs to classify the server.
|
|
160
|
+
*/
|
|
161
|
+
labels?: pulumi.Input<{
|
|
162
|
+
[key: string]: pulumi.Input<string>;
|
|
163
|
+
}>;
|
|
164
|
+
/**
|
|
165
|
+
* Configure access credentials to the server
|
|
166
|
+
*/
|
|
167
|
+
login?: pulumi.Input<inputs.ServerLogin>;
|
|
168
|
+
/**
|
|
169
|
+
* The amount of memory for the server (in megabytes)
|
|
170
|
+
*/
|
|
171
|
+
mem?: pulumi.Input<number>;
|
|
172
|
+
/**
|
|
173
|
+
* Is metadata service active for the server
|
|
174
|
+
*/
|
|
175
|
+
metadata?: pulumi.Input<boolean>;
|
|
176
|
+
/**
|
|
177
|
+
* One or more blocks describing the network interfaces of the server. In addition to list order, the configured network
|
|
178
|
+
* interfaces are matched to the server's actual network interfaces by `index` and `ipAddress` fields. This is to avoid
|
|
179
|
+
* public and utility network interfaces being re-assigned when the server is updated. This might result to inaccurate
|
|
180
|
+
* diffs in the plan, when interfaces are re-ordered or when interface is removed from the middle of the list. We recommend
|
|
181
|
+
* explicitly setting the value for `index` in configuration, when re-ordering interfaces or when removing interface from
|
|
182
|
+
* middle of the list.
|
|
183
|
+
*/
|
|
184
|
+
networkInterfaces?: pulumi.Input<pulumi.Input<inputs.ServerNetworkInterface>[]>;
|
|
185
|
+
/**
|
|
186
|
+
* The model of the server's network interfaces
|
|
187
|
+
*/
|
|
188
|
+
nicModel?: pulumi.Input<string>;
|
|
189
|
+
/**
|
|
190
|
+
* The pricing plan used for the server. You can list available server plans with `upctl server plans`
|
|
191
|
+
*/
|
|
192
|
+
plan?: pulumi.Input<string>;
|
|
193
|
+
/**
|
|
194
|
+
* The UUID of a server group to attach this server to. Note that the server can also be attached to a server group via the
|
|
195
|
+
* `members` property of `upcloud.ServerGroup`. Only one of the these should be defined at a time. This value is only
|
|
196
|
+
* updated if it has been set to non-zero value.
|
|
197
|
+
*/
|
|
198
|
+
serverGroup?: pulumi.Input<string>;
|
|
199
|
+
simpleBackup?: pulumi.Input<inputs.ServerSimpleBackup>;
|
|
200
|
+
/**
|
|
201
|
+
* A set of storage devices associated with the server
|
|
202
|
+
*/
|
|
203
|
+
storageDevices?: pulumi.Input<pulumi.Input<inputs.ServerStorageDevice>[]>;
|
|
204
|
+
/**
|
|
205
|
+
* The server related tags
|
|
206
|
+
*/
|
|
207
|
+
tags?: pulumi.Input<pulumi.Input<string>[]>;
|
|
208
|
+
/**
|
|
209
|
+
* Block describing the preconfigured operating system
|
|
210
|
+
*/
|
|
211
|
+
template?: pulumi.Input<inputs.ServerTemplate>;
|
|
212
|
+
/**
|
|
213
|
+
* The timezone of the server. The timezone must be a valid timezone string, e.g. `Europe/Helsinki`.
|
|
214
|
+
*/
|
|
215
|
+
timezone?: pulumi.Input<string>;
|
|
216
|
+
/**
|
|
217
|
+
* A short, informational description of the server.
|
|
218
|
+
*/
|
|
219
|
+
title?: pulumi.Input<string>;
|
|
220
|
+
/**
|
|
221
|
+
* Defines URL for a server setup script, or the script body itself
|
|
222
|
+
*/
|
|
223
|
+
userData?: pulumi.Input<string>;
|
|
224
|
+
/**
|
|
225
|
+
* The model of the server's video interface
|
|
226
|
+
*/
|
|
227
|
+
videoModel?: pulumi.Input<string>;
|
|
228
|
+
/**
|
|
229
|
+
* The zone in which the server will be hosted, e.g. `de-fra1`. You can list available zones with `upctl zone list`.
|
|
230
|
+
*/
|
|
231
|
+
zone?: pulumi.Input<string>;
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* The set of arguments for constructing a Server resource.
|
|
235
|
+
*/
|
|
236
|
+
export interface ServerArgs {
|
|
237
|
+
/**
|
|
238
|
+
* The boot device order, `cdrom`|`disk`|`network` or comma separated combination of those values. Defaults to `disk`
|
|
239
|
+
*/
|
|
240
|
+
bootOrder?: pulumi.Input<string>;
|
|
241
|
+
/**
|
|
242
|
+
* The number of CPU cores for the server
|
|
243
|
+
*/
|
|
244
|
+
cpu?: pulumi.Input<number>;
|
|
245
|
+
/**
|
|
246
|
+
* Are firewall rules active for the server
|
|
247
|
+
*/
|
|
248
|
+
firewall?: pulumi.Input<boolean>;
|
|
249
|
+
/**
|
|
250
|
+
* Use this to start the VM on a specific host. Refers to value from host -attribute. Only available for private cloud
|
|
251
|
+
* hosts
|
|
252
|
+
*/
|
|
253
|
+
host?: pulumi.Input<number>;
|
|
254
|
+
/**
|
|
255
|
+
* The hostname of the server.
|
|
256
|
+
*/
|
|
257
|
+
hostname: pulumi.Input<string>;
|
|
258
|
+
/**
|
|
259
|
+
* User defined key-value pairs to classify the server.
|
|
260
|
+
*/
|
|
261
|
+
labels?: pulumi.Input<{
|
|
262
|
+
[key: string]: pulumi.Input<string>;
|
|
263
|
+
}>;
|
|
264
|
+
/**
|
|
265
|
+
* Configure access credentials to the server
|
|
266
|
+
*/
|
|
267
|
+
login?: pulumi.Input<inputs.ServerLogin>;
|
|
268
|
+
/**
|
|
269
|
+
* The amount of memory for the server (in megabytes)
|
|
270
|
+
*/
|
|
271
|
+
mem?: pulumi.Input<number>;
|
|
272
|
+
/**
|
|
273
|
+
* Is metadata service active for the server
|
|
274
|
+
*/
|
|
275
|
+
metadata?: pulumi.Input<boolean>;
|
|
276
|
+
/**
|
|
277
|
+
* One or more blocks describing the network interfaces of the server. In addition to list order, the configured network
|
|
278
|
+
* interfaces are matched to the server's actual network interfaces by `index` and `ipAddress` fields. This is to avoid
|
|
279
|
+
* public and utility network interfaces being re-assigned when the server is updated. This might result to inaccurate
|
|
280
|
+
* diffs in the plan, when interfaces are re-ordered or when interface is removed from the middle of the list. We recommend
|
|
281
|
+
* explicitly setting the value for `index` in configuration, when re-ordering interfaces or when removing interface from
|
|
282
|
+
* middle of the list.
|
|
283
|
+
*/
|
|
284
|
+
networkInterfaces?: pulumi.Input<pulumi.Input<inputs.ServerNetworkInterface>[]>;
|
|
285
|
+
/**
|
|
286
|
+
* The model of the server's network interfaces
|
|
287
|
+
*/
|
|
288
|
+
nicModel?: pulumi.Input<string>;
|
|
289
|
+
/**
|
|
290
|
+
* The pricing plan used for the server. You can list available server plans with `upctl server plans`
|
|
291
|
+
*/
|
|
292
|
+
plan?: pulumi.Input<string>;
|
|
293
|
+
/**
|
|
294
|
+
* The UUID of a server group to attach this server to. Note that the server can also be attached to a server group via the
|
|
295
|
+
* `members` property of `upcloud.ServerGroup`. Only one of the these should be defined at a time. This value is only
|
|
296
|
+
* updated if it has been set to non-zero value.
|
|
297
|
+
*/
|
|
298
|
+
serverGroup?: pulumi.Input<string>;
|
|
299
|
+
simpleBackup?: pulumi.Input<inputs.ServerSimpleBackup>;
|
|
300
|
+
/**
|
|
301
|
+
* A set of storage devices associated with the server
|
|
302
|
+
*/
|
|
303
|
+
storageDevices?: pulumi.Input<pulumi.Input<inputs.ServerStorageDevice>[]>;
|
|
304
|
+
/**
|
|
305
|
+
* The server related tags
|
|
306
|
+
*/
|
|
307
|
+
tags?: pulumi.Input<pulumi.Input<string>[]>;
|
|
308
|
+
/**
|
|
309
|
+
* Block describing the preconfigured operating system
|
|
310
|
+
*/
|
|
311
|
+
template?: pulumi.Input<inputs.ServerTemplate>;
|
|
312
|
+
/**
|
|
313
|
+
* The timezone of the server. The timezone must be a valid timezone string, e.g. `Europe/Helsinki`.
|
|
314
|
+
*/
|
|
315
|
+
timezone?: pulumi.Input<string>;
|
|
316
|
+
/**
|
|
317
|
+
* A short, informational description of the server.
|
|
318
|
+
*/
|
|
319
|
+
title?: pulumi.Input<string>;
|
|
320
|
+
/**
|
|
321
|
+
* Defines URL for a server setup script, or the script body itself
|
|
322
|
+
*/
|
|
323
|
+
userData?: pulumi.Input<string>;
|
|
324
|
+
/**
|
|
325
|
+
* The model of the server's video interface
|
|
326
|
+
*/
|
|
327
|
+
videoModel?: pulumi.Input<string>;
|
|
328
|
+
/**
|
|
329
|
+
* The zone in which the server will be hosted, e.g. `de-fra1`. You can list available zones with `upctl zone list`.
|
|
330
|
+
*/
|
|
331
|
+
zone: pulumi.Input<string>;
|
|
332
|
+
}
|
package/server.js
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
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.Server = void 0;
|
|
6
|
+
const pulumi = require("@pulumi/pulumi");
|
|
7
|
+
const utilities = require("./utilities");
|
|
8
|
+
/**
|
|
9
|
+
* The UpCloud server resource allows the creation, update and deletion of a [cloud server](https://upcloud.com/products/cloud-servers).
|
|
10
|
+
*
|
|
11
|
+
* ## Import
|
|
12
|
+
*
|
|
13
|
+
* ```sh
|
|
14
|
+
* $ pulumi import upcloud:index/server:Server example_server ead4544f-10bf-42a3-b98a-a0fea2e2ad14
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
class Server extends pulumi.CustomResource {
|
|
18
|
+
/**
|
|
19
|
+
* Get an existing Server 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 Server(name, state, Object.assign(Object.assign({}, opts), { id: id }));
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Returns true if the given object is an instance of Server. 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'] === Server.__pulumiType;
|
|
39
|
+
}
|
|
40
|
+
constructor(name, argsOrState, opts) {
|
|
41
|
+
let resourceInputs = {};
|
|
42
|
+
opts = opts || {};
|
|
43
|
+
if (opts.id) {
|
|
44
|
+
const state = argsOrState;
|
|
45
|
+
resourceInputs["bootOrder"] = state ? state.bootOrder : undefined;
|
|
46
|
+
resourceInputs["cpu"] = state ? state.cpu : undefined;
|
|
47
|
+
resourceInputs["firewall"] = state ? state.firewall : undefined;
|
|
48
|
+
resourceInputs["host"] = state ? state.host : undefined;
|
|
49
|
+
resourceInputs["hostname"] = state ? state.hostname : undefined;
|
|
50
|
+
resourceInputs["labels"] = state ? state.labels : undefined;
|
|
51
|
+
resourceInputs["login"] = state ? state.login : undefined;
|
|
52
|
+
resourceInputs["mem"] = state ? state.mem : undefined;
|
|
53
|
+
resourceInputs["metadata"] = state ? state.metadata : undefined;
|
|
54
|
+
resourceInputs["networkInterfaces"] = state ? state.networkInterfaces : undefined;
|
|
55
|
+
resourceInputs["nicModel"] = state ? state.nicModel : undefined;
|
|
56
|
+
resourceInputs["plan"] = state ? state.plan : undefined;
|
|
57
|
+
resourceInputs["serverGroup"] = state ? state.serverGroup : undefined;
|
|
58
|
+
resourceInputs["simpleBackup"] = state ? state.simpleBackup : undefined;
|
|
59
|
+
resourceInputs["storageDevices"] = state ? state.storageDevices : undefined;
|
|
60
|
+
resourceInputs["tags"] = state ? state.tags : undefined;
|
|
61
|
+
resourceInputs["template"] = state ? state.template : undefined;
|
|
62
|
+
resourceInputs["timezone"] = state ? state.timezone : undefined;
|
|
63
|
+
resourceInputs["title"] = state ? state.title : undefined;
|
|
64
|
+
resourceInputs["userData"] = state ? state.userData : undefined;
|
|
65
|
+
resourceInputs["videoModel"] = state ? state.videoModel : undefined;
|
|
66
|
+
resourceInputs["zone"] = state ? state.zone : undefined;
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
const args = argsOrState;
|
|
70
|
+
if ((!args || args.hostname === undefined) && !opts.urn) {
|
|
71
|
+
throw new Error("Missing required property 'hostname'");
|
|
72
|
+
}
|
|
73
|
+
if ((!args || args.zone === undefined) && !opts.urn) {
|
|
74
|
+
throw new Error("Missing required property 'zone'");
|
|
75
|
+
}
|
|
76
|
+
resourceInputs["bootOrder"] = args ? args.bootOrder : undefined;
|
|
77
|
+
resourceInputs["cpu"] = args ? args.cpu : undefined;
|
|
78
|
+
resourceInputs["firewall"] = args ? args.firewall : undefined;
|
|
79
|
+
resourceInputs["host"] = args ? args.host : undefined;
|
|
80
|
+
resourceInputs["hostname"] = args ? args.hostname : undefined;
|
|
81
|
+
resourceInputs["labels"] = args ? args.labels : undefined;
|
|
82
|
+
resourceInputs["login"] = args ? args.login : undefined;
|
|
83
|
+
resourceInputs["mem"] = args ? args.mem : undefined;
|
|
84
|
+
resourceInputs["metadata"] = args ? args.metadata : undefined;
|
|
85
|
+
resourceInputs["networkInterfaces"] = args ? args.networkInterfaces : undefined;
|
|
86
|
+
resourceInputs["nicModel"] = args ? args.nicModel : undefined;
|
|
87
|
+
resourceInputs["plan"] = args ? args.plan : undefined;
|
|
88
|
+
resourceInputs["serverGroup"] = args ? args.serverGroup : undefined;
|
|
89
|
+
resourceInputs["simpleBackup"] = args ? args.simpleBackup : undefined;
|
|
90
|
+
resourceInputs["storageDevices"] = args ? args.storageDevices : undefined;
|
|
91
|
+
resourceInputs["tags"] = args ? args.tags : undefined;
|
|
92
|
+
resourceInputs["template"] = args ? args.template : undefined;
|
|
93
|
+
resourceInputs["timezone"] = args ? args.timezone : undefined;
|
|
94
|
+
resourceInputs["title"] = args ? args.title : undefined;
|
|
95
|
+
resourceInputs["userData"] = args ? args.userData : undefined;
|
|
96
|
+
resourceInputs["videoModel"] = args ? args.videoModel : undefined;
|
|
97
|
+
resourceInputs["zone"] = args ? args.zone : undefined;
|
|
98
|
+
}
|
|
99
|
+
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
|
100
|
+
super(Server.__pulumiType, name, resourceInputs, opts);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
exports.Server = Server;
|
|
104
|
+
/** @internal */
|
|
105
|
+
Server.__pulumiType = 'upcloud:index/server:Server';
|
|
106
|
+
//# sourceMappingURL=server.js.map
|
package/server.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../server.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC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+1,124 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
import * as inputs from "./types/input";
|
|
3
|
+
import * as outputs from "./types/output";
|
|
4
|
+
/**
|
|
5
|
+
* This resource represents a generated list of UpCloud firewall rules.
|
|
6
|
+
* Firewall rules are used in conjunction with UpCloud servers.
|
|
7
|
+
* Each server has its own firewall rules.
|
|
8
|
+
* The firewall is enabled on all network interfaces except ones attached to private virtual networks.
|
|
9
|
+
* The maximum number of firewall rules per server is 1000.
|
|
10
|
+
*
|
|
11
|
+
* ## Example Usage
|
|
12
|
+
*
|
|
13
|
+
* ```typescript
|
|
14
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
15
|
+
* import * as upcloud from "@upcloud/pulumi-upcloud";
|
|
16
|
+
*
|
|
17
|
+
* // The following example defines a server and then links the server to a single firewall rule.
|
|
18
|
+
* // The list of firewall rules applied to the server can be expanded by providing additional server_firewall_rules blocks.
|
|
19
|
+
* const exampleServer = new upcloud.Server("exampleServer", {
|
|
20
|
+
* firewall: true,
|
|
21
|
+
* hostname: "terraform.example.tld",
|
|
22
|
+
* zone: "de-fra1",
|
|
23
|
+
* plan: "1xCPU-1GB",
|
|
24
|
+
* template: {
|
|
25
|
+
* storage: "Ubuntu Server 20.04 LTS (Focal Fossa)",
|
|
26
|
+
* size: 25,
|
|
27
|
+
* },
|
|
28
|
+
* networkInterfaces: [{
|
|
29
|
+
* type: "utility",
|
|
30
|
+
* }],
|
|
31
|
+
* });
|
|
32
|
+
* const exampleServerFirewallRules = new upcloud.ServerFirewallRules("exampleServerFirewallRules", {
|
|
33
|
+
* serverId: exampleServer.id,
|
|
34
|
+
* firewallRules: [{
|
|
35
|
+
* action: "accept",
|
|
36
|
+
* comment: "Allow SSH from this network",
|
|
37
|
+
* destinationPortEnd: "22",
|
|
38
|
+
* destinationPortStart: "22",
|
|
39
|
+
* direction: "in",
|
|
40
|
+
* family: "IPv4",
|
|
41
|
+
* protocol: "tcp",
|
|
42
|
+
* sourceAddressEnd: "192.168.1.255",
|
|
43
|
+
* sourceAddressStart: "192.168.1.1",
|
|
44
|
+
* }],
|
|
45
|
+
* });
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* ## Import
|
|
49
|
+
*
|
|
50
|
+
* ```sh
|
|
51
|
+
* $ pulumi import upcloud:index/serverFirewallRules:ServerFirewallRules my_example_rules 049d7ca2-757e-4fb1-a833-f87ee056547a
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
export declare class ServerFirewallRules extends pulumi.CustomResource {
|
|
55
|
+
/**
|
|
56
|
+
* Get an existing ServerFirewallRules resource's state with the given name, ID, and optional extra
|
|
57
|
+
* properties used to qualify the lookup.
|
|
58
|
+
*
|
|
59
|
+
* @param name The _unique_ name of the resulting resource.
|
|
60
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
61
|
+
* @param state Any extra arguments used during the lookup.
|
|
62
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
63
|
+
*/
|
|
64
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ServerFirewallRulesState, opts?: pulumi.CustomResourceOptions): ServerFirewallRules;
|
|
65
|
+
/**
|
|
66
|
+
* Returns true if the given object is an instance of ServerFirewallRules. This is designed to work even
|
|
67
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
68
|
+
*/
|
|
69
|
+
static isInstance(obj: any): obj is ServerFirewallRules;
|
|
70
|
+
/**
|
|
71
|
+
* A single firewall rule. If used, IP address and port ranges must have both start and end values specified. These can be
|
|
72
|
+
* the same value if only one IP address or port number is specified. Source and destination port numbers can only be set
|
|
73
|
+
* if the protocol is TCP or UDP. The ICMP type may only be set if the protocol is ICMP. Typical firewall rule should have
|
|
74
|
+
* "action", "direction", "protocol", "family" and at least one destination/source-address/port range. The default rule can
|
|
75
|
+
* be created by providing only "action" and "direction" attributes. Default rule should be defined last.
|
|
76
|
+
*/
|
|
77
|
+
readonly firewallRules: pulumi.Output<outputs.ServerFirewallRulesFirewallRule[]>;
|
|
78
|
+
/**
|
|
79
|
+
* The unique id of the server to be protected the firewall rules
|
|
80
|
+
*/
|
|
81
|
+
readonly serverId: pulumi.Output<string>;
|
|
82
|
+
/**
|
|
83
|
+
* Create a ServerFirewallRules resource with the given unique name, arguments, and options.
|
|
84
|
+
*
|
|
85
|
+
* @param name The _unique_ name of the resource.
|
|
86
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
87
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
88
|
+
*/
|
|
89
|
+
constructor(name: string, args: ServerFirewallRulesArgs, opts?: pulumi.CustomResourceOptions);
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Input properties used for looking up and filtering ServerFirewallRules resources.
|
|
93
|
+
*/
|
|
94
|
+
export interface ServerFirewallRulesState {
|
|
95
|
+
/**
|
|
96
|
+
* A single firewall rule. If used, IP address and port ranges must have both start and end values specified. These can be
|
|
97
|
+
* the same value if only one IP address or port number is specified. Source and destination port numbers can only be set
|
|
98
|
+
* if the protocol is TCP or UDP. The ICMP type may only be set if the protocol is ICMP. Typical firewall rule should have
|
|
99
|
+
* "action", "direction", "protocol", "family" and at least one destination/source-address/port range. The default rule can
|
|
100
|
+
* be created by providing only "action" and "direction" attributes. Default rule should be defined last.
|
|
101
|
+
*/
|
|
102
|
+
firewallRules?: pulumi.Input<pulumi.Input<inputs.ServerFirewallRulesFirewallRule>[]>;
|
|
103
|
+
/**
|
|
104
|
+
* The unique id of the server to be protected the firewall rules
|
|
105
|
+
*/
|
|
106
|
+
serverId?: pulumi.Input<string>;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* The set of arguments for constructing a ServerFirewallRules resource.
|
|
110
|
+
*/
|
|
111
|
+
export interface ServerFirewallRulesArgs {
|
|
112
|
+
/**
|
|
113
|
+
* A single firewall rule. If used, IP address and port ranges must have both start and end values specified. These can be
|
|
114
|
+
* the same value if only one IP address or port number is specified. Source and destination port numbers can only be set
|
|
115
|
+
* if the protocol is TCP or UDP. The ICMP type may only be set if the protocol is ICMP. Typical firewall rule should have
|
|
116
|
+
* "action", "direction", "protocol", "family" and at least one destination/source-address/port range. The default rule can
|
|
117
|
+
* be created by providing only "action" and "direction" attributes. Default rule should be defined last.
|
|
118
|
+
*/
|
|
119
|
+
firewallRules: pulumi.Input<pulumi.Input<inputs.ServerFirewallRulesFirewallRule>[]>;
|
|
120
|
+
/**
|
|
121
|
+
* The unique id of the server to be protected the firewall rules
|
|
122
|
+
*/
|
|
123
|
+
serverId: pulumi.Input<string>;
|
|
124
|
+
}
|