Skip to content

Commit 53b58ac

Browse files
author
Dharsan
authored
docs: update docs and rename location to region
2 parents 79d0102 + e9e0a49 commit 53b58ac

15 files changed

+33
-25
lines changed

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,14 @@ This reference architecture implementation uses Terraform. You will need to do t
109109
terraform plan
110110
terraform apply
111111
```
112+
> If you're recreating the reference architecture and facing the issue of `WorkloadIdentityPool already exists`,
113+
> please run the following commands to import workload identity pools and workload identity pool provider
114+
> ```shell
115+
> gcloud iam workload-identity-pools undelete humanitec-wif-pool --location=global
116+
> gcloud iam workload-identity-pools providers undelete humanitec-wif --workload-identity-pool=humanitec-wif-pool --location=global
117+
> terraform import module.base.module.credentials.google_iam_workload_identity_pool.pool humanitec-wif-pool
118+
> terraform import module.base.module.credentials.google_iam_workload_identity_pool_provider.pool_provider humanitec-wif-pool/humanitec-wif
119+
> ```
112120
113121
#### Required input variables
114122
@@ -257,7 +265,7 @@ Once you are finished with the reference architecture, you can remove all provis
257265
258266
| Name | Description | Type | Default | Required |
259267
|------|-------------|------|---------|:--------:|
260-
| gar\_repository\_location | Location of the Google Artifact Registry repository, | `string` | n/a | yes |
268+
| gar\_repository\_region | Region of the Google Artifact Registry repository, | `string` | n/a | yes |
261269
| project\_id | GCP Project ID to provision resources in. | `string` | n/a | yes |
262270
| region | GCP Region to provision resources in. | `string` | n/a | yes |
263271
| gar\_repository\_id | Google Artifact Registry repository ID. | `string` | `"htc-ref-arch"` | no |

main.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ module "base" {
77
humanitec_prefix = var.humanitec_prefix
88
humanitec_org_id = var.humanitec_org_id
99

10-
gar_repository_id = var.gar_repository_id
11-
gar_repository_location = var.gar_repository_location
10+
gar_repository_id = var.gar_repository_id
11+
gar_repository_region = var.gar_repository_region
1212
}
1313

1414
# User used for scaffolding and deploying apps
@@ -40,7 +40,7 @@ module "github" {
4040
project_id = var.project_id
4141
github_org_id = var.github_org_id
4242
gar_repository_id = var.gar_repository_id
43-
gar_repository_location = var.gar_repository_location
43+
gar_repository_region = var.gar_repository_region
4444

4545
depends_on = [module.base]
4646
}

modules/base/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
| project\_id | GCP Project ID to provision resources in. | `string` | n/a | yes |
3636
| region | GCP Region to provision resources in. | `string` | n/a | yes |
3737
| gar\_repository\_id | ID of the Google Artifact Registry repository (not created if empty). | `string` | `null` | no |
38-
| gar\_repository\_location | Location of the Google Artifact Registry repository (required when gar\_repository\_id is set). | `string` | `null` | no |
38+
| gar\_repository\_region | Region of the Google Artifact Registry repository (required when gar\_repository\_id is set). | `string` | `null` | no |
3939
| gke\_autopilot | Whether GKE Autopilot should be used | `bool` | `true` | no |
4040
| gke\_cluster\_name | The name of the GKE Cluster. Must be unique within the project. | `string` | `"htc-ref-arch-cluster"` | no |
4141
| gke\_subnet\_name | The name of the subnet to allocate IPs for the GKE Cluster from. If vpc\_subnet is set, this must be updated. | `string` | `"htc-ref-arch-subnet"` | no |

modules/base/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ module "k8s" {
4040
vpc_name = var.vpc_name
4141
enable_autopilot = var.gke_autopilot
4242

43-
gar_repository_id = var.gar_repository_id
44-
gar_repository_location = var.gar_repository_location
43+
gar_repository_id = var.gar_repository_id
44+
gar_repository_region = var.gar_repository_region
4545
}
4646

4747
# ######################################################################

modules/base/terraform.tfvars.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
# ID of the Google Artifact Registry repository (not created if empty).
33
gar_repository_id = ""
44

5-
# Location of the Google Artifact Registry repository (required when gar_repository_id is set).
6-
gar_repository_location = ""
5+
# Region of the Google Artifact Registry repository (required when gar_repository_id is set).
6+
gar_repository_region = ""
77

88
# Whether GKE Autopilot should be used
99
gke_autopilot = true

modules/base/variables.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ variable "gar_repository_id" {
9595
default = null
9696
}
9797

98-
variable "gar_repository_location" {
98+
variable "gar_repository_region" {
9999
type = string
100-
description = "Location of the Google Artifact Registry repository (required when gar_repository_id is set)."
100+
description = "Region of the Google Artifact Registry repository (required when gar_repository_id is set)."
101101
default = null
102102
}

modules/github/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
| Name | Description | Type | Default | Required |
4343
|------|-------------|------|---------|:--------:|
4444
| gar\_repository\_id | Google Artifact Registry repository ID. | `string` | n/a | yes |
45-
| gar\_repository\_location | Location of the Google Artifact Registry repository. | `string` | n/a | yes |
45+
| gar\_repository\_region | Region of the Google Artifact Registry repository. | `string` | n/a | yes |
4646
| github\_org\_id | GitHub org id | `string` | n/a | yes |
4747
| humanitec\_ci\_service\_user\_token | Humanitec CI Service User Token | `string` | n/a | yes |
4848
| humanitec\_org\_id | Humanitec Organization ID. | `string` | n/a | yes |

modules/github/gcp.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ resource "google_service_account" "sa" {
4242
# Reference https://cloud.google.com/artifact-registry/docs/access-control#roles
4343
resource "google_artifact_registry_repository_iam_member" "gha_gar_containers_writer" {
4444
project = var.project_id
45-
location = var.gar_repository_location
45+
location = var.gar_repository_region
4646
repository = var.gar_repository_id
4747
role = "roles/artifactregistry.writer"
4848
member = "serviceAccount:${google_service_account.sa.email}"

modules/github/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
locals {
22
cloud_provider = "gcp"
33

4-
repository_host = "${var.gar_repository_location}-docker.pkg.dev"
4+
repository_host = "${var.gar_repository_region}-docker.pkg.dev"
55
repository_name = "${local.repository_host}/${var.project_id}/${var.gar_repository_id}"
66
}
77

modules/github/terraform.tfvars.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
# Google Artifact Registry repository ID.
33
gar_repository_id = ""
44

5-
# Location of the Google Artifact Registry repository.
6-
gar_repository_location = ""
5+
# Region of the Google Artifact Registry repository.
6+
gar_repository_region = ""
77

88
# GitHub org id
99
github_org_id = ""

0 commit comments

Comments
 (0)