Skip to content

Commit

Permalink
cd: efs
Browse files Browse the repository at this point in the history
  • Loading branch information
hei-teacher committed Dec 12, 2023
1 parent 6c5c297 commit 4c970b1
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,10 @@ jobs:
- name: Deploy storage database stack
uses: aws-actions/aws-cloudformation-github-deploy@v1
with:
# TODO: -storage- --> -database-. But it will BREAK backward compatibility.
name: ${{ github.ref_name }}-storage-poja-base
template: cf-stacks/storage-database-stack.yml
name: ${{ github.ref_name }}-efs-poja-base
template: cf-stacks/storage-efs-stack.yml
tags: "[ { \"Key\": \"app\", \"Value\": \"poja-base\" }, { \"Key\": \"env\", \"Value\": \"${{ github.ref_name }}\" } ]"
capabilities: CAPABILITY_NAMED_IAM
no-fail-on-empty-changeset: "1"
parameter-overrides:
"Env=${{ github.ref_name }},
ProdDbClusterTimeout=${{ vars.PROD_DB_CLUSTER_TIMEOUT }}"
"Env=${{ github.ref_name }}"
26 changes: 26 additions & 0 deletions cf-stacks/storage-efs-stack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
AWSTemplateFormatVersion: 2010-09-09
Description: poja-base - Storage EFS

Parameters:
Env:
Type: String

Conditions:
IsProdEnv: !Equals
- !Ref Env
- 'prod'

Resources:
Filesystem:
Type: AWS::EFS::FileSystem

FilesystemSSM:
Type: AWS::SSM::Parameter
Properties:
Name: !Join [ '', [ /poja-base/, !Ref Env, /efs/id ] ]
Type: String
Value: !Ref FileSystem

Outputs:
DatabaseClusterSSM:
Value: !GetAtt FilesystemSSM.Value

0 comments on commit 4c970b1

Please sign in to comment.