Skip to content

Commit 4841a8f

Browse files
authored
Temporarily remove verify until inspec uses googleauth libraries that support WIF (#68)
1 parent cc6d566 commit 4841a8f

File tree

3 files changed

+44
-6
lines changed

3 files changed

+44
-6
lines changed

.github/workflows/kitchen-terraform.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,11 @@ jobs:
4545
with:
4646
kitchen-command: converge
4747

48-
- name: Verify
49-
uses: osinfra-io/github-kitchen-terraform-action@v1.3.1
50-
with:
51-
kitchen-command: verify
48+
# No support for WIF: https://github.com/inspec/inspec-gcp/issues/437
49+
# - name: Verify
50+
# uses: osinfra-io/github-kitchen-terraform-action@v1.3.1
51+
# with:
52+
# kitchen-command: verify
5253

5354
- name: Destroy
5455
if: ${{ github.ref == 'refs/heads/main' }}

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ repos:
1111
- id: no-commit-to-branch
1212

1313
- repo: https://github.com/antonbabenko/pre-commit-terraform
14-
rev: v1.77.1
14+
rev: v1.77.2
1515
hooks:
1616
- id: terraform_fmt
1717
- id: terraform_validate

README.md

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ Rather than copying and pasting from one workflow to another, you can make workf
2525
### Workflows
2626

2727
- [plan-and-apply.yml](.github/workflows/plan-and-apply.yml)
28+
- [kitchen-terraform.yml](.github/workflows/kitchen-terraform.yml)
2829

29-
### Usage
30+
### Plan and Apply Usage
3031

3132
You can check the [.github/workflows](.github/workflows/) directory for example configurations ([sandbox.yml](.github/workflows/sandbox.yml), [non-production.yml](.github/workflows/non-production.yml), [production.yml](.github/workflows/production.yml)). These set up the system for the testing process by providing it with all the necessary code to initialize it, thus creating good examples to base your configuration on.
3233

@@ -71,3 +72,39 @@ jobs:
7172
infracost_api_key: ${{ secrets.INFRACOST_API_KEY }}
7273
terraform_plan_secret_args: -var="billing_account=${{ secrets.BILLING_ACCOUNT }}"
7374
```
75+
76+
### Kitchen-Terraform Usage
77+
78+
Here is an example of a basic configuration:
79+
80+
```yaml
81+
name: Kitchen Tests
82+
83+
on:
84+
workflow_dispatch:
85+
pull_request:
86+
types:
87+
- opened
88+
- synchronize
89+
paths-ignore:
90+
- "**.md"
91+
92+
# For reusable workflows, the permissions setting for id-token should be set to write at the
93+
# caller workflow level or in the specific job that calls the reusable workflow.
94+
95+
permissions:
96+
id-token: write
97+
98+
jobs:
99+
kitchen_terraform:
100+
name: "Kitchen-Terraform"
101+
uses: osinfra-io/github-terraform-gcp-called-workflows/.github/workflows/kitchen-terraform.yml@v0.0.0
102+
if: github.actor != 'dependabot[bot]'
103+
104+
with:
105+
service_account: example@example-project-sb.iam.gserviceaccount.com
106+
workload_identity_provider: projects/123456789876/locations/global/workloadIdentityPools/github-actions/providers/github-actions-oidc
107+
108+
secrets:
109+
billing_account: ${{ secrets.BILLING_ACCOUNT }}
110+
```

0 commit comments

Comments
 (0)