@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,189 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
/**
|
|
3
|
+
* Provides a DigitalOcean database connection pool resource.
|
|
4
|
+
*
|
|
5
|
+
* ## Example Usage
|
|
6
|
+
* ### Create a new PostgreSQL database connection pool
|
|
7
|
+
* ```typescript
|
|
8
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
9
|
+
* import * as digitalocean from "@pulumi/digitalocean";
|
|
10
|
+
*
|
|
11
|
+
* const postgres_example = new digitalocean.DatabaseCluster("postgres-example", {
|
|
12
|
+
* engine: "pg",
|
|
13
|
+
* version: "11",
|
|
14
|
+
* size: "db-s-1vcpu-1gb",
|
|
15
|
+
* region: "nyc1",
|
|
16
|
+
* nodeCount: 1,
|
|
17
|
+
* });
|
|
18
|
+
* const pool_01 = new digitalocean.DatabaseConnectionPool("pool-01", {
|
|
19
|
+
* clusterId: postgres_example.id,
|
|
20
|
+
* mode: "transaction",
|
|
21
|
+
* size: 20,
|
|
22
|
+
* dbName: "defaultdb",
|
|
23
|
+
* user: "doadmin",
|
|
24
|
+
* });
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* ## Import
|
|
28
|
+
*
|
|
29
|
+
* Database connection pools can be imported using the `id` of the source database cluster and the `name` of the connection pool joined with a comma. For example
|
|
30
|
+
*
|
|
31
|
+
* ```sh
|
|
32
|
+
* $ pulumi import digitalocean:index/databaseConnectionPool:DatabaseConnectionPool pool-01 245bcfd0-7f31-4ce6-a2bc-475a116cca97,pool-01
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
export declare class DatabaseConnectionPool extends pulumi.CustomResource {
|
|
36
|
+
/**
|
|
37
|
+
* Get an existing DatabaseConnectionPool resource's state with the given name, ID, and optional extra
|
|
38
|
+
* properties used to qualify the lookup.
|
|
39
|
+
*
|
|
40
|
+
* @param name The _unique_ name of the resulting resource.
|
|
41
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
42
|
+
* @param state Any extra arguments used during the lookup.
|
|
43
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
44
|
+
*/
|
|
45
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: DatabaseConnectionPoolState, opts?: pulumi.CustomResourceOptions): DatabaseConnectionPool;
|
|
46
|
+
/**
|
|
47
|
+
* Returns true if the given object is an instance of DatabaseConnectionPool. This is designed to work even
|
|
48
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
49
|
+
*/
|
|
50
|
+
static isInstance(obj: any): obj is DatabaseConnectionPool;
|
|
51
|
+
/**
|
|
52
|
+
* The ID of the source database cluster. Note: This must be a PostgreSQL cluster.
|
|
53
|
+
*/
|
|
54
|
+
readonly clusterId: pulumi.Output<string>;
|
|
55
|
+
/**
|
|
56
|
+
* The database for use with the connection pool.
|
|
57
|
+
*/
|
|
58
|
+
readonly dbName: pulumi.Output<string>;
|
|
59
|
+
/**
|
|
60
|
+
* The hostname used to connect to the database connection pool.
|
|
61
|
+
*/
|
|
62
|
+
readonly host: pulumi.Output<string>;
|
|
63
|
+
/**
|
|
64
|
+
* The PGBouncer transaction mode for the connection pool. The allowed values are session, transaction, and statement.
|
|
65
|
+
*/
|
|
66
|
+
readonly mode: pulumi.Output<string>;
|
|
67
|
+
/**
|
|
68
|
+
* The name for the database connection pool.
|
|
69
|
+
*/
|
|
70
|
+
readonly name: pulumi.Output<string>;
|
|
71
|
+
/**
|
|
72
|
+
* Password for the connection pool's user.
|
|
73
|
+
*/
|
|
74
|
+
readonly password: pulumi.Output<string>;
|
|
75
|
+
/**
|
|
76
|
+
* Network port that the database connection pool is listening on.
|
|
77
|
+
*/
|
|
78
|
+
readonly port: pulumi.Output<number>;
|
|
79
|
+
/**
|
|
80
|
+
* Same as `host`, but only accessible from resources within the account and in the same region.
|
|
81
|
+
*/
|
|
82
|
+
readonly privateHost: pulumi.Output<string>;
|
|
83
|
+
/**
|
|
84
|
+
* Same as `uri`, but only accessible from resources within the account and in the same region.
|
|
85
|
+
*/
|
|
86
|
+
readonly privateUri: pulumi.Output<string>;
|
|
87
|
+
/**
|
|
88
|
+
* The desired size of the PGBouncer connection pool.
|
|
89
|
+
*/
|
|
90
|
+
readonly size: pulumi.Output<number>;
|
|
91
|
+
/**
|
|
92
|
+
* The full URI for connecting to the database connection pool.
|
|
93
|
+
*/
|
|
94
|
+
readonly uri: pulumi.Output<string>;
|
|
95
|
+
/**
|
|
96
|
+
* The name of the database user for use with the connection pool.
|
|
97
|
+
*/
|
|
98
|
+
readonly user: pulumi.Output<string>;
|
|
99
|
+
/**
|
|
100
|
+
* Create a DatabaseConnectionPool resource with the given unique name, arguments, and options.
|
|
101
|
+
*
|
|
102
|
+
* @param name The _unique_ name of the resource.
|
|
103
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
104
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
105
|
+
*/
|
|
106
|
+
constructor(name: string, args: DatabaseConnectionPoolArgs, opts?: pulumi.CustomResourceOptions);
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Input properties used for looking up and filtering DatabaseConnectionPool resources.
|
|
110
|
+
*/
|
|
111
|
+
export interface DatabaseConnectionPoolState {
|
|
112
|
+
/**
|
|
113
|
+
* The ID of the source database cluster. Note: This must be a PostgreSQL cluster.
|
|
114
|
+
*/
|
|
115
|
+
clusterId?: pulumi.Input<string>;
|
|
116
|
+
/**
|
|
117
|
+
* The database for use with the connection pool.
|
|
118
|
+
*/
|
|
119
|
+
dbName?: pulumi.Input<string>;
|
|
120
|
+
/**
|
|
121
|
+
* The hostname used to connect to the database connection pool.
|
|
122
|
+
*/
|
|
123
|
+
host?: pulumi.Input<string>;
|
|
124
|
+
/**
|
|
125
|
+
* The PGBouncer transaction mode for the connection pool. The allowed values are session, transaction, and statement.
|
|
126
|
+
*/
|
|
127
|
+
mode?: pulumi.Input<string>;
|
|
128
|
+
/**
|
|
129
|
+
* The name for the database connection pool.
|
|
130
|
+
*/
|
|
131
|
+
name?: pulumi.Input<string>;
|
|
132
|
+
/**
|
|
133
|
+
* Password for the connection pool's user.
|
|
134
|
+
*/
|
|
135
|
+
password?: pulumi.Input<string>;
|
|
136
|
+
/**
|
|
137
|
+
* Network port that the database connection pool is listening on.
|
|
138
|
+
*/
|
|
139
|
+
port?: pulumi.Input<number>;
|
|
140
|
+
/**
|
|
141
|
+
* Same as `host`, but only accessible from resources within the account and in the same region.
|
|
142
|
+
*/
|
|
143
|
+
privateHost?: pulumi.Input<string>;
|
|
144
|
+
/**
|
|
145
|
+
* Same as `uri`, but only accessible from resources within the account and in the same region.
|
|
146
|
+
*/
|
|
147
|
+
privateUri?: pulumi.Input<string>;
|
|
148
|
+
/**
|
|
149
|
+
* The desired size of the PGBouncer connection pool.
|
|
150
|
+
*/
|
|
151
|
+
size?: pulumi.Input<number>;
|
|
152
|
+
/**
|
|
153
|
+
* The full URI for connecting to the database connection pool.
|
|
154
|
+
*/
|
|
155
|
+
uri?: pulumi.Input<string>;
|
|
156
|
+
/**
|
|
157
|
+
* The name of the database user for use with the connection pool.
|
|
158
|
+
*/
|
|
159
|
+
user?: pulumi.Input<string>;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* The set of arguments for constructing a DatabaseConnectionPool resource.
|
|
163
|
+
*/
|
|
164
|
+
export interface DatabaseConnectionPoolArgs {
|
|
165
|
+
/**
|
|
166
|
+
* The ID of the source database cluster. Note: This must be a PostgreSQL cluster.
|
|
167
|
+
*/
|
|
168
|
+
clusterId: pulumi.Input<string>;
|
|
169
|
+
/**
|
|
170
|
+
* The database for use with the connection pool.
|
|
171
|
+
*/
|
|
172
|
+
dbName: pulumi.Input<string>;
|
|
173
|
+
/**
|
|
174
|
+
* The PGBouncer transaction mode for the connection pool. The allowed values are session, transaction, and statement.
|
|
175
|
+
*/
|
|
176
|
+
mode: pulumi.Input<string>;
|
|
177
|
+
/**
|
|
178
|
+
* The name for the database connection pool.
|
|
179
|
+
*/
|
|
180
|
+
name?: pulumi.Input<string>;
|
|
181
|
+
/**
|
|
182
|
+
* The desired size of the PGBouncer connection pool.
|
|
183
|
+
*/
|
|
184
|
+
size: pulumi.Input<number>;
|
|
185
|
+
/**
|
|
186
|
+
* The name of the database user for use with the connection pool.
|
|
187
|
+
*/
|
|
188
|
+
user: pulumi.Input<string>;
|
|
189
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
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 database connection pool resource.
|
|
9
|
+
*
|
|
10
|
+
* ## Example Usage
|
|
11
|
+
* ### Create a new PostgreSQL database connection pool
|
|
12
|
+
* ```typescript
|
|
13
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
14
|
+
* import * as digitalocean from "@pulumi/digitalocean";
|
|
15
|
+
*
|
|
16
|
+
* const postgres_example = new digitalocean.DatabaseCluster("postgres-example", {
|
|
17
|
+
* engine: "pg",
|
|
18
|
+
* version: "11",
|
|
19
|
+
* size: "db-s-1vcpu-1gb",
|
|
20
|
+
* region: "nyc1",
|
|
21
|
+
* nodeCount: 1,
|
|
22
|
+
* });
|
|
23
|
+
* const pool_01 = new digitalocean.DatabaseConnectionPool("pool-01", {
|
|
24
|
+
* clusterId: postgres_example.id,
|
|
25
|
+
* mode: "transaction",
|
|
26
|
+
* size: 20,
|
|
27
|
+
* dbName: "defaultdb",
|
|
28
|
+
* user: "doadmin",
|
|
29
|
+
* });
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* ## Import
|
|
33
|
+
*
|
|
34
|
+
* Database connection pools can be imported using the `id` of the source database cluster and the `name` of the connection pool joined with a comma. For example
|
|
35
|
+
*
|
|
36
|
+
* ```sh
|
|
37
|
+
* $ pulumi import digitalocean:index/databaseConnectionPool:DatabaseConnectionPool pool-01 245bcfd0-7f31-4ce6-a2bc-475a116cca97,pool-01
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
class DatabaseConnectionPool extends pulumi.CustomResource {
|
|
41
|
+
constructor(name, argsOrState, opts) {
|
|
42
|
+
let inputs = {};
|
|
43
|
+
opts = opts || {};
|
|
44
|
+
if (opts.id) {
|
|
45
|
+
const state = argsOrState;
|
|
46
|
+
inputs["clusterId"] = state ? state.clusterId : undefined;
|
|
47
|
+
inputs["dbName"] = state ? state.dbName : undefined;
|
|
48
|
+
inputs["host"] = state ? state.host : undefined;
|
|
49
|
+
inputs["mode"] = state ? state.mode : undefined;
|
|
50
|
+
inputs["name"] = state ? state.name : undefined;
|
|
51
|
+
inputs["password"] = state ? state.password : undefined;
|
|
52
|
+
inputs["port"] = state ? state.port : undefined;
|
|
53
|
+
inputs["privateHost"] = state ? state.privateHost : undefined;
|
|
54
|
+
inputs["privateUri"] = state ? state.privateUri : undefined;
|
|
55
|
+
inputs["size"] = state ? state.size : undefined;
|
|
56
|
+
inputs["uri"] = state ? state.uri : undefined;
|
|
57
|
+
inputs["user"] = state ? state.user : undefined;
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
const args = argsOrState;
|
|
61
|
+
if ((!args || args.clusterId === undefined) && !opts.urn) {
|
|
62
|
+
throw new Error("Missing required property 'clusterId'");
|
|
63
|
+
}
|
|
64
|
+
if ((!args || args.dbName === undefined) && !opts.urn) {
|
|
65
|
+
throw new Error("Missing required property 'dbName'");
|
|
66
|
+
}
|
|
67
|
+
if ((!args || args.mode === undefined) && !opts.urn) {
|
|
68
|
+
throw new Error("Missing required property 'mode'");
|
|
69
|
+
}
|
|
70
|
+
if ((!args || args.size === undefined) && !opts.urn) {
|
|
71
|
+
throw new Error("Missing required property 'size'");
|
|
72
|
+
}
|
|
73
|
+
if ((!args || args.user === undefined) && !opts.urn) {
|
|
74
|
+
throw new Error("Missing required property 'user'");
|
|
75
|
+
}
|
|
76
|
+
inputs["clusterId"] = args ? args.clusterId : undefined;
|
|
77
|
+
inputs["dbName"] = args ? args.dbName : undefined;
|
|
78
|
+
inputs["mode"] = args ? args.mode : undefined;
|
|
79
|
+
inputs["name"] = args ? args.name : undefined;
|
|
80
|
+
inputs["size"] = args ? args.size : undefined;
|
|
81
|
+
inputs["user"] = args ? args.user : undefined;
|
|
82
|
+
inputs["host"] = undefined /*out*/;
|
|
83
|
+
inputs["password"] = undefined /*out*/;
|
|
84
|
+
inputs["port"] = undefined /*out*/;
|
|
85
|
+
inputs["privateHost"] = undefined /*out*/;
|
|
86
|
+
inputs["privateUri"] = undefined /*out*/;
|
|
87
|
+
inputs["uri"] = undefined /*out*/;
|
|
88
|
+
}
|
|
89
|
+
if (!opts.version) {
|
|
90
|
+
opts = pulumi.mergeOptions(opts, { version: utilities.getVersion() });
|
|
91
|
+
}
|
|
92
|
+
super(DatabaseConnectionPool.__pulumiType, name, inputs, opts);
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Get an existing DatabaseConnectionPool resource's state with the given name, ID, and optional extra
|
|
96
|
+
* properties used to qualify the lookup.
|
|
97
|
+
*
|
|
98
|
+
* @param name The _unique_ name of the resulting resource.
|
|
99
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
100
|
+
* @param state Any extra arguments used during the lookup.
|
|
101
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
102
|
+
*/
|
|
103
|
+
static get(name, id, state, opts) {
|
|
104
|
+
return new DatabaseConnectionPool(name, state, Object.assign(Object.assign({}, opts), { id: id }));
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Returns true if the given object is an instance of DatabaseConnectionPool. This is designed to work even
|
|
108
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
109
|
+
*/
|
|
110
|
+
static isInstance(obj) {
|
|
111
|
+
if (obj === undefined || obj === null) {
|
|
112
|
+
return false;
|
|
113
|
+
}
|
|
114
|
+
return obj['__pulumiType'] === DatabaseConnectionPool.__pulumiType;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
exports.DatabaseConnectionPool = DatabaseConnectionPool;
|
|
118
|
+
/** @internal */
|
|
119
|
+
DatabaseConnectionPool.__pulumiType = 'digitalocean:index/databaseConnectionPool:DatabaseConnectionPool';
|
|
120
|
+
//# sourceMappingURL=databaseConnectionPool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"databaseConnectionPool.js","sourceRoot":"","sources":["../databaseConnectionPool.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAa,sBAAuB,SAAQ,MAAM,CAAC,cAAc;IAqF7D,YAAY,IAAY,EAAE,WAAsE,EAAE,IAAmC;QACjI,IAAI,MAAM,GAAkB,EAAE,CAAC;QAC/B,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,EAAE,EAAE;YACT,MAAM,KAAK,GAAG,WAAsD,CAAC;YACrE,MAAM,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS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I,EAAE;YACnC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,GAAG,CAAC,cAAc,CAAC,KAAK,sBAAsB,CAAC,YAAY,CAAC;IACvE,CAAC;;AA1BL,wDAyIC;AA3HG,gBAAgB;AACO,mCAAY,GAAG,kEAAkE,CAAC"}
|
package/databaseDb.d.ts
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
/**
|
|
3
|
+
* Provides a DigitalOcean database resource. When creating a new database cluster, a default database with name `defaultdb` will be created. Then, this resource can be used to provide additional database inside the cluster.
|
|
4
|
+
*
|
|
5
|
+
* ## Example Usage
|
|
6
|
+
* ### Create a new PostgreSQL database
|
|
7
|
+
* ```typescript
|
|
8
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
9
|
+
* import * as digitalocean from "@pulumi/digitalocean";
|
|
10
|
+
*
|
|
11
|
+
* const postgres_example = new digitalocean.DatabaseCluster("postgres-example", {
|
|
12
|
+
* engine: "pg",
|
|
13
|
+
* version: "11",
|
|
14
|
+
* size: "db-s-1vcpu-1gb",
|
|
15
|
+
* region: "nyc1",
|
|
16
|
+
* nodeCount: 1,
|
|
17
|
+
* });
|
|
18
|
+
* const database_example = new digitalocean.DatabaseDb("database-example", {clusterId: postgres_example.id});
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* ## Import
|
|
22
|
+
*
|
|
23
|
+
* Database can be imported using the `id` of the source database cluster and the `name` of the database joined with a comma. For example
|
|
24
|
+
*
|
|
25
|
+
* ```sh
|
|
26
|
+
* $ pulumi import digitalocean:index/databaseDb:DatabaseDb database-example 245bcfd0-7f31-4ce6-a2bc-475a116cca97,foobar
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export declare class DatabaseDb extends pulumi.CustomResource {
|
|
30
|
+
/**
|
|
31
|
+
* Get an existing DatabaseDb resource's state with the given name, ID, and optional extra
|
|
32
|
+
* properties used to qualify the lookup.
|
|
33
|
+
*
|
|
34
|
+
* @param name The _unique_ name of the resulting resource.
|
|
35
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
36
|
+
* @param state Any extra arguments used during the lookup.
|
|
37
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
38
|
+
*/
|
|
39
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: DatabaseDbState, opts?: pulumi.CustomResourceOptions): DatabaseDb;
|
|
40
|
+
/**
|
|
41
|
+
* Returns true if the given object is an instance of DatabaseDb. This is designed to work even
|
|
42
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
43
|
+
*/
|
|
44
|
+
static isInstance(obj: any): obj is DatabaseDb;
|
|
45
|
+
/**
|
|
46
|
+
* The ID of the original source database cluster.
|
|
47
|
+
*/
|
|
48
|
+
readonly clusterId: pulumi.Output<string>;
|
|
49
|
+
/**
|
|
50
|
+
* The name for the database.
|
|
51
|
+
*/
|
|
52
|
+
readonly name: pulumi.Output<string>;
|
|
53
|
+
/**
|
|
54
|
+
* Create a DatabaseDb resource with the given unique name, arguments, and options.
|
|
55
|
+
*
|
|
56
|
+
* @param name The _unique_ name of the resource.
|
|
57
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
58
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
59
|
+
*/
|
|
60
|
+
constructor(name: string, args: DatabaseDbArgs, opts?: pulumi.CustomResourceOptions);
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Input properties used for looking up and filtering DatabaseDb resources.
|
|
64
|
+
*/
|
|
65
|
+
export interface DatabaseDbState {
|
|
66
|
+
/**
|
|
67
|
+
* The ID of the original source database cluster.
|
|
68
|
+
*/
|
|
69
|
+
clusterId?: pulumi.Input<string>;
|
|
70
|
+
/**
|
|
71
|
+
* The name for the database.
|
|
72
|
+
*/
|
|
73
|
+
name?: pulumi.Input<string>;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* The set of arguments for constructing a DatabaseDb resource.
|
|
77
|
+
*/
|
|
78
|
+
export interface DatabaseDbArgs {
|
|
79
|
+
/**
|
|
80
|
+
* The ID of the original source database cluster.
|
|
81
|
+
*/
|
|
82
|
+
clusterId: pulumi.Input<string>;
|
|
83
|
+
/**
|
|
84
|
+
* The name for the database.
|
|
85
|
+
*/
|
|
86
|
+
name?: pulumi.Input<string>;
|
|
87
|
+
}
|
package/databaseDb.js
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
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 database resource. When creating a new database cluster, a default database with name `defaultdb` will be created. Then, this resource can be used to provide additional database inside the cluster.
|
|
9
|
+
*
|
|
10
|
+
* ## Example Usage
|
|
11
|
+
* ### Create a new PostgreSQL database
|
|
12
|
+
* ```typescript
|
|
13
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
14
|
+
* import * as digitalocean from "@pulumi/digitalocean";
|
|
15
|
+
*
|
|
16
|
+
* const postgres_example = new digitalocean.DatabaseCluster("postgres-example", {
|
|
17
|
+
* engine: "pg",
|
|
18
|
+
* version: "11",
|
|
19
|
+
* size: "db-s-1vcpu-1gb",
|
|
20
|
+
* region: "nyc1",
|
|
21
|
+
* nodeCount: 1,
|
|
22
|
+
* });
|
|
23
|
+
* const database_example = new digitalocean.DatabaseDb("database-example", {clusterId: postgres_example.id});
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* ## Import
|
|
27
|
+
*
|
|
28
|
+
* Database can be imported using the `id` of the source database cluster and the `name` of the database joined with a comma. For example
|
|
29
|
+
*
|
|
30
|
+
* ```sh
|
|
31
|
+
* $ pulumi import digitalocean:index/databaseDb:DatabaseDb database-example 245bcfd0-7f31-4ce6-a2bc-475a116cca97,foobar
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
class DatabaseDb extends pulumi.CustomResource {
|
|
35
|
+
constructor(name, argsOrState, opts) {
|
|
36
|
+
let inputs = {};
|
|
37
|
+
opts = opts || {};
|
|
38
|
+
if (opts.id) {
|
|
39
|
+
const state = argsOrState;
|
|
40
|
+
inputs["clusterId"] = state ? state.clusterId : undefined;
|
|
41
|
+
inputs["name"] = state ? state.name : undefined;
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
const args = argsOrState;
|
|
45
|
+
if ((!args || args.clusterId === undefined) && !opts.urn) {
|
|
46
|
+
throw new Error("Missing required property 'clusterId'");
|
|
47
|
+
}
|
|
48
|
+
inputs["clusterId"] = args ? args.clusterId : undefined;
|
|
49
|
+
inputs["name"] = args ? args.name : undefined;
|
|
50
|
+
}
|
|
51
|
+
if (!opts.version) {
|
|
52
|
+
opts = pulumi.mergeOptions(opts, { version: utilities.getVersion() });
|
|
53
|
+
}
|
|
54
|
+
super(DatabaseDb.__pulumiType, name, inputs, opts);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Get an existing DatabaseDb resource's state with the given name, ID, and optional extra
|
|
58
|
+
* properties used to qualify the lookup.
|
|
59
|
+
*
|
|
60
|
+
* @param name The _unique_ name of the resulting resource.
|
|
61
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
62
|
+
* @param state Any extra arguments used during the lookup.
|
|
63
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
64
|
+
*/
|
|
65
|
+
static get(name, id, state, opts) {
|
|
66
|
+
return new DatabaseDb(name, state, Object.assign(Object.assign({}, opts), { id: id }));
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Returns true if the given object is an instance of DatabaseDb. This is designed to work even
|
|
70
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
71
|
+
*/
|
|
72
|
+
static isInstance(obj) {
|
|
73
|
+
if (obj === undefined || obj === null) {
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
return obj['__pulumiType'] === DatabaseDb.__pulumiType;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
exports.DatabaseDb = DatabaseDb;
|
|
80
|
+
/** @internal */
|
|
81
|
+
DatabaseDb.__pulumiType = 'digitalocean:index/databaseDb:DatabaseDb';
|
|
82
|
+
//# sourceMappingURL=databaseDb.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"databaseDb.js","sourceRoot":"","sources":["../databaseDb.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAa,UAAW,SAAQ,MAAM,CAAC,cAAc;IA6CjD,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,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;SACnD;aAAM;YACH,MAAM,IAAI,GAAG,WAAyC,CAAC;YACvD,IAAI,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;gBACtD,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;aAC5D;YACD,MAAM,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;YACxD,MAAM,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;SACjD;QACD,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YACf,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,SAAS,CAAC,UAAU,EAAE,EAAC,CAAC,CAAC;SACxE;QACD,KAAK,CAAC,UAAU,CAAC,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IACvD,CAAC;IA/DD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAuB,EAAE,IAAmC;QACrH,OAAO,IAAI,UAAU,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IACjE,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,UAAU,CAAC,YAAY,CAAC;IAC3D,CAAC;;AA1BL,gCAiEC;AAnDG,gBAAgB;AACO,uBAAY,GAAG,0CAA0C,CAAC"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
import { input as inputs, output as outputs } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* Provides a DigitalOcean database firewall resource allowing you to restrict
|
|
5
|
+
* connections to your database to trusted sources. You may limit connections to
|
|
6
|
+
* specific Droplets, Kubernetes clusters, or IP addresses.
|
|
7
|
+
*
|
|
8
|
+
* ## Example Usage
|
|
9
|
+
* ### Create a new database firewall allowing multiple IP addresses
|
|
10
|
+
*
|
|
11
|
+
* ```typescript
|
|
12
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
13
|
+
* import * as digitalocean from "@pulumi/digitalocean";
|
|
14
|
+
*
|
|
15
|
+
* const postgres_example = new digitalocean.DatabaseCluster("postgres-example", {
|
|
16
|
+
* engine: "pg",
|
|
17
|
+
* version: "11",
|
|
18
|
+
* size: "db-s-1vcpu-1gb",
|
|
19
|
+
* region: "nyc1",
|
|
20
|
+
* nodeCount: 1,
|
|
21
|
+
* });
|
|
22
|
+
* const example_fw = new digitalocean.DatabaseFirewall("example-fw", {
|
|
23
|
+
* clusterId: postgres_example.id,
|
|
24
|
+
* rules: [
|
|
25
|
+
* {
|
|
26
|
+
* type: "ip_addr",
|
|
27
|
+
* value: "192.168.1.1",
|
|
28
|
+
* },
|
|
29
|
+
* {
|
|
30
|
+
* type: "ip_addr",
|
|
31
|
+
* value: "192.0.2.0",
|
|
32
|
+
* },
|
|
33
|
+
* ],
|
|
34
|
+
* });
|
|
35
|
+
* ```
|
|
36
|
+
* ### Create a new database firewall allowing a Droplet
|
|
37
|
+
*
|
|
38
|
+
* ```typescript
|
|
39
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
40
|
+
* import * as digitalocean from "@pulumi/digitalocean";
|
|
41
|
+
*
|
|
42
|
+
* const web = new digitalocean.Droplet("web", {
|
|
43
|
+
* size: "s-1vcpu-1gb",
|
|
44
|
+
* image: "centos-7-x64",
|
|
45
|
+
* region: "nyc3",
|
|
46
|
+
* });
|
|
47
|
+
* const postgres_example = new digitalocean.DatabaseCluster("postgres-example", {
|
|
48
|
+
* engine: "pg",
|
|
49
|
+
* version: "11",
|
|
50
|
+
* size: "db-s-1vcpu-1gb",
|
|
51
|
+
* region: "nyc1",
|
|
52
|
+
* nodeCount: 1,
|
|
53
|
+
* });
|
|
54
|
+
* const example_fw = new digitalocean.DatabaseFirewall("example-fw", {
|
|
55
|
+
* clusterId: postgres_example.id,
|
|
56
|
+
* rules: [{
|
|
57
|
+
* type: "droplet",
|
|
58
|
+
* value: web.id,
|
|
59
|
+
* }],
|
|
60
|
+
* });
|
|
61
|
+
* ```
|
|
62
|
+
*
|
|
63
|
+
* ## Import
|
|
64
|
+
*
|
|
65
|
+
* Database firewalls can be imported using the `id` of the target database cluster For example
|
|
66
|
+
*
|
|
67
|
+
* ```sh
|
|
68
|
+
* $ pulumi import digitalocean:index/databaseFirewall:DatabaseFirewall example-fw 5f55c6cd-863b-4907-99b8-7e09b0275d54
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
export declare class DatabaseFirewall extends pulumi.CustomResource {
|
|
72
|
+
/**
|
|
73
|
+
* Get an existing DatabaseFirewall resource's state with the given name, ID, and optional extra
|
|
74
|
+
* properties used to qualify the lookup.
|
|
75
|
+
*
|
|
76
|
+
* @param name The _unique_ name of the resulting resource.
|
|
77
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
78
|
+
* @param state Any extra arguments used during the lookup.
|
|
79
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
80
|
+
*/
|
|
81
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: DatabaseFirewallState, opts?: pulumi.CustomResourceOptions): DatabaseFirewall;
|
|
82
|
+
/**
|
|
83
|
+
* Returns true if the given object is an instance of DatabaseFirewall. This is designed to work even
|
|
84
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
85
|
+
*/
|
|
86
|
+
static isInstance(obj: any): obj is DatabaseFirewall;
|
|
87
|
+
/**
|
|
88
|
+
* The ID of the target database cluster.
|
|
89
|
+
*/
|
|
90
|
+
readonly clusterId: pulumi.Output<string>;
|
|
91
|
+
/**
|
|
92
|
+
* A rule specifying a resource allowed to access the database cluster. The following arguments must be specified:
|
|
93
|
+
*/
|
|
94
|
+
readonly rules: pulumi.Output<outputs.DatabaseFirewallRule[]>;
|
|
95
|
+
/**
|
|
96
|
+
* Create a DatabaseFirewall resource with the given unique name, arguments, and options.
|
|
97
|
+
*
|
|
98
|
+
* @param name The _unique_ name of the resource.
|
|
99
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
100
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
101
|
+
*/
|
|
102
|
+
constructor(name: string, args: DatabaseFirewallArgs, opts?: pulumi.CustomResourceOptions);
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Input properties used for looking up and filtering DatabaseFirewall resources.
|
|
106
|
+
*/
|
|
107
|
+
export interface DatabaseFirewallState {
|
|
108
|
+
/**
|
|
109
|
+
* The ID of the target database cluster.
|
|
110
|
+
*/
|
|
111
|
+
clusterId?: pulumi.Input<string>;
|
|
112
|
+
/**
|
|
113
|
+
* A rule specifying a resource allowed to access the database cluster. The following arguments must be specified:
|
|
114
|
+
*/
|
|
115
|
+
rules?: pulumi.Input<pulumi.Input<inputs.DatabaseFirewallRule>[]>;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* The set of arguments for constructing a DatabaseFirewall resource.
|
|
119
|
+
*/
|
|
120
|
+
export interface DatabaseFirewallArgs {
|
|
121
|
+
/**
|
|
122
|
+
* The ID of the target database cluster.
|
|
123
|
+
*/
|
|
124
|
+
clusterId: pulumi.Input<string>;
|
|
125
|
+
/**
|
|
126
|
+
* A rule specifying a resource allowed to access the database cluster. The following arguments must be specified:
|
|
127
|
+
*/
|
|
128
|
+
rules: pulumi.Input<pulumi.Input<inputs.DatabaseFirewallRule>[]>;
|
|
129
|
+
}
|