Skip to content

Commit

Permalink
Update deploy-d2ec2.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoDiazL authored Jan 8, 2024
1 parent 0af0ffb commit d2e79ed
Showing 1 changed file with 28 additions and 42 deletions.
70 changes: 28 additions & 42 deletions .github/workflows/deploy-d2ec2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,60 +15,46 @@ env:
jobs:
deploy:
runs-on: ubuntu-latest
#runs-on: self-hosted
#environment:
# name: ${{ github.ref_name }}
# url: ${{ steps.deploy.outputs.lb_url }}
# #
steps:
- id: efs
uses: bitovi/[email protected]
with:
aws_access_key_id: ${{ env.AWS_KEY_ID }}
aws_secret_access_key: ${{ env.AWS_ACCESS_KEY }}
aws_default_region: ${{ env.AWS_REGION }}
tf_state_file_name_append: ${{ github.action }}${{ env.ENVIRONMENT }}
aws_efs_create_mount_target: true
aws_efs_create_ha: false
aws_vpc_availability_zones: ${{ env.AWS_AZ }}
tf_stack_destroy: ${{ env.STACK_DESTROY }}

- id: rds
uses: bitovi/[email protected]
with:
aws_access_key_id: ${{ env.AWS_KEY_ID }}
aws_secret_access_key: ${{ env.AWS_ACCESS_KEY }}
aws_default_region: ${{ env.AWS_REGION }}
tf_state_file_name_append: ${{ github.action }}${{ env.ENVIRONMENT }}
aws_vpc_availability_zones: ${{ env.AWS_AZ }}
aws_vpc_id: ${{ steps.efs.outputs.aws_vpc_id }}
tf_stack_destroy: ${{ env.STACK_DESTROY }}

- id: ec2
uses: bitovi/github-actions-deploy-docker-to-ec2@efs-bump
uses: bitovi/github-actions-deploy-docker-to-ec2@v1.0.1
with:
aws_access_key_id: ${{ env.AWS_KEY_ID }}
aws_secret_access_key: ${{ env.AWS_ACCESS_KEY }}
aws_default_region: ${{ env.AWS_REGION }}
#aws_elb_app_port: 3000
aws_elb_app_port: 3000
aws_ec2_instance_type: t3.small
aws_elb_create: false
tf_state_bucket_destroy: true
tf_state_file_name_append: ${{ github.action }}${{ env.ENVIRONMENT }}
#aws_efs_fs_id: ${{ steps.efs.outputs.aws_efs_fs_id }}
#aws_efs_create_mount_target: false
#aws_vpc_id: ${{ steps.efs.outputs.aws_vpc_id }}
#env_aws_secret: ${{ steps.rds.outputs.db_secret_details_name }}
aws_efs_fs_id: ${{ steps.efs.outputs.aws_efs_fs_id }}
aws_efs_create_mount_target: false
env_aws_secret: ${{ steps.rds.outputs.db_secret_details_name }}
aws_vpc_availability_zones: ${{ env.AWS_AZ }}
tf_stack_destroy: ${{ env.STACK_DESTROY }}
aws_vpc_create: true
aws_vpc_enable_nat_gateway: true
aws_vpc_single_nat_gateway: true
aws_ec2_instance_public_ip: true
ansible_skip: false

# - id: efs
# uses: bitovi/github-actions-deploy-efs-volume@initial-branch
# with:
# aws_access_key_id: ${{ env.AWS_KEY_ID }}
# aws_secret_access_key: ${{ env.AWS_ACCESS_KEY }}
# aws_default_region: ${{ env.AWS_REGION }}
# tf_state_file_name_append: ${{ github.action }}${{ env.ENVIRONMENT }}
# aws_efs_create_mount_target: true
# aws_efs_create_ha: false
# #aws_vpc_create: true
# aws_vpc_availability_zones: ${{ env.AWS_AZ }}
# tf_stack_destroy: ${{ env.STACK_DESTROY }}

#- id: rds
# uses: bitovi/[email protected]
# with:
# aws_access_key_id: ${{ env.AWS_KEY_ID }}
# aws_secret_access_key: ${{ env.AWS_ACCESS_KEY }}
# aws_default_region: ${{ env.AWS_REGION }}
# tf_state_file_name_append: ${{ github.action }}${{ env.ENVIRONMENT }}
# aws_vpc_availability_zones: ${{ env.AWS_AZ }}
# aws_vpc_id: ${{ steps.efs.outputs.aws_vpc_id }}
# #tf_stack_destroy: ${{ env.STACK_DESTROY }}
# tf_stack_destroy: true


# We can use this to set the location of the files based on the path
# docker_repo_app_directory: ${{ env.ENVIRONMENT }}

0 comments on commit d2e79ed

Please sign in to comment.