Skip to content

Commit 60c3c83

Browse files
Android Build Filesystem (ABFS) Teamsce-taid
authored andcommitted
adding an example tfvars file and improving variables.tf
PiperOrigin-RevId: 787483967
1 parent 6c00ddb commit 60c3c83

File tree

2 files changed

+85
-4
lines changed

2 files changed

+85
-4
lines changed
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Copyright 2025 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
project_id = "YOUR_PROJECT_ID"
16+
region = "europe-west1"
17+
zone = "europe-west1-c"
18+
19+
# If you don't need private access to Artifact Registry, set this to false.
20+
#create_dns_zones = false
21+
22+
# if unset will create a new service account
23+
# if set, will use the specified service account
24+
#abfs_service_account_id = "YOUR_EXISTING_SERVICE_ACCOUNT_ID"
25+
26+
# run terraform apply first
27+
# submit the output through the allow-listing form
28+
# then insert the license here and run terraform apply again
29+
#abfs_license = "INSERT_YOUR_LICENSE_HERE"
30+
31+
abfs_docker_image_uri = "europe-docker.pkg.dev/abfs-binaries/abfs-containers-alpha/abfs-alpha:latest"
32+
33+
abfs_server_machine_type = "n2d-standard-48"
34+
35+
# If you want to enable Git LFS support, set this to true.
36+
abfs_enable_git_lfs = true
37+
38+
abfs_gerrit_uploader_count = 3
39+
abfs_gerrit_uploader_manifest_server = "android.googlesource.com"
40+
#abfs_gerrit_uploader_git_branch = ["branch1", "branch2"]
41+
42+
abfs_bucket_location = "europe-west1"
43+
abfs_spanner_instance_config = "regional-europe-west1"
44+
abfs_spanner_database_create_tables = true
45+
46+
#alert_notification_email = "[email protected]"
47+
48+
create_cloud_workstation_resources = true
49+
cws_clusters = {
50+
"cws-abfs-cluster" = {
51+
network = "default"
52+
region = "europe-west1"
53+
subnetwork = "default"
54+
}
55+
}
56+
cws_configs = {
57+
"cws-abfs-config" = {
58+
cws_cluster = "cws-abfs-cluster"
59+
idle_timeout = 3600
60+
machine_type = "e2-standard-8"
61+
boot_disk_size_gb = 64
62+
disable_public_ip_addresses = true
63+
pool_size = 0
64+
enable_nested_virtualization = false
65+
persistent_disk_size_gb = 2000
66+
persistent_disk_fs_type = "ext4"
67+
persistent_disk_type = "pd-ssd"
68+
persistent_disk_reclaim_policy = "RETAIN"
69+
creators = ["[email protected]"]
70+
instances = [
71+
{
72+
name = "cws-abfs-instance"
73+
users = ["[email protected]"]
74+
}
75+
]
76+
}
77+
}

examples/simple/variables.tf

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,13 @@ variable "abfs_gerrit_uploader_manifest_server" {
7474
default = "android.googlesource.com"
7575
}
7676

77+
# If you don't have an ABFS license yet, leave this empty and run terraform apply.
78+
# Submit the output via the Early Access Program (EAP) form.
79+
# When you received a license, insert it in your terraform.tfvars file and run terraform apply again.
7780
variable "abfs_license" {
7881
type = string
7982
description = "ABFS license (JSON)"
83+
default = ""
8084
}
8185

8286
variable "alert_notification_email" {
@@ -86,14 +90,14 @@ variable "alert_notification_email" {
8690

8791
variable "abfs_service_account_id" {
8892
type = string
89-
description = "ABFS service account ID (e.g. abfs@<project-id>.iam.gserviceaccount.com); if not specified, a new service account will be created using the abfs_service_account_name."
93+
description = "ABFS service account ID (e.g. sa-abfs@<project-id>.iam.gserviceaccount.com); if not specified, a new service account will be created using the abfs_service_account_name."
9094
default = ""
9195
}
9296

9397
variable "abfs_service_account_name" {
9498
type = string
9599
description = "The name of the service account to create in case abfs_service_account_id is not specified."
96-
default = "abfs"
100+
default = "sa-abfs"
97101
}
98102

99103
variable "abfs_server_machine_type" {
@@ -171,10 +175,10 @@ variable "cws_configs" {
171175
persistent_disk_reclaim_policy = string
172176
creators = optional(list(string))
173177
image = optional(string)
174-
instances = list(object({
178+
instances = optional(list(object({
175179
name = string
176180
users = list(string)
177-
}))
181+
})))
178182
}))
179183
description = "A map of Cloud Workstation configurations."
180184
default = {}

0 commit comments

Comments
 (0)