pulumi-cloudamqp 3.21.0a1743571485__py3-none-any.whl → 3.21.0a1744082841__py3-none-any.whl

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.

Potentially problematic release.


This version of pulumi-cloudamqp might be problematic. Click here for more details.

Files changed (45) hide show
  1. pulumi_cloudamqp/__init__.py +9 -0
  2. pulumi_cloudamqp/_inputs.py +28 -9
  3. pulumi_cloudamqp/account_action.py +14 -7
  4. pulumi_cloudamqp/alarm.py +90 -30
  5. pulumi_cloudamqp/custom_domain.py +52 -10
  6. pulumi_cloudamqp/extra_disk_size.py +117 -101
  7. pulumi_cloudamqp/get_account.py +8 -2
  8. pulumi_cloudamqp/get_account_vpcs.py +13 -40
  9. pulumi_cloudamqp/get_alarm.py +50 -44
  10. pulumi_cloudamqp/get_credentials.py +10 -18
  11. pulumi_cloudamqp/get_instance.py +51 -2
  12. pulumi_cloudamqp/get_nodes.py +3 -50
  13. pulumi_cloudamqp/get_notification.py +17 -20
  14. pulumi_cloudamqp/get_plugins.py +15 -42
  15. pulumi_cloudamqp/get_plugins_community.py +16 -40
  16. pulumi_cloudamqp/get_upgradable_versions.py +10 -16
  17. pulumi_cloudamqp/get_vpc_gcp_info.py +23 -118
  18. pulumi_cloudamqp/get_vpc_info.py +18 -112
  19. pulumi_cloudamqp/instance.py +400 -177
  20. pulumi_cloudamqp/integration_aws_eventbridge.py +90 -26
  21. pulumi_cloudamqp/integration_log.py +135 -50
  22. pulumi_cloudamqp/integration_metric.py +50 -2
  23. pulumi_cloudamqp/maintenance_window.py +515 -0
  24. pulumi_cloudamqp/node_actions.py +32 -10
  25. pulumi_cloudamqp/notification.py +103 -22
  26. pulumi_cloudamqp/outputs.py +118 -28
  27. pulumi_cloudamqp/plugin.py +89 -25
  28. pulumi_cloudamqp/plugin_community.py +87 -27
  29. pulumi_cloudamqp/privatelink_aws.py +62 -270
  30. pulumi_cloudamqp/privatelink_azure.py +64 -268
  31. pulumi_cloudamqp/pulumi-plugin.json +1 -1
  32. pulumi_cloudamqp/rabbit_configuration.py +209 -86
  33. pulumi_cloudamqp/security_firewall.py +76 -23
  34. pulumi_cloudamqp/upgrade_lavinmq.py +0 -74
  35. pulumi_cloudamqp/upgrade_rabbitmq.py +14 -261
  36. pulumi_cloudamqp/vpc.py +48 -16
  37. pulumi_cloudamqp/vpc_connect.py +111 -499
  38. pulumi_cloudamqp/vpc_gcp_peering.py +141 -506
  39. pulumi_cloudamqp/vpc_peering.py +50 -36
  40. pulumi_cloudamqp/webhook.py +48 -9
  41. {pulumi_cloudamqp-3.21.0a1743571485.dist-info → pulumi_cloudamqp-3.21.0a1744082841.dist-info}/METADATA +1 -1
  42. pulumi_cloudamqp-3.21.0a1744082841.dist-info/RECORD +50 -0
  43. pulumi_cloudamqp-3.21.0a1743571485.dist-info/RECORD +0 -49
  44. {pulumi_cloudamqp-3.21.0a1743571485.dist-info → pulumi_cloudamqp-3.21.0a1744082841.dist-info}/WHEEL +0 -0
  45. {pulumi_cloudamqp-3.21.0a1743571485.dist-info → pulumi_cloudamqp-3.21.0a1744082841.dist-info}/top_level.txt +0 -0
@@ -32,23 +32,23 @@ class VpcConnectArgs:
32
32
  :param pulumi.Input[str] region: The region where the CloudAMQP instance is hosted.
33
33
  :param pulumi.Input[Sequence[pulumi.Input[str]]] allowed_principals: List of allowed prinicpals used by AWS, see below table.
34
34
  :param pulumi.Input[Sequence[pulumi.Input[str]]] allowed_projects: List of allowed projects used by GCP, see below table.
35
- :param pulumi.Input[Sequence[pulumi.Input[str]]] approved_subscriptions: List of approved subscriptions used by Azure, see below table.
36
- :param pulumi.Input[int] sleep: Configurable sleep time (seconds) when enable Private Service Connect.
37
- Default set to 10 seconds.
38
- :param pulumi.Input[int] timeout: Configurable timeout time (seconds) when enable Private Service Connect.
39
- Default set to 1800 seconds.
35
+ :param pulumi.Input[Sequence[pulumi.Input[str]]] approved_subscriptions: List of approved subscriptions used by Azure, see below
36
+ table.
37
+ :param pulumi.Input[int] sleep: Configurable sleep time (seconds) when enable Private
38
+ Service Connect. Default set to 10 seconds.
39
+ :param pulumi.Input[int] timeout: Configurable timeout time (seconds) when enable Private
40
+ Service Connect. Default set to 1800 seconds.
40
41
 
41
42
  ___
42
43
 
43
- The `allowed_principals`, `approved_subscriptions` or `allowed_projects` data depends on the provider platform:
44
+ The `allowed_principals`, `approved_subscriptions` or `allowed_projects` data depends on the
45
+ provider platform:
44
46
 
45
- | Platform | Description | Format |
46
- |----------|---------------------|------------------------------------------------------------------------------------------------------------------------------------|
47
- | AWS | IAM ARN principals | arn:aws:iam::aws-account-id:root<br /> arn:aws:iam::aws-account-id:user/user-name<br /> arn:aws:iam::aws-account-id:role/role-name |
48
- | Azure | Subscription (GUID) | XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX |
49
- | GCP | Project IDs* | 6 to 30 lowercase letters, digits, or hyphens |
50
-
51
- *https://cloud.google.com/resource-manager/reference/rest/v1/projects
47
+ | Platform | Description | Format |
48
+ |---|---|---|
49
+ | AWS | IAM ARN principals | arn:aws:iam::aws-account-id:root<br>arn:aws:iam::aws-account-id:user/user-name<br> arn:aws:iam::aws-account-id:role/role-name |
50
+ | Azure | Subscription (GUID) | XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX |
51
+ | GCP | Project IDs [Google docs] | 6 to 30 lowercase letters, digits, or hyphens |
52
52
  """
53
53
  pulumi.set(__self__, "instance_id", instance_id)
54
54
  pulumi.set(__self__, "region", region)
@@ -115,7 +115,8 @@ class VpcConnectArgs:
115
115
  @pulumi.getter(name="approvedSubscriptions")
116
116
  def approved_subscriptions(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
117
117
  """
118
- List of approved subscriptions used by Azure, see below table.
118
+ List of approved subscriptions used by Azure, see below
119
+ table.
119
120
  """
120
121
  return pulumi.get(self, "approved_subscriptions")
121
122
 
@@ -127,8 +128,8 @@ class VpcConnectArgs:
127
128
  @pulumi.getter
128
129
  def sleep(self) -> Optional[pulumi.Input[int]]:
129
130
  """
130
- Configurable sleep time (seconds) when enable Private Service Connect.
131
- Default set to 10 seconds.
131
+ Configurable sleep time (seconds) when enable Private
132
+ Service Connect. Default set to 10 seconds.
132
133
  """
133
134
  return pulumi.get(self, "sleep")
134
135
 
@@ -140,20 +141,19 @@ class VpcConnectArgs:
140
141
  @pulumi.getter
141
142
  def timeout(self) -> Optional[pulumi.Input[int]]:
142
143
  """
143
- Configurable timeout time (seconds) when enable Private Service Connect.
144
- Default set to 1800 seconds.
144
+ Configurable timeout time (seconds) when enable Private
145
+ Service Connect. Default set to 1800 seconds.
145
146
 
146
147
  ___
147
148
 
148
- The `allowed_principals`, `approved_subscriptions` or `allowed_projects` data depends on the provider platform:
149
-
150
- | Platform | Description | Format |
151
- |----------|---------------------|------------------------------------------------------------------------------------------------------------------------------------|
152
- | AWS | IAM ARN principals | arn:aws:iam::aws-account-id:root<br /> arn:aws:iam::aws-account-id:user/user-name<br /> arn:aws:iam::aws-account-id:role/role-name |
153
- | Azure | Subscription (GUID) | XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX |
154
- | GCP | Project IDs* | 6 to 30 lowercase letters, digits, or hyphens |
149
+ The `allowed_principals`, `approved_subscriptions` or `allowed_projects` data depends on the
150
+ provider platform:
155
151
 
156
- *https://cloud.google.com/resource-manager/reference/rest/v1/projects
152
+ | Platform | Description | Format |
153
+ |---|---|---|
154
+ | AWS | IAM ARN principals | arn:aws:iam::aws-account-id:root<br>arn:aws:iam::aws-account-id:user/user-name<br> arn:aws:iam::aws-account-id:role/role-name |
155
+ | Azure | Subscription (GUID) | XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX |
156
+ | GCP | Project IDs [Google docs] | 6 to 30 lowercase letters, digits, or hyphens |
157
157
  """
158
158
  return pulumi.get(self, "timeout")
159
159
 
@@ -180,27 +180,27 @@ class _VpcConnectState:
180
180
  :param pulumi.Input[Sequence[pulumi.Input[str]]] active_zones: Covering availability zones used when creating an endpoint from other VPC. (AWS)
181
181
  :param pulumi.Input[Sequence[pulumi.Input[str]]] allowed_principals: List of allowed prinicpals used by AWS, see below table.
182
182
  :param pulumi.Input[Sequence[pulumi.Input[str]]] allowed_projects: List of allowed projects used by GCP, see below table.
183
- :param pulumi.Input[Sequence[pulumi.Input[str]]] approved_subscriptions: List of approved subscriptions used by Azure, see below table.
183
+ :param pulumi.Input[Sequence[pulumi.Input[str]]] approved_subscriptions: List of approved subscriptions used by Azure, see below
184
+ table.
184
185
  :param pulumi.Input[int] instance_id: The CloudAMQP instance identifier.
185
186
  :param pulumi.Input[str] region: The region where the CloudAMQP instance is hosted.
186
187
  :param pulumi.Input[str] service_name: Service name (alias for Azure, see example above) of the PrivateLink.
187
- :param pulumi.Input[int] sleep: Configurable sleep time (seconds) when enable Private Service Connect.
188
- Default set to 10 seconds.
188
+ :param pulumi.Input[int] sleep: Configurable sleep time (seconds) when enable Private
189
+ Service Connect. Default set to 10 seconds.
189
190
  :param pulumi.Input[str] status: Private Service Connect status [enable, pending, disable]
190
- :param pulumi.Input[int] timeout: Configurable timeout time (seconds) when enable Private Service Connect.
191
- Default set to 1800 seconds.
191
+ :param pulumi.Input[int] timeout: Configurable timeout time (seconds) when enable Private
192
+ Service Connect. Default set to 1800 seconds.
192
193
 
193
194
  ___
194
195
 
195
- The `allowed_principals`, `approved_subscriptions` or `allowed_projects` data depends on the provider platform:
196
+ The `allowed_principals`, `approved_subscriptions` or `allowed_projects` data depends on the
197
+ provider platform:
196
198
 
197
- | Platform | Description | Format |
198
- |----------|---------------------|------------------------------------------------------------------------------------------------------------------------------------|
199
- | AWS | IAM ARN principals | arn:aws:iam::aws-account-id:root<br /> arn:aws:iam::aws-account-id:user/user-name<br /> arn:aws:iam::aws-account-id:role/role-name |
200
- | Azure | Subscription (GUID) | XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX |
201
- | GCP | Project IDs* | 6 to 30 lowercase letters, digits, or hyphens |
202
-
203
- *https://cloud.google.com/resource-manager/reference/rest/v1/projects
199
+ | Platform | Description | Format |
200
+ |---|---|---|
201
+ | AWS | IAM ARN principals | arn:aws:iam::aws-account-id:root<br>arn:aws:iam::aws-account-id:user/user-name<br> arn:aws:iam::aws-account-id:role/role-name |
202
+ | Azure | Subscription (GUID) | XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX |
203
+ | GCP | Project IDs [Google docs] | 6 to 30 lowercase letters, digits, or hyphens |
204
204
  """
205
205
  if active_zones is not None:
206
206
  pulumi.set(__self__, "active_zones", active_zones)
@@ -263,7 +263,8 @@ class _VpcConnectState:
263
263
  @pulumi.getter(name="approvedSubscriptions")
264
264
  def approved_subscriptions(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
265
265
  """
266
- List of approved subscriptions used by Azure, see below table.
266
+ List of approved subscriptions used by Azure, see below
267
+ table.
267
268
  """
268
269
  return pulumi.get(self, "approved_subscriptions")
269
270
 
@@ -311,8 +312,8 @@ class _VpcConnectState:
311
312
  @pulumi.getter
312
313
  def sleep(self) -> Optional[pulumi.Input[int]]:
313
314
  """
314
- Configurable sleep time (seconds) when enable Private Service Connect.
315
- Default set to 10 seconds.
315
+ Configurable sleep time (seconds) when enable Private
316
+ Service Connect. Default set to 10 seconds.
316
317
  """
317
318
  return pulumi.get(self, "sleep")
318
319
 
@@ -336,20 +337,19 @@ class _VpcConnectState:
336
337
  @pulumi.getter
337
338
  def timeout(self) -> Optional[pulumi.Input[int]]:
338
339
  """
339
- Configurable timeout time (seconds) when enable Private Service Connect.
340
- Default set to 1800 seconds.
340
+ Configurable timeout time (seconds) when enable Private
341
+ Service Connect. Default set to 1800 seconds.
341
342
 
342
343
  ___
343
344
 
344
- The `allowed_principals`, `approved_subscriptions` or `allowed_projects` data depends on the provider platform:
345
-
346
- | Platform | Description | Format |
347
- |----------|---------------------|------------------------------------------------------------------------------------------------------------------------------------|
348
- | AWS | IAM ARN principals | arn:aws:iam::aws-account-id:root<br /> arn:aws:iam::aws-account-id:user/user-name<br /> arn:aws:iam::aws-account-id:role/role-name |
349
- | Azure | Subscription (GUID) | XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX |
350
- | GCP | Project IDs* | 6 to 30 lowercase letters, digits, or hyphens |
345
+ The `allowed_principals`, `approved_subscriptions` or `allowed_projects` data depends on the
346
+ provider platform:
351
347
 
352
- *https://cloud.google.com/resource-manager/reference/rest/v1/projects
348
+ | Platform | Description | Format |
349
+ |---|---|---|
350
+ | AWS | IAM ARN principals | arn:aws:iam::aws-account-id:root<br>arn:aws:iam::aws-account-id:user/user-name<br> arn:aws:iam::aws-account-id:role/role-name |
351
+ | Azure | Subscription (GUID) | XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX |
352
+ | GCP | Project IDs [Google docs] | 6 to 30 lowercase letters, digits, or hyphens |
353
353
  """
354
354
  return pulumi.get(self, "timeout")
355
355
 
@@ -372,247 +372,53 @@ class VpcConnect(pulumi.CustomResource):
372
372
  timeout: Optional[pulumi.Input[int]] = None,
373
373
  __props__=None):
374
374
  """
375
- This resource is a generic way to handle PrivateLink (AWS and Azure) and Private Service Connect (GCP).
376
- Communication between resources can be done just as they were living inside a VPC. CloudAMQP creates an Endpoint
377
- Service to connect the VPC and creating a new network interface to handle the communicate.
378
-
379
- If no existing VPC available when enable VPC connect, a new VPC will be created with subnet `10.52.72.0/24`.
380
-
381
- More information can be found at: [CloudAMQP VPC Connect](https://www.cloudamqp.com/docs/cloudamqp-vpc-connect.html)
382
-
383
- > **Note:** Enabling VPC Connect will automatically add a firewall rule.
384
-
385
- <details>
386
- <summary>
387
- <b>
388
- <i>Default PrivateLink firewall rule [AWS, Azure]</i>
389
- </b>
390
- </summary>
391
-
392
- ## Example Usage
393
-
394
- <details>
395
- <summary>
396
- <b>
397
- <i>Enable VPC Connect (PrivateLink) in AWS</i>
398
- </b>
399
- </summary>
400
-
401
- ```python
402
- import pulumi
403
- import pulumi_cloudamqp as cloudamqp
404
-
405
- vpc = cloudamqp.Vpc("vpc",
406
- name="Standalone VPC",
407
- region="amazon-web-services::us-west-1",
408
- subnet="10.56.72.0/24",
409
- tags=[])
410
- instance = cloudamqp.Instance("instance",
411
- name="Instance 01",
412
- plan="bunny-1",
413
- region="amazon-web-services::us-west-1",
414
- tags=[],
415
- vpc_id=vpc.id,
416
- keep_associated_vpc=True)
417
- vpc_connect = cloudamqp.VpcConnect("vpc_connect",
418
- instance_id=instance.id,
419
- region=instance.region,
420
- allowed_principals=["arn:aws:iam::aws-account-id:user/user-name"])
421
- ```
422
-
423
- </details>
424
-
425
- <details>
426
- <summary>
427
- <b>
428
- <i>Enable VPC Connect (PrivateLink) in Azure</i>
429
- </b>
430
- </summary>
431
-
432
- ```python
433
- import pulumi
434
- import pulumi_cloudamqp as cloudamqp
435
-
436
- vpc = cloudamqp.Vpc("vpc",
437
- name="Standalone VPC",
438
- region="azure-arm::westus",
439
- subnet="10.56.72.0/24",
440
- tags=[])
441
- instance = cloudamqp.Instance("instance",
442
- name="Instance 01",
443
- plan="bunny-1",
444
- region="azure-arm::westus",
445
- tags=[],
446
- vpc_id=vpc.id,
447
- keep_associated_vpc=True)
448
- vpc_connect = cloudamqp.VpcConnect("vpc_connect",
449
- instance_id=instance.id,
450
- region=instance.region,
451
- approved_subscriptions=["XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"])
452
- ```
453
-
454
- The attribute `service_name` found in resource `VpcConnect` corresponds to the alias in
455
- the resource `azurerm_private_endpoint` of the Azure provider. This can be used when creating the
456
- private endpoint.
457
-
458
- ```python
459
- import pulumi
460
- import pulumi_azurerm as azurerm
461
-
462
- example = azurerm.index.PrivateEndpoint("example",
463
- name=example-endpoint,
464
- location=example_azurerm_resource_group.location,
465
- resource_group_name=example_azurerm_resource_group.name,
466
- subnet_id=subnet.id,
467
- private_service_connection=[{
468
- name: example-privateserviceconnection,
469
- privateConnectionResourceAlias: vpc_connect.service_name,
470
- isManualConnection: True,
471
- requestMessage: PL,
472
- }])
473
- ```
474
-
475
- More information about the resource and argument can be found here:
476
- private_connection_resource_alias. Or check their example "Using a Private Link
477
- Service Alias with existing resources:".
478
-
479
- </details>
480
-
481
- <details>
482
- <summary>
483
- <b>
484
- <i>Enable VPC Connect (Private Service Connect) in GCP</i>
485
- </b>
486
- </summary>
487
-
488
- ```python
489
- import pulumi
490
- import pulumi_cloudamqp as cloudamqp
491
-
492
- vpc = cloudamqp.Vpc("vpc",
493
- name="Standalone VPC",
494
- region="google-compute-engine::us-west1",
495
- subnet="10.56.72.0/24",
496
- tags=[])
497
- instance = cloudamqp.Instance("instance",
498
- name="Instance 01",
499
- plan="bunny-1",
500
- region="google-compute-engine::us-west1",
501
- tags=[],
502
- vpc_id=vpc.id,
503
- keep_associated_vpc=True)
504
- vpc_connect = cloudamqp.VpcConnect("vpc_connect",
505
- instance_id=instance.id,
506
- region=instance.region,
507
- allowed_projects=["some-project-123456"])
508
- ```
509
-
510
- </details>
511
-
512
- ### With Additional Firewall Rules
513
-
514
- <details>
515
- <summary>
516
- <b>
517
- <i>CloudAMQP instance in an existing VPC with managed firewall rules</i>
518
- </b>
519
- </summary>
520
-
521
- ```python
522
- import pulumi
523
- import pulumi_cloudamqp as cloudamqp
524
-
525
- vpc = cloudamqp.Vpc("vpc",
526
- name="Standalone VPC",
527
- region="amazon-web-services::us-west-1",
528
- subnet="10.56.72.0/24",
529
- tags=[])
530
- instance = cloudamqp.Instance("instance",
531
- name="Instance 01",
532
- plan="bunny-1",
533
- region="amazon-web-services::us-west-1",
534
- tags=[],
535
- vpc_id=vpc.id,
536
- keep_associated_vpc=True)
537
- vpc_connect = cloudamqp.VpcConnect("vpc_connect",
538
- instance_id=instance.id,
539
- allowed_principals=["arn:aws:iam::aws-account-id:user/user-name"])
540
- firewall_settings = cloudamqp.SecurityFirewall("firewall_settings",
541
- instance_id=instance.id,
542
- rules=[
543
- {
544
- "description": "Custom PrivateLink setup",
545
- "ip": vpc.subnet,
546
- "ports": [],
547
- "services": [
548
- "AMQP",
549
- "AMQPS",
550
- "HTTPS",
551
- "STREAM",
552
- "STREAM_SSL",
553
- ],
554
- },
555
- {
556
- "description": "MGMT interface",
557
- "ip": "0.0.0.0/0",
558
- "ports": [],
559
- "services": ["HTTPS"],
560
- },
561
- ],
562
- opts = pulumi.ResourceOptions(depends_on=[vpc_connect]))
563
- ```
375
+ ## Import
564
376
 
565
- </details>
377
+ `cloudamqp_vpc_connect` can be imported using CloudAMQP instance identifier. To
566
378
 
567
- ## Depedency
379
+ retrieve the identifier, use [CloudAMQP API list intances].
568
380
 
569
- This resource depends on CloudAMQP instance identifier, `cloudamqp_instance.instance.id`.
381
+ From Terraform v1.5.0, the `import` block can be used to import this resource:
570
382
 
571
- Since `region` also is required, suggest to reuse the argument from CloudAMQP instance,
572
- `cloudamqp_instance.instance.region`.
383
+ hcl
573
384
 
574
- ## Create VPC Connect with additional firewall rules
385
+ import {
575
386
 
576
- To create a PrivateLink/Private Service Connect configuration with additional firewall rules, it's required to chain the SecurityFirewall
577
- resource to avoid parallel conflicting resource calls. You can do this by making the firewall
578
- resource depend on the VPC Connect resource, `cloudamqp_vpc_connect.vpc_connect`.
387
+ to = cloudamqp_vpc_connect.this
579
388
 
580
- Furthermore, since all firewall rules are overwritten, the otherwise automatically added rules for
581
- the VPC Connect also needs to be added.
389
+ id = cloudamqp_instance.instance.id
582
390
 
583
- ## Import
391
+ }
584
392
 
585
- `cloudamqp_vpc_connect` can be imported using CloudAMQP internal identifier.
393
+ Or use Terraform CLI:
586
394
 
587
395
  ```sh
588
396
  $ pulumi import cloudamqp:index/vpcConnect:VpcConnect vpc_connect <id>`
589
397
  ```
590
398
 
591
- The resource uses the same identifier as the CloudAMQP instance. To retrieve the identifier for an instance, either use [CloudAMQP customer API](https://docs.cloudamqp.com/#list-instances) or use the data source [`cloudamqp_account`](./data-sources/account.md).
592
-
593
399
  :param str resource_name: The name of the resource.
594
400
  :param pulumi.ResourceOptions opts: Options for the resource.
595
401
  :param pulumi.Input[Sequence[pulumi.Input[str]]] allowed_principals: List of allowed prinicpals used by AWS, see below table.
596
402
  :param pulumi.Input[Sequence[pulumi.Input[str]]] allowed_projects: List of allowed projects used by GCP, see below table.
597
- :param pulumi.Input[Sequence[pulumi.Input[str]]] approved_subscriptions: List of approved subscriptions used by Azure, see below table.
403
+ :param pulumi.Input[Sequence[pulumi.Input[str]]] approved_subscriptions: List of approved subscriptions used by Azure, see below
404
+ table.
598
405
  :param pulumi.Input[int] instance_id: The CloudAMQP instance identifier.
599
406
  :param pulumi.Input[str] region: The region where the CloudAMQP instance is hosted.
600
- :param pulumi.Input[int] sleep: Configurable sleep time (seconds) when enable Private Service Connect.
601
- Default set to 10 seconds.
602
- :param pulumi.Input[int] timeout: Configurable timeout time (seconds) when enable Private Service Connect.
603
- Default set to 1800 seconds.
407
+ :param pulumi.Input[int] sleep: Configurable sleep time (seconds) when enable Private
408
+ Service Connect. Default set to 10 seconds.
409
+ :param pulumi.Input[int] timeout: Configurable timeout time (seconds) when enable Private
410
+ Service Connect. Default set to 1800 seconds.
604
411
 
605
412
  ___
606
413
 
607
- The `allowed_principals`, `approved_subscriptions` or `allowed_projects` data depends on the provider platform:
414
+ The `allowed_principals`, `approved_subscriptions` or `allowed_projects` data depends on the
415
+ provider platform:
608
416
 
609
- | Platform | Description | Format |
610
- |----------|---------------------|------------------------------------------------------------------------------------------------------------------------------------|
611
- | AWS | IAM ARN principals | arn:aws:iam::aws-account-id:root<br /> arn:aws:iam::aws-account-id:user/user-name<br /> arn:aws:iam::aws-account-id:role/role-name |
612
- | Azure | Subscription (GUID) | XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX |
613
- | GCP | Project IDs* | 6 to 30 lowercase letters, digits, or hyphens |
614
-
615
- *https://cloud.google.com/resource-manager/reference/rest/v1/projects
417
+ | Platform | Description | Format |
418
+ |---|---|---|
419
+ | AWS | IAM ARN principals | arn:aws:iam::aws-account-id:root<br>arn:aws:iam::aws-account-id:user/user-name<br> arn:aws:iam::aws-account-id:role/role-name |
420
+ | Azure | Subscription (GUID) | XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX |
421
+ | GCP | Project IDs [Google docs] | 6 to 30 lowercase letters, digits, or hyphens |
616
422
  """
617
423
  ...
618
424
  @overload
@@ -621,224 +427,30 @@ class VpcConnect(pulumi.CustomResource):
621
427
  args: VpcConnectArgs,
622
428
  opts: Optional[pulumi.ResourceOptions] = None):
623
429
  """
624
- This resource is a generic way to handle PrivateLink (AWS and Azure) and Private Service Connect (GCP).
625
- Communication between resources can be done just as they were living inside a VPC. CloudAMQP creates an Endpoint
626
- Service to connect the VPC and creating a new network interface to handle the communicate.
627
-
628
- If no existing VPC available when enable VPC connect, a new VPC will be created with subnet `10.52.72.0/24`.
629
-
630
- More information can be found at: [CloudAMQP VPC Connect](https://www.cloudamqp.com/docs/cloudamqp-vpc-connect.html)
631
-
632
- > **Note:** Enabling VPC Connect will automatically add a firewall rule.
633
-
634
- <details>
635
- <summary>
636
- <b>
637
- <i>Default PrivateLink firewall rule [AWS, Azure]</i>
638
- </b>
639
- </summary>
640
-
641
- ## Example Usage
642
-
643
- <details>
644
- <summary>
645
- <b>
646
- <i>Enable VPC Connect (PrivateLink) in AWS</i>
647
- </b>
648
- </summary>
649
-
650
- ```python
651
- import pulumi
652
- import pulumi_cloudamqp as cloudamqp
653
-
654
- vpc = cloudamqp.Vpc("vpc",
655
- name="Standalone VPC",
656
- region="amazon-web-services::us-west-1",
657
- subnet="10.56.72.0/24",
658
- tags=[])
659
- instance = cloudamqp.Instance("instance",
660
- name="Instance 01",
661
- plan="bunny-1",
662
- region="amazon-web-services::us-west-1",
663
- tags=[],
664
- vpc_id=vpc.id,
665
- keep_associated_vpc=True)
666
- vpc_connect = cloudamqp.VpcConnect("vpc_connect",
667
- instance_id=instance.id,
668
- region=instance.region,
669
- allowed_principals=["arn:aws:iam::aws-account-id:user/user-name"])
670
- ```
671
-
672
- </details>
673
-
674
- <details>
675
- <summary>
676
- <b>
677
- <i>Enable VPC Connect (PrivateLink) in Azure</i>
678
- </b>
679
- </summary>
680
-
681
- ```python
682
- import pulumi
683
- import pulumi_cloudamqp as cloudamqp
684
-
685
- vpc = cloudamqp.Vpc("vpc",
686
- name="Standalone VPC",
687
- region="azure-arm::westus",
688
- subnet="10.56.72.0/24",
689
- tags=[])
690
- instance = cloudamqp.Instance("instance",
691
- name="Instance 01",
692
- plan="bunny-1",
693
- region="azure-arm::westus",
694
- tags=[],
695
- vpc_id=vpc.id,
696
- keep_associated_vpc=True)
697
- vpc_connect = cloudamqp.VpcConnect("vpc_connect",
698
- instance_id=instance.id,
699
- region=instance.region,
700
- approved_subscriptions=["XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"])
701
- ```
702
-
703
- The attribute `service_name` found in resource `VpcConnect` corresponds to the alias in
704
- the resource `azurerm_private_endpoint` of the Azure provider. This can be used when creating the
705
- private endpoint.
706
-
707
- ```python
708
- import pulumi
709
- import pulumi_azurerm as azurerm
710
-
711
- example = azurerm.index.PrivateEndpoint("example",
712
- name=example-endpoint,
713
- location=example_azurerm_resource_group.location,
714
- resource_group_name=example_azurerm_resource_group.name,
715
- subnet_id=subnet.id,
716
- private_service_connection=[{
717
- name: example-privateserviceconnection,
718
- privateConnectionResourceAlias: vpc_connect.service_name,
719
- isManualConnection: True,
720
- requestMessage: PL,
721
- }])
722
- ```
723
-
724
- More information about the resource and argument can be found here:
725
- private_connection_resource_alias. Or check their example "Using a Private Link
726
- Service Alias with existing resources:".
727
-
728
- </details>
729
-
730
- <details>
731
- <summary>
732
- <b>
733
- <i>Enable VPC Connect (Private Service Connect) in GCP</i>
734
- </b>
735
- </summary>
736
-
737
- ```python
738
- import pulumi
739
- import pulumi_cloudamqp as cloudamqp
740
-
741
- vpc = cloudamqp.Vpc("vpc",
742
- name="Standalone VPC",
743
- region="google-compute-engine::us-west1",
744
- subnet="10.56.72.0/24",
745
- tags=[])
746
- instance = cloudamqp.Instance("instance",
747
- name="Instance 01",
748
- plan="bunny-1",
749
- region="google-compute-engine::us-west1",
750
- tags=[],
751
- vpc_id=vpc.id,
752
- keep_associated_vpc=True)
753
- vpc_connect = cloudamqp.VpcConnect("vpc_connect",
754
- instance_id=instance.id,
755
- region=instance.region,
756
- allowed_projects=["some-project-123456"])
757
- ```
758
-
759
- </details>
760
-
761
- ### With Additional Firewall Rules
762
-
763
- <details>
764
- <summary>
765
- <b>
766
- <i>CloudAMQP instance in an existing VPC with managed firewall rules</i>
767
- </b>
768
- </summary>
769
-
770
- ```python
771
- import pulumi
772
- import pulumi_cloudamqp as cloudamqp
773
-
774
- vpc = cloudamqp.Vpc("vpc",
775
- name="Standalone VPC",
776
- region="amazon-web-services::us-west-1",
777
- subnet="10.56.72.0/24",
778
- tags=[])
779
- instance = cloudamqp.Instance("instance",
780
- name="Instance 01",
781
- plan="bunny-1",
782
- region="amazon-web-services::us-west-1",
783
- tags=[],
784
- vpc_id=vpc.id,
785
- keep_associated_vpc=True)
786
- vpc_connect = cloudamqp.VpcConnect("vpc_connect",
787
- instance_id=instance.id,
788
- allowed_principals=["arn:aws:iam::aws-account-id:user/user-name"])
789
- firewall_settings = cloudamqp.SecurityFirewall("firewall_settings",
790
- instance_id=instance.id,
791
- rules=[
792
- {
793
- "description": "Custom PrivateLink setup",
794
- "ip": vpc.subnet,
795
- "ports": [],
796
- "services": [
797
- "AMQP",
798
- "AMQPS",
799
- "HTTPS",
800
- "STREAM",
801
- "STREAM_SSL",
802
- ],
803
- },
804
- {
805
- "description": "MGMT interface",
806
- "ip": "0.0.0.0/0",
807
- "ports": [],
808
- "services": ["HTTPS"],
809
- },
810
- ],
811
- opts = pulumi.ResourceOptions(depends_on=[vpc_connect]))
812
- ```
430
+ ## Import
813
431
 
814
- </details>
432
+ `cloudamqp_vpc_connect` can be imported using CloudAMQP instance identifier. To
815
433
 
816
- ## Depedency
434
+ retrieve the identifier, use [CloudAMQP API list intances].
817
435
 
818
- This resource depends on CloudAMQP instance identifier, `cloudamqp_instance.instance.id`.
436
+ From Terraform v1.5.0, the `import` block can be used to import this resource:
819
437
 
820
- Since `region` also is required, suggest to reuse the argument from CloudAMQP instance,
821
- `cloudamqp_instance.instance.region`.
438
+ hcl
822
439
 
823
- ## Create VPC Connect with additional firewall rules
440
+ import {
824
441
 
825
- To create a PrivateLink/Private Service Connect configuration with additional firewall rules, it's required to chain the SecurityFirewall
826
- resource to avoid parallel conflicting resource calls. You can do this by making the firewall
827
- resource depend on the VPC Connect resource, `cloudamqp_vpc_connect.vpc_connect`.
442
+ to = cloudamqp_vpc_connect.this
828
443
 
829
- Furthermore, since all firewall rules are overwritten, the otherwise automatically added rules for
830
- the VPC Connect also needs to be added.
444
+ id = cloudamqp_instance.instance.id
831
445
 
832
- ## Import
446
+ }
833
447
 
834
- `cloudamqp_vpc_connect` can be imported using CloudAMQP internal identifier.
448
+ Or use Terraform CLI:
835
449
 
836
450
  ```sh
837
451
  $ pulumi import cloudamqp:index/vpcConnect:VpcConnect vpc_connect <id>`
838
452
  ```
839
453
 
840
- The resource uses the same identifier as the CloudAMQP instance. To retrieve the identifier for an instance, either use [CloudAMQP customer API](https://docs.cloudamqp.com/#list-instances) or use the data source [`cloudamqp_account`](./data-sources/account.md).
841
-
842
454
  :param str resource_name: The name of the resource.
843
455
  :param VpcConnectArgs args: The arguments to use to populate this resource's properties.
844
456
  :param pulumi.ResourceOptions opts: Options for the resource.
@@ -914,27 +526,27 @@ class VpcConnect(pulumi.CustomResource):
914
526
  :param pulumi.Input[Sequence[pulumi.Input[str]]] active_zones: Covering availability zones used when creating an endpoint from other VPC. (AWS)
915
527
  :param pulumi.Input[Sequence[pulumi.Input[str]]] allowed_principals: List of allowed prinicpals used by AWS, see below table.
916
528
  :param pulumi.Input[Sequence[pulumi.Input[str]]] allowed_projects: List of allowed projects used by GCP, see below table.
917
- :param pulumi.Input[Sequence[pulumi.Input[str]]] approved_subscriptions: List of approved subscriptions used by Azure, see below table.
529
+ :param pulumi.Input[Sequence[pulumi.Input[str]]] approved_subscriptions: List of approved subscriptions used by Azure, see below
530
+ table.
918
531
  :param pulumi.Input[int] instance_id: The CloudAMQP instance identifier.
919
532
  :param pulumi.Input[str] region: The region where the CloudAMQP instance is hosted.
920
533
  :param pulumi.Input[str] service_name: Service name (alias for Azure, see example above) of the PrivateLink.
921
- :param pulumi.Input[int] sleep: Configurable sleep time (seconds) when enable Private Service Connect.
922
- Default set to 10 seconds.
534
+ :param pulumi.Input[int] sleep: Configurable sleep time (seconds) when enable Private
535
+ Service Connect. Default set to 10 seconds.
923
536
  :param pulumi.Input[str] status: Private Service Connect status [enable, pending, disable]
924
- :param pulumi.Input[int] timeout: Configurable timeout time (seconds) when enable Private Service Connect.
925
- Default set to 1800 seconds.
537
+ :param pulumi.Input[int] timeout: Configurable timeout time (seconds) when enable Private
538
+ Service Connect. Default set to 1800 seconds.
926
539
 
927
540
  ___
928
541
 
929
- The `allowed_principals`, `approved_subscriptions` or `allowed_projects` data depends on the provider platform:
930
-
931
- | Platform | Description | Format |
932
- |----------|---------------------|------------------------------------------------------------------------------------------------------------------------------------|
933
- | AWS | IAM ARN principals | arn:aws:iam::aws-account-id:root<br /> arn:aws:iam::aws-account-id:user/user-name<br /> arn:aws:iam::aws-account-id:role/role-name |
934
- | Azure | Subscription (GUID) | XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX |
935
- | GCP | Project IDs* | 6 to 30 lowercase letters, digits, or hyphens |
542
+ The `allowed_principals`, `approved_subscriptions` or `allowed_projects` data depends on the
543
+ provider platform:
936
544
 
937
- *https://cloud.google.com/resource-manager/reference/rest/v1/projects
545
+ | Platform | Description | Format |
546
+ |---|---|---|
547
+ | AWS | IAM ARN principals | arn:aws:iam::aws-account-id:root<br>arn:aws:iam::aws-account-id:user/user-name<br> arn:aws:iam::aws-account-id:role/role-name |
548
+ | Azure | Subscription (GUID) | XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX |
549
+ | GCP | Project IDs [Google docs] | 6 to 30 lowercase letters, digits, or hyphens |
938
550
  """
939
551
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
940
552
 
@@ -980,7 +592,8 @@ class VpcConnect(pulumi.CustomResource):
980
592
  @pulumi.getter(name="approvedSubscriptions")
981
593
  def approved_subscriptions(self) -> pulumi.Output[Optional[Sequence[str]]]:
982
594
  """
983
- List of approved subscriptions used by Azure, see below table.
595
+ List of approved subscriptions used by Azure, see below
596
+ table.
984
597
  """
985
598
  return pulumi.get(self, "approved_subscriptions")
986
599
 
@@ -1012,8 +625,8 @@ class VpcConnect(pulumi.CustomResource):
1012
625
  @pulumi.getter
1013
626
  def sleep(self) -> pulumi.Output[Optional[int]]:
1014
627
  """
1015
- Configurable sleep time (seconds) when enable Private Service Connect.
1016
- Default set to 10 seconds.
628
+ Configurable sleep time (seconds) when enable Private
629
+ Service Connect. Default set to 10 seconds.
1017
630
  """
1018
631
  return pulumi.get(self, "sleep")
1019
632
 
@@ -1029,20 +642,19 @@ class VpcConnect(pulumi.CustomResource):
1029
642
  @pulumi.getter
1030
643
  def timeout(self) -> pulumi.Output[Optional[int]]:
1031
644
  """
1032
- Configurable timeout time (seconds) when enable Private Service Connect.
1033
- Default set to 1800 seconds.
645
+ Configurable timeout time (seconds) when enable Private
646
+ Service Connect. Default set to 1800 seconds.
1034
647
 
1035
648
  ___
1036
649
 
1037
- The `allowed_principals`, `approved_subscriptions` or `allowed_projects` data depends on the provider platform:
1038
-
1039
- | Platform | Description | Format |
1040
- |----------|---------------------|------------------------------------------------------------------------------------------------------------------------------------|
1041
- | AWS | IAM ARN principals | arn:aws:iam::aws-account-id:root<br /> arn:aws:iam::aws-account-id:user/user-name<br /> arn:aws:iam::aws-account-id:role/role-name |
1042
- | Azure | Subscription (GUID) | XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX |
1043
- | GCP | Project IDs* | 6 to 30 lowercase letters, digits, or hyphens |
650
+ The `allowed_principals`, `approved_subscriptions` or `allowed_projects` data depends on the
651
+ provider platform:
1044
652
 
1045
- *https://cloud.google.com/resource-manager/reference/rest/v1/projects
653
+ | Platform | Description | Format |
654
+ |---|---|---|
655
+ | AWS | IAM ARN principals | arn:aws:iam::aws-account-id:root<br>arn:aws:iam::aws-account-id:user/user-name<br> arn:aws:iam::aws-account-id:role/role-name |
656
+ | Azure | Subscription (GUID) | XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX |
657
+ | GCP | Project IDs [Google docs] | 6 to 30 lowercase letters, digits, or hyphens |
1046
658
  """
1047
659
  return pulumi.get(self, "timeout")
1048
660