ecs_composex.kms package ¶
Submodules ¶
ecs_composex.kms.kms_ecs_cluster module ¶
Functions to allow the S3 Bucket to interpolate x-s3 values for ECS Cluster
- ecs_composex.kms.kms_ecs_cluster. handle_ecs_cluster ( settings , kms_key ) [source] ¶
-
Entrypoint function to updating the ECS Cluster properties
- Parameters :
-
-
settings (
ecs_composex.common.settings.ComposeXSettings
) – -
kms_key (
ecs_composex.kms.kms_stack.KmsKey
) –
-
- Return type :
-
None
- ecs_composex.kms.kms_ecs_cluster. interpolate_s3_kms_key_id ( exec_config , kms_key ) [source] ¶
-
Replaces the value for x-s3::<kms_key_name> for the log configuration with the appropriate parameters
- Parameters :
-
-
exec_config (
troposphere.ecs.ExecuteCommandConfiguration
) – -
kms_key (
ecs_composex.kms.kms_stack.KmsKey
) –
-
- Return type :
-
None
- ecs_composex.kms.kms_ecs_cluster. update_cluster_kms_property ( ecs_cluster , kms_key ) [source] ¶
-
- Parameters :
-
-
ecs_cluster (
ecs_composex.ecs_cluster.EcsCluster
) – -
kms_key (
ecs_composex.kms.kms_stack.KmsKey
) –
-
- Return type :
-
None
ecs_composex.kms.kms_kinesis_firehose module ¶
Updates x-kinesis_firehose fields and properties, IAM policies for Firehose::DeliveryStream
- ecs_composex.kms.kms_kinesis_firehose. kms_to_firehose ( resource , dest_resource , dest_resource_stack , settings ) [source] ¶
-
Updates properties of the Firehose Delivery Stream with KMS key settings
- Parameters :
-
-
resource ( KmsKey ) –
-
dest_resource ( DeliveryStream ) –
-
dest_resource_stack –
-
settings ( ComposeXSettings ) –
-
- Return type :
-
None
ecs_composex.kms.kms_module module ¶
ecs_composex.kms.kms_params module ¶
ecs_composex.kms.kms_s3 module ¶
Handle x-kms in S3 buckets
- ecs_composex.kms.kms_s3. assign_kms_key_to_bucket ( kms_key , bucket_rule , bucket_stack ) [source] ¶
-
Assigns the KMS Key pointer to the bucket property
- Parameters :
-
-
kms_key ( ecs_composex.kms.kms_stack.KmsKey ) –
-
bucket_rule ( troposphere.s3.ServerSideEncryptionRule ) –
-
bucket_stack ( ecs_composex.s3.s3_stack.XStack ) –
-
- Returns :
-
- ecs_composex.kms.kms_s3. handle_bucket_kms ( kms_key , bucket , bucket_stack , settings ) [source] ¶
-
Goes over the properties of the bucket and if the KMSMasterKeyID points to the kms_key, assigns the value accordingly in the template
- Parameters :
-
-
kms_key ( ecs_composex.kms.kms_stack.KmsKey ) –
-
bucket ( ecs_composex.s3.s3_bucket.Bucket ) –
-
bucket_stack ( ecs_composex.s3.s3_stack.XStack ) –
-
settings ( ecs_composex.common.settings.ComposeXSettings ) – unused
-
- Returns :
-
ecs_composex.kms.kms_sqs module ¶
Handle x-kms in x-sqs
- ecs_composex.kms.kms_sqs. assign_kms_key_to_queue ( kms_key , queue , queue_stack , settings ) [source] ¶
-
Assigns the KMS Key pointer to the queue property
- Parameters :
-
-
kms_key ( ecs_composex.kms.kms_stack.KmsKey ) –
-
queue –
-
queue_stack ( ecs_composex.sqs.sqs_stack.XStack ) –
-
settings ( ecs_composex.common.settings.ComposeXSettings ) –
-
- Returns :
-
- ecs_composex.kms.kms_sqs. handle_queue_kms ( kms_key , queue , queue_stack , settings ) [source] ¶
-
Goes over the properties of the queue and if the KEY points to the kms_key, assigns the value accordingly in the template
- Parameters :
-
-
kms_key ( ecs_composex.kms.kms_stack.KmsKey ) –
-
queue ( ecs_composex.sqs.sqs_stack.Queue ) –
-
queue_stack ( ecs_composex.sqs.sqs_stack.XStack ) –
-
settings ( ecs_composex.common.settings.ComposeXSettings ) –
-
- Returns :
-
ecs_composex.kms.kms_stack module ¶
Manage Creation/Deletion of AWS KMS Keys
- class ecs_composex.kms.kms_stack. KmsKey ( name , definition , module , settings ) [source] ¶
-
Bases:
AwsEnvironmentResource
,ApiXResource
Class to represent a KMS Key
- handle_key_settings ( template ) [source] ¶
-
Method to add to the template for additional KMS key related resources.
- Parameters :
-
template ( troposphere.Template ) –
- handle_x_dependencies ( settings , root_stack = None ) [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 ) – Not used. Present for general compatibility
-
- Return type :
-
None
- property is_cmk ¶
- class ecs_composex.kms.kms_stack. XStack ( title , settings , module , ** kwargs ) [source] ¶
-
Bases:
ComposeXStack
Class for KMS Root stack
- do_validation : bool ¶
- properties : Dict[str, Any] ¶
- propnames : Set[str] ¶
- resource : Dict[str, Any] ¶
- template : Optional[Template] ¶
- title : Optional[str] ¶
ecs_composex.kms.kms_template module ¶
- ecs_composex.kms.kms_template. create_kms_template ( template , new_keys , xstack ) [source] ¶
-
Function to create all the KMS Keys based on their definition
- Parameters :
-
settings ( ecs_composex.common.settings.ComposeXSettings ) –