diff --git a/samtranslator/model/__init__.py b/samtranslator/model/__init__.py index ed8dff914..a64ffc235 100644 --- a/samtranslator/model/__init__.py +++ b/samtranslator/model/__init__.py @@ -43,7 +43,7 @@ class Resource(object): property_types = None _keywords = ["logical_id", "relative_id", "depends_on", "resource_attributes"] - _supported_resource_attributes = ["DeletionPolicy", "UpdatePolicy", "Condition"] + _supported_resource_attributes = ["DeletionPolicy", "UpdateReplacePolicy", "UpdatePolicy", "Condition"] # Runtime attributes that can be qureied resource. They are CloudFormation attributes like ARN, Name etc that # will be resolvable at runtime. This map will be implemented by sub-classes to express list of attributes they diff --git a/samtranslator/model/sam_resources.py b/samtranslator/model/sam_resources.py index 88c16cae8..c7665d55a 100644 --- a/samtranslator/model/sam_resources.py +++ b/samtranslator/model/sam_resources.py @@ -677,6 +677,7 @@ def _construct_version(self, function, intrinsics_resolver, code_sha256=None): if attributes is None: attributes = {} attributes["DeletionPolicy"] = "Retain" + attributes["UpdateReplacePolicy"] = "Delete" lambda_version = LambdaVersion(logical_id=logical_id, attributes=attributes) lambda_version.FunctionName = function.get_runtime_attr("name") @@ -1104,6 +1105,7 @@ def _construct_lambda_layer(self, intrinsics_resolver): if attributes is None: attributes = {} attributes["DeletionPolicy"] = retention_policy_value + attributes["UpdateReplacePolicy"] = "Delete" old_logical_id = self.logical_id new_logical_id = logical_id_generator.LogicalIdGenerator(old_logical_id, self.to_dict()).gen() diff --git a/tests/translator/output/aws-cn/basic_layer.json b/tests/translator/output/aws-cn/basic_layer.json index d373bd19c..64511b2f0 100644 --- a/tests/translator/output/aws-cn/basic_layer.json +++ b/tests/translator/output/aws-cn/basic_layer.json @@ -10,6 +10,7 @@ "Resources": { "LayerWithCondition7c655e10ea": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::LayerVersion", "Properties": { "Content": { @@ -22,6 +23,7 @@ }, "MinimalLayer0c7f96cce7": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::LayerVersion", "Properties": { "Content": { @@ -33,6 +35,7 @@ }, "CompleteLayer5d71a60e81": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::LayerVersion", "Properties": { "Content": { @@ -50,6 +53,7 @@ }, "LayerWithContentUriObjectbdbf1b82ac": { "DeletionPolicy": "Delete", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::LayerVersion", "Properties": { "Content": { diff --git a/tests/translator/output/aws-cn/function_event_conditions.json b/tests/translator/output/aws-cn/function_event_conditions.json index c6010f940..6c03efd1f 100644 --- a/tests/translator/output/aws-cn/function_event_conditions.json +++ b/tests/translator/output/aws-cn/function_event_conditions.json @@ -316,6 +316,7 @@ }, "MyAwesomeFunctionVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Condition": "MyCondition", "Properties": { diff --git a/tests/translator/output/aws-cn/function_with_alias.json b/tests/translator/output/aws-cn/function_with_alias.json index cf8953e96..189610231 100644 --- a/tests/translator/output/aws-cn/function_with_alias.json +++ b/tests/translator/output/aws-cn/function_with_alias.json @@ -2,6 +2,7 @@ "Resources": { "MinimalFunctionVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "Description": "sam-testing", diff --git a/tests/translator/output/aws-cn/function_with_alias_and_event_sources.json b/tests/translator/output/aws-cn/function_with_alias_and_event_sources.json index e48747d79..35d9e1d68 100644 --- a/tests/translator/output/aws-cn/function_with_alias_and_event_sources.json +++ b/tests/translator/output/aws-cn/function_with_alias_and_event_sources.json @@ -358,6 +358,7 @@ }, "MyAwesomeFunctionVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { diff --git a/tests/translator/output/aws-cn/function_with_alias_intrinsics.json b/tests/translator/output/aws-cn/function_with_alias_intrinsics.json index 3fff52854..9bfabaa47 100644 --- a/tests/translator/output/aws-cn/function_with_alias_intrinsics.json +++ b/tests/translator/output/aws-cn/function_with_alias_intrinsics.json @@ -8,6 +8,7 @@ "Resources": { "MinimalFunctionVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { diff --git a/tests/translator/output/aws-cn/function_with_custom_codedeploy_deployment_preference.json b/tests/translator/output/aws-cn/function_with_custom_codedeploy_deployment_preference.json index f3d5e0510..1e1fcf25e 100644 --- a/tests/translator/output/aws-cn/function_with_custom_codedeploy_deployment_preference.json +++ b/tests/translator/output/aws-cn/function_with_custom_codedeploy_deployment_preference.json @@ -59,6 +59,7 @@ }, "CustomWithFindInMapVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { @@ -204,6 +205,7 @@ }, "CustomWithConditionVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { @@ -242,6 +244,7 @@ }, "CustomWithCondition2Version640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { @@ -303,6 +306,7 @@ }, "NormalWithRefVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { @@ -429,6 +433,7 @@ }, "CustomWithSubVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { @@ -591,6 +596,7 @@ }, "NormalWithSubVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { @@ -813,6 +819,7 @@ }, "MinimalFunctionVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { diff --git a/tests/translator/output/aws-cn/function_with_custom_conditional_codedeploy_deployment_preference.json b/tests/translator/output/aws-cn/function_with_custom_conditional_codedeploy_deployment_preference.json index 26c5417e6..622a95936 100644 --- a/tests/translator/output/aws-cn/function_with_custom_conditional_codedeploy_deployment_preference.json +++ b/tests/translator/output/aws-cn/function_with_custom_conditional_codedeploy_deployment_preference.json @@ -140,6 +140,7 @@ }, "HelloWorldFunctionVersionfb53d5c2e6": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { diff --git a/tests/translator/output/aws-cn/function_with_deployment_and_custom_role.json b/tests/translator/output/aws-cn/function_with_deployment_and_custom_role.json index 03a936a6d..5ad19b120 100644 --- a/tests/translator/output/aws-cn/function_with_deployment_and_custom_role.json +++ b/tests/translator/output/aws-cn/function_with_deployment_and_custom_role.json @@ -102,6 +102,7 @@ }, "FunctionWithRoleVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { @@ -209,6 +210,7 @@ }, "MinimalFunctionVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { diff --git a/tests/translator/output/aws-cn/function_with_deployment_no_service_role.json b/tests/translator/output/aws-cn/function_with_deployment_no_service_role.json index 65d6a4483..4bbbcd173 100644 --- a/tests/translator/output/aws-cn/function_with_deployment_no_service_role.json +++ b/tests/translator/output/aws-cn/function_with_deployment_no_service_role.json @@ -86,6 +86,7 @@ }, "OtherFunctionVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { @@ -186,6 +187,7 @@ }, "MinimalFunctionVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { diff --git a/tests/translator/output/aws-cn/function_with_deployment_preference.json b/tests/translator/output/aws-cn/function_with_deployment_preference.json index 830ecaa18..58ca6f5fb 100644 --- a/tests/translator/output/aws-cn/function_with_deployment_preference.json +++ b/tests/translator/output/aws-cn/function_with_deployment_preference.json @@ -146,6 +146,7 @@ }, "MinimalFunctionVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { diff --git a/tests/translator/output/aws-cn/function_with_deployment_preference_all_parameters.json b/tests/translator/output/aws-cn/function_with_deployment_preference_all_parameters.json index 739a81811..974b9ae77 100644 --- a/tests/translator/output/aws-cn/function_with_deployment_preference_all_parameters.json +++ b/tests/translator/output/aws-cn/function_with_deployment_preference_all_parameters.json @@ -205,6 +205,7 @@ }, "MinimalFunctionVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { diff --git a/tests/translator/output/aws-cn/function_with_deployment_preference_from_parameters.json b/tests/translator/output/aws-cn/function_with_deployment_preference_from_parameters.json index 0e83fb6c6..550278962 100644 --- a/tests/translator/output/aws-cn/function_with_deployment_preference_from_parameters.json +++ b/tests/translator/output/aws-cn/function_with_deployment_preference_from_parameters.json @@ -219,6 +219,7 @@ }, "MinimalFunctionVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { diff --git a/tests/translator/output/aws-cn/function_with_deployment_preference_multiple_combinations.json b/tests/translator/output/aws-cn/function_with_deployment_preference_multiple_combinations.json index 7c9543aa5..1a018b103 100644 --- a/tests/translator/output/aws-cn/function_with_deployment_preference_multiple_combinations.json +++ b/tests/translator/output/aws-cn/function_with_deployment_preference_multiple_combinations.json @@ -188,6 +188,7 @@ }, "MinimalFunctionWithMinimalDeploymentPreferenceVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { @@ -303,6 +304,7 @@ }, "MinimalFunctionWithDeploymentPreferenceWithHooksAndAlarmsVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { @@ -376,6 +378,7 @@ }, "MinimalFunctionVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { diff --git a/tests/translator/output/aws-cn/function_with_disabled_deployment_preference.json b/tests/translator/output/aws-cn/function_with_disabled_deployment_preference.json index 80337bcd2..88c79037a 100644 --- a/tests/translator/output/aws-cn/function_with_disabled_deployment_preference.json +++ b/tests/translator/output/aws-cn/function_with_disabled_deployment_preference.json @@ -2,6 +2,7 @@ "Resources": { "MinimalFunctionVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { diff --git a/tests/translator/output/aws-cn/function_with_event_dest_basic.json b/tests/translator/output/aws-cn/function_with_event_dest_basic.json index 01a3440e1..2d2b3e5ad 100644 --- a/tests/translator/output/aws-cn/function_with_event_dest_basic.json +++ b/tests/translator/output/aws-cn/function_with_event_dest_basic.json @@ -138,6 +138,7 @@ }, "MyTestFunctionVersiondaf9da458d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { diff --git a/tests/translator/output/aws-cn/function_with_layers.json b/tests/translator/output/aws-cn/function_with_layers.json index 7c2004acf..80d2293fa 100644 --- a/tests/translator/output/aws-cn/function_with_layers.json +++ b/tests/translator/output/aws-cn/function_with_layers.json @@ -28,6 +28,7 @@ }, "MyLayera5167acaba": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::LayerVersion", "Properties": { "Content": { diff --git a/tests/translator/output/aws-cn/function_with_many_layers.json b/tests/translator/output/aws-cn/function_with_many_layers.json index 2bff7ff8f..63c4aa4eb 100644 --- a/tests/translator/output/aws-cn/function_with_many_layers.json +++ b/tests/translator/output/aws-cn/function_with_many_layers.json @@ -2,6 +2,7 @@ "Resources": { "MyLayera5167acaba": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::LayerVersion", "Properties": { "Content": { diff --git a/tests/translator/output/aws-cn/function_with_resource_refs.json b/tests/translator/output/aws-cn/function_with_resource_refs.json index 89ab2a671..4b75bb5dc 100644 --- a/tests/translator/output/aws-cn/function_with_resource_refs.json +++ b/tests/translator/output/aws-cn/function_with_resource_refs.json @@ -159,6 +159,7 @@ }, "MinimalFunctionVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { diff --git a/tests/translator/output/aws-cn/globals_for_function.json b/tests/translator/output/aws-cn/globals_for_function.json index 148dfb9c6..ef2d1c1c8 100644 --- a/tests/translator/output/aws-cn/globals_for_function.json +++ b/tests/translator/output/aws-cn/globals_for_function.json @@ -223,6 +223,7 @@ }, "FunctionWithOverridesVersion096ed3b52b": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { @@ -232,6 +233,7 @@ }, "MinimalFunctionVersion0a06fc8fb1": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { diff --git a/tests/translator/output/aws-cn/layers_all_properties.json b/tests/translator/output/aws-cn/layers_all_properties.json index 3520acb5b..fc4e312b2 100644 --- a/tests/translator/output/aws-cn/layers_all_properties.json +++ b/tests/translator/output/aws-cn/layers_all_properties.json @@ -66,6 +66,7 @@ }, "MyLayerd04062b365": { "DeletionPolicy": "Delete", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::LayerVersion", "Properties": { "Content": { @@ -77,6 +78,7 @@ }, "MyLayerWithANamefda8c9ec8c": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::LayerVersion", "Properties": { "Content": { diff --git a/tests/translator/output/aws-cn/layers_with_intrinsics.json b/tests/translator/output/aws-cn/layers_with_intrinsics.json index c8351374f..05b0d8b1a 100644 --- a/tests/translator/output/aws-cn/layers_with_intrinsics.json +++ b/tests/translator/output/aws-cn/layers_with_intrinsics.json @@ -15,6 +15,7 @@ "Resources": { "LayerWithNameIntrinsiccf8baed8b9": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::LayerVersion", "Properties": { "Content": { @@ -26,6 +27,7 @@ }, "LayerWithRefNameIntrinsicRegion186db7e435": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::LayerVersion", "Properties": { "Content": { @@ -37,6 +39,7 @@ }, "LayerWithSubNameIntrinsicRegionfbc3f9f13d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::LayerVersion", "Properties": { "Content": { @@ -50,6 +53,7 @@ }, "LayerWithRuntimesIntrinsic1a006faa85": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::LayerVersion", "Properties": { "Content": { @@ -64,6 +68,7 @@ }, "LayerWithLicenseIntrinsic965c8d0c9b": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::LayerVersion", "Properties": { "Content": { @@ -77,6 +82,7 @@ "LayerWithSubNameIntrinsic6e9b477102": { "Type": "AWS::Lambda::LayerVersion", "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Properties": { "Content": { "S3Bucket": "sam-demo-bucket", diff --git a/tests/translator/output/aws-us-gov/basic_layer.json b/tests/translator/output/aws-us-gov/basic_layer.json index d373bd19c..64511b2f0 100644 --- a/tests/translator/output/aws-us-gov/basic_layer.json +++ b/tests/translator/output/aws-us-gov/basic_layer.json @@ -10,6 +10,7 @@ "Resources": { "LayerWithCondition7c655e10ea": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::LayerVersion", "Properties": { "Content": { @@ -22,6 +23,7 @@ }, "MinimalLayer0c7f96cce7": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::LayerVersion", "Properties": { "Content": { @@ -33,6 +35,7 @@ }, "CompleteLayer5d71a60e81": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::LayerVersion", "Properties": { "Content": { @@ -50,6 +53,7 @@ }, "LayerWithContentUriObjectbdbf1b82ac": { "DeletionPolicy": "Delete", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::LayerVersion", "Properties": { "Content": { diff --git a/tests/translator/output/aws-us-gov/function_event_conditions.json b/tests/translator/output/aws-us-gov/function_event_conditions.json index 2b1dea068..0f048da9b 100644 --- a/tests/translator/output/aws-us-gov/function_event_conditions.json +++ b/tests/translator/output/aws-us-gov/function_event_conditions.json @@ -316,6 +316,7 @@ }, "MyAwesomeFunctionVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Condition": "MyCondition", "Properties": { diff --git a/tests/translator/output/aws-us-gov/function_with_alias.json b/tests/translator/output/aws-us-gov/function_with_alias.json index aae104be5..d86791d07 100644 --- a/tests/translator/output/aws-us-gov/function_with_alias.json +++ b/tests/translator/output/aws-us-gov/function_with_alias.json @@ -2,6 +2,7 @@ "Resources": { "MinimalFunctionVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "Description": "sam-testing", diff --git a/tests/translator/output/aws-us-gov/function_with_alias_and_event_sources.json b/tests/translator/output/aws-us-gov/function_with_alias_and_event_sources.json index 99ccfc0b3..fb697b76a 100644 --- a/tests/translator/output/aws-us-gov/function_with_alias_and_event_sources.json +++ b/tests/translator/output/aws-us-gov/function_with_alias_and_event_sources.json @@ -368,6 +368,7 @@ }, "MyAwesomeFunctionVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { diff --git a/tests/translator/output/aws-us-gov/function_with_alias_intrinsics.json b/tests/translator/output/aws-us-gov/function_with_alias_intrinsics.json index 6844f0abb..e1003d470 100644 --- a/tests/translator/output/aws-us-gov/function_with_alias_intrinsics.json +++ b/tests/translator/output/aws-us-gov/function_with_alias_intrinsics.json @@ -8,6 +8,7 @@ "Resources": { "MinimalFunctionVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { diff --git a/tests/translator/output/aws-us-gov/function_with_custom_codedeploy_deployment_preference.json b/tests/translator/output/aws-us-gov/function_with_custom_codedeploy_deployment_preference.json index f601b9622..52cf49ea3 100644 --- a/tests/translator/output/aws-us-gov/function_with_custom_codedeploy_deployment_preference.json +++ b/tests/translator/output/aws-us-gov/function_with_custom_codedeploy_deployment_preference.json @@ -59,6 +59,7 @@ }, "CustomWithFindInMapVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { @@ -204,6 +205,7 @@ }, "CustomWithConditionVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { @@ -242,6 +244,7 @@ }, "CustomWithCondition2Version640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { @@ -303,6 +306,7 @@ }, "NormalWithRefVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { @@ -429,6 +433,7 @@ }, "CustomWithSubVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { @@ -591,6 +596,7 @@ }, "NormalWithSubVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { @@ -813,6 +819,7 @@ }, "MinimalFunctionVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { diff --git a/tests/translator/output/aws-us-gov/function_with_custom_conditional_codedeploy_deployment_preference.json b/tests/translator/output/aws-us-gov/function_with_custom_conditional_codedeploy_deployment_preference.json index b91a7f0ff..e95ed0f17 100644 --- a/tests/translator/output/aws-us-gov/function_with_custom_conditional_codedeploy_deployment_preference.json +++ b/tests/translator/output/aws-us-gov/function_with_custom_conditional_codedeploy_deployment_preference.json @@ -140,6 +140,7 @@ }, "HelloWorldFunctionVersionfb53d5c2e6": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { diff --git a/tests/translator/output/aws-us-gov/function_with_deployment_and_custom_role.json b/tests/translator/output/aws-us-gov/function_with_deployment_and_custom_role.json index 68a538606..cfd59c2df 100644 --- a/tests/translator/output/aws-us-gov/function_with_deployment_and_custom_role.json +++ b/tests/translator/output/aws-us-gov/function_with_deployment_and_custom_role.json @@ -102,6 +102,7 @@ }, "FunctionWithRoleVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { @@ -209,6 +210,7 @@ }, "MinimalFunctionVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { diff --git a/tests/translator/output/aws-us-gov/function_with_deployment_no_service_role.json b/tests/translator/output/aws-us-gov/function_with_deployment_no_service_role.json index ca6cf4a1e..3e5e2f583 100644 --- a/tests/translator/output/aws-us-gov/function_with_deployment_no_service_role.json +++ b/tests/translator/output/aws-us-gov/function_with_deployment_no_service_role.json @@ -86,6 +86,7 @@ }, "OtherFunctionVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { @@ -186,6 +187,7 @@ }, "MinimalFunctionVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { diff --git a/tests/translator/output/aws-us-gov/function_with_deployment_preference.json b/tests/translator/output/aws-us-gov/function_with_deployment_preference.json index 3b6868a1e..657871c32 100644 --- a/tests/translator/output/aws-us-gov/function_with_deployment_preference.json +++ b/tests/translator/output/aws-us-gov/function_with_deployment_preference.json @@ -146,6 +146,7 @@ }, "MinimalFunctionVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { diff --git a/tests/translator/output/aws-us-gov/function_with_deployment_preference_all_parameters.json b/tests/translator/output/aws-us-gov/function_with_deployment_preference_all_parameters.json index 2eb18aee3..9767c5005 100644 --- a/tests/translator/output/aws-us-gov/function_with_deployment_preference_all_parameters.json +++ b/tests/translator/output/aws-us-gov/function_with_deployment_preference_all_parameters.json @@ -205,6 +205,7 @@ }, "MinimalFunctionVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { diff --git a/tests/translator/output/aws-us-gov/function_with_deployment_preference_from_parameters.json b/tests/translator/output/aws-us-gov/function_with_deployment_preference_from_parameters.json index 960cf3d85..dddd35966 100644 --- a/tests/translator/output/aws-us-gov/function_with_deployment_preference_from_parameters.json +++ b/tests/translator/output/aws-us-gov/function_with_deployment_preference_from_parameters.json @@ -219,6 +219,7 @@ }, "MinimalFunctionVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { diff --git a/tests/translator/output/aws-us-gov/function_with_deployment_preference_multiple_combinations.json b/tests/translator/output/aws-us-gov/function_with_deployment_preference_multiple_combinations.json index 2ad3524ec..56fa4795f 100644 --- a/tests/translator/output/aws-us-gov/function_with_deployment_preference_multiple_combinations.json +++ b/tests/translator/output/aws-us-gov/function_with_deployment_preference_multiple_combinations.json @@ -188,6 +188,7 @@ }, "MinimalFunctionWithMinimalDeploymentPreferenceVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { @@ -303,6 +304,7 @@ }, "MinimalFunctionWithDeploymentPreferenceWithHooksAndAlarmsVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { @@ -376,6 +378,7 @@ }, "MinimalFunctionVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { diff --git a/tests/translator/output/aws-us-gov/function_with_disabled_deployment_preference.json b/tests/translator/output/aws-us-gov/function_with_disabled_deployment_preference.json index 6057dd5f9..6086482f3 100644 --- a/tests/translator/output/aws-us-gov/function_with_disabled_deployment_preference.json +++ b/tests/translator/output/aws-us-gov/function_with_disabled_deployment_preference.json @@ -2,6 +2,7 @@ "Resources": { "MinimalFunctionVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { diff --git a/tests/translator/output/aws-us-gov/function_with_event_dest_basic.json b/tests/translator/output/aws-us-gov/function_with_event_dest_basic.json index 2849abc9a..3ae6cc122 100644 --- a/tests/translator/output/aws-us-gov/function_with_event_dest_basic.json +++ b/tests/translator/output/aws-us-gov/function_with_event_dest_basic.json @@ -138,6 +138,7 @@ }, "MyTestFunctionVersiondaf9da458d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { diff --git a/tests/translator/output/aws-us-gov/function_with_layers.json b/tests/translator/output/aws-us-gov/function_with_layers.json index 9197f869c..9369d1e6f 100644 --- a/tests/translator/output/aws-us-gov/function_with_layers.json +++ b/tests/translator/output/aws-us-gov/function_with_layers.json @@ -28,6 +28,7 @@ }, "MyLayera5167acaba": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::LayerVersion", "Properties": { "Content": { diff --git a/tests/translator/output/aws-us-gov/function_with_many_layers.json b/tests/translator/output/aws-us-gov/function_with_many_layers.json index 15389c0a6..bf114bcb8 100644 --- a/tests/translator/output/aws-us-gov/function_with_many_layers.json +++ b/tests/translator/output/aws-us-gov/function_with_many_layers.json @@ -2,6 +2,7 @@ "Resources": { "MyLayera5167acaba": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::LayerVersion", "Properties": { "Content": { diff --git a/tests/translator/output/aws-us-gov/function_with_resource_refs.json b/tests/translator/output/aws-us-gov/function_with_resource_refs.json index b54893054..9bac03723 100644 --- a/tests/translator/output/aws-us-gov/function_with_resource_refs.json +++ b/tests/translator/output/aws-us-gov/function_with_resource_refs.json @@ -159,6 +159,7 @@ }, "MinimalFunctionVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { diff --git a/tests/translator/output/aws-us-gov/globals_for_function.json b/tests/translator/output/aws-us-gov/globals_for_function.json index 31fce858f..b08413497 100644 --- a/tests/translator/output/aws-us-gov/globals_for_function.json +++ b/tests/translator/output/aws-us-gov/globals_for_function.json @@ -223,6 +223,7 @@ }, "FunctionWithOverridesVersion096ed3b52b": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { @@ -232,6 +233,7 @@ }, "MinimalFunctionVersion0a06fc8fb1": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { diff --git a/tests/translator/output/aws-us-gov/layers_all_properties.json b/tests/translator/output/aws-us-gov/layers_all_properties.json index 066c5eaab..d1f507d45 100644 --- a/tests/translator/output/aws-us-gov/layers_all_properties.json +++ b/tests/translator/output/aws-us-gov/layers_all_properties.json @@ -66,6 +66,7 @@ }, "MyLayerd04062b365": { "DeletionPolicy": "Delete", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::LayerVersion", "Properties": { "Content": { @@ -77,6 +78,7 @@ }, "MyLayerWithANamefda8c9ec8c": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::LayerVersion", "Properties": { "Content": { diff --git a/tests/translator/output/aws-us-gov/layers_with_intrinsics.json b/tests/translator/output/aws-us-gov/layers_with_intrinsics.json index a0a46e7d7..c63116ede 100644 --- a/tests/translator/output/aws-us-gov/layers_with_intrinsics.json +++ b/tests/translator/output/aws-us-gov/layers_with_intrinsics.json @@ -15,6 +15,7 @@ "Resources": { "LayerWithNameIntrinsiccf8baed8b9": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::LayerVersion", "Properties": { "Content": { @@ -26,6 +27,7 @@ }, "LayerWithRefNameIntrinsicRegionad31c93c8b": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::LayerVersion", "Properties": { "Content": { @@ -37,6 +39,7 @@ }, "LayerWithSubNameIntrinsicRegion5b2c74d55e": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::LayerVersion", "Properties": { "Content": { @@ -50,6 +53,7 @@ }, "LayerWithRuntimesIntrinsic1a006faa85": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::LayerVersion", "Properties": { "Content": { @@ -64,6 +68,7 @@ }, "LayerWithLicenseIntrinsic965c8d0c9b": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::LayerVersion", "Properties": { "Content": { @@ -77,6 +82,7 @@ "LayerWithSubNameIntrinsic6e9b477102": { "Type": "AWS::Lambda::LayerVersion", "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Properties": { "Content": { "S3Bucket": "sam-demo-bucket", diff --git a/tests/translator/output/basic_layer.json b/tests/translator/output/basic_layer.json index d373bd19c..64511b2f0 100644 --- a/tests/translator/output/basic_layer.json +++ b/tests/translator/output/basic_layer.json @@ -10,6 +10,7 @@ "Resources": { "LayerWithCondition7c655e10ea": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::LayerVersion", "Properties": { "Content": { @@ -22,6 +23,7 @@ }, "MinimalLayer0c7f96cce7": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::LayerVersion", "Properties": { "Content": { @@ -33,6 +35,7 @@ }, "CompleteLayer5d71a60e81": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::LayerVersion", "Properties": { "Content": { @@ -50,6 +53,7 @@ }, "LayerWithContentUriObjectbdbf1b82ac": { "DeletionPolicy": "Delete", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::LayerVersion", "Properties": { "Content": { diff --git a/tests/translator/output/function_event_conditions.json b/tests/translator/output/function_event_conditions.json index a1c0e9a76..98893b051 100644 --- a/tests/translator/output/function_event_conditions.json +++ b/tests/translator/output/function_event_conditions.json @@ -316,6 +316,7 @@ }, "MyAwesomeFunctionVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Condition": "MyCondition", "Properties": { diff --git a/tests/translator/output/function_with_alias.json b/tests/translator/output/function_with_alias.json index 306c5b387..99e5bf0e8 100644 --- a/tests/translator/output/function_with_alias.json +++ b/tests/translator/output/function_with_alias.json @@ -2,6 +2,7 @@ "Resources": { "MinimalFunctionVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "Description": "sam-testing", diff --git a/tests/translator/output/function_with_alias_and_code_sha256.json b/tests/translator/output/function_with_alias_and_code_sha256.json index 5f89a1632..1e8dbf32e 100644 --- a/tests/translator/output/function_with_alias_and_code_sha256.json +++ b/tests/translator/output/function_with_alias_and_code_sha256.json @@ -2,6 +2,7 @@ "Resources": { "MinimalFunctionVersion6b86b273ff": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "Description": "sam-testing", diff --git a/tests/translator/output/function_with_alias_and_event_sources.json b/tests/translator/output/function_with_alias_and_event_sources.json index eb62f8fae..6a525f000 100644 --- a/tests/translator/output/function_with_alias_and_event_sources.json +++ b/tests/translator/output/function_with_alias_and_event_sources.json @@ -360,6 +360,7 @@ }, "MyAwesomeFunctionVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { diff --git a/tests/translator/output/function_with_alias_intrinsics.json b/tests/translator/output/function_with_alias_intrinsics.json index 507f8af00..ff9d4f032 100644 --- a/tests/translator/output/function_with_alias_intrinsics.json +++ b/tests/translator/output/function_with_alias_intrinsics.json @@ -8,6 +8,7 @@ "Resources": { "MinimalFunctionVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { diff --git a/tests/translator/output/function_with_custom_codedeploy_deployment_preference.json b/tests/translator/output/function_with_custom_codedeploy_deployment_preference.json index 7f9d9822d..613d9cd22 100644 --- a/tests/translator/output/function_with_custom_codedeploy_deployment_preference.json +++ b/tests/translator/output/function_with_custom_codedeploy_deployment_preference.json @@ -59,6 +59,7 @@ }, "CustomWithFindInMapVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { @@ -204,6 +205,7 @@ }, "CustomWithConditionVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { @@ -242,6 +244,7 @@ }, "CustomWithCondition2Version640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { @@ -303,6 +306,7 @@ }, "NormalWithRefVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { @@ -429,6 +433,7 @@ }, "CustomWithSubVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { @@ -591,6 +596,7 @@ }, "NormalWithSubVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { @@ -813,6 +819,7 @@ }, "MinimalFunctionVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { diff --git a/tests/translator/output/function_with_custom_conditional_codedeploy_deployment_preference.json b/tests/translator/output/function_with_custom_conditional_codedeploy_deployment_preference.json index 26a20afde..af2c9a26e 100644 --- a/tests/translator/output/function_with_custom_conditional_codedeploy_deployment_preference.json +++ b/tests/translator/output/function_with_custom_conditional_codedeploy_deployment_preference.json @@ -140,6 +140,7 @@ }, "HelloWorldFunctionVersionfb53d5c2e6": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { diff --git a/tests/translator/output/function_with_deployment_and_custom_role.json b/tests/translator/output/function_with_deployment_and_custom_role.json index 8ec847d9d..0556e17c7 100644 --- a/tests/translator/output/function_with_deployment_and_custom_role.json +++ b/tests/translator/output/function_with_deployment_and_custom_role.json @@ -102,6 +102,7 @@ }, "FunctionWithRoleVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { @@ -209,6 +210,7 @@ }, "MinimalFunctionVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { diff --git a/tests/translator/output/function_with_deployment_no_service_role.json b/tests/translator/output/function_with_deployment_no_service_role.json index ef9ed4aa6..77aa89664 100644 --- a/tests/translator/output/function_with_deployment_no_service_role.json +++ b/tests/translator/output/function_with_deployment_no_service_role.json @@ -86,6 +86,7 @@ }, "OtherFunctionVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { @@ -186,6 +187,7 @@ }, "MinimalFunctionVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { diff --git a/tests/translator/output/function_with_deployment_preference.json b/tests/translator/output/function_with_deployment_preference.json index e428000af..7c5db4cf9 100644 --- a/tests/translator/output/function_with_deployment_preference.json +++ b/tests/translator/output/function_with_deployment_preference.json @@ -146,6 +146,7 @@ }, "MinimalFunctionVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { diff --git a/tests/translator/output/function_with_deployment_preference_all_parameters.json b/tests/translator/output/function_with_deployment_preference_all_parameters.json index aff72299c..d1c34351d 100644 --- a/tests/translator/output/function_with_deployment_preference_all_parameters.json +++ b/tests/translator/output/function_with_deployment_preference_all_parameters.json @@ -205,6 +205,7 @@ }, "MinimalFunctionVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { diff --git a/tests/translator/output/function_with_deployment_preference_from_parameters.json b/tests/translator/output/function_with_deployment_preference_from_parameters.json index bba04a56a..e90e425da 100644 --- a/tests/translator/output/function_with_deployment_preference_from_parameters.json +++ b/tests/translator/output/function_with_deployment_preference_from_parameters.json @@ -219,6 +219,7 @@ }, "MinimalFunctionVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { diff --git a/tests/translator/output/function_with_deployment_preference_multiple_combinations.json b/tests/translator/output/function_with_deployment_preference_multiple_combinations.json index 2ac095373..54c08f7d1 100644 --- a/tests/translator/output/function_with_deployment_preference_multiple_combinations.json +++ b/tests/translator/output/function_with_deployment_preference_multiple_combinations.json @@ -188,6 +188,7 @@ }, "MinimalFunctionWithMinimalDeploymentPreferenceVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { @@ -303,6 +304,7 @@ }, "MinimalFunctionWithDeploymentPreferenceWithHooksAndAlarmsVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { @@ -376,6 +378,7 @@ }, "MinimalFunctionVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { diff --git a/tests/translator/output/function_with_disabled_deployment_preference.json b/tests/translator/output/function_with_disabled_deployment_preference.json index 47834b6e8..b71184c18 100644 --- a/tests/translator/output/function_with_disabled_deployment_preference.json +++ b/tests/translator/output/function_with_disabled_deployment_preference.json @@ -2,6 +2,7 @@ "Resources": { "MinimalFunctionVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { diff --git a/tests/translator/output/function_with_event_dest_basic.json b/tests/translator/output/function_with_event_dest_basic.json index e845f151f..e95ad601a 100644 --- a/tests/translator/output/function_with_event_dest_basic.json +++ b/tests/translator/output/function_with_event_dest_basic.json @@ -138,6 +138,7 @@ }, "MyTestFunctionVersiondaf9da458d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { diff --git a/tests/translator/output/function_with_layers.json b/tests/translator/output/function_with_layers.json index 9d660ef49..f2374838b 100644 --- a/tests/translator/output/function_with_layers.json +++ b/tests/translator/output/function_with_layers.json @@ -28,6 +28,7 @@ }, "MyLayera5167acaba": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::LayerVersion", "Properties": { "Content": { diff --git a/tests/translator/output/function_with_many_layers.json b/tests/translator/output/function_with_many_layers.json index 96e64d886..558723a19 100644 --- a/tests/translator/output/function_with_many_layers.json +++ b/tests/translator/output/function_with_many_layers.json @@ -2,6 +2,7 @@ "Resources": { "MyLayera5167acaba": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::LayerVersion", "Properties": { "Content": { diff --git a/tests/translator/output/function_with_resource_refs.json b/tests/translator/output/function_with_resource_refs.json index d331af50a..5c26d107f 100644 --- a/tests/translator/output/function_with_resource_refs.json +++ b/tests/translator/output/function_with_resource_refs.json @@ -159,6 +159,7 @@ }, "MinimalFunctionVersion640128d35d": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { diff --git a/tests/translator/output/globals_for_function.json b/tests/translator/output/globals_for_function.json index 6174a06d0..d8c904c13 100644 --- a/tests/translator/output/globals_for_function.json +++ b/tests/translator/output/globals_for_function.json @@ -223,6 +223,7 @@ }, "FunctionWithOverridesVersion096ed3b52b": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { @@ -232,6 +233,7 @@ }, "MinimalFunctionVersion0a06fc8fb1": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { diff --git a/tests/translator/output/layers_all_properties.json b/tests/translator/output/layers_all_properties.json index a99809489..41785d8b2 100644 --- a/tests/translator/output/layers_all_properties.json +++ b/tests/translator/output/layers_all_properties.json @@ -66,6 +66,7 @@ }, "MyLayerd04062b365": { "DeletionPolicy": "Delete", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::LayerVersion", "Properties": { "Content": { @@ -77,6 +78,7 @@ }, "MyLayerWithANamefda8c9ec8c": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::LayerVersion", "Properties": { "Content": { diff --git a/tests/translator/output/layers_with_intrinsics.json b/tests/translator/output/layers_with_intrinsics.json index 79e2dea55..9b71ef03c 100644 --- a/tests/translator/output/layers_with_intrinsics.json +++ b/tests/translator/output/layers_with_intrinsics.json @@ -15,6 +15,7 @@ "Resources": { "LayerWithNameIntrinsiccf8baed8b9": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::LayerVersion", "Properties": { "Content": { @@ -26,6 +27,7 @@ }, "LayerWithRefNameIntrinsicRegion32bf7198a5": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::LayerVersion", "Properties": { "Content": { @@ -37,6 +39,7 @@ }, "LayerWithSubNameIntrinsicRegiond71326de24": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::LayerVersion", "Properties": { "Content": { @@ -50,6 +53,7 @@ }, "LayerWithRuntimesIntrinsic1a006faa85": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::LayerVersion", "Properties": { "Content": { @@ -64,6 +68,7 @@ }, "LayerWithLicenseIntrinsic965c8d0c9b": { "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Type": "AWS::Lambda::LayerVersion", "Properties": { "Content": { @@ -77,6 +82,7 @@ "LayerWithSubNameIntrinsic6e9b477102": { "Type": "AWS::Lambda::LayerVersion", "DeletionPolicy": "Retain", + "UpdateReplacePolicy": "Delete", "Properties": { "Content": { "S3Bucket": "sam-demo-bucket",