Skip to content

Commit 606440a

Browse files
Android Build Filesystem (ABFS) Teamsce-taid
authored andcommitted
dedicated files for abfs and monitoring resources
PiperOrigin-RevId: 809934715
1 parent 037ea66 commit 606440a

File tree

3 files changed

+78
-52
lines changed

3 files changed

+78
-52
lines changed

examples/simple/abfs.tf

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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+
moved {
16+
from = module.abfs-deployment
17+
to = module.abfs_server
18+
}
19+
20+
moved {
21+
from = module.abfs-uploaders
22+
to = module.abfs_uploaders
23+
}
24+
25+
module "abfs_server" {
26+
source = "github.com/terraform-google-modules/terraform-google-abfs//modules/server?ref=v0.8.0"
27+
28+
project_id = data.google_project.project.project_id
29+
zone = var.zone
30+
service_account_email = local.abfs_service_account_email
31+
subnetwork = module.abfs_vpc.subnets["${var.region}/abfs-subnet"].name
32+
abfs_docker_image_uri = var.abfs_docker_image_uri
33+
abfs_license = var.abfs_license
34+
abfs_bucket_location = var.abfs_bucket_location
35+
abfs_server_machine_type = var.abfs_server_machine_type
36+
abfs_spanner_instance_config = var.abfs_spanner_instance_config
37+
abfs_spanner_database_create_tables = var.abfs_spanner_database_create_tables
38+
}
39+
40+
module "abfs_uploaders" {
41+
source = "github.com/terraform-google-modules/terraform-google-abfs//modules/uploaders?ref=v0.8.0"
42+
43+
project_id = data.google_project.project.project_id
44+
zone = var.zone
45+
service_account_email = local.abfs_service_account_email
46+
subnetwork = module.abfs_vpc.subnets["${var.region}/abfs-subnet"].name
47+
abfs_docker_image_uri = var.abfs_docker_image_uri
48+
abfs_gerrit_uploader_count = var.abfs_gerrit_uploader_count
49+
abfs_gerrit_uploader_machine_type = var.abfs_gerrit_uploader_machine_type
50+
abfs_gerrit_uploader_datadisk_size_gb = var.abfs_gerrit_uploader_datadisk_size_gb
51+
abfs_gerrit_uploader_manifest_server = var.abfs_gerrit_uploader_manifest_server
52+
abfs_gerrit_uploader_git_branch = var.abfs_gerrit_uploader_git_branch
53+
abfs_manifest_project_name = var.abfs_manifest_project_name
54+
abfs_manifest_file = var.abfs_manifest_file
55+
abfs_license = var.abfs_license
56+
abfs_server_name = module.abfs_server.abfs_server_name
57+
abfs_enable_git_lfs = var.abfs_enable_git_lfs
58+
}

examples/simple/main.tf

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -12,58 +12,6 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
moved {
16-
from = module.abfs-deployment
17-
to = module.abfs_server
18-
}
19-
20-
moved {
21-
from = module.abfs-uploaders
22-
to = module.abfs_uploaders
23-
}
24-
25-
module "abfs_server" {
26-
source = "github.com/terraform-google-modules/terraform-google-abfs//modules/server?ref=v0.8.0"
27-
28-
project_id = data.google_project.project.project_id
29-
zone = var.zone
30-
service_account_email = local.abfs_service_account_email
31-
subnetwork = module.abfs_vpc.subnets["${var.region}/abfs-subnet"].name
32-
abfs_docker_image_uri = var.abfs_docker_image_uri
33-
abfs_license = var.abfs_license
34-
abfs_bucket_location = var.abfs_bucket_location
35-
abfs_server_machine_type = var.abfs_server_machine_type
36-
abfs_spanner_instance_config = var.abfs_spanner_instance_config
37-
abfs_spanner_database_create_tables = var.abfs_spanner_database_create_tables
38-
}
39-
40-
module "abfs_uploaders" {
41-
source = "github.com/terraform-google-modules/terraform-google-abfs//modules/uploaders?ref=v0.8.0"
42-
43-
project_id = data.google_project.project.project_id
44-
zone = var.zone
45-
service_account_email = local.abfs_service_account_email
46-
subnetwork = module.abfs_vpc.subnets["${var.region}/abfs-subnet"].name
47-
abfs_docker_image_uri = var.abfs_docker_image_uri
48-
abfs_gerrit_uploader_count = var.abfs_gerrit_uploader_count
49-
abfs_gerrit_uploader_machine_type = var.abfs_gerrit_uploader_machine_type
50-
abfs_gerrit_uploader_datadisk_size_gb = var.abfs_gerrit_uploader_datadisk_size_gb
51-
abfs_gerrit_uploader_manifest_server = var.abfs_gerrit_uploader_manifest_server
52-
abfs_gerrit_uploader_git_branch = var.abfs_gerrit_uploader_git_branch
53-
abfs_manifest_project_name = var.abfs_manifest_project_name
54-
abfs_manifest_file = var.abfs_manifest_file
55-
abfs_license = var.abfs_license
56-
abfs_server_name = module.abfs_server.abfs_server_name
57-
abfs_enable_git_lfs = var.abfs_enable_git_lfs
58-
}
59-
60-
module "monitoring" {
61-
source = "./monitoring"
62-
63-
project_id = data.google_project.project.project_id
64-
notification_email = var.alert_notification_email
65-
}
66-
6715
data "google_project" "project" {
6816
project_id = var.project_id
6917

examples/simple/monitoring.tf

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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+
module "monitoring" {
16+
source = "./monitoring"
17+
18+
project_id = data.google_project.project.project_id
19+
notification_email = var.alert_notification_email
20+
}

0 commit comments

Comments
 (0)