@pulumi/cloudamqp 3.26.1 → 3.27.0-alpha.1770934853
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/alarm.d.ts +120 -12
- package/alarm.js +120 -12
- package/alarm.js.map +1 -1
- package/config/vars.d.ts +3 -0
- package/config/vars.js.map +1 -1
- package/customDomain.d.ts +0 -26
- package/customDomain.js +0 -26
- package/customDomain.js.map +1 -1
- package/extraDiskSize.d.ts +0 -1
- package/extraDiskSize.js +0 -1
- package/extraDiskSize.js.map +1 -1
- package/getVpcGcpInfo.d.ts +108 -0
- package/getVpcGcpInfo.js +108 -0
- package/getVpcGcpInfo.js.map +1 -1
- package/getVpcInfo.d.ts +108 -0
- package/getVpcInfo.js +108 -0
- package/getVpcInfo.js.map +1 -1
- package/instance.d.ts +0 -24
- package/instance.js +0 -24
- package/instance.js.map +1 -1
- package/integrationAwsEventbridge.d.ts +0 -34
- package/integrationAwsEventbridge.js +0 -34
- package/integrationAwsEventbridge.js.map +1 -1
- package/integrationLog.d.ts +0 -44
- package/integrationLog.js +0 -44
- package/integrationLog.js.map +1 -1
- package/integrationMetric.d.ts +0 -34
- package/integrationMetric.js +0 -34
- package/integrationMetric.js.map +1 -1
- package/integrationMetricPrometheus.d.ts +2 -40
- package/integrationMetricPrometheus.js +2 -40
- package/integrationMetricPrometheus.js.map +1 -1
- package/maintenanceWindow.d.ts +0 -28
- package/maintenanceWindow.js +0 -28
- package/maintenanceWindow.js.map +1 -1
- package/notification.d.ts +0 -28
- package/notification.js +0 -28
- package/notification.js.map +1 -1
- package/oauth2Configuration.d.ts +0 -22
- package/oauth2Configuration.js +0 -22
- package/oauth2Configuration.js.map +1 -1
- package/package.json +2 -2
- package/plugin.d.ts +128 -13
- package/plugin.js +128 -13
- package/plugin.js.map +1 -1
- package/pluginCommunity.d.ts +50 -14
- package/pluginCommunity.js +50 -14
- package/pluginCommunity.js.map +1 -1
- package/privatelinkAws.d.ts +139 -12
- package/privatelinkAws.js +139 -12
- package/privatelinkAws.js.map +1 -1
- package/privatelinkAzure.d.ts +138 -13
- package/privatelinkAzure.js +138 -13
- package/privatelinkAzure.js.map +1 -1
- package/provider.d.ts +3 -0
- package/rabbitConfiguration.d.ts +293 -12
- package/rabbitConfiguration.js +293 -12
- package/rabbitConfiguration.js.map +1 -1
- package/securityFirewall.d.ts +157 -12
- package/securityFirewall.js +157 -12
- package/securityFirewall.js.map +1 -1
- package/trustStore.d.ts +0 -24
- package/trustStore.js +0 -24
- package/trustStore.js.map +1 -1
- package/upgradeLavinmq.d.ts +41 -0
- package/upgradeLavinmq.js +41 -0
- package/upgradeLavinmq.js.map +1 -1
- package/upgradeRabbitmq.d.ts +152 -0
- package/upgradeRabbitmq.js +152 -0
- package/upgradeRabbitmq.js.map +1 -1
- package/vpc.d.ts +0 -28
- package/vpc.js +0 -28
- package/vpc.js.map +1 -1
- package/vpcConnect.d.ts +220 -12
- package/vpcConnect.js +220 -12
- package/vpcConnect.js.map +1 -1
- package/vpcGcpPeering.d.ts +252 -6
- package/vpcGcpPeering.js +252 -6
- package/vpcGcpPeering.js.map +1 -1
- package/vpcPeering.d.ts +305 -5
- package/vpcPeering.js +305 -5
- package/vpcPeering.js.map +1 -1
- package/webhook.d.ts +94 -12
- package/webhook.js +94 -12
- package/webhook.js.map +1 -1
package/vpcConnect.js
CHANGED
|
@@ -6,29 +6,237 @@ exports.VpcConnect = void 0;
|
|
|
6
6
|
const pulumi = require("@pulumi/pulumi");
|
|
7
7
|
const utilities = require("./utilities");
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* This resource is a generic way to handle PrivateLink (AWS and Azure) and Private Service Connect
|
|
10
|
+
* (GCP). Communication between resources can be done just as they were living inside a VPC. CloudAMQP
|
|
11
|
+
* creates an Endpoint Service to connect the VPC and creating a new network interface to handle the
|
|
12
|
+
* communicate.
|
|
10
13
|
*
|
|
11
|
-
*
|
|
14
|
+
* If no existing VPC available when enable VPC connect, a new VPC will be created with subnet
|
|
15
|
+
* `10.52.72.0/24`.
|
|
12
16
|
*
|
|
13
|
-
*
|
|
17
|
+
* More information can be found at: [CloudAMQP VPC Connect]
|
|
14
18
|
*
|
|
15
|
-
*
|
|
19
|
+
* > **Note:** Enabling VPC Connect will automatically add a firewall rule.
|
|
16
20
|
*
|
|
17
|
-
*
|
|
21
|
+
* <details>
|
|
22
|
+
* <summary>
|
|
23
|
+
* <b>
|
|
24
|
+
* <i>Default PrivateLink firewall rule [AWS, Azure]</i>
|
|
25
|
+
* </b>
|
|
26
|
+
* </summary>
|
|
18
27
|
*
|
|
19
|
-
*
|
|
28
|
+
* For LavinMQ:
|
|
20
29
|
*
|
|
21
|
-
*
|
|
30
|
+
* ## Example Usage
|
|
22
31
|
*
|
|
23
|
-
*
|
|
32
|
+
* <details>
|
|
33
|
+
* <summary>
|
|
34
|
+
* <b>
|
|
35
|
+
* <i>Enable VPC Connect (PrivateLink) in AWS</i>
|
|
36
|
+
* </b>
|
|
37
|
+
* </summary>
|
|
24
38
|
*
|
|
25
|
-
*
|
|
39
|
+
* ```typescript
|
|
40
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
41
|
+
* import * as cloudamqp from "@pulumi/cloudamqp";
|
|
26
42
|
*
|
|
27
|
-
*
|
|
43
|
+
* const vpc = new cloudamqp.Vpc("vpc", {
|
|
44
|
+
* name: "Standalone VPC",
|
|
45
|
+
* region: "amazon-web-services::us-west-1",
|
|
46
|
+
* subnet: "10.56.72.0/24",
|
|
47
|
+
* tags: [],
|
|
48
|
+
* });
|
|
49
|
+
* const instance = new cloudamqp.Instance("instance", {
|
|
50
|
+
* name: "Instance 01",
|
|
51
|
+
* plan: "penguin-1",
|
|
52
|
+
* region: "amazon-web-services::us-west-1",
|
|
53
|
+
* tags: [],
|
|
54
|
+
* vpcId: vpc.id,
|
|
55
|
+
* keepAssociatedVpc: true,
|
|
56
|
+
* });
|
|
57
|
+
* const vpcConnect = new cloudamqp.VpcConnect("vpc_connect", {
|
|
58
|
+
* instanceId: instance.id,
|
|
59
|
+
* region: instance.region,
|
|
60
|
+
* allowedPrincipals: ["arn:aws:iam::aws-account-id:user/user-name"],
|
|
61
|
+
* });
|
|
62
|
+
* ```
|
|
63
|
+
*
|
|
64
|
+
* </details>
|
|
65
|
+
*
|
|
66
|
+
* <details>
|
|
67
|
+
* <summary>
|
|
68
|
+
* <b>
|
|
69
|
+
* <i>Enable VPC Connect (PrivateLink) in Azure</i>
|
|
70
|
+
* </b>
|
|
71
|
+
* </summary>
|
|
72
|
+
*
|
|
73
|
+
* ```typescript
|
|
74
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
75
|
+
* import * as cloudamqp from "@pulumi/cloudamqp";
|
|
76
|
+
*
|
|
77
|
+
* const vpc = new cloudamqp.Vpc("vpc", {
|
|
78
|
+
* name: "Standalone VPC",
|
|
79
|
+
* region: "azure-arm::westus",
|
|
80
|
+
* subnet: "10.56.72.0/24",
|
|
81
|
+
* tags: [],
|
|
82
|
+
* });
|
|
83
|
+
* const instance = new cloudamqp.Instance("instance", {
|
|
84
|
+
* name: "Instance 01",
|
|
85
|
+
* plan: "penguin-1",
|
|
86
|
+
* region: "azure-arm::westus",
|
|
87
|
+
* tags: [],
|
|
88
|
+
* vpcId: vpc.id,
|
|
89
|
+
* keepAssociatedVpc: true,
|
|
90
|
+
* });
|
|
91
|
+
* const vpcConnect = new cloudamqp.VpcConnect("vpc_connect", {
|
|
92
|
+
* instanceId: instance.id,
|
|
93
|
+
* region: instance.region,
|
|
94
|
+
* approvedSubscriptions: ["XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"],
|
|
95
|
+
* });
|
|
96
|
+
* ```
|
|
97
|
+
*
|
|
98
|
+
* The attribute `serviceName` found in resource `cloudamqp.VpcConnect` corresponds to the alias in
|
|
99
|
+
* the resource `azurermPrivateEndpoint` of the Azure provider. This can be used when creating the
|
|
100
|
+
* private endpoint.
|
|
101
|
+
*
|
|
102
|
+
* ```typescript
|
|
103
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
104
|
+
* import * as azurerm from "@pulumi/azurerm";
|
|
105
|
+
*
|
|
106
|
+
* const example = new azurerm.index.PrivateEndpoint("example", {
|
|
107
|
+
* name: "example-endpoint",
|
|
108
|
+
* location: exampleAzurermResourceGroup.location,
|
|
109
|
+
* resourceGroupName: exampleAzurermResourceGroup.name,
|
|
110
|
+
* subnetId: subnet.id,
|
|
111
|
+
* privateServiceConnection: [{
|
|
112
|
+
* name: "example-privateserviceconnection",
|
|
113
|
+
* privateConnectionResourceAlias: vpcConnect.serviceName,
|
|
114
|
+
* isManualConnection: true,
|
|
115
|
+
* requestMessage: "PL",
|
|
116
|
+
* }],
|
|
117
|
+
* });
|
|
118
|
+
* ```
|
|
119
|
+
*
|
|
120
|
+
* More information about the resource and argument can be found here:
|
|
121
|
+
* [privateConnectionResourceAlias]. Or check their example "Using a Private Link Service Alias with
|
|
122
|
+
* existing resources".
|
|
123
|
+
*
|
|
124
|
+
* </details>
|
|
125
|
+
*
|
|
126
|
+
* <details>
|
|
127
|
+
* <summary>
|
|
128
|
+
* <b>
|
|
129
|
+
* <i>Enable VPC Connect (Private Service Connect) in GCP</i>
|
|
130
|
+
* </b>
|
|
131
|
+
* </summary>
|
|
132
|
+
*
|
|
133
|
+
* ```typescript
|
|
134
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
135
|
+
* import * as cloudamqp from "@pulumi/cloudamqp";
|
|
28
136
|
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
137
|
+
* const vpc = new cloudamqp.Vpc("vpc", {
|
|
138
|
+
* name: "Standalone VPC",
|
|
139
|
+
* region: "google-compute-engine::us-west1",
|
|
140
|
+
* subnet: "10.56.72.0/24",
|
|
141
|
+
* tags: [],
|
|
142
|
+
* });
|
|
143
|
+
* const instance = new cloudamqp.Instance("instance", {
|
|
144
|
+
* name: "Instance 01",
|
|
145
|
+
* plan: "penguin-1",
|
|
146
|
+
* region: "google-compute-engine::us-west1",
|
|
147
|
+
* tags: [],
|
|
148
|
+
* vpcId: vpc.id,
|
|
149
|
+
* keepAssociatedVpc: true,
|
|
150
|
+
* });
|
|
151
|
+
* const vpcConnect = new cloudamqp.VpcConnect("vpc_connect", {
|
|
152
|
+
* instanceId: instance.id,
|
|
153
|
+
* region: instance.region,
|
|
154
|
+
* allowedProjects: ["some-project-123456"],
|
|
155
|
+
* });
|
|
31
156
|
* ```
|
|
157
|
+
*
|
|
158
|
+
* </details>
|
|
159
|
+
*
|
|
160
|
+
* ### With Additional Firewall Rules
|
|
161
|
+
*
|
|
162
|
+
* <details>
|
|
163
|
+
* <summary>
|
|
164
|
+
* <b>
|
|
165
|
+
* <i>CloudAMQP instance in an existing VPC with managed firewall rules</i>
|
|
166
|
+
* </b>
|
|
167
|
+
* </summary>
|
|
168
|
+
*
|
|
169
|
+
* ```typescript
|
|
170
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
171
|
+
* import * as cloudamqp from "@pulumi/cloudamqp";
|
|
172
|
+
*
|
|
173
|
+
* const vpc = new cloudamqp.Vpc("vpc", {
|
|
174
|
+
* name: "Standalone VPC",
|
|
175
|
+
* region: "amazon-web-services::us-west-1",
|
|
176
|
+
* subnet: "10.56.72.0/24",
|
|
177
|
+
* tags: [],
|
|
178
|
+
* });
|
|
179
|
+
* const instance = new cloudamqp.Instance("instance", {
|
|
180
|
+
* name: "Instance 01",
|
|
181
|
+
* plan: "penguin-1",
|
|
182
|
+
* region: "amazon-web-services::us-west-1",
|
|
183
|
+
* tags: [],
|
|
184
|
+
* vpcId: vpc.id,
|
|
185
|
+
* keepAssociatedVpc: true,
|
|
186
|
+
* });
|
|
187
|
+
* const vpcConnect = new cloudamqp.VpcConnect("vpc_connect", {
|
|
188
|
+
* instanceId: instance.id,
|
|
189
|
+
* allowedPrincipals: ["arn:aws:iam::aws-account-id:user/user-name"],
|
|
190
|
+
* });
|
|
191
|
+
* const firewallSettings = new cloudamqp.SecurityFirewall("firewall_settings", {
|
|
192
|
+
* instanceId: instance.id,
|
|
193
|
+
* rules: [
|
|
194
|
+
* {
|
|
195
|
+
* description: "Custom PrivateLink setup",
|
|
196
|
+
* ip: vpc.subnet,
|
|
197
|
+
* ports: [],
|
|
198
|
+
* services: [
|
|
199
|
+
* "AMQP",
|
|
200
|
+
* "AMQPS",
|
|
201
|
+
* "HTTPS",
|
|
202
|
+
* ],
|
|
203
|
+
* },
|
|
204
|
+
* {
|
|
205
|
+
* description: "MGMT interface",
|
|
206
|
+
* ip: "0.0.0.0/0",
|
|
207
|
+
* ports: [],
|
|
208
|
+
* services: ["HTTPS"],
|
|
209
|
+
* },
|
|
210
|
+
* ],
|
|
211
|
+
* }, {
|
|
212
|
+
* dependsOn: [vpcConnect],
|
|
213
|
+
* });
|
|
214
|
+
* ```
|
|
215
|
+
*
|
|
216
|
+
* </details>
|
|
217
|
+
*
|
|
218
|
+
* [CloudAMQP API list intances]: https://docs.cloudamqp.com/index.html#tag/instances/get/instances
|
|
219
|
+
* [CloudAMQP VPC Connect]: https://www.cloudamqp.com/docs/cloudamqp-vpc-connect.html
|
|
220
|
+
* [cloudamqp.SecurityFirewall]: https://registry.terraform.io/providers/cloudamqp/cloudamqp/latest/docs/resources/security_firewall
|
|
221
|
+
* [Google docs]: https://cloud.google.com/resource-manager/reference/rest/v1/projects
|
|
222
|
+
* [privateConnectionResourceAlias]: ./private_endpoint#private_connection_resource_alias-1
|
|
223
|
+
*
|
|
224
|
+
* ## Dependency
|
|
225
|
+
*
|
|
226
|
+
* This resource depends on CloudAMQP instance identifier, `cloudamqp_instance.instance.id`.
|
|
227
|
+
*
|
|
228
|
+
* Since `region` also is required, suggest to reuse the argument from CloudAMQP instance,
|
|
229
|
+
* `cloudamqp_instance.instance.region`.
|
|
230
|
+
*
|
|
231
|
+
* ## Create VPC Connect with additional firewall rules
|
|
232
|
+
*
|
|
233
|
+
* To create a PrivateLink/Private Service Connect configuration with additional firewall rules, it's
|
|
234
|
+
* required to chain the [cloudamqp.SecurityFirewall] resource to avoid parallel conflicting resource
|
|
235
|
+
* calls. You can do this by making the firewall resource depend on the VPC Connect resource
|
|
236
|
+
* `cloudamqp_vpc_connect.vpc_connect`.
|
|
237
|
+
*
|
|
238
|
+
* Furthermore, since all firewall rules are overwritten, the otherwise automatically added rules for
|
|
239
|
+
* the VPC Connect also needs to be added.
|
|
32
240
|
*/
|
|
33
241
|
class VpcConnect extends pulumi.CustomResource {
|
|
34
242
|
/**
|
package/vpcConnect.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vpcConnect.js","sourceRoot":"","sources":["../vpcConnect.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC
|
|
1
|
+
{"version":3,"file":"vpcConnect.js","sourceRoot":"","sources":["../vpcConnect.ts"],"names":[],"mappings":"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"}
|
package/vpcGcpPeering.d.ts
CHANGED
|
@@ -1,16 +1,262 @@
|
|
|
1
1
|
import * as pulumi from "@pulumi/pulumi";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* This resouce creates a VPC peering configuration for the CloudAMQP instance. The configuration will
|
|
4
|
+
* connect to another VPC network hosted on Google Cloud Platform (GCP). See the [GCP documentation]
|
|
5
|
+
* for more information on how to create the VPC peering configuration.
|
|
6
|
+
*
|
|
7
|
+
* > **Note:** Creating a VPC peering will automatically add firewall rules for the peered subnet.
|
|
8
|
+
*
|
|
9
|
+
* <details>
|
|
10
|
+
* <summary>
|
|
11
|
+
* <i>Default VPC peering firewall rule</i>
|
|
12
|
+
* </summary>
|
|
13
|
+
*
|
|
14
|
+
* For LavinMQ:
|
|
15
|
+
*
|
|
16
|
+
* ## Example Usage
|
|
17
|
+
*
|
|
18
|
+
* <details>
|
|
19
|
+
* <summary>
|
|
20
|
+
* <b>
|
|
21
|
+
* <i>VPC peering before v1.16.0</i>
|
|
22
|
+
* </b>
|
|
23
|
+
* </summary>
|
|
24
|
+
*
|
|
25
|
+
* ```typescript
|
|
26
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
27
|
+
* import * as cloudamqp from "@pulumi/cloudamqp";
|
|
28
|
+
*
|
|
29
|
+
* // CloudAMQP instance
|
|
30
|
+
* const instance = new cloudamqp.Instance("instance", {
|
|
31
|
+
* name: "terraform-vpc-peering",
|
|
32
|
+
* plan: "penguin-1",
|
|
33
|
+
* region: "google-compute-engine::europe-north1",
|
|
34
|
+
* tags: ["terraform"],
|
|
35
|
+
* vpcSubnet: "10.40.72.0/24",
|
|
36
|
+
* });
|
|
37
|
+
* // VPC information
|
|
38
|
+
* const vpcInfo = instance.id.apply(id => cloudamqp.getVpcGcpInfoOutput({
|
|
39
|
+
* instanceId: id,
|
|
40
|
+
* }));
|
|
41
|
+
* // VPC peering configuration
|
|
42
|
+
* const vpcPeeringRequest = new cloudamqp.VpcGcpPeering("vpc_peering_request", {
|
|
43
|
+
* instanceId: instance.id,
|
|
44
|
+
* peerNetworkUri: "https://www.googleapis.com/compute/v1/projects/PROJECT-NAME/global/networks/VPC-NETWORK-NAME",
|
|
45
|
+
* });
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* </details>
|
|
49
|
+
*
|
|
50
|
+
* <details>
|
|
51
|
+
* <summary>
|
|
52
|
+
* <b>
|
|
53
|
+
* <i>VPC peering from [v1.16.0] (Managed VPC)</i>
|
|
54
|
+
* </b>
|
|
55
|
+
* </summary>
|
|
56
|
+
*
|
|
57
|
+
* ```typescript
|
|
58
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
59
|
+
* import * as cloudamqp from "@pulumi/cloudamqp";
|
|
60
|
+
*
|
|
61
|
+
* // Managed VPC resource
|
|
62
|
+
* const vpc = new cloudamqp.Vpc("vpc", {
|
|
63
|
+
* name: "<VPC name>",
|
|
64
|
+
* region: "google-compute-engine::europe-north1",
|
|
65
|
+
* subnet: "10.56.72.0/24",
|
|
66
|
+
* tags: [],
|
|
67
|
+
* });
|
|
68
|
+
* // CloudAMQP instance
|
|
69
|
+
* const instance = new cloudamqp.Instance("instance", {
|
|
70
|
+
* name: "terraform-vpc-peering",
|
|
71
|
+
* plan: "penguin-1",
|
|
72
|
+
* region: "google-compute-engine::europe-north1",
|
|
73
|
+
* tags: ["terraform"],
|
|
74
|
+
* vpcId: vpc.id,
|
|
75
|
+
* });
|
|
76
|
+
* // VPC information
|
|
77
|
+
* const vpcInfo = cloudamqp.getVpcGcpInfo({
|
|
78
|
+
* vpcId: vpc.info,
|
|
79
|
+
* });
|
|
80
|
+
* // VPC peering configuration
|
|
81
|
+
* const vpcPeeringRequest = new cloudamqp.VpcGcpPeering("vpc_peering_request", {
|
|
82
|
+
* vpcId: vpc.id,
|
|
83
|
+
* peerNetworkUri: "https://www.googleapis.com/compute/v1/projects/PROJECT-NAME/global/networks/VPC-NETWORK-NAME",
|
|
84
|
+
* });
|
|
85
|
+
* ```
|
|
86
|
+
*
|
|
87
|
+
* </details>
|
|
88
|
+
*
|
|
89
|
+
* <details>
|
|
90
|
+
* <summary>
|
|
91
|
+
* <b>
|
|
92
|
+
* <i>VPC peering from [v1.28.0], waitOnPeeringStatus </i>
|
|
93
|
+
* </b>
|
|
94
|
+
* </summary>
|
|
95
|
+
*
|
|
96
|
+
* Default peering request, no need to set `waitOnPeeringStatus`. It's default set to false and will
|
|
97
|
+
* not wait on peering status. Create resource will be considered completed, regardless of the status
|
|
98
|
+
* of the state.
|
|
99
|
+
*
|
|
100
|
+
* ```typescript
|
|
101
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
102
|
+
* import * as cloudamqp from "@pulumi/cloudamqp";
|
|
103
|
+
*
|
|
104
|
+
* const vpcPeeringRequest = new cloudamqp.VpcGcpPeering("vpc_peering_request", {
|
|
105
|
+
* vpcId: vpc.id,
|
|
106
|
+
* peerNetworkUri: "https://www.googleapis.com/compute/v1/projects/ROJECT-NAME/global/networks/VPC-NETWORK-NAME",
|
|
107
|
+
* });
|
|
108
|
+
* ```
|
|
109
|
+
*
|
|
110
|
+
* Peering request and waiting for peering status of the state to change to ACTIVE before the create
|
|
111
|
+
* resource is consider complete. This is done once both side have done the peering.
|
|
4
112
|
*
|
|
5
|
-
*
|
|
113
|
+
* ```typescript
|
|
114
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
115
|
+
* import * as cloudamqp from "@pulumi/cloudamqp";
|
|
6
116
|
*
|
|
7
|
-
*
|
|
117
|
+
* const vpcPeeringRequest = new cloudamqp.VpcGcpPeering("vpc_peering_request", {
|
|
118
|
+
* vpcId: vpc.id,
|
|
119
|
+
* waitOnPeeringStatus: true,
|
|
120
|
+
* peerNetworkUri: "https://www.googleapis.com/compute/v1/projects/PROJECT-NAME/global/networks/VPC-NETWORK-NAME",
|
|
121
|
+
* });
|
|
122
|
+
* ```
|
|
8
123
|
*
|
|
9
|
-
*
|
|
124
|
+
* </details>
|
|
10
125
|
*
|
|
11
|
-
*
|
|
126
|
+
* ### With Additional Firewall Rules
|
|
127
|
+
*
|
|
128
|
+
* <details>
|
|
129
|
+
* <summary>
|
|
130
|
+
* <b>
|
|
131
|
+
* <i>VPC peering before v1.16.0</i>
|
|
132
|
+
* </b>
|
|
133
|
+
* </summary>
|
|
134
|
+
*
|
|
135
|
+
* ```typescript
|
|
136
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
137
|
+
* import * as cloudamqp from "@pulumi/cloudamqp";
|
|
138
|
+
*
|
|
139
|
+
* // VPC peering configuration
|
|
140
|
+
* const vpcPeeringRequest = new cloudamqp.VpcGcpPeering("vpc_peering_request", {
|
|
141
|
+
* instanceId: instance.id,
|
|
142
|
+
* peerNetworkUri: peerNetworkUri,
|
|
143
|
+
* });
|
|
144
|
+
* // Firewall rules
|
|
145
|
+
* const firewallSettings = new cloudamqp.SecurityFirewall("firewall_settings", {
|
|
146
|
+
* instanceId: instance.id,
|
|
147
|
+
* rules: [
|
|
148
|
+
* {
|
|
149
|
+
* ip: peerSubnet,
|
|
150
|
+
* ports: [
|
|
151
|
+
* 15672,
|
|
152
|
+
* 5552,
|
|
153
|
+
* 5551,
|
|
154
|
+
* ],
|
|
155
|
+
* services: [
|
|
156
|
+
* "AMQP",
|
|
157
|
+
* "AMQPS",
|
|
158
|
+
* ],
|
|
159
|
+
* description: "VPC peering for <NETWORK>",
|
|
160
|
+
* },
|
|
161
|
+
* {
|
|
162
|
+
* ip: "192.168.0.0/24",
|
|
163
|
+
* ports: [
|
|
164
|
+
* 4567,
|
|
165
|
+
* 4568,
|
|
166
|
+
* ],
|
|
167
|
+
* services: [
|
|
168
|
+
* "AMQP",
|
|
169
|
+
* "AMQPS",
|
|
170
|
+
* "HTTPS",
|
|
171
|
+
* ],
|
|
172
|
+
* },
|
|
173
|
+
* ],
|
|
174
|
+
* }, {
|
|
175
|
+
* dependsOn: [vpcPeeringRequest],
|
|
176
|
+
* });
|
|
177
|
+
* ```
|
|
178
|
+
*
|
|
179
|
+
* </details>
|
|
180
|
+
*
|
|
181
|
+
* <details>
|
|
182
|
+
* <summary>
|
|
183
|
+
* <b>
|
|
184
|
+
* <i>VPC peering from [v1.16.0] (Managed VPC)</i>
|
|
185
|
+
* </b>
|
|
186
|
+
* </summary>
|
|
187
|
+
*
|
|
188
|
+
* ```typescript
|
|
189
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
190
|
+
* import * as cloudamqp from "@pulumi/cloudamqp";
|
|
191
|
+
*
|
|
192
|
+
* // VPC peering configuration
|
|
193
|
+
* const vpcPeeringRequest = new cloudamqp.VpcGcpPeering("vpc_peering_request", {
|
|
194
|
+
* vpcId: vpc.id,
|
|
195
|
+
* peerNetworkUri: peerNetworkUri,
|
|
196
|
+
* });
|
|
197
|
+
* // Firewall rules
|
|
198
|
+
* const firewallSettings = new cloudamqp.SecurityFirewall("firewall_settings", {
|
|
199
|
+
* instanceId: instance.id,
|
|
200
|
+
* rules: [
|
|
201
|
+
* {
|
|
202
|
+
* ip: peerSubnet,
|
|
203
|
+
* ports: [
|
|
204
|
+
* 15672,
|
|
205
|
+
* 5552,
|
|
206
|
+
* 5551,
|
|
207
|
+
* ],
|
|
208
|
+
* services: [
|
|
209
|
+
* "AMQP",
|
|
210
|
+
* "AMQPS",
|
|
211
|
+
* ],
|
|
212
|
+
* description: "VPC peering for <NETWORK>",
|
|
213
|
+
* },
|
|
214
|
+
* {
|
|
215
|
+
* ip: "0.0.0.0/0",
|
|
216
|
+
* ports: [],
|
|
217
|
+
* services: ["HTTPS"],
|
|
218
|
+
* description: "MGMT interface",
|
|
219
|
+
* },
|
|
220
|
+
* ],
|
|
221
|
+
* }, {
|
|
222
|
+
* dependsOn: [vpcPeeringRequest],
|
|
223
|
+
* });
|
|
224
|
+
* ```
|
|
225
|
+
*
|
|
226
|
+
* </details>
|
|
227
|
+
*
|
|
228
|
+
* [CloudAMQP plans]: https://www.cloudamqp.com/plans.html
|
|
229
|
+
* [cloudamqp.SecurityFirewall]: https://registry.terraform.io/providers/cloudamqp/cloudamqp/latest/docs/resources/security_firewall
|
|
230
|
+
* [GCP documentation]: https://cloud.google.com/vpc/docs/using-vpc-peering
|
|
231
|
+
* [v1.16.0]: https://github.com/cloudamqp/terraform-provider-cloudamqp/releases/tag/v1.16.0
|
|
232
|
+
* [v1.28.0]: https://github.com/cloudamqp/terraform-provider-cloudamqp/releases/tag/v1.28.0
|
|
233
|
+
* [v1.29.0]: https://github.com/cloudamqp/terraform-provider-cloudamqp/releases/tag/v1.29.0
|
|
234
|
+
*
|
|
235
|
+
* ## Dependency
|
|
236
|
+
*
|
|
237
|
+
* ***From v1.16.0:***
|
|
238
|
+
* This resource depends on CloudAMQP managed VPC identifier, `cloudamqp_vpc.vpc.id` or instance
|
|
239
|
+
* identifier, `cloudamqp_instance.instance.id`.
|
|
240
|
+
*
|
|
241
|
+
* ***Before v1.16.0:***
|
|
242
|
+
* This resource depends on CloudAMQP instance identifier, `cloudamqp_instance.instance.id`.
|
|
243
|
+
*
|
|
244
|
+
* ## Create VPC peering with additional firewall rules
|
|
245
|
+
*
|
|
246
|
+
* To create a VPC peering configuration with additional firewall rules, it's required to chain the
|
|
247
|
+
* [cloudamqp.SecurityFirewall] resource to avoid parallel conflicting resource calls. This is done by
|
|
248
|
+
* adding dependency from the firewall resource to the VPC peering resource.
|
|
249
|
+
*
|
|
250
|
+
* Furthermore, since all firewall rules are overwritten, the otherwise automatically added rules for
|
|
251
|
+
* the VPC peering also needs to be added.
|
|
252
|
+
*
|
|
253
|
+
* See example below.
|
|
254
|
+
*
|
|
255
|
+
* ## Import
|
|
12
256
|
*
|
|
13
|
-
*
|
|
257
|
+
* ***From v1.32.2:***
|
|
258
|
+
* `cloudamqp.VpcGcpPeering` can be imported while using the resource type, with CloudAMQP VPC
|
|
259
|
+
* identifier or instance identifier together with *peering_network_uri* (CSV seperated).
|
|
14
260
|
*/
|
|
15
261
|
export declare class VpcGcpPeering extends pulumi.CustomResource {
|
|
16
262
|
/**
|