language: python

python: 3.6

script: 
    - "python main.py"
    - "./plan.sh"

before_deploy:
    - "./build.sh"
    - curl -fSL "https://releases.hashicorp.com/terraform/0.10.2/terraform_0.10.2_linux_amd64.zip" -o terraform.zip
    - sudo unzip terraform.zip -d /opt/terraform
    - sudo ln -s /opt/terraform/terraform /usr/bin/terraform
    - rm -f terraform.zip

deploy:
    provider: lambda
    handler_name: "handler"
    module_name: "main"
    runtime: "python3.6"
    region: "us-east-1"
    function_name: "continuous_lambda"
    zip: lambda.zip
    publish: true
    role: "arn:aws:iam::578594301922:role/continuous_lambda_role"
    secret_access_key: $AWS_SECRET_ACCESS_KEY
    access_key_id: $AWS_ACCESS_KEY_ID

language: python

python: 3.6

before_install:
    - curl -fSL "https://releases.hashicorp.com/terraform/0.10.2/terraform_0.10.2_linux_amd64.zip" -o terraform.zip
    - sudo unzip terraform.zip -d /opt/terraform
    - sudo ln -s /opt/terraform/terraform /usr/bin/terraform
    - rm -f terraform.zip

script: 
    - "python main.py"
    - "./plan.sh"

before_deploy:
    - "./build.sh"

deploy:
    provider: lambda
    handler_name: "handler"
    module_name: "main"
    runtime: "python3.6"
    region: "us-east-1"
    function_name: "continuous_lambda"
    zip: lambda.zip
    publish: true
    role: "arn:aws:iam::578594301922:role/continuous_lambda_role"
    secret_access_key: $AWS_SECRET_ACCESS_KEY
    access_key_id: $AWS_ACCESS_KEY_ID

Move terraform installation to another stage
Move terraform installation to another stage
