Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/terraform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ env:
GITHUB_APP_INSTALLATION_ID: ${{ inputs.gh_app_installation_id || vars.GH_APP_INSTALLATION_ID }}
GITHUB_APP_PEM_FILE: ${{ secrets.gh_app_pem_file || secrets.GH_APP_PEM_FILE }}
TF_WORKSPACE: ${{ inputs.gh_owner || vars.GH_OWNER }}
TF_VAR_path: ../iac/${{ inputs.path || 'test.yaml' }}
TF_VAR_path: ${{ inputs.path && format('../iac/{0}', inputs.path) || '../test.yaml' }}

jobs:
terraform:
Expand All @@ -61,6 +61,7 @@ jobs:
repository: 'xebis/github-organization-as-code'

- name: Checkout caller YAML configuration
if: github.repository != 'xebis/github-organization-as-code'
uses: actions/checkout@v4
with:
path: iac
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Dotenv files
.env*

# Local .terraform directories
**/.terraform/*

Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ Defaults are the same as in the Terraform provider `github` resource `github_rep
Apply the configuration using Terraform:

```shell
# Environment variables
export AWS_REGION=<aws-region>
export AWS_ENDPOINT_URL_S3=<aws-endpoint-url-s3> # Only for non-AWS S3 compatible APIs
export AWS_ACCESS_KEY_ID=<aws-access-key-id>
Expand All @@ -209,8 +210,9 @@ export GITHUB_APP_INSTALLATION_ID=<app-installation-id>
export GITHUB_APP_PEM_FILE=$(cat <app-private-key.pem>)

export TF_WORKSPACE="$GITHUB_OWNER"
export TF_VAR_path="test.yaml"
export TF_VAR_path="../test.yaml"

# Terraform
terraform -chdir=terraform init
terraform -chdir=terraform plan
terraform -chdir=terraform apply
Expand Down