From 6fd228f2565f05df0cd8443be1d7f9026d7a1a57 Mon Sep 17 00:00:00 2001 From: Chris Pates Date: Thu, 4 Jan 2024 12:56:03 +0000 Subject: [PATCH] improve testing for singleStack - unnamed function --- cicd/cloudformation/testing.yaml | 20 +++++++++++++++---- .../singlestack/unnamedfunction.yml | 13 +++++------- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/cicd/cloudformation/testing.yaml b/cicd/cloudformation/testing.yaml index c5527bf..b13b6af 100644 --- a/cicd/cloudformation/testing.yaml +++ b/cicd/cloudformation/testing.yaml @@ -21,7 +21,7 @@ Parameters: - Delegated - NonDelegated DelegatedAccount: - Description: The test account type + Description: The account id of the account setup as delegated admin Default: "622987834645" Type: String DelegatedBucket: @@ -42,6 +42,7 @@ Metadata: - TestAccount - Label: default: Delegated Account + description: Only required for when deploying in the management account Parameters: - DelegatedAccount - DelegatedBucket @@ -483,6 +484,19 @@ Resources: - Name: ExecuteSingleStack InputArtifacts: - Name: Tests + - Name: RemoveStack + ActionTypeId: + Category: Deploy + Owner: AWS + Version: 1 + Provider: CloudFormation + Configuration: + ActionMode: DELETE_ONLY + StackName: TestSingleStack + RoleArn: !GetAtt [CloudFormationDeployerRole, Arn] + InputArtifacts: + - Name: Tests + RunOrder: 3 - Name: UnNamedFunction Actions: - Name: Deploy @@ -501,8 +515,6 @@ Resources: InputArtifacts: - Name: Tests RunOrder: 1 - - Name: CleanUp - Actions: - Name: RemoveStack ActionTypeId: Category: Deploy @@ -515,7 +527,7 @@ Resources: RoleArn: !GetAtt [CloudFormationDeployerRole, Arn] InputArtifacts: - Name: Tests - RunOrder: 1 + RunOrder: 2 CodePipelineSplitStack: Type: AWS::CodePipeline::Pipeline diff --git a/cicd/deploy_patterns/singlestack/unnamedfunction.yml b/cicd/deploy_patterns/singlestack/unnamedfunction.yml index 57f2205..cf534b5 100644 --- a/cicd/deploy_patterns/singlestack/unnamedfunction.yml +++ b/cicd/deploy_patterns/singlestack/unnamedfunction.yml @@ -76,13 +76,10 @@ Resources: LogFormat: json Outputs: - FunctionArn: - Condition: OutputFunction + SSOSyncArn: Description: "The Arn of the deployed lambda function" - Value: - Fn::GetAtt: - - SARApp - - Outputs.FunctionArn - Export: - Name: FunctionARN + Value: + Fn::GetAtt: + - SARApp + - Outputs.FunctionArn