Skip to content

Commit 9b36644

Browse files
fix: revert README changes, shorten variable description
Move migration docs to public Ona documentation instead of the module README. Shorten the variable description to one sentence. Co-authored-by: Ona <no-reply@ona.com>
1 parent 2bbff32 commit 9b36644

2 files changed

Lines changed: 1 addition & 42 deletions

File tree

README.md

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -26,47 +26,6 @@ for setup instructions, configuration options, and troubleshooting.
2626
The [`runner-with-networking`](./examples/runner-with-networking/) example
2727
provides a full infrastructure setup including VPC, DNS, and certificates.
2828

29-
## Project Metadata Mode
30-
31-
By default this module uses `google_compute_project_metadata` (authoritative),
32-
which manages **all** project-level metadata. Any metadata keys not declared in
33-
this module will be removed on `terraform apply`.
34-
35-
If other systems or Terraform modules manage project metadata in the same GCP
36-
project, set `use_authoritative_project_metadata = false` to switch to per-key
37-
`google_compute_project_metadata_item` resources. This only manages the keys
38-
the module needs (`enable-oslogin`, `gitpod-runner-id`) and leaves everything
39-
else untouched.
40-
41-
```hcl
42-
module "runner" {
43-
source = "gitpod-io/ona-runner/google"
44-
# ...
45-
use_authoritative_project_metadata = false
46-
}
47-
```
48-
49-
### Migrating an existing deployment to per-key metadata
50-
51-
Switching an existing deployment from authoritative to per-key requires a state
52-
migration. Without it, Terraform will try to destroy the old resource and create
53-
the new ones, which can fail or cause a brief metadata gap.
54-
55-
```bash
56-
# 1. Remove the old authoritative resource from state
57-
terraform state rm 'module.runner.google_compute_project_metadata.runner_metadata'
58-
59-
# 2. Import the individual keys into the new resources
60-
terraform import 'module.runner.google_compute_project_metadata_item.enable_oslogin[0]' 'projects/<PROJECT_ID>/enable-oslogin'
61-
terraform import 'module.runner.google_compute_project_metadata_item.runner_id[0]' 'projects/<PROJECT_ID>/gitpod-runner-id'
62-
63-
# 3. Apply — should show no changes
64-
terraform apply
65-
```
66-
67-
Replace `<PROJECT_ID>` with your GCP project ID and adjust the module path if
68-
your module block uses a different name.
69-
7029
## Releases
7130

7231
New stable releases are published roughly once a week. To get notified when a

variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ variable "enable_agents" {
338338
}
339339

340340
variable "use_authoritative_project_metadata" {
341-
description = "Use authoritative google_compute_project_metadata (true) or per-key google_compute_project_metadata_item (false). The authoritative resource manages ALL project metadata — keys not listed in this module will be removed. Set to false if other systems or Terraform modules manage project metadata in the same project. Switching from true to false on an existing deployment requires state migration (see README)."
341+
description = "When true (default), uses authoritative google_compute_project_metadata which manages all project metadata. Set to false to use per-key metadata items that leave other project metadata untouched."
342342
type = bool
343343
default = true
344344
}

0 commit comments

Comments
 (0)