ecs_composex.route53 package ¶
Submodules ¶
ecs_composex.route53.route53_acm module ¶
Manages x-route53 to x-acm
- ecs_composex.route53.route53_acm. handle_acm_records ( x_hosted_zone , route53_stack , target_cert , acm_stack , settings , root_stack = None ) [source] ¶
-
Function to go over the ACM Certificate Domain validation options, and identifies x-route53 to map it to.
- Parameters :
-
-
x_hosted_zone ( ecs_composex.route53.route53_zone.HostedZone ) – HostedZone to evaluate.
-
route53_stack ( ecs_composex.common.stacks.ComposeXStack ) –
-
target_cert ( ecs_composex.acm.acm_stack.Certificate ) –
-
acm_stack ( ecs_composex.common.stacks.ComposeXStack ) –
-
settings ( ecs_composex.common.settings.ComposeXSettings ) –
-
- ecs_composex.route53.route53_acm. lookup_dns_zone ( route53_zone , validation_option , acm_stack , settings ) [source] ¶
-
Update the HostedZoneId property when using a lookup DNS zone
- Parameters :
-
-
route53_zone –
-
validation_option ( troposphere.certificatemanager.DomainValidationOption ) –
-
acm_stack ( XStack ) –
-
settings ( ecs_composex.common.settings.ComposeXSettings ) –
-
- ecs_composex.route53.route53_acm. new_dns_zone ( route53_zone , acm_stack , validation_option ) [source] ¶
-
Update the HostedZoneId property when using a new Route53 zone
- Parameters :
-
-
route53_zone –
-
acm_stack –
-
validation_option ( troposphere.certificatemanager.DomainValidationOption ) –
-
- ecs_composex.route53.route53_acm. update_route53_pointer ( x_hosted_zone , validation_setting , route53_stack , target_cert , acm_stack , settings ) [source] ¶
-
Iterates over each HostedZone and upon finding the right one :param ecs_composex.route53.route53_zone.HostedZone x_hosted_zone: List of HostedZones defined :param troposphere.certificatemanager.DomainValidationOption validation_setting: :param XStack route53_stack: :param ComposeXStack acm_stack: :param ecs_composex.common.settings.ComposeXSettings settings:
ecs_composex.route53.route53_elbv2 module ¶
- ecs_composex.route53.route53_elbv2. add_dns_records_for_elbv2 ( x_hosted_zone , record , route53_stack , target_elbv2 , elbv2_stack ) [source] ¶
-
Iterates over each HostedZone and upon finding the right one :param ecs_composex.route53.route53_zone.HostedZone x_hosted_zone: List of HostedZones defined :param dict record: :param XStack route53_stack: :param ecs_composex.elbv2.elbv2_stack.Elbv2 target_elbv2: :param ComposeXStack elbv2_stack:
- Return type :
-
None
- ecs_composex.route53.route53_elbv2. create_record ( name , route53_zone , route53_stack , target_elbv2 , elbv2_stack ) [source] ¶
-
Create a new RecordResource with the given DNS Name pointing to the ELB
- Parameters :
-
-
name ( str ) –
-
route53_zone ( ecs_composex.route53.route53_zone.HostedZone ) –
-
route53_stack ( ecs_composex.route53.route53_stack.XStack ) –
-
target_elbv2 ( ecs_composex.elbv2.elbv2_stack.Elbv2 ) –
-
elbv2_stack ( ComposeXStack ) –
-
- Return type :
-
None
- ecs_composex.route53.route53_elbv2. handle_elbv2_records ( x_hosted_zone , route53_stack , target_elbv2 , elbv2_stack , settings = None , root_stack = None ) [source] ¶
-
Function to add DNS Records for ELBv2
- Parameters :
-
-
x_hosted_zone ( HostedZone ) – List of HostedZones defined
-
route53_stack ( XStack ) –
-
target_elbv2 ( Elbv2 ) –
-
elbv2_stack ( ComposeXStack ) –
-
settings ( ecs_composex.common.settings.ComposeXSettings ) – unused. Present for compatibility.
-
- Return type :
-
None
ecs_composex.route53.route53_helpers module ¶
- ecs_composex.route53.route53_helpers. filter_out_cloudmap_zones ( zones , zone_name ) [source] ¶
-
Function to filter out the Hosted Zones linked to CloudMap
- ecs_composex.route53.route53_helpers. lookup_hosted_zone ( zone , session , private , zone_id = None ) [source] ¶
-
Describes all zones in account via the session, returns the details about the one zone if found
- Parameters :
-
-
zone ( HostecZone ) –
-
session ( boto3.session.Session ) –
-
private ( bool ) –
-
zone_id ( str ) – The Zone ID
-
- Return type :
-
dict
- Returns :
-
- ecs_composex.route53.route53_helpers. resolve_lookup ( lookup_resources , settings , module ) [source] ¶
-
Lookup the ACM certificates in AWS and creates the CFN mappings for them
- Parameters :
-
-
lookup_resources ( list [ HostedZone ] ) – List of resources to lookup
-
settings ( ecs_composex.common.settings.ComposeXSettings ) –
-
module ( XResourceModule ) –
-
- Return type :
-
None
ecs_composex.route53.route53_module module ¶
ecs_composex.route53.route53_params module ¶
Module for DNS Route53 parameters
ecs_composex.route53.route53_stack module ¶
Main module for x-route53
- class ecs_composex.route53.route53_stack. HostedZone ( name , definition , module , settings ) [source] ¶
-
Bases:
AwsEnvironmentResource
Class specifically for Route53 Hosted Zone
- Variables :
-
records ( list [ Record ] ) – List of DNS Records to create with the DNS Zone
- handle_x_dependencies ( settings , root_stack ) [source] ¶
-
WIll go over all the new resources to create in the execution and search for properties that can be updated with itself
- Parameters :
-
-
settings ( ecs_composex.common.settings.ComposeXSettings ) –
-
root_stack ( ComposeXStack ) – The root stack
-
- Return type :
-
None
- init_stack_for_records ( root_stack , settings ) [source] ¶
-
When creating new Route53 records, if the x-route53 where looked up, we need to initialize the Route53 stack
- Parameters :
-
root_stack ( ComposeXStack ) – The root stack
- Return type :
-
None
- lookup_resource ( arn_re , native_lookup_function , cfn_resource_type , tagging_api_id , subattribute_key = None , use_arn_for_id = False ) [source] ¶
-
Special lookup for Route53. Only needs
- Parameters :
-
-
arn_re ( re.Pattern ) –
-
native_lookup_function –
-
cfn_resource_type –
-
tagging_api_id –
-
subattribute_key –
-
- Returns :
-
- class ecs_composex.route53.route53_stack. XStack ( name , settings , module , ** kwargs ) [source] ¶
-
Bases:
ComposeXStack
Root stack for x-route53 hosted zones
- Parameters :
-
settings ( ecs_composex.common.settings.ComposeXSettings ) –