Skip to content
This repository has been archived by the owner on Dec 20, 2024. It is now read-only.

Commit

Permalink
feat:add oicd to ci job
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurHodot authored and Thomas de Lachaux committed Sep 22, 2023
1 parent b7f009f commit 7fc981b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
21 changes: 14 additions & 7 deletions .github/workflows/terratest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,29 @@ on:

env:
TEST_WORKDIR: Monday
GCP_PROJECT_ID: padok-lab
GCP_PROJECT_NUMBER: "1016915073978"
GCP_SERVICE_ACCOUNT: "enabler-padok-lab-sa"

jobs:
test:
strategy:
matrix:
terratestTarget: [basic, gke]
terratestTarget: [basic]
runs-on: ubuntu-latest
permissions:
contents: "read"
id-token: "write"
steps:
- name: Checkout code
uses: actions/checkout@v2
# - name: Check for terratestExample folder
# run: |
# if [ ! -d "terratestExample" ]; then
# echo "terratestExample folder not found, exiting..."
# exit 1
# fi
- name: Authenticate to Google Cloud
id: auth
uses: google-github-actions/auth@v1
with:
token_format: "access_token"
workload_identity_provider: "projects/${{ env.GCP_PROJECT_NUMBER }}/locations/global/workloadIdentityPools/identity-pool-padok-lab/providers/identity-provider-padok-lab"
service_account: "${{ env.GCP_SERVICE_ACCOUNT }}@${{ env.GCP_PROJECT_ID }}.iam.gserviceaccount.com"
- name: Set up Go
uses: actions/setup-go@v3
- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions examples/basic/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ module "basic" {
#checkov:skip=CKV_GCP_76: cannot enforce IPV6 private access using Google's VPC module
source = "../.."

name = "testing"
project_id = "padok-library-gcp-host"
name = "testing-terratest"
project_id = "padok-lab"

nats = {
"europe-west1" = {
Expand Down

0 comments on commit 7fc981b

Please sign in to comment.