Skip to content

Commit

Permalink
import tessera gcs
Browse files Browse the repository at this point in the history
  • Loading branch information
phbnf committed Oct 8, 2024
1 parent 8ea3790 commit 0678fb1
Showing 1 changed file with 2 additions and 46 deletions.
48 changes: 2 additions & 46 deletions deployment/modules/gcp/storage/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down

0 comments on commit 0678fb1

Please sign in to comment.