Last active
December 18, 2022 07:54
-
-
Save itsmunim/2812154b9ee3784edde1a59849a46115 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: apply-iac | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: setup-and-deployment | |
env: | |
SECRETHUB_CREDENTIAL: ${{ secrets.SECRETHUB_CREDENTIAL }} | |
run: | | |
# Setup secrethub cli & terraform | |
echo "deb [trusted=yes] https://apt.secrethub.io stable main" | sudo tee /etc/apt/sources.list.d/secrethub.sources.list | |
sudo apt-get update && sudo apt-get install -y secrethub-cli gnupg software-properties-common curl | |
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add - | |
sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | |
sudo apt-get update && sudo apt-get install terraform | |
terraform -version | |
# Then we apply the tf scripts | |
cd terraform/ | |
terraform init | |
terraform plan -out .terraform-plan | |
terraform apply .terraform-plan |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment