dbt-platform-helper 12.0.0__py3-none-any.whl → 12.0.1__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.

@@ -384,6 +384,13 @@ def create_header_rule(
384
384
  )
385
385
 
386
386
 
387
+ def normalise_to_cidr(ip: str):
388
+ if "/" in ip:
389
+ return ip
390
+ SINGLE_IPV4_CIDR_PREFIX_LENGTH = "32"
391
+ return f"{ip}/{SINGLE_IPV4_CIDR_PREFIX_LENGTH}"
392
+
393
+
387
394
  def create_source_ip_rule(
388
395
  lb_client: boto3.client,
389
396
  listener_arn: str,
@@ -395,10 +402,11 @@ def create_source_ip_rule(
395
402
  conditions = get_host_conditions(lb_client, listener_arn, target_group_arn)
396
403
 
397
404
  # add new condition to existing conditions
405
+
398
406
  combined_conditions = [
399
407
  {
400
408
  "Field": "source-ip",
401
- "SourceIpConfig": {"Values": [value + "/32" for value in values]},
409
+ "SourceIpConfig": {"Values": [normalise_to_cidr(value) for value in values]},
402
410
  }
403
411
  ] + conditions
404
412
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dbt-platform-helper
3
- Version: 12.0.0
3
+ Version: 12.0.1
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
@@ -20,7 +20,7 @@ dbt_platform_helper/constants.py,sha256=fzN2VZt81mspNfdYpNef5_eEjDVsh8GUYmhBMTIf
20
20
  dbt_platform_helper/default-extensions.yml,sha256=SU1ZitskbuEBpvE7efc3s56eAUF11j70brhj_XrNMMo,493
21
21
  dbt_platform_helper/domain/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
22
  dbt_platform_helper/domain/database_copy.py,sha256=OS4vcAjsn7x9NI8LdxrU2HjcERySFrwC50SSt2Pd9lQ,8532
23
- dbt_platform_helper/domain/maintenance_page.py,sha256=qIaM4CXOefOwt-Nfjx_I66vSvwxMHKlcBuKaRRkcoDk,15532
23
+ dbt_platform_helper/domain/maintenance_page.py,sha256=NFHN_J0NthhJ1YkcOTJ8c0R8y33TrDZq3ka2fmMRM1g,15708
24
24
  dbt_platform_helper/exceptions.py,sha256=dCQkqmlt5yycZgblwTtpkwGrP7ANQB_1MRORUWIYI-U,541
25
25
  dbt_platform_helper/jinja2_tags.py,sha256=jFyN_Sxmko1GSfvrqRIGQ80CCW8EwlCV3su0ahJPfoE,541
26
26
  dbt_platform_helper/providers/load_balancers.py,sha256=e1SPrWbBWq95paSVd3Y5yORIrHAZxcVabBYDjPyUTsU,1430
@@ -88,8 +88,8 @@ dbt_platform_helper/utils/template.py,sha256=raRx4QUCVJtKfvJK08Egg6gwWcs3r3V4nPW
88
88
  dbt_platform_helper/utils/validation.py,sha256=htEcvFNnqO9OPCrvvl_Emo0bUsN9f_ThBG5aomVfKIE,24919
89
89
  dbt_platform_helper/utils/versioning.py,sha256=IBxdocJ8ZyJib38d1ja87tTuFE0iJ4npaDcAHQAKQ58,10825
90
90
  platform_helper.py,sha256=bly3JkwbfwnWTZSZziu40dbgzQItsK-DIMMvL6ArFDY,1893
91
- dbt_platform_helper-12.0.0.dist-info/LICENSE,sha256=dP79lN73--7LMApnankTGLqDbImXg8iYFqWgnExGkGk,1090
92
- dbt_platform_helper-12.0.0.dist-info/METADATA,sha256=ad4UIfaHgL6gLHC8zFGcyfC9yk7wUAsqr3WK0D2rLL0,3161
93
- dbt_platform_helper-12.0.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
94
- dbt_platform_helper-12.0.0.dist-info/entry_points.txt,sha256=QhbY8F434A-onsg0-FsdMd2U6HKh6Q7yCFFZrGUh5-M,67
95
- dbt_platform_helper-12.0.0.dist-info/RECORD,,
91
+ dbt_platform_helper-12.0.1.dist-info/LICENSE,sha256=dP79lN73--7LMApnankTGLqDbImXg8iYFqWgnExGkGk,1090
92
+ dbt_platform_helper-12.0.1.dist-info/METADATA,sha256=1-iLoR4MRuR1gGhens7RnJdniIbYVMeGuhaTBokZb-Y,3161
93
+ dbt_platform_helper-12.0.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
94
+ dbt_platform_helper-12.0.1.dist-info/entry_points.txt,sha256=QhbY8F434A-onsg0-FsdMd2U6HKh6Q7yCFFZrGUh5-M,67
95
+ dbt_platform_helper-12.0.1.dist-info/RECORD,,