Skip to content

Commit

Permalink
remove datastore users and roles from tf
Browse files Browse the repository at this point in the history
  • Loading branch information
volovyks committed Nov 8, 2024
1 parent b78ccea commit f904e54
Show file tree
Hide file tree
Showing 10 changed files with 3 additions and 26 deletions.
2 changes: 1 addition & 1 deletion chain-signatures/node/src/storage/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pub mod triple_storage;
#[derive(Debug, Clone, clap::Parser)]
#[group(id = "storage_options")]
pub struct Options {
/// env used to suffix datastore table names to differentiate among environments.
/// env used to differentiate among environments.
#[clap(long, env("MPC_ENV"))]
pub env: String,
/// GCP project ID.
Expand Down
6 changes: 0 additions & 6 deletions infra/mpc-recovery-dev/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,6 @@ resource "google_service_account_iam_binding" "serivce-account-iam" {
]
}

resource "google_project_iam_member" "service-account-datastore-user" {
project = var.project
role = "roles/datastore.user"
member = "serviceAccount:${google_service_account.service_account.email}"
}

/*
* Ensure service account has access to Secret Manager variables
*/
Expand Down
7 changes: 0 additions & 7 deletions infra/mpc-recovery-prod/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,6 @@ resource "google_service_account" "service_account" {
display_name = "MPC Recovery mainnet Account"
}


resource "google_project_iam_member" "service-account-datastore-user" {
project = var.project
role = "roles/datastore.user"
member = "serviceAccount:${google_service_account.service_account.email}"
}

/*
* Ensure service account has access to Secret Manager variables
*/
Expand Down
7 changes: 0 additions & 7 deletions infra/mpc-recovery-testnet/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,6 @@ resource "google_service_account" "service_account" {
display_name = "MPC Recovery testnet Account"
}


resource "google_project_iam_member" "service-account-datastore-user" {
project = var.project
role = "roles/datastore.user"
member = "serviceAccount:${google_service_account.service_account.email}"
}

/*
* Ensure service account has access to Secret Manager variables
*/
Expand Down
1 change: 0 additions & 1 deletion infra/multichain-dev/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ resource "google_service_account" "service_account" {

resource "google_project_iam_member" "sa-roles" {
for_each = toset([
"roles/datastore.user",
"roles/secretmanager.admin",
"roles/storage.objectAdmin",
"roles/iam.serviceAccountAdmin",
Expand Down
2 changes: 1 addition & 1 deletion infra/multichain-mainnet/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ resource "google_service_account" "service_account" {

resource "google_project_iam_member" "sa-roles" {
for_each = toset([
"roles/datastore.user",
"roles/.user",
"roles/secretmanager.admin",
"roles/storage.objectAdmin",
"roles/iam.serviceAccountAdmin",
Expand Down
1 change: 0 additions & 1 deletion infra/multichain-testnet/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ resource "google_service_account" "service_account" {

resource "google_project_iam_member" "sa-roles" {
for_each = toset([
"roles/datastore.user",
"roles/secretmanager.admin",
"roles/storage.objectAdmin",
"roles/iam.serviceAccountAdmin",
Expand Down
1 change: 0 additions & 1 deletion infra/partner-mainnet/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ resource "google_service_account" "service_account" {

resource "google_project_iam_member" "sa-roles" {
for_each = toset([
"roles/datastore.user",
"roles/secretmanager.admin",
"roles/storage.objectAdmin",
"roles/iam.serviceAccountAdmin",
Expand Down
1 change: 0 additions & 1 deletion infra/partner-testnet/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ resource "google_service_account" "service_account" {

resource "google_project_iam_member" "sa-roles" {
for_each = toset([
"roles/datastore.user",
"roles/secretmanager.admin",
"roles/storage.objectAdmin",
"roles/iam.serviceAccountAdmin",
Expand Down
1 change: 1 addition & 0 deletions integration-tests/chain-signatures/src/containers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,7 @@ impl Default for DockerClient {
}
}

// TODO: remove or rename this struct and other mentions of datastore
pub struct Datastore<'a> {
pub container: Container<'a, GenericImage>,
pub address: String,
Expand Down

0 comments on commit f904e54

Please sign in to comment.