Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update #1

Merged
merged 6 commits into from
Sep 25, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup Terraform
uses: hashicorp/setup-terraform@v1
with:
terraform_version: 1.0.0
terraform_version: 1.5.2

- name: Terraform Fmt
id: fmt
Expand Down
106 changes: 63 additions & 43 deletions .terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ See references below for more information about Workload Identity Federation for

## Usage

The following example creates a new GCP service account and IAM role for each environment in the repository `rickardl/teliacompany-gcp-wif-test`. The service account is assigned the built-in IAM roles `roles/compute.networkAdmin` and `roles/appengine.appAdmin` for the project `seismic-shape-293115` in the environment `development`.
The following example creates a new GCP service account and IAM role for each environment in the repository `teliacompany-gcp-wif-test`. The service account is assigned the built-in IAM roles `roles/compute.networkAdmin` and `roles/appengine.appAdmin` for the project `seismic-shape-293115` in the environment `development`.

```hcl
module "gha_repo1" {
Expand All @@ -37,7 +37,7 @@ module "gha_repo1" {

repositories = [
{
repository_name = "rickardl/teliacompany-gcp-wif-test"
repository_name = "teliacompany-gcp-wif-test"
environments = [
{
environment = "development"
Expand Down Expand Up @@ -72,9 +72,9 @@ Please see the [examples](./examples) directory for examples of how to use this

| Name | Version |
| ---------------------------------------------------------- | ------- |
| <a name="provider_github"></a> [github](#provider\_github) | 5.21.1 |
| <a name="provider_google"></a> [google](#provider\_google) | 4.60.2 |
| <a name="provider_random"></a> [random](#provider\_random) | ~>3.4 |
| <a name="provider_github"></a> [github](#provider\_github) | 5.37.0 |
| <a name="provider_google"></a> [google](#provider\_google) | 4.83.0 |
| <a name="provider_random"></a> [random](#provider\_random) | 3.5.1 |

## Modules

Expand Down
115 changes: 58 additions & 57 deletions examples/basic/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions examples/basic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@ This example demonstrates the basic usage of the `terraform-gcp-github-actions-w

> **NOTE:** This example uses the `terraform-gcp-github-actions-wif` module from the root of the repository. In a real-world scenario, you would use the module from the [Terraform Registry](https://registry.terraform.io/modules/telia-oss/terraform-gcp-github-actions-wif).

> **NOTE:** You need to set the owner attribute in the Github provider block. [Docs](https://registry.terraform.io/providers/integrations/github/latest/docs#owner)

## Usage

1. Run `terraform init` to initialize the Terraform working directory.
2. Run `terraform apply` to create the resources.
3. Verify the resources created by checking the output values.
2. Run `export GITHUB_TOKEN=$(gh auth token)` to set the Github Token (You need the Github CLI for this)
3. Run `terraform apply` to create the resources.
4. Verify the resources created by checking the output values.

## Inputs

Expand Down
Loading
Loading