From adadef013dc16cf2cb343a707cc2075951038b77 Mon Sep 17 00:00:00 2001 From: Abraham Montoya Date: Mon, 10 Jun 2024 12:21:52 -0700 Subject: [PATCH] ci: add app runner resource --- template.yml | 80 ++++++++++++++++++++++++++-------------------------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/template.yml b/template.yml index 08f8303..54bff39 100644 --- a/template.yml +++ b/template.yml @@ -82,46 +82,46 @@ Resources: VpcConnectorName: !Sub "${Project}-${Stage}" - # AppRunnerService: - # Type: AWS::AppRunner::Service - # Properties: - # ServiceName: !Sub "stori-api-app-runner" - # NetworkConfiguration: - # EgressConfiguration: - # EgressType: VPC - # VpcConnectorArn: !Ref AppRunnerVPCConnector - # SourceConfiguration: - # AuthenticationConfiguration: - # ConnectionArn: !Ref AppRunnerConnectionArn - # AutoDeploymentsEnabled: true - # CodeRepository: - # RepositoryUrl: "https://github.com/montoyaobeso/transactions-email-generator" - # SourceCodeVersion: - # Type: BRANCH - # Value: !Ref Stage - # CodeConfiguration: - # ConfigurationSource: API - # CodeConfigurationValues: - # Runtime: PYTHON_3 - # BuildCommand: "pip install -r requirements.txt" - # StartCommand: "python server.py" - # Port: 8080 - # RuntimeEnvironmentVariables: - # - - # Name: BUCKET_NAME - # Value: !Ref BucketName - # - - # Name: SECRET_NAME - # Value: !Ref SecretName - # - - # Name: STAGE - # Value: !Ref Stage - # - - # Name: PORT - # Value: 8080 - # InstanceConfiguration: - # Cpu: 1 vCPU - # Memory: 2 GB + AppRunnerService: + Type: AWS::AppRunner::Service + Properties: + ServiceName: !Sub "stori-api-app-runner" + NetworkConfiguration: + EgressConfiguration: + EgressType: VPC + VpcConnectorArn: !Ref AppRunnerVPCConnector + SourceConfiguration: + AuthenticationConfiguration: + ConnectionArn: !Ref AppRunnerConnectionArn + AutoDeploymentsEnabled: true + CodeRepository: + RepositoryUrl: "https://github.com/montoyaobeso/transactions-email-generator" + SourceCodeVersion: + Type: BRANCH + Value: !Ref Stage + CodeConfiguration: + ConfigurationSource: API + CodeConfigurationValues: + Runtime: PYTHON_3 + BuildCommand: "pip install -r requirements.txt" + StartCommand: "python server.py" + Port: 8080 + RuntimeEnvironmentVariables: + - + Name: BUCKET_NAME + Value: !Ref BucketName + - + Name: SECRET_NAME + Value: !Ref SecretName + - + Name: STAGE + Value: !Ref Stage + - + Name: PORT + Value: 8080 + InstanceConfiguration: + Cpu: 1 vCPU + Memory: 2 GB Outputs: ApiUrl: