code
stringlengths
66
870k
docstring
stringlengths
19
26.7k
func_name
stringlengths
1
138
language
stringclasses
1 value
repo
stringlengths
7
68
path
stringlengths
5
324
url
stringlengths
46
389
license
stringclasses
7 values
def _build_lambda_function_environment_property(tf_properties: dict, resource: TFResource) -> Optional[dict]: """ Builds the Environment property of a CloudFormation AWS Lambda Function out of the properties of the equivalent terraform resource Parameters ---------- tf_properties: dict ...
Builds the Environment property of a CloudFormation AWS Lambda Function out of the properties of the equivalent terraform resource Parameters ---------- tf_properties: dict Properties of the terraform AWS Lambda function resource resource: TFResource Configuration terraform res...
_build_lambda_function_environment_property
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/property_builder.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/property_builder.py
Apache-2.0
def _build_lambda_function_image_config_property(tf_properties: dict, resource: TFResource) -> Optional[dict]: """ Builds the ImageConfig property of a CloudFormation AWS Lambda Function out of the properties of the equivalent terraform resource Parameters ---------- tf_properties: dict ...
Builds the ImageConfig property of a CloudFormation AWS Lambda Function out of the properties of the equivalent terraform resource Parameters ---------- tf_properties: dict Properties of the terraform AWS Lambda function resource resource: TFResource Configuration terraform res...
_build_lambda_function_image_config_property
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/property_builder.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/property_builder.py
Apache-2.0
def _check_image_config_value(image_config: Any) -> bool: """ validate if the image_config property value is as SAM CLI expects. If it is not valid, it will raise a PrepareHookException. Parameters ---------- image_config: Any The aws_lambda resource's Image_config property value as re...
validate if the image_config property value is as SAM CLI expects. If it is not valid, it will raise a PrepareHookException. Parameters ---------- image_config: Any The aws_lambda resource's Image_config property value as read from the terraform plan output. Returns ------- b...
_check_image_config_value
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/property_builder.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/property_builder.py
Apache-2.0
def _get_json_body(tf_properties: dict, resource: TFResource) -> Any: """ Gets the JSON formatted body value from the API Gateway if there is one Parameters ---------- tf_properties: dict Properties of the terraform AWS Lambda function resource resource: TFResource Configuration...
Gets the JSON formatted body value from the API Gateway if there is one Parameters ---------- tf_properties: dict Properties of the terraform AWS Lambda function resource resource: TFResource Configuration terraform resource Returns ------- Any Returns a dicton...
_get_json_body
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/property_builder.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/property_builder.py
Apache-2.0
def _get_cors_v2_api(tf_properties: dict, resource: TFResource) -> Optional[Dict[str, Any]]: """ Extract the cors properties from an aws_apigatewayv2_api since they are in a nested property called "cors_configuration" and not in the root of the resource e.g. resource "aws_apigatewayv2_api" "my_api"...
Extract the cors properties from an aws_apigatewayv2_api since they are in a nested property called "cors_configuration" and not in the root of the resource e.g. resource "aws_apigatewayv2_api" "my_api" { name = "my_api" protocol_type = "HTTP" cors_configuration { ...
_get_cors_v2_api
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/property_builder.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/property_builder.py
Apache-2.0
def link_resources(self) -> None: """ Validate the ResourceLinkingPair object and link the corresponding source resource to destination resource """ for config_address, resource in self._resource_pair.source_resource_tf_config.items(): if config_address in self._resource_pair...
Validate the ResourceLinkingPair object and link the corresponding source resource to destination resource
link_resources
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _handle_linking(self, source_tf_resource: TFResource, cfn_source_resources: List[Dict]) -> None: """ Resolve the destinations resource for the input source configuration resource, and then update the equivalent cfn source resource list. The source resource configuration resource in T...
Resolve the destinations resource for the input source configuration resource, and then update the equivalent cfn source resource list. The source resource configuration resource in Terraform can match multiple actual resources in case if it was defined using count or for_each pattern. ...
_handle_linking
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _link_using_terraform_config(self, source_tf_resource: TFResource, cfn_resources: List[Dict]): """ Uses the Terraform Configuration to resolve the destination resources linked to the input terraform resource, then updates the cnf resources that match the input terraform resource. Pa...
Uses the Terraform Configuration to resolve the destination resources linked to the input terraform resource, then updates the cnf resources that match the input terraform resource. Parameters ---------- source_tf_resource: TFResource The source resource Terraform c...
_link_using_terraform_config
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _link_using_linking_fields(self, cfn_resource: Dict) -> None: """ Depends on that all the child resources of the source resource are applied, and so we do not need to traverse the terraform configuration to define the destination resource. We will depend on the actual values of the l...
Depends on that all the child resources of the source resource are applied, and so we do not need to traverse the terraform configuration to define the destination resource. We will depend on the actual values of the linking fields, and find the destination resource that has the same value. ...
_link_using_linking_fields
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _process_resolved_resources( self, source_tf_resource: TFResource, resolved_destination_resource: List[Union[ConstantValue, ResolvedReference]], ) -> List[ReferenceType]: """ Process the resolved destination resources. Parameters ---------- source...
Process the resolved destination resources. Parameters ---------- source_tf_resource: TFResource The source Terraform resource. resolved_destination_resource: List[Union[ConstantValue, ResolvedReference]] The resolved destination resources to be processe...
_process_resolved_resources
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _process_reference_resource_value( self, source_tf_resource: TFResource, resolved_destination_resource: ResolvedReference ) -> List[ReferenceType]: """ Process the reference destination resource value of type ResolvedReference. Parameters ---------- source_tf_res...
Process the reference destination resource value of type ResolvedReference. Parameters ---------- source_tf_resource: TFResource The source Terraform resource. resolved_destination_resource: ResolvedReference The resolved destination resource reference. ...
_process_reference_resource_value
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _build_module( module_name: Optional[str], module_configuration: Dict, input_variables: Dict[str, Expression], parent_module_address: Optional[str], ) -> TFModule: """ Builds and returns a TFModule Parameters ========== module_name: Optional[str] The module's name, if an...
Builds and returns a TFModule Parameters ========== module_name: Optional[str] The module's name, if any module_configuration: Dict The module object from the terraform configuration input_variables: Dict[str, Expression] The input variables sent into the module par...
_build_module
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _build_module_full_address(module_name: Optional[str], parent_module_address: Optional[str]) -> Optional[str]: """ Returns the full address of a module, depending on whether it has a module name and a parent module address. Parameters ========== module_name: Optional[str] The module's n...
Returns the full address of a module, depending on whether it has a module name and a parent module address. Parameters ========== module_name: Optional[str] The module's name, if any parent_module_address: Optional[str] The module's parent address, if any Returns ======= ...
_build_module_full_address
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _build_module_variables_from_configuration( module_configuration: Dict, input_variables: Dict[str, Expression] ) -> Dict[str, Expression]: """ Builds and returns module variables as Expressions using a module terraform configuration Parameters ========== module_configuration: dict T...
Builds and returns module variables as Expressions using a module terraform configuration Parameters ========== module_configuration: dict The module object from the terraform configuration input_variables: Dict[str, Expression] The input variables sent into the module to override ...
_build_module_variables_from_configuration
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _build_module_resources_from_configuration(module_configuration: Dict, module: TFModule) -> Dict[str, TFResource]: """ Builds and returns module TFResources using a module terraform configuration Parameters ========== module_configuration: dict The module object from the terraform confi...
Builds and returns module TFResources using a module terraform configuration Parameters ========== module_configuration: dict The module object from the terraform configuration module: TFModule The TFModule whose resources we're parsing Returns ======= Dict[TFResource]...
_build_module_resources_from_configuration
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _build_module_outputs_from_configuration(module_configuration: Dict) -> Dict[str, Expression]: """ Builds and returns module outputs as Expressions using a module terraform configuration Parameters ========== module_configuration: dict The module object from the terraform configuration ...
Builds and returns module outputs as Expressions using a module terraform configuration Parameters ========== module_configuration: dict The module object from the terraform configuration Returns ======= Dict[str, Expression] Dictionary with the output names as keys and pa...
_build_module_outputs_from_configuration
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _build_child_modules_from_configuration(module_configuration: Dict, module: TFModule) -> Dict[str, TFModule]: """ Builds and returns child TFModules using a module terraform configuration Parameters ========== module_configuration: dict The module object from the terraform configuration...
Builds and returns child TFModules using a module terraform configuration Parameters ========== module_configuration: dict The module object from the terraform configuration module: TFModule The TFModule whose child modules we're building Returns ======= Dict[str, TFMo...
_build_child_modules_from_configuration
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _build_expression_from_configuration(expression_configuration: Dict) -> Optional[Expression]: """ Parses an Expression from an expression terraform configuration. Parameters ========== expression_configuration: dict The expression object from the terraform configuration Returns ...
Parses an Expression from an expression terraform configuration. Parameters ========== expression_configuration: dict The expression object from the terraform configuration Returns ======= Expression The parsed expression
_build_expression_from_configuration
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _clean_references_list(references: List[str]) -> List[str]: """ Return a new copy of the complete references list. e.g. given a list of references like [ 'aws_lambda_layer_version.layer1[0].arn', 'aws_lambda_layer_version.layer1[0]', 'aws_lambda_layer_version.layer1', ] ...
Return a new copy of the complete references list. e.g. given a list of references like [ 'aws_lambda_layer_version.layer1[0].arn', 'aws_lambda_layer_version.layer1[0]', 'aws_lambda_layer_version.layer1', ] We want only the first complete reference ('aws_lambda_layer_versio...
_clean_references_list
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _resolve_module_output(module: TFModule, output_name: str) -> List[Union[ConstantValue, ResolvedReference]]: """ Resolves any references in the output section of the module Parameters ---------- module : Module The module with outputs to search output_name : str The value to...
Resolves any references in the output section of the module Parameters ---------- module : Module The module with outputs to search output_name : str The value to resolve Returns ------- List[Union[ConstantValue, ResolvedReference]] A list of resolved values ...
_resolve_module_output
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _resolve_resource_attribute( resource: TFResource, attribute_name: str ) -> List[Union[ConstantValue, ResolvedReference]]: """ Return a list of the values that resolve the passed attribute name in the input terraform resource configuration Parameters ---------- resource: TFResource ...
Return a list of the values that resolve the passed attribute name in the input terraform resource configuration Parameters ---------- resource: TFResource A terraform resource attribute_name: str The attribute name that needs to be resolved. Returns ------- List[Unio...
_resolve_resource_attribute
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _link_lambda_functions_to_layers_call_back( function_cfn_resource: Dict, referenced_resource_values: List[ReferenceType] ) -> None: """ Callback function that used by the linking algorith to update a Lambda Function CFN Resource with the list of layers ids. Layers ids can be reference to other Layer...
Callback function that used by the linking algorith to update a Lambda Function CFN Resource with the list of layers ids. Layers ids can be reference to other Layers resources define in the customer project, or ARN values to layers exist in customer's account. Parameters ---------- function_cf...
_link_lambda_functions_to_layers_call_back
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _link_gateway_resources_to_gateway_rest_apis( gateway_resources_tf_configs: Dict[str, TFResource], gateway_resources_cfn_resources: Dict[str, List], rest_apis_terraform_resources: Dict[str, Dict], ): """ Iterate through all the resources and link the corresponding Rest API resource to each Gatew...
Iterate through all the resources and link the corresponding Rest API resource to each Gateway Resource resource. Parameters ---------- gateway_resources_tf_configs: Dict[str, TFResource] Dictionary of configuration Gateway Resource resources gateway_resources_cfn_resources: Dict[str, List...
_link_gateway_resources_to_gateway_rest_apis
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _link_gateway_resources_to_parents( gateway_resources_tf_configs: Dict[str, TFResource], gateway_resources_cfn_resources: Dict[str, List], multiple_destination_options_terraform_resources: Dict[str, Dict], ): """ Iterate through all the resources and link them to the corresponding parent resourc...
Iterate through all the resources and link them to the corresponding parent resource. Parent resource can either be a Rest API resource or another API Resource resource. Parameters ---------- gateway_resources_tf_configs: Dict[str, TFResource] Dictionary of configuration Gateway Resource ...
_link_gateway_resources_to_parents
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _link_lambda_functions_to_layers( lambda_config_funcs_conf_cfn_resources: Dict[str, TFResource], lambda_funcs_conf_cfn_resources: Dict[str, List], lambda_layers_terraform_resources: Dict[str, Dict], ): """ Iterate through all the resources and link the corresponding Lambda Layers to each Lambda ...
Iterate through all the resources and link the corresponding Lambda Layers to each Lambda Function Parameters ---------- lambda_config_funcs_conf_cfn_resources: Dict[str, TFResource] Dictionary of configuration lambda resources lambda_funcs_conf_cfn_resources: Dict[str, List] Dicti...
_link_lambda_functions_to_layers
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _link_gateway_resource_to_gateway_rest_apis_rest_api_id_call_back( gateway_cfn_resource: Dict, referenced_rest_apis_values: List[ReferenceType] ) -> None: """ Callback function that used by the linking algorithm to update an Api Gateway resource (Method, Integration, or Integration Response) CFN Res...
Callback function that used by the linking algorithm to update an Api Gateway resource (Method, Integration, or Integration Response) CFN Resource with a reference to the Rest Api resource. Parameters ---------- gateway_cfn_resource: Dict API Gateway CFN resource referenced_rest_apis_v...
_link_gateway_resource_to_gateway_rest_apis_rest_api_id_call_back
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _link_gateway_resource_to_gateway_resource_call_back( gateway_resource_cfn_resource: Dict, referenced_gateway_resource_values: List[ReferenceType] ) -> None: """ Callback function that is used by the linking algorithm to update an Api Gateway resource (Method, Integration, or Integration Response) C...
Callback function that is used by the linking algorithm to update an Api Gateway resource (Method, Integration, or Integration Response) CFN with a reference to the Gateway Resource resource. Parameters ---------- gateway_resource_cfn_resource: Dict API Gateway resource CFN resource re...
_link_gateway_resource_to_gateway_resource_call_back
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _link_gateway_resource_to_parent_resource_call_back( gateway_resource_cfn_resource: Dict, referenced_parent_resources_values: List[ReferenceType] ) -> None: """ Callback function that is used by the linking algorithm to update an Api Gateway resource CFN with a reference to the parent resource which...
Callback function that is used by the linking algorithm to update an Api Gateway resource CFN with a reference to the parent resource which either rest api or gateway resource. Parameters ---------- gateway_resource_cfn_resource: Dict API Gateway resource CFN resource referenced_parent...
_link_gateway_resource_to_parent_resource_call_back
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _link_gateway_methods_to_gateway_rest_apis( gateway_methods_config_resources: Dict[str, TFResource], gateway_methods_config_address_cfn_resources_map: Dict[str, List], rest_apis_terraform_resources: Dict[str, Dict], ): """ Iterate through all the resources and link the corresponding Rest API res...
Iterate through all the resources and link the corresponding Rest API resource to each Gateway Method resource. Parameters ---------- gateway_methods_config_resources: Dict[str, TFResource] Dictionary of configuration Gateway Methods gateway_methods_config_address_cfn_resources_map: Dict[s...
_link_gateway_methods_to_gateway_rest_apis
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _link_gateway_stage_to_rest_api( gateway_stages_config_resources: Dict[str, TFResource], gateway_stages_config_address_cfn_resources_map: Dict[str, List], rest_apis_terraform_resources: Dict[str, Dict], ): """ Iterate through all the resources and link the corresponding Gateway Stage to each Gat...
Iterate through all the resources and link the corresponding Gateway Stage to each Gateway Rest API resource. Parameters ---------- gateway_stages_config_resources: Dict[str, TFResource] Dictionary of configuration Gateway Stages gateway_stages_config_address_cfn_resources_map: Dict[str, L...
_link_gateway_stage_to_rest_api
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _link_gateway_method_to_gateway_resource( gateway_method_config_resources: Dict[str, TFResource], gateway_method_config_address_cfn_resources_map: Dict[str, List], gateway_resources_or_rest_apis_terraform_resources: Dict[str, Dict], ): """ Iterate through all the resources and link the correspon...
Iterate through all the resources and link the corresponding Gateway Method resources to each Gateway Resource resources. Parameters ---------- gateway_method_config_resources: Dict[str, TFResource] Dictionary of configuration Gateway Methods gateway_method_config_address_cfn_resources...
_link_gateway_method_to_gateway_resource
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _link_gateway_integrations_to_gateway_rest_apis( gateway_integrations_config_resources: Dict[str, TFResource], gateway_integrations_config_address_cfn_resources_map: Dict[str, List], rest_apis_terraform_resources: Dict[str, Dict], ): """ Iterate through all the resources and link the correspondi...
Iterate through all the resources and link the corresponding Rest API resource to each Gateway Integration resource. Parameters ---------- gateway_integrations_config_resources: Dict[str, TFResource] Dictionary of configuration Gateway Integrations gateway_integrations_config_address_cfn_r...
_link_gateway_integrations_to_gateway_rest_apis
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _link_gateway_integrations_to_gateway_resource( gateway_integrations_config_resources: Dict[str, TFResource], gateway_integrations_config_address_cfn_resources_map: Dict[str, List], gateway_resources_or_rest_apis_terraform_resources: Dict[str, Dict], ): """ Iterate through all the resources and ...
Iterate through all the resources and link the corresponding Gateway Resource resource to each Gateway Integration resource. Parameters ---------- gateway_integrations_config_resources: Dict[str, TFResource] Dictionary of configuration Gateway Integrations gateway_integrations_config_a...
_link_gateway_integrations_to_gateway_resource
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _link_gateway_integration_to_function_call_back( gateway_integration_cfn_resource: Dict, referenced_gateway_resource_values: List[ReferenceType] ) -> None: """ Callback function that is used by the linking algorithm to update an Api Gateway integration CFN Resource with a reference to the Lambda fun...
Callback function that is used by the linking algorithm to update an Api Gateway integration CFN Resource with a reference to the Lambda function resource through the AWS_PROXY integration. Parameters ---------- gateway_integration_cfn_resource: Dict API Gateway integration CFN resource ...
_link_gateway_integration_to_function_call_back
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _link_gateway_integrations_to_function_resource( gateway_integrations_config_resources: Dict[str, TFResource], gateway_integrations_config_address_cfn_resources_map: Dict[str, List], lambda_function_terraform_resources: Dict[str, Dict], ): """ Iterate through all the resources and link the corre...
Iterate through all the resources and link the corresponding Lambda function resource to each Gateway Integration resource. Parameters ---------- gateway_integrations_config_resources: Dict[str, TFResource] Dictionary of configuration Gateway Integrations gateway_integrations_config_ad...
_link_gateway_integrations_to_function_resource
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _link_gateway_integration_responses_to_gateway_rest_apis( gateway_integration_responses_config_resources: Dict[str, TFResource], gateway_integration_responses_config_address_cfn_resources_map: Dict[str, List], rest_apis_terraform_resources: Dict[str, Dict], ): """ Iterate through all the resourc...
Iterate through all the resources and link the corresponding Rest API resource to each Gateway Integration Response resource. Parameters ---------- gateway_integration_responses_config_resources: Dict[str, TFResource] Dictionary of Terraform configuration Gateway Integration Response resou...
_link_gateway_integration_responses_to_gateway_rest_apis
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _link_gateway_integration_responses_to_gateway_resource( gateway_integration_responses_config_resources: Dict[str, TFResource], gateway_integration_responses_config_address_cfn_resources_map: Dict[str, List], gateway_resources_or_rest_apis_terraform_resources: Dict[str, Dict], ): """ Iterate thr...
Iterate through all the resour ces and link the corresponding Gateway Resource resource to each Gateway Integration Response resource. Parameters ---------- gateway_integration_responses_config_resources: Dict[str, TFResource] Dictionary of configuration Gateway Integration Response res...
_link_gateway_integration_responses_to_gateway_resource
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _link_gateway_authorizer_to_lambda_function_call_back( gateway_authorizer_cfn_resource: Dict, lambda_function_resource_values: List[ReferenceType] ) -> None: """ Callback function that is used by the linking algorithm to update a CFN Authorizer Resource with a reference to the Lambda function's invo...
Callback function that is used by the linking algorithm to update a CFN Authorizer Resource with a reference to the Lambda function's invocation URI Parameters ---------- gateway_authorizer_cfn_resource: Dict API Gateway Authorizer CFN resource lambda_function_resource_values: List[Ref...
_link_gateway_authorizer_to_lambda_function_call_back
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _link_gateway_authorizer_to_lambda_function( authorizer_config_resources: Dict[str, TFResource], authorizer_cfn_resources: Dict[str, List], lamda_function_resources: Dict[str, Dict], ) -> None: """ Iterate through all the resources and link the corresponding Authorizer to each Lambda Function ...
Iterate through all the resources and link the corresponding Authorizer to each Lambda Function Parameters ---------- authorizer_config_resources: Dict[str, TFResource] Dictionary of configuration Authorizer resources authorizer_cfn_resources: Dict[str, List] Dictionary containing ...
_link_gateway_authorizer_to_lambda_function
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _link_gateway_authorizer_to_rest_api( authorizer_config_resources: Dict[str, TFResource], authorizer_cfn_resources: Dict[str, List], rest_api_resource: Dict[str, Dict], ) -> None: """ Iterate through all the resources and link the corresponding Authorizer to each Rest Api Parameters ---...
Iterate through all the resources and link the corresponding Authorizer to each Rest Api Parameters ---------- authorizer_config_resources: Dict[str, TFResource] Dictionary of configuration Authorizer resources authorizer_cfn_resources: Dict[str, List] Dictionary containing resolve...
_link_gateway_authorizer_to_rest_api
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _link_gateway_method_to_gateway_authorizer_call_back( gateway_method_cfn_resource: Dict, authorizer_resources: List[ReferenceType] ) -> None: """ Callback function that is used by the linking algorithm to update a CFN Method Resource with a reference to the Lambda Authorizers's Id Parameters ...
Callback function that is used by the linking algorithm to update a CFN Method Resource with a reference to the Lambda Authorizers's Id Parameters ---------- gateway_method_cfn_resource: Dict API Gateway Method CFN resource authorizer_resources: List[ReferenceType] List of refe...
_link_gateway_method_to_gateway_authorizer_call_back
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _link_gateway_method_to_gateway_authorizer( gateway_method_config_resources: Dict[str, TFResource], gateway_method_config_address_cfn_resources_map: Dict[str, List], authorizer_resources: Dict[str, Dict], ) -> None: """ Iterate through all the resources and link the corresponding Gateway Met...
Iterate through all the resources and link the corresponding Gateway Method resources to each Gateway Authorizer Parameters ---------- gateway_method_config_resources: Dict[str, TFResource] Dictionary of configuration Gateway Methods gateway_method_config_address_cfn_resources_map: Dic...
_link_gateway_method_to_gateway_authorizer
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _link_gateway_v2_route_to_integration_callback( gateway_v2_route_cfn_resource: Dict, gateway_v2_integration_resources: List[ReferenceType] ): """ Callback function that is used by the linking algorithm to update a CFN V2 Route Resource with a reference to the Gateway V2 integration resource Par...
Callback function that is used by the linking algorithm to update a CFN V2 Route Resource with a reference to the Gateway V2 integration resource Parameters ---------- gateway_v2_route_cfn_resource: Dict API Gateway V2 Route CFN resource gateway_v2_integration_resources: List[Reference...
_link_gateway_v2_route_to_integration_callback
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _extract_gateway_v2_integration_id_from_route_target_value(value: str) -> str: """ Function to extract the Gateway V2 Integration id value from the Gateway V2 Route resource target property value. The Route Target value should be in the format `integrations/<Gateway Ve Integration resource id>` Par...
Function to extract the Gateway V2 Integration id value from the Gateway V2 Route resource target property value. The Route Target value should be in the format `integrations/<Gateway Ve Integration resource id>` Parameters ---------- value: str Gateway V2 Route target property value ...
_extract_gateway_v2_integration_id_from_route_target_value
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _link_gateway_v2_route_to_integration( gateway_route_config_resources: Dict[str, TFResource], gateway_route_config_address_cfn_resources_map: Dict[str, List], integration_resources: Dict[str, Dict], ) -> None: """ Iterate through all the resources and link the corresponding Gateway V2 Route ...
Iterate through all the resources and link the corresponding Gateway V2 Route resources to each Gateway V2 Integration Parameters ---------- gateway_route_config_resources: Dict[str, TFResource] Dictionary of configuration Gateway Routes gateway_route_config_address_cfn_resources_map: ...
_link_gateway_v2_route_to_integration
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _link_gateway_v2_integration_to_lambda_function_callback( gateway_v2_integration_cfn_resource: Dict, lambda_function_resources: List[ReferenceType] ): """ Callback function that is used by the linking algorithm to update a CFN V2 Route Resource with a reference to the Gateway V2 integration resource...
Callback function that is used by the linking algorithm to update a CFN V2 Route Resource with a reference to the Gateway V2 integration resource Parameters ---------- gateway_v2_integration_cfn_resource: Dict API Gateway V2 Integration CFN resource lambda_function_resources: List[Refe...
_link_gateway_v2_integration_to_lambda_function_callback
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _link_gateway_v2_integration_to_lambda_function( v2_gateway_integration_config_resources: Dict[str, TFResource], v2_gateway_integration_config_address_cfn_resources_map: Dict[str, List], lambda_functions_resources: Dict[str, Dict], ) -> None: """ Iterate through all the resources and link the co...
Iterate through all the resources and link the corresponding Gateway V2 integration resources to each lambda functions Parameters ---------- v2_gateway_integration_config_resources: Dict[str, TFResource] Dictionary of configuration Gateway Integrations v2_gateway_integration_config_add...
_link_gateway_v2_integration_to_lambda_function
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _link_gateway_v2_resource_to_api_callback( gateway_v2_resource_cfn_resource: Dict, gateway_v2_api_resources: List[ReferenceType] ): """ Callback function that is used by the linking algorithm to update a CFN V2 Integration Resource with a reference to the Gateway V2 Api resource Parameters ...
Callback function that is used by the linking algorithm to update a CFN V2 Integration Resource with a reference to the Gateway V2 Api resource Parameters ---------- gateway_v2_resource_cfn_resource: Dict API Gateway V2 Integration CFN resource gateway_v2_api_resources: List[ReferenceT...
_link_gateway_v2_resource_to_api_callback
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _link_gateway_v2_integration_to_api( gateway_integration_config_resources: Dict[str, TFResource], gateway_integration_config_address_cfn_resources_map: Dict[str, List], api_resources: Dict[str, Dict], ) -> None: """ Iterate through all the resources and link the corresponding Gateway V2 Inte...
Iterate through all the resources and link the corresponding Gateway V2 Integration resources to each Gateway V2 Api Parameters ---------- gateway_integration_config_resources: Dict[str, TFResource] Dictionary of configuration Gateway Integrations gateway_integration_config_address_cfn...
_link_gateway_v2_integration_to_api
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _link_gateway_v2_route_to_api( gateway_route_config_resources: Dict[str, TFResource], gateway_route_config_address_cfn_resources_map: Dict[str, List], api_resources: Dict[str, Dict], ) -> None: """ Iterate through all the resources and link the corresponding Gateway V2 Route resources to eac...
Iterate through all the resources and link the corresponding Gateway V2 Route resources to each Gateway V2 Api Parameters ---------- gateway_route_config_resources: Dict[str, TFResource] Dictionary of configuration Gateway Integrations gateway_route_config_address_cfn_resources_map: Di...
_link_gateway_v2_route_to_api
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _link_gateway_v2_authorizer_to_lambda_function( authorizer_config_resources: Dict[str, TFResource], authorizer_cfn_resources: Dict[str, List], lamda_function_resources: Dict[str, Dict], ) -> None: """ Iterate through all the resources and link the corresponding V2 Authorizer to each Lambda Funct...
Iterate through all the resources and link the corresponding V2 Authorizer to each Lambda Function Parameters ---------- authorizer_config_resources: Dict[str, TFResource] Dictionary of configuration Authorizer resources authorizer_cfn_resources: Dict[str, List] Dictionary containi...
_link_gateway_v2_authorizer_to_lambda_function
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _link_gateway_v2_authorizer_to_api( v2_authorizer_config_resources: Dict[str, TFResource], v2_authorizer_config_address_cfn_resources_map: Dict[str, List], api_resources: Dict[str, Dict], ) -> None: """ Iterate through all the resources and link the corresponding Gateway V2 Authorizer resour...
Iterate through all the resources and link the corresponding Gateway V2 Authorizer resources to each Gateway V2 Api Parameters ---------- v2_authorizer_config_resources: Dict[str, TFResource] Dictionary of configuration Gateway V2 Authorizers v2_authorizer_config_address_cfn_resources_...
_link_gateway_v2_authorizer_to_api
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _link_gateway_v2_api_to_function_callback( gateway_v2_api_cfn_resource: Dict, referenced_function_resource_values: List[ReferenceType] ) -> None: """ Callback function that is used by the linking algorithm to update an Api Gateway V2 API CFN Resource with a reference to the Lambda function resource ...
Callback function that is used by the linking algorithm to update an Api Gateway V2 API CFN Resource with a reference to the Lambda function resource through the AWS_PROXY integration. Parameters ---------- gateway_v2_api_cfn_resource: Dict API Gateway V2 API CFN resource referenced_fu...
_link_gateway_v2_api_to_function_callback
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _link_gateway_v2_api_to_function( gateway_api_config_resources: Dict[str, TFResource], gateway_api_config_address_cfn_resources_map: Dict[str, List], lambda_function_resources: Dict[str, Dict], ) -> None: """ Iterate through all the resources and link the corresponding Gateway V2 API resourc...
Iterate through all the resources and link the corresponding Gateway V2 API resources to each Lambda Function Parameters ---------- gateway_api_config_resources: Dict[str, TFResource] Dictionary of configuration Gateway APIs gateway_api_config_address_cfn_resources_map: Dict[str, List]...
_link_gateway_v2_api_to_function
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _link_gateway_v2_stage_to_api( gateway_stage_config_resources: Dict[str, TFResource], gateway_stage_config_address_cfn_resources_map: Dict[str, List], api_resources: Dict[str, Dict], ): """ Iterate through all the resources and link the corresponding Gateway V2 Stage resources to each Gatewa...
Iterate through all the resources and link the corresponding Gateway V2 Stage resources to each Gateway V2 Api Parameters ---------- gateway_stage_config_resources: Dict[str, TFResource] Dictionary of configuration Gateway Stages gateway_stage_config_address_cfn_resources_map: Dict[str...
_link_gateway_v2_stage_to_api
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _link_gateway_v2_route_to_authorizer_callback( gateway_v2_route_cfn_resource: Dict, gateway_v2_authorizer_resources: List[ReferenceType] ): """ Callback function that is used by the linking algorithm to update a CFN V2 Integration Route with a reference to the Gateway V2 Authorizer resource Par...
Callback function that is used by the linking algorithm to update a CFN V2 Integration Route with a reference to the Gateway V2 Authorizer resource Parameters ---------- gateway_v2_route_cfn_resource: Dict API Gateway V2 Route CFN resource gateway_v2_authorizer_resources: List[Referenc...
_link_gateway_v2_route_to_authorizer_callback
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _link_gateway_v2_route_to_authorizer( gateway_route_config_resources: Dict[str, TFResource], gateway_route_config_address_cfn_resources_map: Dict[str, List], authorizer_resources: Dict[str, Dict], ): """ Iterate through all the resources and link the corresponding Gateway V2 Route resources ...
Iterate through all the resources and link the corresponding Gateway V2 Route resources to each Gateway V2 Authorizer Parameters ---------- gateway_route_config_resources: Dict[str, TFResource] Dictionary of configuration Gateway Routes gateway_route_config_address_cfn_resources_map: D...
_link_gateway_v2_route_to_authorizer
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resource_linking.py
Apache-2.0
def _get_modules(root_module: dict, root_tf_module: TFModule) -> Iterator[Tuple[dict, TFModule]]: """ Iterator helper method to find any child modules for processing. Parameters ---------- root_module: dict The root level planned values dictionary root_tf_module: TFModule The TF...
Iterator helper method to find any child modules for processing. Parameters ---------- root_module: dict The root level planned values dictionary root_tf_module: TFModule The TFModule class representation of the configuration values Yields ------ Tuple[dict, TFModule] ...
_get_modules
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/translate.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/translate.py
Apache-2.0
def _check_unresolvable_values(root_module: dict, root_tf_module: TFModule) -> None: """ Checks the planned values and configuration values if there are any properties that are unresolved, or unknown, until the Terraform project is applied. Parameters ---------- root_module: dict The ro...
Checks the planned values and configuration values if there are any properties that are unresolved, or unknown, until the Terraform project is applied. Parameters ---------- root_module: dict The root level planned values dictionary root_tf_module: TFModule The TFModule class r...
_check_unresolvable_values
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/translate.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/translate.py
Apache-2.0
def translate_to_cfn( tf_json: dict, output_directory_path: str, terraform_application_dir: str, project_root_dir: str ) -> dict: """ Translates the json output of a terraform show into CloudFormation Parameters ---------- tf_json: dict A terraform show json output output_directory_...
Translates the json output of a terraform show into CloudFormation Parameters ---------- tf_json: dict A terraform show json output output_directory_path: str the string path to write the metadata file and makefile terraform_application_dir: str the terraform configurat...
translate_to_cfn
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/translate.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/translate.py
Apache-2.0
def _add_child_modules_to_queue(curr_module: Dict, curr_module_configuration: TFModule, modules_queue: List) -> None: """ Iterate over the children modules of current module and add each module with its related child module configuration to the modules_queue. Parameters ---------- curr_module: ...
Iterate over the children modules of current module and add each module with its related child module configuration to the modules_queue. Parameters ---------- curr_module: Dict The current module in the planned values curr_module_configuration: TFModule The current module conf...
_add_child_modules_to_queue
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/translate.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/translate.py
Apache-2.0
def _add_metadata_resource_to_metadata_list( sam_metadata_resource: SamMetadataResource, sam_metadata_resource_planned_values: Dict, sam_metadata_resources: List[SamMetadataResource], ) -> None: """ Prioritize the metadata resources that has resource name value to overwrite the metadata resources th...
Prioritize the metadata resources that has resource name value to overwrite the metadata resources that does not have resource name value. Parameters ---------- sam_metadata_resource: SamMetadataResource The mapped metadata resource sam_metadata_resource_planned_values: Dict Th...
_add_metadata_resource_to_metadata_list
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/translate.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/translate.py
Apache-2.0
def _translate_properties( tf_properties: dict, property_builder_mapping: PropertyBuilderMapping, resource: TFResource ) -> dict: """ Translates the properties of a terraform resource into the equivalent properties of a CloudFormation resource Parameters ---------- tf_properties: dict T...
Translates the properties of a terraform resource into the equivalent properties of a CloudFormation resource Parameters ---------- tf_properties: dict The terraform properties to translate property_builder_mapping: PropertyBuilderMapping A mapping of the CloudFormation property na...
_translate_properties
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/translate.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/translate.py
Apache-2.0
def _map_s3_sources_to_functions( s3_hash_to_source: Dict[str, Tuple[str, List[Union[ConstantValue, ResolvedReference]]]], cfn_resources: Dict[str, Any], lambda_resources_to_code_map: Dict[str, List[Tuple[Dict, str]]], ) -> None: """ Maps the source property of terraform AWS S3 object resources into...
Maps the source property of terraform AWS S3 object resources into the the Code property of CloudFormation AWS Lambda Function resources, and append the hash value of the artifacts path to the lambda resources code map. Parameters ---------- s3_hash_to_source: Dict[str, Tuple[str, List[Union[C...
_map_s3_sources_to_functions
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/translate.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/translate.py
Apache-2.0
def _check_dummy_remote_values(cfn_resources: Dict[str, Any]) -> None: """ Check if there is any lambda function/layer that has a dummy remote value for its code.imageuri or code.s3 attributes, and raise a validation error for it. Parameters ---------- cfn_resources: dict CloudFormation...
Check if there is any lambda function/layer that has a dummy remote value for its code.imageuri or code.s3 attributes, and raise a validation error for it. Parameters ---------- cfn_resources: dict CloudFormation resources
_check_dummy_remote_values
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/translate.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/translate.py
Apache-2.0
def _get_s3_object_hash( bucket: Union[str, List[Union[ConstantValue, ResolvedReference]]], key: Union[str, List[Union[ConstantValue, ResolvedReference]]], ) -> str: """ Creates a hash for an AWS S3 object out of the bucket and key Parameters ---------- bucket: Union[str, List[Union[Constan...
Creates a hash for an AWS S3 object out of the bucket and key Parameters ---------- bucket: Union[str, List[Union[ConstantValue, ResolvedReference]]] bucket for the S3 object key: Union[str, List[Union[ConstantValue, ResolvedReference]]] key for the S3 object Returns -----...
_get_s3_object_hash
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/translate.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/translate.py
Apache-2.0
def collect(self, properties: ResourceTranslationProperties): """ Collect any properties required for future resource processing after traversing the Terraform modules. In parent class we collect all the required properties. This logic can be customized in the children classes. Paramet...
Collect any properties required for future resource processing after traversing the Terraform modules. In parent class we collect all the required properties. This logic can be customized in the children classes. Parameters ---------- properties: ResourceTranslationProperties ...
collect
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/types.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/types.py
Apache-2.0
def add_lambda_resources_to_code_map( self, properties: ResourceTranslationProperties, translated_properties: Dict, lambda_resources_to_code_map: Dict[str, List[Tuple[Dict, str]]], ): """ Resolves the relevant code properties for an CFN resource from a Terraform resou...
Resolves the relevant code properties for an CFN resource from a Terraform resource and then stores that property in the lambda_resources_to_code_map. Parameters ---------- properties: ResourceTranslationProperties Properties acquired specific to the resource being ...
add_lambda_resources_to_code_map
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/types.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/types.py
Apache-2.0
def _unsupported_reference_field(field: str, resource: Dict, config_resource: TFResource) -> bool: """ Check if a field in a resource is a reference to a computed value that is unknown until apply-time. These fields are not visible to AWS SAM CLI until the Terraform application is applied, meaning that ...
Check if a field in a resource is a reference to a computed value that is unknown until apply-time. These fields are not visible to AWS SAM CLI until the Terraform application is applied, meaning that the field isn't parsable by `sam local` commands and isn't supported with the current hook implementat...
_unsupported_reference_field
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resources/apigw.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resources/apigw.py
Apache-2.0
def add_integrations_to_methods( gateway_methods_cfn: Dict[str, List], gateway_integrations_cfn: Dict[str, List] ) -> None: """ Iterate through all the API Gateway methods in the translated CFN dict. For each API Gateway method, search the internal integration resources using the integrations' unique id...
Iterate through all the API Gateway methods in the translated CFN dict. For each API Gateway method, search the internal integration resources using the integrations' unique identifier to find the one that corresponds with that API Gateway method. Once found, append the properties of the internal integ...
add_integrations_to_methods
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resources/apigw.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resources/apigw.py
Apache-2.0
def add_integration_responses_to_methods( gateway_methods_cfn: Dict[str, List], gateway_integration_responses_cfn: Dict[str, List] ) -> None: """ Iterate through all the API Gateway methods in the translated CFN dict. For each API Gateway method, search the internal integration response resources using ...
Iterate through all the API Gateway methods in the translated CFN dict. For each API Gateway method, search the internal integration response resources using the responses' unique identifier to find the one that corresponds with that API Gateway method. Once found, update the matched Method resource to upd...
add_integration_responses_to_methods
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resources/apigw.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resources/apigw.py
Apache-2.0
def _find_gateway_integration(search_key: set, gateway_integrations_cfn: Dict[str, List]) -> Optional[dict]: """ Iterate through all internal API Gateway integration or integration response and search of an integration / integration response whose unique identifier matches the given search key. Parame...
Iterate through all internal API Gateway integration or integration response and search of an integration / integration response whose unique identifier matches the given search key. Parameters ---------- search_key: set Set containing the unique identifier of the API Gateway integration ...
_find_gateway_integration
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resources/apigw.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resources/apigw.py
Apache-2.0
def _gateway_method_integration_identifier(resource_properties: dict) -> set: """ Given a dict containing the properties that uniquely identify an API Gateway integration (RestApiId, ResourceId, HttpMethod) returns a set containing these fields that be used to check for equality of integrations. Pa...
Given a dict containing the properties that uniquely identify an API Gateway integration (RestApiId, ResourceId, HttpMethod) returns a set containing these fields that be used to check for equality of integrations. Parameters ---------- resource_properties: dict Dict containing the res...
_gateway_method_integration_identifier
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resources/apigw.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resources/apigw.py
Apache-2.0
def _get_reference_from_string_or_intrinsic(resource_properties: dict, property_key: str) -> str: """ Check if a reference value is a constant string ARN or if it is a reference to a logical ID. Return either the ARN or the logical ID Parameters ---------- resource_properties: dict Reso...
Check if a reference value is a constant string ARN or if it is a reference to a logical ID. Return either the ARN or the logical ID Parameters ---------- resource_properties: dict Resource properties to search through property_key: str Property to find Returns -------...
_get_reference_from_string_or_intrinsic
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resources/apigw.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resources/apigw.py
Apache-2.0
def _create_gateway_method_integration(method_resource: dict, integration_resource_properties: dict) -> None: """ Set the relevant resource properties defined in the integration internal resource on the API Gateway method resource Integration field Parameters ---------- method_resource: dict ...
Set the relevant resource properties defined in the integration internal resource on the API Gateway method resource Integration field Parameters ---------- method_resource: dict Dict containing the AWS CFN resource for the API Gateway method resource integration_resource_properties: d...
_create_gateway_method_integration
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resources/apigw.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resources/apigw.py
Apache-2.0
def _create_gateway_method_integration_response( method_resource: dict, integration_response_resource_properties: dict ) -> None: """ Set the relevant resource properties defined in the integration response internal resource on the API Gateway method resource Integration field Parameters ------...
Set the relevant resource properties defined in the integration response internal resource on the API Gateway method resource Integration field Parameters ---------- method_resource: dict Dict containing the AWS CFN resource for the API Gateway method resource integration_response_reso...
_create_gateway_method_integration_response
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resources/apigw.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resources/apigw.py
Apache-2.0
def _add_lambda_resource_code_path_to_code_map( terraform_resource: TFResource, lambda_resource_prefix: str, lambda_resources_to_code_map: Dict, logical_id: str, lambda_resource_code_value: Any, terraform_code_property_name: str, translated_resource: Dict, ) -> None: """ Calculate th...
Calculate the hash value of the lambda resource code path planned value or the configuration value and use it to map the lambda resource logical id to the source code path. This will be used later to map the metadata resource to the correct lambda resource. Parameters ---------- terraform_res...
_add_lambda_resource_code_path_to_code_map
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resources/code_resource_utils.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resources/code_resource_utils.py
Apache-2.0
def add_lambda_resources_to_code_map( self, properties: ResourceTranslationProperties, translated_properties: Dict, lambda_resources_to_code_map: Dict[str, List[Tuple[Dict, str]]], ): """ Resolves the relevant code properties for an AWS::Lambda::Function from a Terraf...
Resolves the relevant code properties for an AWS::Lambda::Function from a Terraform aws_lambda_function and then stores that property in the lambda_resources_to_code_map. Parameters ---------- properties: ResourceTranslationProperties Properties acquired specific to...
add_lambda_resources_to_code_map
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resources/lambda_function.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resources/lambda_function.py
Apache-2.0
def add_lambda_resources_to_code_map( self, properties: ResourceTranslationProperties, translated_properties: Dict, lambda_resources_to_code_map: Dict[str, List[Tuple[Dict, str]]], ): """ Resolves the relevant code properties for an AWS::Lambda::LayerVersion from a Te...
Resolves the relevant code properties for an AWS::Lambda::LayerVersion from a Terraform aws_lambda_layer_version and then stores that property in the lambda_resources_to_code_map. Parameters ---------- properties: ResourceTranslationProperties Properties acquired sp...
add_lambda_resources_to_code_map
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resources/lambda_layers.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resources/lambda_layers.py
Apache-2.0
def get_resource_property_mapping() -> Dict[str, ResourceProperties]: """ Get a map containing the class for handling resource property translations for a specific resource type Returns ------- Dict[str, ResourceProperties] A mapping between the Terraform resource type and the R...
Get a map containing the class for handling resource property translations for a specific resource type Returns ------- Dict[str, ResourceProperties] A mapping between the Terraform resource type and the ResourceProperties handling class for that resource type
get_resource_property_mapping
python
aws/aws-sam-cli
samcli/hook_packages/terraform/hooks/prepare/resources/resource_properties.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/hooks/prepare/resources/resource_properties.py
Apache-2.0
def build_cfn_logical_id(tf_address: str) -> str: """ Builds a CloudFormation logical ID out of a terraform resource address Parameters ---------- tf_address: str terraform resource address Returns ------- str CloudFormation logical ID """ # ignores non-alphanum...
Builds a CloudFormation logical ID out of a terraform resource address Parameters ---------- tf_address: str terraform resource address Returns ------- str CloudFormation logical ID
build_cfn_logical_id
python
aws/aws-sam-cli
samcli/hook_packages/terraform/lib/utils.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/lib/utils.py
Apache-2.0
def _calculate_configuration_attribute_value_hash( configuration_attribute_value: Union[str, List[Union[ConstantValue, ResolvedReference]]], ) -> str: """ Create a hash value of an attribute value of the resource configuration. Parameters ---------- configuration_attribute_value: Union[str, Lis...
Create a hash value of an attribute value of the resource configuration. Parameters ---------- configuration_attribute_value: Union[str, List[Union[ConstantValue, ResolvedReference]]] An attribute value of the resource configuration. Its value can be either string if it can be resolved from ...
_calculate_configuration_attribute_value_hash
python
aws/aws-sam-cli
samcli/hook_packages/terraform/lib/utils.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/hook_packages/terraform/lib/utils.py
Apache-2.0
def print_managed_s3_bucket_info(s3_bucket: str): """ Print information about the managed S3 bucket. Parameters ---------- s3_bucket : str The name of the managed S3 bucket """ message = f"\n\tManaged S3 bucket: {s3_bucket}" click.secho(message, bold=True) click.echo("\tAuto...
Print information about the managed S3 bucket. Parameters ---------- s3_bucket : str The name of the managed S3 bucket
print_managed_s3_bucket_info
python
aws/aws-sam-cli
samcli/lib/bootstrap/bootstrap.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/lib/bootstrap/bootstrap.py
Apache-2.0
def get_current_account_id(profile: Optional[str] = None): """Returns account ID based on used AWS credentials.""" session = boto3.Session(profile_name=profile) sts_client = session.client("sts") try: caller_identity = sts_client.get_caller_identity() except ClientError as ex: if ex....
Returns account ID based on used AWS credentials.
get_current_account_id
python
aws/aws-sam-cli
samcli/lib/bootstrap/bootstrap.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/lib/bootstrap/bootstrap.py
Apache-2.0
def build(self) -> str: """ Build companion stack CFN template with current functions Returns ------- str CFN template for companions stack """ for _, ecr_repo in self._repo_mapping.items(): self.add_resource(cast(str, ecr_repo.logical_id),...
Build companion stack CFN template with current functions Returns ------- str CFN template for companions stack
build
python
aws/aws-sam-cli
samcli/lib/bootstrap/companion_stack/companion_stack_builder.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/lib/bootstrap/companion_stack/companion_stack_builder.py
Apache-2.0
def _build_repo_dict(self, repo: ECRRepo) -> Dict: """ Build a single ECR repo resource dictionary Parameters ---------- repo ECR repo that will be turned into CFN resource Returns ------- dict ECR repo resource dictionary ...
Build a single ECR repo resource dictionary Parameters ---------- repo ECR repo that will be turned into CFN resource Returns ------- dict ECR repo resource dictionary
_build_repo_dict
python
aws/aws-sam-cli
samcli/lib/bootstrap/companion_stack/companion_stack_builder.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/lib/bootstrap/companion_stack/companion_stack_builder.py
Apache-2.0
def set_functions( self, function_logical_ids: List[str], image_repositories: Optional[Dict[str, str]] = None ) -> None: """ Sets functions that need to have ECR repos created Parameters ---------- function_logical_ids: List[str] Function logical IDs that...
Sets functions that need to have ECR repos created Parameters ---------- function_logical_ids: List[str] Function logical IDs that need to have ECR repos created image_repositories: Optional[Dict[str, str]] Optional image repository mapping. Functions wi...
set_functions
python
aws/aws-sam-cli
samcli/lib/bootstrap/companion_stack/companion_stack_manager.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/lib/bootstrap/companion_stack/companion_stack_manager.py
Apache-2.0
def update_companion_stack(self) -> None: """ Blocking call to create or update the companion stack based on current functions Companion stack template will be updated to the s3 bucket first before deployment """ if not self._builder.repo_mapping: return stac...
Blocking call to create or update the companion stack based on current functions Companion stack template will be updated to the s3 bucket first before deployment
update_companion_stack
python
aws/aws-sam-cli
samcli/lib/bootstrap/companion_stack/companion_stack_manager.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/lib/bootstrap/companion_stack/companion_stack_manager.py
Apache-2.0
def _delete_companion_stack(self) -> None: """ Blocking call to delete the companion stack """ stack_name = self._companion_stack.stack_name waiter = self._cfn_client.get_waiter("stack_delete_complete") self._cfn_client.delete_stack(StackName=stack_name) waiter.wa...
Blocking call to delete the companion stack
_delete_companion_stack
python
aws/aws-sam-cli
samcli/lib/bootstrap/companion_stack/companion_stack_manager.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/lib/bootstrap/companion_stack/companion_stack_manager.py
Apache-2.0
def list_deployed_repos(self) -> List[ECRRepo]: """ List deployed ECR repos for this companion stack Not using create_change_set as it is slow. Returns ------- List[ECRRepo] List of ECR repos deployed for this companion stack Returns empty list if...
List deployed ECR repos for this companion stack Not using create_change_set as it is slow. Returns ------- List[ECRRepo] List of ECR repos deployed for this companion stack Returns empty list if companion stack does not exist
list_deployed_repos
python
aws/aws-sam-cli
samcli/lib/bootstrap/companion_stack/companion_stack_manager.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/lib/bootstrap/companion_stack/companion_stack_manager.py
Apache-2.0
def get_unreferenced_repos(self) -> List[ECRRepo]: """ List deployed ECR repos that is not referenced by current list of functions Returns ------- List[ECRRepo] List of deployed ECR repos that is not referenced by current list of functions Returns empty l...
List deployed ECR repos that is not referenced by current list of functions Returns ------- List[ECRRepo] List of deployed ECR repos that is not referenced by current list of functions Returns empty list if companion stack does not exist
get_unreferenced_repos
python
aws/aws-sam-cli
samcli/lib/bootstrap/companion_stack/companion_stack_manager.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/lib/bootstrap/companion_stack/companion_stack_manager.py
Apache-2.0
def delete_unreferenced_repos(self) -> None: """ Blocking call to delete all deployed ECR repos that are unreferenced by a function If repo does not exist, this will simply skip it. """ repos = self.get_unreferenced_repos() for repo in repos: try: ...
Blocking call to delete all deployed ECR repos that are unreferenced by a function If repo does not exist, this will simply skip it.
delete_unreferenced_repos
python
aws/aws-sam-cli
samcli/lib/bootstrap/companion_stack/companion_stack_manager.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/lib/bootstrap/companion_stack/companion_stack_manager.py
Apache-2.0
def sync_repos(self) -> None: """ Blocking call to sync companion stack with the following actions Creates the stack if it does not exist, and updates it if it does. Deletes unreferenced repos if they exist. Deletes companion stack if there isn't any repo left. """ ...
Blocking call to sync companion stack with the following actions Creates the stack if it does not exist, and updates it if it does. Deletes unreferenced repos if they exist. Deletes companion stack if there isn't any repo left.
sync_repos
python
aws/aws-sam-cli
samcli/lib/bootstrap/companion_stack/companion_stack_manager.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/lib/bootstrap/companion_stack/companion_stack_manager.py
Apache-2.0
def does_companion_stack_exist(self) -> bool: """ Does companion stack exist Returns ------- bool Returns True if companion stack exists """ try: self._cfn_client.describe_stacks(StackName=self._companion_stack.stack_name) retu...
Does companion stack exist Returns ------- bool Returns True if companion stack exists
does_companion_stack_exist
python
aws/aws-sam-cli
samcli/lib/bootstrap/companion_stack/companion_stack_manager.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/lib/bootstrap/companion_stack/companion_stack_manager.py
Apache-2.0
def sync_ecr_stack( template_file: str, stack_name: str, region: str, s3_bucket: str, s3_prefix: str, image_repositories: Dict[str, str] ) -> Dict[str, str]: """Blocking call to sync local functions with ECR Companion Stack Parameters ---------- template_file : str Template file path. s...
Blocking call to sync local functions with ECR Companion Stack Parameters ---------- template_file : str Template file path. stack_name : str Stack name region : str AWS region s3_bucket : str S3 bucket s3_prefix : str S3 prefix for the bucket ima...
sync_ecr_stack
python
aws/aws-sam-cli
samcli/lib/bootstrap/companion_stack/companion_stack_manager.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/lib/bootstrap/companion_stack/companion_stack_manager.py
Apache-2.0
def __init__( self, companion_stack: Optional[CompanionStack] = None, function_full_path: Optional[str] = None, logical_id: Optional[str] = None, physical_id: Optional[str] = None, output_logical_id: Optional[str] = None, ): """ Must be specified eithe...
Must be specified either with companion_stack and function_full_path or logical_id, physical_id, and output_logical_id
__init__
python
aws/aws-sam-cli
samcli/lib/bootstrap/companion_stack/data_types.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/lib/bootstrap/companion_stack/data_types.py
Apache-2.0
def __init__( self, stack: Stack, stack_name: str, build_dir: str, current_template: Dict, app_build_result: ApplicationBuildResult, stack_metadata: Optional[Dict] = None, ): """ Parameters ---------- stack: Stack St...
Parameters ---------- stack: Stack Stack that it is currently been processed stack_name : str Original stack name, which is used to generate layer name build_dir : str Build directory for storing the new nested stack template current_t...
__init__
python
aws/aws-sam-cli
samcli/lib/bootstrap/nested_stack/nested_stack_manager.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/lib/bootstrap/nested_stack/nested_stack_manager.py
Apache-2.0
def generate_auto_dependency_layer_stack(self) -> Dict: """ Loops through all resources, and for the supported ones (SUPPORTED_RESOURCES and SUPPORTED_LANGUAGES) creates layer for its dependencies in a nested stack, and adds reference of the nested stack back to original stack ""...
Loops through all resources, and for the supported ones (SUPPORTED_RESOURCES and SUPPORTED_LANGUAGES) creates layer for its dependencies in a nested stack, and adds reference of the nested stack back to original stack
generate_auto_dependency_layer_stack
python
aws/aws-sam-cli
samcli/lib/bootstrap/nested_stack/nested_stack_manager.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/lib/bootstrap/nested_stack/nested_stack_manager.py
Apache-2.0
def update_layer_folder( build_dir: str, dependencies_dir: str, layer_logical_id: str, function_logical_id: str, function_runtime: Optional[str], ) -> str: """ Creates build folder for auto dependency layer by moving dependencies into sub folder which is defin...
Creates build folder for auto dependency layer by moving dependencies into sub folder which is defined by the runtime
update_layer_folder
python
aws/aws-sam-cli
samcli/lib/bootstrap/nested_stack/nested_stack_manager.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/lib/bootstrap/nested_stack/nested_stack_manager.py
Apache-2.0
def _is_function_supported(self, function: Function): """ Checks if function is built with current session and its runtime is supported """ # check if function is built if function.full_path not in self._app_build_result.artifacts.keys(): LOG.debug( "F...
Checks if function is built with current session and its runtime is supported
_is_function_supported
python
aws/aws-sam-cli
samcli/lib/bootstrap/nested_stack/nested_stack_manager.py
https://github.com/aws/aws-sam-cli/blob/master/samcli/lib/bootstrap/nested_stack/nested_stack_manager.py
Apache-2.0