-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
2 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,52 +9,8 @@ terraform { | |
} | ||
} | ||
|
||
# Services | ||
resource "google_project_service" "serviceusage_googleapis_com" { | ||
service = "serviceusage.googleapis.com" | ||
disable_on_destroy = false | ||
} | ||
resource "google_project_service" "storage_api_googleapis_com" { | ||
service = "storage-api.googleapis.com" | ||
disable_on_destroy = false | ||
} | ||
resource "google_project_service" "storage_component_googleapis_com" { | ||
service = "storage-component.googleapis.com" | ||
disable_on_destroy = false | ||
} | ||
resource "google_project_service" "storage_googleapis_com" { | ||
service = "storage.googleapis.com" | ||
disable_on_destroy = false | ||
} | ||
|
||
## Resources | ||
|
||
# Buckets | ||
|
||
resource "google_storage_bucket" "log_bucket" { | ||
name = "${var.project_id}-${var.base_name}-bucket" | ||
location = var.location | ||
storage_class = "STANDARD" | ||
uniform_bucket_level_access = true | ||
} | ||
|
||
# Spanner | ||
|
||
resource "google_spanner_instance" "log_spanner" { | ||
name = var.base_name | ||
config = "regional-${var.location}" | ||
display_name = var.base_name | ||
processing_units = 100 | ||
} | ||
|
||
resource "google_spanner_database" "log_db" { | ||
instance = google_spanner_instance.log_spanner.name | ||
name = "${var.base_name}-db" | ||
ddl = [ | ||
"CREATE TABLE SeqCoord (id INT64 NOT NULL, next INT64 NOT NULL,) PRIMARY KEY (id)", | ||
"CREATE TABLE Seq (id INT64 NOT NULL, seq INT64 NOT NULL, v BYTES(MAX),) PRIMARY KEY (id, seq)", | ||
"CREATE TABLE IntCoord (id INT64 NOT NULL, seq INT64 NOT NULL,) PRIMARY KEY (id)", | ||
] | ||
module "tessera-gcs" { | ||
source = "[email protected]:transparency-dev/trillian-tessera/deployment/module//gcs" | ||
} | ||
|
||
resource "google_spanner_database" "dedup_db" { | ||
|