dbt-platform-helper 11.3.0__py3-none-any.whl → 12.0.0__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 dbt-platform-helper might be problematic. Click here for more details.

Files changed (33) hide show
  1. dbt_platform_helper/COMMANDS.md +3 -252
  2. dbt_platform_helper/addons-template-map.yml +7 -33
  3. dbt_platform_helper/commands/application.py +8 -7
  4. dbt_platform_helper/commands/conduit.py +1 -4
  5. dbt_platform_helper/commands/copilot.py +14 -110
  6. dbt_platform_helper/commands/environment.py +0 -5
  7. dbt_platform_helper/commands/pipeline.py +1 -13
  8. dbt_platform_helper/domain/database_copy.py +2 -2
  9. dbt_platform_helper/domain/maintenance_page.py +0 -3
  10. dbt_platform_helper/templates/addon-instructions.txt +1 -1
  11. dbt_platform_helper/templates/addons/svc/s3-policy.yml +0 -8
  12. dbt_platform_helper/utils/aws.py +3 -1
  13. dbt_platform_helper/utils/platform_config.py +2 -7
  14. dbt_platform_helper/utils/validation.py +3 -78
  15. {dbt_platform_helper-11.3.0.dist-info → dbt_platform_helper-12.0.0.dist-info}/METADATA +1 -1
  16. {dbt_platform_helper-11.3.0.dist-info → dbt_platform_helper-12.0.0.dist-info}/RECORD +20 -33
  17. platform_helper.py +0 -8
  18. dbt_platform_helper/commands/check_cloudformation.py +0 -87
  19. dbt_platform_helper/commands/dns.py +0 -952
  20. dbt_platform_helper/custom_resources/__init__.py +0 -0
  21. dbt_platform_helper/custom_resources/s3_object.py +0 -85
  22. dbt_platform_helper/templates/addons/env/addons.parameters.yml +0 -19
  23. dbt_platform_helper/templates/addons/env/aurora-postgres.yml +0 -604
  24. dbt_platform_helper/templates/addons/env/monitoring.yml +0 -121
  25. dbt_platform_helper/templates/addons/env/opensearch.yml +0 -257
  26. dbt_platform_helper/templates/addons/env/rds-postgres.yml +0 -603
  27. dbt_platform_helper/templates/addons/env/redis-cluster.yml +0 -171
  28. dbt_platform_helper/templates/addons/env/s3.yml +0 -219
  29. dbt_platform_helper/templates/addons/env/vpc.yml +0 -120
  30. dbt_platform_helper/utils/cloudformation.py +0 -34
  31. {dbt_platform_helper-11.3.0.dist-info → dbt_platform_helper-12.0.0.dist-info}/LICENSE +0 -0
  32. {dbt_platform_helper-11.3.0.dist-info → dbt_platform_helper-12.0.0.dist-info}/WHEEL +0 -0
  33. {dbt_platform_helper-11.3.0.dist-info → dbt_platform_helper-12.0.0.dist-info}/entry_points.txt +0 -0
File without changes
@@ -1,85 +0,0 @@
1
- import json
2
- import logging
3
- import time
4
- from urllib import request
5
- from urllib.error import HTTPError
6
-
7
- import boto3
8
- from botocore.exceptions import ClientError
9
-
10
- logger = logging.getLogger(__name__)
11
-
12
-
13
- def send_response(event, context, status, message):
14
- bucket = event["ResourceProperties"].get("S3Bucket", "")
15
- key = event["ResourceProperties"].get("S3ObjectKey", "")
16
-
17
- body = json.dumps(
18
- {
19
- "Status": status,
20
- "Reason": message,
21
- "StackId": event["StackId"],
22
- "RequestId": event["RequestId"],
23
- "LogicalResourceId": event["LogicalResourceId"],
24
- "PhysicalResourceId": f"s3://{bucket}/{key}",
25
- "Data": {
26
- "Bucket": bucket,
27
- "Key": key,
28
- },
29
- }
30
- ).encode()
31
-
32
- send = request.Request(event["ResponseURL"], data=body)
33
- send.get_method = lambda: "PUT"
34
-
35
- count = 0
36
- while count < 5:
37
- count += 1
38
- try:
39
- request.urlopen(send)
40
- break
41
- except HTTPError as ex:
42
- if count < 5:
43
- logger.warning(f"{ex} [{ex.url}] - Retry {count}")
44
- else:
45
- logger.error(f"{ex} [{ex.url}]")
46
- time.sleep(count * 5)
47
-
48
-
49
- def handler(event, context):
50
- s3_client = boto3.client("s3")
51
- request_type = event["RequestType"]
52
- properties = event["ResourceProperties"]
53
- required_properties = [
54
- "CopilotApplication",
55
- "CopilotEnvironment",
56
- "S3Bucket",
57
- "S3ObjectBody",
58
- "S3ObjectKey",
59
- ]
60
- missing_properties = [p for p in required_properties if p not in properties]
61
-
62
- if missing_properties:
63
- missing_properties.sort()
64
- return send_response(
65
- event, context, "FAILED", f"Missing required properties: {missing_properties}"
66
- )
67
-
68
- try:
69
- if request_type == "Delete":
70
- s3_client.delete_object(
71
- Bucket=properties["S3Bucket"],
72
- Key=properties["S3ObjectKey"],
73
- )
74
- else:
75
- content_type = properties.get("S3ObjectContentType", "binary/octet-stream")
76
- s3_client.put_object(
77
- Bucket=properties["S3Bucket"],
78
- Key=properties["S3ObjectKey"],
79
- Body=properties["S3ObjectBody"].encode("utf-8"),
80
- ContentType=content_type,
81
- )
82
-
83
- send_response(event, context, "SUCCESS", f"{request_type}d")
84
- except ClientError as ex:
85
- send_response(event, context, "FAILED", f"{ex}")
@@ -1,19 +0,0 @@
1
- # {% extra_header %}
2
- # {% version_info %}
3
-
4
- Parameters:
5
- ECSClusterName: !Ref Cluster
6
- EnvironmentSecurityGroup: !Ref EnvironmentSecurityGroup
7
- {%- if has_postgres_addon %}
8
- DefaultPublicRoute: !Ref DefaultPublicRoute
9
- InternetGateway: !Ref InternetGateway
10
- InternetGatewayAttachment: !Ref InternetGatewayAttachment
11
- {%- endif %}
12
- PrivateSubnets: !Join [ ',', [ !Ref PrivateSubnet1, !Ref PrivateSubnet2, ] ]
13
- {%- if has_postgres_addon %}
14
- PublicRouteTable: !Ref PublicRouteTable
15
- PublicSubnet1RouteTableAssociation: !Ref PublicSubnet1RouteTableAssociation
16
- PublicSubnet2RouteTableAssociation: !Ref PublicSubnet2RouteTableAssociation
17
- {%- endif %}
18
- PublicSubnets: !Join [ ',', [ !Ref PublicSubnet1, !Ref PublicSubnet2, ] ]
19
- VpcId: !Ref VPC