Skip to content

Commit

Permalink
add deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
franklinfoko committed Apr 1, 2024
1 parent 2a5f846 commit 0b4d01f
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: "Terraform Cloud Deploy "

on:
push:
branches:
- main


env:
TF_API_TOKEN: "${{ secrets.TF_API_TOKEN }}"
TF_API_URL: "app.terraform.io"
CONFIG_DIRECTORY: "./labs-17"

jobs:
terraform:
runs-on: ubuntu-latest

steps:
- name: Checkout le code
uses: actions/checkout@v2

- name: Set up Terraform CLI
uses: hashicorp/setup-terraform@v1
with:
terraform_version: 1.6.6 # Modifiez en fonction de la version souhaitée

- name: Configure Terraform Cloud
run: |
echo "credentials \"$TF_API_URL\" {" >> ~/.terraformrc
echo " token = \"${{ secrets.TF_TOKEN }}\"" >> ~/.terraformrc
echo "}" >> ~/.terraformrc
- name: Initialize Terraform
run: |
ls
terraform init
- name: Terraform plan
run: |
terraform plan -out=tfplan

0 comments on commit 0b4d01f

Please sign in to comment.