Skip to content

Commit

Permalink
chase tf project into vpn directory
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismarget-j committed Aug 13, 2023
1 parent 334a45f commit 44228fd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 39 deletions.
39 changes: 3 additions & 36 deletions .github/workflows/terraform_merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,43 +29,10 @@ jobs:
terraform_version: 1.5.5

- name: Terraform Init
run: terraform init
run: cd vpn && terraform init

- id: apply
name: Terraform Apply
run: |
terraform apply -no-color --auto-approve
terraform apply -no-color --auto-approve
# - name: Update PR
# uses: actions/github-script@v6
# id: plan-comment
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# script: |
# const { data: comments } = await github.rest.issues.listComments({
# owner: context.repo.owner,
# repo: context.repo.repo,
# issue_number: context.issue.number,
# });
# const botComment = comments.find(comment => {
# return comment.user.type === 'Bot' && comment.body.includes('Terraform Plan Output')
# });
# const output = `#### Terraform Plan Output
# \`\`\`
# ${{ steps.plan.outputs.stdout }}
# \`\`\`
# `;
# if (botComment) {
# github.rest.issues.deleteComment({
# owner: context.repo.owner,
# repo: context.repo.repo,
# comment_id: botComment.id,
# });
# }
# github.rest.issues.createComment({
# issue_number: context.issue.number,
# owner: context.repo.owner,
# repo: context.repo.repo,
# body: output
# });
cd vpn && terraform apply -no-color --auto-approve
cd vpn && terraform apply -no-color --auto-approve
6 changes: 3 additions & 3 deletions .github/workflows/terraform_pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ jobs:
terraform_version: 1.5.5

- name: Terraform Init
run: terraform init
run: cd vpn && terraform init

- name: Terraform Validate
run: terraform validate
run: cd vpn && terraform validate

- id: plan
name: Terraform Plan
run: terraform plan -no-color
run: cd vpn && terraform plan -no-color

- name: Update PR
uses: actions/github-script@v6
Expand Down

0 comments on commit 44228fd

Please sign in to comment.