dbt-platform-helper 12.5.1__py3-none-any.whl → 13.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 (47) hide show
  1. dbt_platform_helper/COMMANDS.md +45 -42
  2. dbt_platform_helper/commands/codebase.py +7 -10
  3. dbt_platform_helper/commands/conduit.py +2 -2
  4. dbt_platform_helper/commands/config.py +1 -1
  5. dbt_platform_helper/commands/environment.py +32 -18
  6. dbt_platform_helper/commands/notify.py +5 -3
  7. dbt_platform_helper/commands/pipeline.py +17 -11
  8. dbt_platform_helper/constants.py +3 -1
  9. dbt_platform_helper/domain/codebase.py +48 -36
  10. dbt_platform_helper/domain/conduit.py +10 -12
  11. dbt_platform_helper/domain/config_validator.py +42 -31
  12. dbt_platform_helper/domain/copilot_environment.py +133 -129
  13. dbt_platform_helper/domain/database_copy.py +38 -37
  14. dbt_platform_helper/domain/maintenance_page.py +243 -193
  15. dbt_platform_helper/domain/pipelines.py +60 -135
  16. dbt_platform_helper/domain/terraform_environment.py +7 -3
  17. dbt_platform_helper/providers/aws.py +5 -0
  18. dbt_platform_helper/providers/cloudformation.py +12 -1
  19. dbt_platform_helper/providers/config.py +12 -14
  20. dbt_platform_helper/providers/ecr.py +20 -0
  21. dbt_platform_helper/providers/files.py +1 -1
  22. dbt_platform_helper/providers/io.py +31 -0
  23. dbt_platform_helper/providers/load_balancers.py +29 -3
  24. dbt_platform_helper/providers/platform_config_schema.py +24 -22
  25. dbt_platform_helper/providers/terraform_manifest.py +120 -0
  26. dbt_platform_helper/providers/vpc.py +81 -32
  27. dbt_platform_helper/templates/COMMANDS.md.jinja +5 -3
  28. dbt_platform_helper/templates/environment-pipelines/main.tf +2 -2
  29. dbt_platform_helper/templates/environments/main.tf +3 -4
  30. dbt_platform_helper/utils/aws.py +16 -5
  31. dbt_platform_helper/utils/messages.py +2 -3
  32. {dbt_platform_helper-12.5.1.dist-info → dbt_platform_helper-13.0.0.dist-info}/METADATA +2 -2
  33. {dbt_platform_helper-12.5.1.dist-info → dbt_platform_helper-13.0.0.dist-info}/RECORD +36 -44
  34. dbt_platform_helper/templates/pipelines/codebase/manifest.yml +0 -56
  35. dbt_platform_helper/templates/pipelines/codebase/overrides/.gitignore +0 -12
  36. dbt_platform_helper/templates/pipelines/codebase/overrides/bin/override.ts +0 -8
  37. dbt_platform_helper/templates/pipelines/codebase/overrides/buildspec.deploy.yml +0 -29
  38. dbt_platform_helper/templates/pipelines/codebase/overrides/buildspec.image.yml +0 -48
  39. dbt_platform_helper/templates/pipelines/codebase/overrides/cdk.json +0 -20
  40. dbt_platform_helper/templates/pipelines/codebase/overrides/package-lock.json +0 -4232
  41. dbt_platform_helper/templates/pipelines/codebase/overrides/package.json +0 -27
  42. dbt_platform_helper/templates/pipelines/codebase/overrides/stack.ts +0 -521
  43. dbt_platform_helper/templates/pipelines/codebase/overrides/tsconfig.json +0 -30
  44. dbt_platform_helper/templates/pipelines/codebase/overrides/types.ts +0 -52
  45. {dbt_platform_helper-12.5.1.dist-info → dbt_platform_helper-13.0.0.dist-info}/LICENSE +0 -0
  46. {dbt_platform_helper-12.5.1.dist-info → dbt_platform_helper-13.0.0.dist-info}/WHEEL +0 -0
  47. {dbt_platform_helper-12.5.1.dist-info → dbt_platform_helper-13.0.0.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,120 @@
1
+ import json
2
+ from datetime import datetime
3
+ from importlib.metadata import version
4
+ from pathlib import Path
5
+ from typing import Callable
6
+
7
+ import click
8
+
9
+ from dbt_platform_helper.constants import SUPPORTED_AWS_PROVIDER_VERSION
10
+ from dbt_platform_helper.constants import SUPPORTED_TERRAFORM_VERSION
11
+ from dbt_platform_helper.providers.files import FileProvider
12
+
13
+
14
+ class TerraformManifestProvider:
15
+ def __init__(
16
+ self, file_provider: FileProvider = FileProvider(), echo: Callable[[str], None] = click.echo
17
+ ):
18
+ self.file_provider = file_provider
19
+ self.echo = echo
20
+
21
+ def generate_codebase_pipeline_config(
22
+ self,
23
+ platform_config: dict,
24
+ terraform_platform_modules_version: str,
25
+ ecr_imports: dict[str, str],
26
+ ):
27
+ default_account = (
28
+ platform_config.get("environments", {})
29
+ .get("*", {})
30
+ .get("accounts", {})
31
+ .get("deploy", {})
32
+ .get("name")
33
+ )
34
+ terraform = {}
35
+ self._add_header(terraform)
36
+ self._add_locals(terraform)
37
+ self._add_provider(terraform, default_account)
38
+ self._add_backend(terraform, platform_config, default_account)
39
+ self._add_codebase_pipeline_module(terraform, terraform_platform_modules_version)
40
+ self._add_imports(terraform, ecr_imports)
41
+
42
+ message = self.file_provider.mkfile(
43
+ str(Path(".").absolute()),
44
+ "terraform/codebase-pipelines/main.tf.json",
45
+ json.dumps(terraform, indent=2),
46
+ True,
47
+ )
48
+ self.echo(message)
49
+
50
+ @staticmethod
51
+ def _add_header(terraform: dict):
52
+ time = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
53
+ version_header = f"Generated by platform-helper {version('dbt-platform-helper')} / {time}."
54
+ warning = "WARNING: This is an autogenerated file, not for manual editing."
55
+ # The "//" key denotes a comment in terraform json.
56
+ terraform["//"] = f"{version_header} {warning}"
57
+
58
+ @staticmethod
59
+ def _add_locals(terraform: dict):
60
+ terraform["locals"] = {
61
+ "platform_config": '${yamldecode(file("../../platform-config.yml"))}',
62
+ "application": '${local.platform_config["application"]}',
63
+ "all_codebases": '${local.platform_config["codebase_pipelines"]}',
64
+ "environments": '${local.platform_config["environments"]}',
65
+ }
66
+
67
+ @staticmethod
68
+ def _add_provider(terraform: dict, default_account: str):
69
+ terraform["provider"] = {"aws": {}}
70
+ terraform["provider"]["aws"]["region"] = "eu-west-2"
71
+ terraform["provider"]["aws"]["profile"] = default_account
72
+ terraform["provider"]["aws"]["alias"] = default_account
73
+ terraform["provider"]["aws"]["shared_credentials_files"] = ["~/.aws/config"]
74
+
75
+ @staticmethod
76
+ def _add_backend(terraform: dict, platform_config: dict, default_account: str):
77
+ terraform["terraform"] = {
78
+ "required_version": SUPPORTED_TERRAFORM_VERSION,
79
+ "backend": {
80
+ "s3": {
81
+ "bucket": f"terraform-platform-state-{default_account}",
82
+ "key": f"tfstate/application/{platform_config['application']}-codebase-pipelines.tfstate",
83
+ "region": "eu-west-2",
84
+ "encrypt": True,
85
+ "kms_key_id": f"alias/terraform-platform-state-s3-key-{default_account}",
86
+ "dynamodb_table": f"terraform-platform-lockdb-{default_account}",
87
+ }
88
+ },
89
+ "required_providers": {
90
+ "aws": {"source": "hashicorp/aws", "version": SUPPORTED_AWS_PROVIDER_VERSION}
91
+ },
92
+ }
93
+
94
+ @staticmethod
95
+ def _add_codebase_pipeline_module(terraform: dict, terraform_platform_modules_version: str):
96
+ source = f"git::https://github.com/uktrade/terraform-platform-modules.git//codebase-pipelines?depth=1&ref={terraform_platform_modules_version}"
97
+ terraform["module"] = {
98
+ "codebase-pipelines": {
99
+ "source": source,
100
+ "for_each": "${local.all_codebases}",
101
+ "application": "${local.application}",
102
+ "codebase": "${each.key}",
103
+ "repository": "${each.value.repository}",
104
+ "additional_ecr_repository": '${lookup(each.value, "additional_ecr_repository", null)}',
105
+ "pipelines": "${each.value.pipelines}",
106
+ "services": "${each.value.services}",
107
+ "requires_image_build": '${lookup(each.value, "requires_image_build", true)}',
108
+ "slack_channel": '${lookup(each.value, "slack_channel", "/codebuild/slack_oauth_channel")}',
109
+ "env_config": "${local.environments}",
110
+ }
111
+ }
112
+
113
+ @staticmethod
114
+ def _add_imports(terraform: dict, ecr_imports: dict[str, str]):
115
+ if ecr_imports:
116
+ terraform["import"] = {
117
+ "for_each": "${%s}" % json.dumps(ecr_imports),
118
+ "id": "${each.value}",
119
+ "to": "module.codebase-pipelines[each.key].aws_ecr_repository.this",
120
+ }
@@ -1,57 +1,106 @@
1
1
  from dataclasses import dataclass
2
2
 
3
- from dbt_platform_helper.providers.aws import AWSException
3
+ from dbt_platform_helper.platform_exception import PlatformException
4
+
5
+
6
+ class VpcProviderException(PlatformException):
7
+ pass
8
+
9
+
10
+ class SubnetsNotFoundException(VpcProviderException):
11
+ pass
12
+
13
+
14
+ class PrivateSubnetsNotFoundException(VpcProviderException):
15
+ pass
16
+
17
+
18
+ class PublicSubnetsNotFoundException(VpcProviderException):
19
+ pass
20
+
21
+
22
+ class SecurityGroupNotFoundException(VpcProviderException):
23
+ pass
24
+
25
+
26
+ class VpcNotFoundForNameException(VpcProviderException):
27
+ pass
28
+
29
+
30
+ class VpcIdMissingException(VpcProviderException):
31
+ pass
4
32
 
5
33
 
6
34
  @dataclass
7
35
  class Vpc:
8
- subnets: list[str]
36
+ id: str
37
+ public_subnets: list[str]
38
+ private_subnets: list[str]
9
39
  security_groups: list[str]
10
40
 
11
41
 
12
42
  class VpcProvider:
13
43
  def __init__(self, session):
14
44
  self.ec2_client = session.client("ec2")
15
- self.ec2_resource = session.resource("ec2")
16
45
 
17
- def get_vpc_info_by_name(self, app: str, env: str, vpc_name: str) -> Vpc:
18
- vpc_response = self.ec2_client.describe_vpcs(
19
- Filters=[{"Name": "tag:Name", "Values": [vpc_name]}]
20
- )
46
+ def _get_subnet_ids(self, vpc_id):
47
+ subnets = self.ec2_client.describe_subnets(
48
+ Filters=[{"Name": "vpc-id", "Values": [vpc_id]}]
49
+ ).get("Subnets")
50
+
51
+ if not subnets:
52
+ raise SubnetsNotFoundException(f"No subnets found for VPC with id: {vpc_id}.")
53
+
54
+ public_tag = {"Key": "subnet_type", "Value": "public"}
55
+ public_subnets = [subnet["SubnetId"] for subnet in subnets if public_tag in subnet["Tags"]]
21
56
 
22
- matching_vpcs = vpc_response.get("Vpcs", [])
57
+ private_tag = {"Key": "subnet_type", "Value": "private"}
58
+ private_subnets = [
59
+ subnet["SubnetId"] for subnet in subnets if private_tag in subnet["Tags"]
60
+ ]
23
61
 
24
- if not matching_vpcs:
25
- raise AWSException(f"VPC not found for name '{vpc_name}'")
62
+ return public_subnets, private_subnets
26
63
 
27
- vpc_id = vpc_response["Vpcs"][0].get("VpcId")
64
+ def _get_vpc_id_by_name(self, vpc_name: str) -> str:
65
+ vpcs = self.ec2_client.describe_vpcs(
66
+ Filters=[{"Name": "tag:Name", "Values": [vpc_name]}]
67
+ ).get("Vpcs", [])
68
+
69
+ if not vpcs:
70
+ raise VpcNotFoundForNameException(f"VPC not found for name '{vpc_name}'")
71
+
72
+ vpc_id = vpcs[0].get("VpcId")
28
73
 
29
74
  if not vpc_id:
30
- raise AWSException(f"VPC id not present in vpc '{vpc_name}'")
75
+ raise VpcIdMissingException(f"VPC id not present in vpc '{vpc_name}'")
31
76
 
32
- vpc = self.ec2_resource.Vpc(vpc_id)
77
+ return vpc_id
33
78
 
34
- route_tables = self.ec2_client.describe_route_tables(
35
- Filters=[{"Name": "vpc-id", "Values": [vpc_id]}]
36
- )["RouteTables"]
37
-
38
- subnets = []
39
- for route_table in route_tables:
40
- private_routes = [route for route in route_table["Routes"] if "NatGatewayId" in route]
41
- if not private_routes:
42
- continue
43
- for association in route_table["Associations"]:
44
- if "SubnetId" in association:
45
- subnet_id = association["SubnetId"]
46
- subnets.append(subnet_id)
79
+ def _get_security_groups(self, app: str, env: str, vpc_id: str) -> list:
47
80
 
48
- if not subnets:
49
- raise AWSException(f"No private subnets found in vpc '{vpc_name}'")
81
+ vpc_filter = {"Name": "vpc-id", "Values": [vpc_id]}
82
+ tag_filter = {"Name": f"tag:Name", "Values": [f"copilot-{app}-{env}-env"]}
83
+ response = self.ec2_client.describe_security_groups(Filters=[vpc_filter, tag_filter])
84
+
85
+ return [sg.get("GroupId") for sg in response.get("SecurityGroups")]
86
+
87
+ def get_vpc(self, app: str, env: str, vpc_name: str) -> Vpc:
88
+
89
+ vpc_id = self._get_vpc_id_by_name(vpc_name)
90
+
91
+ public_subnets, private_subnets = self._get_subnet_ids(vpc_id)
92
+
93
+ if not private_subnets:
94
+ raise PrivateSubnetsNotFoundException(f"No private subnets found in vpc '{vpc_name}'")
95
+
96
+ if not public_subnets:
97
+ raise PublicSubnetsNotFoundException(f"No public subnets found in vpc '{vpc_name}'")
50
98
 
51
- tag_value = {"Key": "Name", "Value": f"copilot-{app}-{env}-env"}
52
- sec_groups = [sg.id for sg in vpc.security_groups.all() if sg.tags and tag_value in sg.tags]
99
+ sec_groups = self._get_security_groups(app, env, vpc_id)
53
100
 
54
101
  if not sec_groups:
55
- raise AWSException(f"No matching security groups found in vpc '{vpc_name}'")
102
+ raise SecurityGroupNotFoundException(
103
+ f"No matching security groups found in vpc '{vpc_name}'"
104
+ )
56
105
 
57
- return Vpc(subnets, sec_groups)
106
+ return Vpc(vpc_id, public_subnets, private_subnets, sec_groups)
@@ -1,8 +1,10 @@
1
1
  # Commands Reference
2
2
 
3
- {% for command in toc -%}
4
- - [{{ command }}](#{{ command.lower() | replace(" ", "-") }})
5
- {% endfor %}
3
+ {% for meta in metadata -%}
4
+ {% if meta.name -%}
5
+ {{ meta.indent }}- [{{ meta.name }}](#{{ meta.name.lower() | replace(" ", "-") }})
6
+ {% endif -%}
7
+ {% endfor -%}
6
8
 
7
9
  {%- for meta in metadata +%}
8
10
  {% if meta.name -%}
@@ -15,7 +15,7 @@ provider "aws" {
15
15
  }
16
16
 
17
17
  terraform {
18
- required_version = "~> 1.8"
18
+ required_version = "{{ terraform_version }}"
19
19
  backend "s3" {
20
20
  bucket = "terraform-platform-state-{{ aws_account }}"
21
21
  key = "tfstate/application/{{ application }}-pipelines.tfstate"
@@ -27,7 +27,7 @@ terraform {
27
27
  required_providers {
28
28
  aws = {
29
29
  source = "hashicorp/aws"
30
- version = "~> 5"
30
+ version = "{{ aws_provider_version }}"
31
31
  }
32
32
  }
33
33
  }
@@ -7,12 +7,12 @@ locals {
7
7
  args = {
8
8
  application = "{{ application }}"
9
9
  services = local.config["extensions"]
10
- dns_account_id = local.env_config["{{ environment }}"]["accounts"]["dns"]["id"]
10
+ env_config = local.env_config
11
11
  }
12
12
  }
13
13
 
14
14
  terraform {
15
- required_version = "~> 1.8"
15
+ required_version = "{{ terraform_version }}"
16
16
  backend "s3" {
17
17
  bucket = "terraform-platform-state-{{ config.accounts.deploy.name }}"
18
18
  key = "tfstate/application/{{ application }}-{{ environment }}.tfstate"
@@ -24,7 +24,7 @@ terraform {
24
24
  required_providers {
25
25
  aws = {
26
26
  source = "hashicorp/aws"
27
- version = "~> 5"
27
+ version = "{{ aws_provider_version }}"
28
28
  }
29
29
  }
30
30
  }
@@ -34,7 +34,6 @@ module "extensions" {
34
34
 
35
35
  args = local.args
36
36
  environment = "{{ environment }}"
37
- vpc_name = "{{ config.vpc }}"
38
37
  }
39
38
 
40
39
  /*
@@ -18,6 +18,7 @@ from dbt_platform_helper.platform_exception import PlatformException
18
18
  from dbt_platform_helper.providers.aws import CopilotCodebaseNotFoundException
19
19
  from dbt_platform_helper.providers.aws import ImageNotFoundException
20
20
  from dbt_platform_helper.providers.aws import LogGroupNotFoundException
21
+ from dbt_platform_helper.providers.aws import RepositoryNotFoundException
21
22
  from dbt_platform_helper.providers.validation import ValidationException
22
23
 
23
24
  SSM_BASE_PATH = "/copilot/{app}/{env}/secrets/"
@@ -381,6 +382,11 @@ def start_build_extraction(codebuild_client, build_options):
381
382
  return response["build"]["arn"]
382
383
 
383
384
 
385
+ def start_pipeline_and_return_execution_id(codepipeline_client, build_options):
386
+ response = codepipeline_client.start_pipeline_execution(**build_options)
387
+ return response["pipelineExecutionId"]
388
+
389
+
384
390
  # Todo: This should probably be in the AWS Copilot provider
385
391
  def check_codebase_exists(session: Session, application, codebase: str):
386
392
  try:
@@ -402,16 +408,16 @@ def check_codebase_exists(session: Session, application, codebase: str):
402
408
 
403
409
  def check_image_exists(session, application, codebase, commit):
404
410
  ecr_client = session.client("ecr")
411
+ repository = f"{application.name}/{codebase}"
405
412
  try:
406
413
  ecr_client.describe_images(
407
- repositoryName=f"{application.name}/{codebase}",
414
+ repositoryName=repository,
408
415
  imageIds=[{"imageTag": f"commit-{commit}"}],
409
416
  )
410
- except (
411
- ecr_client.exceptions.RepositoryNotFoundException,
412
- ecr_client.exceptions.ImageNotFoundException,
413
- ):
417
+ except ecr_client.exceptions.ImageNotFoundException:
414
418
  raise ImageNotFoundException(commit)
419
+ except ecr_client.exceptions.RepositoryNotFoundException:
420
+ raise RepositoryNotFoundException(repository)
415
421
 
416
422
 
417
423
  def get_build_url_from_arn(build_arn: str) -> str:
@@ -423,6 +429,11 @@ def get_build_url_from_arn(build_arn: str) -> str:
423
429
  )
424
430
 
425
431
 
432
+ def get_build_url_from_pipeline_execution_id(execution_id: str, pipeline_name: str) -> str:
433
+
434
+ return f"https://eu-west-2.console.aws.amazon.com/codesuite/codepipeline/pipelines/{pipeline_name}/executions/{execution_id}"
435
+
436
+
426
437
  def list_latest_images(ecr_client, ecr_repository_name, codebase_repository, echo):
427
438
  paginator = ecr_client.get_paginator("describe_images")
428
439
  describe_images_response_iterator = paginator.paginate(
@@ -1,6 +1,5 @@
1
- import click
1
+ from dbt_platform_helper.providers.io import ClickIOProvider
2
2
 
3
3
 
4
4
  def abort_with_error(message):
5
- click.secho(f"Error: {message}", err=True, fg="red")
6
- exit(1)
5
+ ClickIOProvider().abort_with_error(message)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: dbt-platform-helper
3
- Version: 12.5.1
3
+ Version: 13.0.0
4
4
  Summary: Set of tools to help transfer applications/services from GOV.UK PaaS to DBT PaaS augmenting AWS Copilot.
5
5
  License: MIT
6
6
  Author: Department for Business and Trade Platform Team
@@ -13,7 +13,7 @@ Classifier: Programming Language :: Python :: 3.10
13
13
  Classifier: Programming Language :: Python :: 3.11
14
14
  Classifier: Programming Language :: Python :: 3.12
15
15
  Classifier: Programming Language :: Python :: 3.13
16
- Requires-Dist: Jinja2 (==3.1.4)
16
+ Requires-Dist: Jinja2 (==3.1.5)
17
17
  Requires-Dist: PyYAML (==6.0.1)
18
18
  Requires-Dist: aiohttp (>=3.8.4,<4.0.0)
19
19
  Requires-Dist: boto3 (>=1.28.24,<2.0.0)
@@ -1,49 +1,52 @@
1
- dbt_platform_helper/COMMANDS.md,sha256=Sm_rxHiEtdoRjmEnWAYpaEgOyCddWbV_PVP8aXrH_3g,21981
1
+ dbt_platform_helper/COMMANDS.md,sha256=RT-q5W8BolaeBKe-554oqRwAwMnNtLWTTa860brvelw,22648
2
2
  dbt_platform_helper/README.md,sha256=B0qN2_u_ASqqgkGDWY2iwNGZt_9tUgMb9XqtaTuzYjw,1530
3
3
  dbt_platform_helper/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  dbt_platform_helper/addon-plans.yml,sha256=O46a_ODsGG9KXmQY_1XbSGqrpSaHSLDe-SdROzHx8Go,4545
5
5
  dbt_platform_helper/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  dbt_platform_helper/commands/application.py,sha256=eVwCaYuwBlk0zx0xfA6fW7b-S1pl8gkyT1lHKeeh2R0,10147
7
- dbt_platform_helper/commands/codebase.py,sha256=KB8irKyFtb6pKn5cQ0MmTywGW7Vd8SSbWjT2mRnh3JA,2270
8
- dbt_platform_helper/commands/conduit.py,sha256=KqRWiirl5Xl7qcJXOAsirbTLlV1XquOjddsopuj0Kp4,2272
9
- dbt_platform_helper/commands/config.py,sha256=vIJh1piAqxRgxr4t68okPLfo-inkPiSoRNUFGPQBChg,12129
7
+ dbt_platform_helper/commands/codebase.py,sha256=y2d2flGXv44KPv0Rj18gVrDG5t862OEzIoQiOK0STqw,2375
8
+ dbt_platform_helper/commands/conduit.py,sha256=QYMOYyCxFPzj_NJaXs3flIL7sHjOv75uAqPpjgh-EPo,2320
9
+ dbt_platform_helper/commands/config.py,sha256=qu2SM5l7-XU3VYSS9ArtLin_2FmKlSIcH2383S2RJIY,12131
10
10
  dbt_platform_helper/commands/copilot.py,sha256=1CTyAkTQBF_i6zkqYzOIUo5wq9UYWfj-G1W8D2oRjmE,13623
11
11
  dbt_platform_helper/commands/database.py,sha256=aG3zcMHL5PE96b7LSAu0FGCbgcycQej3AGRcd-bpXUo,4115
12
- dbt_platform_helper/commands/environment.py,sha256=NyzvKnhPTklwg5ycC6KYc254avYvPiuVRYnaQ9doxgI,3356
12
+ dbt_platform_helper/commands/environment.py,sha256=WUf5A6MwXAF7qTvW5phX2bH8C07GUs8fDPZs0cQvEg0,3909
13
13
  dbt_platform_helper/commands/generate.py,sha256=YLCPb-xcPapGcsLn-7d1Am7BpGp5l0iecIDTOdNGjHk,722
14
- dbt_platform_helper/commands/notify.py,sha256=kVJ0s78QMiaEWPVKu_bbMko4DW2uJy2fu8-HNJsglyk,3748
15
- dbt_platform_helper/commands/pipeline.py,sha256=tdLgcOOzPFbECKYN9UUHwK6tiwPvrMx3c4Q8ghRe1no,2685
14
+ dbt_platform_helper/commands/notify.py,sha256=lCS_JotQeg4NEpF4x145TCoZs0Pnf_LYf0rB1Iz_Tw0,3884
15
+ dbt_platform_helper/commands/pipeline.py,sha256=IdiJJJxZY47qI8ooyNNLlQo0gjQGrHebGbT-aIBoKBs,3000
16
16
  dbt_platform_helper/commands/secrets.py,sha256=QjF9xUChioIr_P0fzqwyEcqLvcN-RNZmNFFlaUPVU9o,3994
17
17
  dbt_platform_helper/commands/version.py,sha256=XVfSd53TDti4cceBqTmRfq_yZnvxs14RbrOjNJHW75U,1444
18
- dbt_platform_helper/constants.py,sha256=f1zl5PJoauUxWOirXBJ8bdAGxOAQVLqNeCs6hldaq2I,971
18
+ dbt_platform_helper/constants.py,sha256=DpHGG54lwjw3XGp2TKCEGNmzaz083lAWMGkEabujDrw,1050
19
19
  dbt_platform_helper/default-extensions.yml,sha256=SU1ZitskbuEBpvE7efc3s56eAUF11j70brhj_XrNMMo,493
20
20
  dbt_platform_helper/domain/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
- dbt_platform_helper/domain/codebase.py,sha256=oaRyztqIVy3-3t9ChP4DEWN7DOhZJrr0xMY_LLm4GzI,9797
22
- dbt_platform_helper/domain/conduit.py,sha256=mvjDzxh-SCUCY5qGL73kG8TT7YqeQR8XtNcHx26SW2w,4344
23
- dbt_platform_helper/domain/config_validator.py,sha256=7te6L6zJrb-soVB5TKm4UwJyhCdONmNvE0TbqXb5U60,10177
24
- dbt_platform_helper/domain/copilot_environment.py,sha256=UJw08KWIXspXMJEgbsO0f8RLlUWhmyAfVA6eUZa9X10,8143
25
- dbt_platform_helper/domain/database_copy.py,sha256=OqxEARb2yIgoqu8LHp90IcW3gkNlNbPHUR5P9om5Sx4,9315
26
- dbt_platform_helper/domain/maintenance_page.py,sha256=evj50GqmcgOtduQN20JJ6-M6zGubCW48DRa2V4yvy8o,16767
27
- dbt_platform_helper/domain/pipelines.py,sha256=Woo1I_ceiNV53zOv1XdljfIsEAD65DgmEpr3_VyCRxI,8076
28
- dbt_platform_helper/domain/terraform_environment.py,sha256=P1LlkMScIzzsoQFiLOTqidnagP9RCz-HRkd8z_JkvwQ,3056
21
+ dbt_platform_helper/domain/codebase.py,sha256=bLlTRqYmIz8J7W4siQczIJIt4Lc5-bjy-Qo46EyovFw,10496
22
+ dbt_platform_helper/domain/conduit.py,sha256=5C5GnF5jssJ1rFFCY6qaKgvLjYUkyytRJE4tHlanYa0,4370
23
+ dbt_platform_helper/domain/config_validator.py,sha256=KJw40kcb-mB_IoUsY2tyEoGjcof7VmGz97GVRiea2VQ,10594
24
+ dbt_platform_helper/domain/copilot_environment.py,sha256=b66w-UpqPb4L7_xIybEhBL0XrCJ0swTD0h0UelHeX5s,8840
25
+ dbt_platform_helper/domain/database_copy.py,sha256=G-vepzJFl-t-clGcr3p6zFTVkrzgEH2W9SG8AS19hLw,9373
26
+ dbt_platform_helper/domain/maintenance_page.py,sha256=qs1Cyqe_zMhM7bvOWfvCysX_55bKiXoR8tPt_T6u3CE,19414
27
+ dbt_platform_helper/domain/pipelines.py,sha256=ey1tXNcfkkWJ88xRZewWF9iZvy1_hWxhrZdk83D-6k8,5649
28
+ dbt_platform_helper/domain/terraform_environment.py,sha256=GsGPc3ufk3wxj7zYq6xkcnmspMI1EIaiQTFjD_HFS-8,3324
29
29
  dbt_platform_helper/domain/test_platform_terraform_manifest_generator.py,sha256=DvDlTeLGJfiAJKshBJKe9SZm4uMSOR7MMUPy37rUwKE,4325
30
30
  dbt_platform_helper/jinja2_tags.py,sha256=hKG6RS3zlxJHQ-Op9r2U2-MhWp4s3lZir4Ihe24ApJ0,540
31
31
  dbt_platform_helper/platform_exception.py,sha256=bheZV9lqGvrCVTNT92349dVntNDEDWTEwciZgC83WzE,187
32
32
  dbt_platform_helper/providers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
33
- dbt_platform_helper/providers/aws.py,sha256=KHgySe6cwEw1wePjw6DL7uSyZRk3DN_Aqqi8KnRoB3M,1208
33
+ dbt_platform_helper/providers/aws.py,sha256=mlorH0fni6m8aUpm1x2jQPhaI3T0QsDMWpoGiSURBcI,1387
34
34
  dbt_platform_helper/providers/cache.py,sha256=GIFVdpfXVnVgf2POQvBvZDP6pvYeUFjEuAdAQLbhJXs,2563
35
- dbt_platform_helper/providers/cloudformation.py,sha256=AMUuhHqjjyYwraFKdkVLgcHs7XZShNHkQFZWHBOMeGg,4877
36
- dbt_platform_helper/providers/config.py,sha256=arJ01kcbBxkarE2bGO-VKraBkYOborZqGBklmt0ckTk,3663
35
+ dbt_platform_helper/providers/cloudformation.py,sha256=SvCZgEVqxdpKfQMRAG3KzFQ43YeOEDqMm2tKmFGtacY,5347
36
+ dbt_platform_helper/providers/config.py,sha256=7PHTMUqcV_icREiHNIdHhsHpc86GJPYZUPw3NrlCXUA,3724
37
37
  dbt_platform_helper/providers/copilot.py,sha256=nBbt-PoGXVkmb9njJti6Et8dq1W9GytW3jGBydNNYYU,5317
38
+ dbt_platform_helper/providers/ecr.py,sha256=lmLKGR5OQT8EyGsX-9M7oO0DHIyoMqgchBAVQBeoBZs,639
38
39
  dbt_platform_helper/providers/ecs.py,sha256=XlQHYhZiLGrqR-1ZWMagGH2R2Hy7mCP6676eZL3YbNQ,3842
39
- dbt_platform_helper/providers/files.py,sha256=E4PAHjGlAFEgbU9ntvHJguKKJf5gwrZF6H1LY054QG0,683
40
- dbt_platform_helper/providers/load_balancers.py,sha256=0tPkuQ_jWfan44HrBA5EMLqrZaYQl-Lw5PavZ1a1iag,1615
40
+ dbt_platform_helper/providers/files.py,sha256=o43HkXS7Bo2oop2W83EkFnTggX1hNr48LNALY3vh5xk,688
41
+ dbt_platform_helper/providers/io.py,sha256=JkWNIMZ_lcYQ6XvdVAuwtTZjoFIPJ-84zbH09nWLMdk,816
42
+ dbt_platform_helper/providers/load_balancers.py,sha256=dQ_hMpo_OyP_PMNodPRTbz7y7feDDBk3p7xNloojLBg,2609
41
43
  dbt_platform_helper/providers/opensearch.py,sha256=tp64jTzHlutleqMpi2h_ZKH1iakZPJnUODebX6i2mfA,1335
42
- dbt_platform_helper/providers/platform_config_schema.py,sha256=vKyk32tMJU99RZMnpqV9phS5-8N4tduSPZJOJBObYss,26513
44
+ dbt_platform_helper/providers/platform_config_schema.py,sha256=UKF3w9JGwWb8ZpkYHsglpabCTRtbx2gX-vs9gvfOyCg,26586
43
45
  dbt_platform_helper/providers/redis.py,sha256=aj8pitxG9IKrMkL3fIYayQhcHPPzApdaXq0Uq_0yblg,1217
44
46
  dbt_platform_helper/providers/secrets.py,sha256=6cYIR15dLdHmqxtWQpM6R71e0_Xgsg9V291HBG-0LV0,5272
47
+ dbt_platform_helper/providers/terraform_manifest.py,sha256=HWko7QVq2Fh-biZxTw8JR0KNK3f9NT23dHoKihWhMZ4,5103
45
48
  dbt_platform_helper/providers/validation.py,sha256=d_YzJZVjGNO65pXcPIcFc9I-FRCESeEC7GvUzP8n-As,596
46
- dbt_platform_helper/providers/vpc.py,sha256=AtXW1qNQhmraeYAf7b04lLplcSvUG18EMrX_hPRIHiw,1905
49
+ dbt_platform_helper/providers/vpc.py,sha256=V9bLUzkho0kdHIkva9qtE4baeT78duhILj7-vlZb3iA,3118
47
50
  dbt_platform_helper/providers/yaml_file.py,sha256=7jMLsDWetBBHWUvcaW652LaYUqICnf0n1H9eS6kNT5o,1990
48
51
  dbt_platform_helper/templates/.copilot/config.yml,sha256=J_bA9sCtBdCPBRImpCBRnYvhQd4vpLYIXIU-lq9vbkA,158
49
52
  dbt_platform_helper/templates/.copilot/image_build_run.sh,sha256=adYucYXEB-kAgZNjTQo0T6EIAY8sh_xCEvVhWKKQ8mw,164
@@ -51,7 +54,7 @@ dbt_platform_helper/templates/.copilot/phases/build.sh,sha256=umKXePcRvx4XyrRY0f
51
54
  dbt_platform_helper/templates/.copilot/phases/install.sh,sha256=pNkEnZBnM4-n1MBzLdPC86YG4Sgj3X7yeQt-swwCunc,123
52
55
  dbt_platform_helper/templates/.copilot/phases/post_build.sh,sha256=qdfaViaaPpnjHxI2Uap9DffM0OcV-FYXk7slT51b_vU,126
53
56
  dbt_platform_helper/templates/.copilot/phases/pre_build.sh,sha256=rzyjyf7Y7LHH7h-Vv_J--QaR7-dTS_5G-R4iE_9mpQI,836
54
- dbt_platform_helper/templates/COMMANDS.md.jinja,sha256=Chfpkr8MfrZg_Y2Oskwqk3uVw-KKOBdGjsts3-KGno8,1081
57
+ dbt_platform_helper/templates/COMMANDS.md.jinja,sha256=8ja7ZGuy1lCP_SWlYrWie---oeO5ucyxfLJkkgwEJ_M,1138
55
58
  dbt_platform_helper/templates/addon-instructions.txt,sha256=Dhd1xDbFKnX7xjfCz0W52P6PqPI9M8dyoxoSHAY2fao,597
56
59
  dbt_platform_helper/templates/addons/README.md,sha256=UdVydY2ocm1OLKecZ8MAiXet3rKsMiq0PpBrmi0Xrns,412
57
60
  dbt_platform_helper/templates/addons/svc/appconfig-ipfilter.yml,sha256=nBIXV4um4jIvXs3Q5QycHqVpJODK5yg_M-xJT6AOBKE,977
@@ -64,19 +67,8 @@ dbt_platform_helper/templates/create-codebuild-role.json,sha256=THJgIKi8rWwDzhg5
64
67
  dbt_platform_helper/templates/custom-codebuild-role-policy.json,sha256=8xyCofilPhV1Yjt3OnQLcI2kZ35mk2c07GcqYrKxuoI,1180
65
68
  dbt_platform_helper/templates/env/manifest.yml,sha256=VCEj_y3jdfnPYi6gmyrwiEqzHYjpaJDANbvswmkiLA0,802
66
69
  dbt_platform_helper/templates/env/terraform-overrides/cfn.patches.yml,sha256=cFlg69fvi9kzpz13ZAeY1asseZ6TuUex-6s76jG3oL4,259
67
- dbt_platform_helper/templates/environment-pipelines/main.tf,sha256=R5xM5OHmWD1BjUyl67uOVQ_PbgR96PuiYXlCDXoaj8c,1914
68
- dbt_platform_helper/templates/environments/main.tf,sha256=6tgxyGLvllZCiN2ryYwNM6fcm6wijb-LMjwdb9UckyU,1579
69
- dbt_platform_helper/templates/pipelines/codebase/manifest.yml,sha256=Mby5ri_w0K9r3cJVdUN-c9adnu2cVvDgHpY4qvHggCE,1980
70
- dbt_platform_helper/templates/pipelines/codebase/overrides/.gitignore,sha256=duFipE4GPjdkrYo-sO1jjCXdmSMoYNoFJLZ19lUKfL0,169
71
- dbt_platform_helper/templates/pipelines/codebase/overrides/bin/override.ts,sha256=iD6Tsl8YTd3DW7NDk6ythkROmtX2OouU8DMSeWAqd_Y,227
72
- dbt_platform_helper/templates/pipelines/codebase/overrides/buildspec.deploy.yml,sha256=neXXpwjCrNRPTOxec3m8nRIFZ0bI4zq2WaPHf5eSU_Y,1090
73
- dbt_platform_helper/templates/pipelines/codebase/overrides/buildspec.image.yml,sha256=oHtRzH27IXJRyORWp7zvtjln-kTf3FgTdc9W_pBFBfU,1480
74
- dbt_platform_helper/templates/pipelines/codebase/overrides/cdk.json,sha256=ZbvoQdcj_k9k1GAD9qHUQcDfQPbMcBPjJwt2mu_S6ho,339
75
- dbt_platform_helper/templates/pipelines/codebase/overrides/package-lock.json,sha256=olH0o2L_csz-05gsjZ-GMKzNZqrkxciaJFUiAt7sYKc,152695
76
- dbt_platform_helper/templates/pipelines/codebase/overrides/package.json,sha256=XB0Pf63NSsGyowkPGTl1Nki167nRDXJdnxLSN3S_lQg,536
77
- dbt_platform_helper/templates/pipelines/codebase/overrides/stack.ts,sha256=v9m6EziRgFnrhF7inbr1KtuOh75FeC054vaWMoAi-qg,21500
78
- dbt_platform_helper/templates/pipelines/codebase/overrides/tsconfig.json,sha256=k6KabP-WwhFNgA1AFHNuonTEAnES6eR74jUuYUJEGOM,651
79
- dbt_platform_helper/templates/pipelines/codebase/overrides/types.ts,sha256=8cp5xl_CIMH5TPvwlw9UBPKwfntcsu-lTAjbL5uylgw,1257
70
+ dbt_platform_helper/templates/environment-pipelines/main.tf,sha256=alycy6gYWvtOEVQPH5JxtHS7iGv0FTU-RQgBTe0kdts,1953
71
+ dbt_platform_helper/templates/environments/main.tf,sha256=0Zqi42IoqB25kWEbnBwoyxDM6-N4xRp2EYWgVJJSCWw,1537
80
72
  dbt_platform_helper/templates/svc/maintenance_pages/default.html,sha256=OTZ-qwwSXu7PFbsgp4kppdm1lsg_iHK7FCFqhPnvrEs,741
81
73
  dbt_platform_helper/templates/svc/maintenance_pages/dmas-migration.html,sha256=qvI6tHuI0UQbMBCuvPgK1a_zLANB6w7KVo9N5d8r-i0,829
82
74
  dbt_platform_helper/templates/svc/maintenance_pages/migration.html,sha256=GiQsOiuaMFb7jG5_wU3V7BMcByHBl9fOBgrNf8quYlw,783
@@ -86,20 +78,20 @@ dbt_platform_helper/templates/svc/overrides/cfn.patches.yml,sha256=W7-d017akuUq9
86
78
  dbt_platform_helper/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
87
79
  dbt_platform_helper/utils/application.py,sha256=53xGrG8VBKrM4jyBKjuZZdwaYBbJ3PiznCCwlLieTKw,4804
88
80
  dbt_platform_helper/utils/arn_parser.py,sha256=BaXzIxSOLdFmP_IfAxRq-0j-0Re1iCN7L4j2Zi5-CRQ,1304
89
- dbt_platform_helper/utils/aws.py,sha256=4GRzsY9nJUWpZoG3zjkb4bj98ec3PMxZ3sFgmvGlw9w,16349
81
+ dbt_platform_helper/utils/aws.py,sha256=C18qEs8rekApGpJ39UslPvmpdFKhKX8Pybvz62YslQU,16918
90
82
  dbt_platform_helper/utils/click.py,sha256=Fx4y4bbve1zypvog_sgK7tJtCocmzheoEFLBRv1lfdM,2943
91
83
  dbt_platform_helper/utils/cloudfoundry.py,sha256=GnQ4fVLnDfOdNSrsJjI6ElZHqpgwINeoPn77cUH2UFY,484
92
84
  dbt_platform_helper/utils/files.py,sha256=adQtG2E1IQHDKfeX06l6j1B7UTYukwBuR_uhJHaoi5M,1873
93
85
  dbt_platform_helper/utils/git.py,sha256=7JGZMaI8-cU6-GjXIXjOlsYfKu_RppLOGyAicBd4n_8,704
94
86
  dbt_platform_helper/utils/manifests.py,sha256=ji3UYHCxq9tTpkm4MlRa2y0-JOYYqq1pWZ2h_zpj0UU,507
95
- dbt_platform_helper/utils/messages.py,sha256=aLx6s9utt__IqlDdeIYq4n82ERwludu2Zfqy0Q2t-x8,115
87
+ dbt_platform_helper/utils/messages.py,sha256=nWA7BWLb7ND0WH5TejDN4OQUJSKYBxU4tyCzteCrfT0,142
96
88
  dbt_platform_helper/utils/platform_config.py,sha256=hAQ7bX-Jqu4L9zPYpBq3EK73LRhOK5-fEP2r3MbT_iQ,475
97
89
  dbt_platform_helper/utils/template.py,sha256=g-Db-0I6a6diOHkgK1nYA0IxJSO4TRrjqOvlyeOR32o,950
98
90
  dbt_platform_helper/utils/validation.py,sha256=lmWVqRweswj-h7TPYP8lvluq8Qeu0htyKFbz2WUkPxI,1185
99
91
  dbt_platform_helper/utils/versioning.py,sha256=XBZcyj8fW3xU6fzLTe1fMj2d3hKdQi8jUc-ZyPKJtwk,11428
100
92
  platform_helper.py,sha256=bly3JkwbfwnWTZSZziu40dbgzQItsK-DIMMvL6ArFDY,1893
101
- dbt_platform_helper-12.5.1.dist-info/LICENSE,sha256=dP79lN73--7LMApnankTGLqDbImXg8iYFqWgnExGkGk,1090
102
- dbt_platform_helper-12.5.1.dist-info/METADATA,sha256=2b2IPTvC5b6F4jnyZjX_zuY7Wc2CzEeSACAtJN3QB3c,3212
103
- dbt_platform_helper-12.5.1.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
104
- dbt_platform_helper-12.5.1.dist-info/entry_points.txt,sha256=QhbY8F434A-onsg0-FsdMd2U6HKh6Q7yCFFZrGUh5-M,67
105
- dbt_platform_helper-12.5.1.dist-info/RECORD,,
93
+ dbt_platform_helper-13.0.0.dist-info/LICENSE,sha256=dP79lN73--7LMApnankTGLqDbImXg8iYFqWgnExGkGk,1090
94
+ dbt_platform_helper-13.0.0.dist-info/METADATA,sha256=yfjraBXUAL7ckeLYLj3pbOOOYkq-UQ8gEctGXScjgbw,3212
95
+ dbt_platform_helper-13.0.0.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
96
+ dbt_platform_helper-13.0.0.dist-info/entry_points.txt,sha256=QhbY8F434A-onsg0-FsdMd2U6HKh6Q7yCFFZrGUh5-M,67
97
+ dbt_platform_helper-13.0.0.dist-info/RECORD,,
@@ -1,56 +0,0 @@
1
- # {% extra_header %}
2
- # {% version_info %}
3
- # This YAML file defines your pipeline: the source repository it tracks and the order of the environments to deploy to.
4
- # For more info: https://aws.github.io/copilot-cli/docs/manifest/pipeline/
5
-
6
- # The name of the pipeline.
7
- name: {{ codebase.name }}
8
-
9
- # The version of the schema used in this template.
10
- version: 1
11
-
12
- # This section defines your source, changes to which trigger your pipeline.
13
- source:
14
- # The name of the provider that is used to store the source artifacts.
15
- # (i.e. GitHub, Bitbucket, CodeCommit)
16
- provider: GitHub
17
- # Additional properties that further specify the location of the artifacts.
18
- properties:
19
- branch: main
20
- repository: https://github.com/{{ codebase.repository }}
21
- # Optional: specify the name of an existing CodeStar Connections connection.
22
- connection_name: {{ app_name }}
23
-
24
- {% if additional_ecr_arn %}
25
- build:
26
- additional_policy:
27
- # Policy to enable push to public repo
28
- PolicyDocument:
29
- Version: 2012-10-17
30
- Statement:
31
- - Effect: Allow
32
- Action:
33
- - ecr:GetAuthorizationToken
34
- Resource: "arn:aws:codebuild:eu-west-2:{{ account_id }}:report-group/pipeline-{{ app_name }}-*"
35
- - Effect: Allow
36
- Action:
37
- - "ecr-public:*"
38
- Resource: "{{ additional_ecr_arn }}"
39
- - Effect: Allow
40
- Action:
41
- - "ecr-public:GetAuthorizationToken"
42
- - "sts:GetServiceBearerToken"
43
- Resource: "*"
44
- {% endif %}
45
-
46
- # This section defines the order of the environments your pipeline will deploy to.
47
- stages:
48
- {% for environment in environments -%}
49
- - # The name of the environment.
50
- name: {{ environment.name }}
51
- # Optional: flag for manual approval action before deployment.
52
- {% if not environment.requires_approval %}# {% endif %}requires_approval: true
53
- # Optional: use test commands to validate this stage of your build.
54
- # test_commands: [echo 'running tests', make test]
55
-
56
- {% endfor %}
@@ -1,12 +0,0 @@
1
- # Copilot template communication with the CDK.
2
- .build
3
-
4
- # NodeJS artifacts.
5
- node_modules
6
- *.js
7
- !jest.config.js
8
- *.d.ts
9
-
10
- # CDK asset staging directory.
11
- .cdk.staging
12
- cdk.out
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env node
2
- import * as cdk from 'aws-cdk-lib';
3
- import { TransformedStack } from '../stack';
4
-
5
- const app = new cdk.App();
6
- new TransformedStack(app, 'Stack', {
7
- appName: process.env.COPILOT_APPLICATION_NAME || "",
8
- });