Skip to content

Create AWS Environment #36

Create AWS Environment

Create AWS Environment #36

Workflow file for this run

name: Create AWS Environment
on:
workflow_dispatch:
jobs:
create_aws_env:
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
runs-on: ubuntu-latest # runner
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- name: Get current time
uses: gerred/actions/current-time@master
id: current-time
- name: Setup Terraform
uses: hashicorp/setup-terraform@v2
with:
terraform_version: 1.1.8
- name: Create AWS credentials files
run: sh ./scripts/aws/create_files.sh
- name: Initialize terraform
run: sh ./scripts/terraform/init.sh
- name: Create AWS infrastructure
run: TF_VAR_instance=t3a.xlarge sh ./scripts/terraform/apply.sh
- name: Generate deployment package
run: zip -r deploy.zip . docker-compose.yml
- name: Deploy to EB
uses: einaregilsson/beanstalk-deploy@v20
with:
aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
application_name: suitecrm-demo
environment_name: suitecrm-demo
version_label: ${{ steps.current-time.outputs.time }}
region: eu-central-1
deployment_package: deploy.zip