Skip to content

Commit

Permalink
chore: fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
eliecharra committed Dec 18, 2024
1 parent 006578a commit 981afd9
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 56 deletions.
34 changes: 17 additions & 17 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ resource "random_id" "seed" {

module "iam" {
source = "./modules/iam"
seed = random_id.seed.hex
seed = random_id.seed.hex

app_service_account_name = var.app_service_account_name
project = var.project
Expand All @@ -13,15 +13,15 @@ module "iam" {
module "artifacts" {
source = "./modules/artifacts"
depends_on = [module.iam]
seed = random_id.seed.hex
seed = random_id.seed.hex

enable_external_workers = var.enable_external_workers
}

module "network" {
source = "./modules/network"
depends_on = [module.iam]
seed = random_id.seed.hex
seed = random_id.seed.hex

enable_external_workers = var.enable_external_workers
ip_cidr_range = var.ip_cidr_range
Expand All @@ -32,24 +32,24 @@ module "network" {

module "gke" {
source = "./modules/gke"
seed = random_id.seed.hex
seed = random_id.seed.hex

app_service_account_name = var.app_service_account_name
backend_service_account_id = module.iam.backend_service_account_id
compute_network_id = module.network.network_id
subnetwork = module.network.subnetwork
pods_ip_range_name = module.network.pods_ip_range_name
services_ip_range_name = module.network.services_ip_range_name
compute_network_name = module.network.network_name
gke_service_account_email = module.iam.gke_service_account_email
k8s_namespace = var.k8s_namespace
project = var.project
region = var.region
app_service_account_name = var.app_service_account_name
backend_service_account_id = module.iam.backend_service_account_id
compute_network_id = module.network.network_id
subnetwork = module.network.subnetwork
pods_ip_range_name = module.network.pods_ip_range_name
services_ip_range_name = module.network.services_ip_range_name
compute_network_name = module.network.network_name
gke_service_account_email = module.iam.gke_service_account_email
k8s_namespace = var.k8s_namespace
project = var.project
region = var.region
}

module "db" {
source = "./modules/db"
seed = random_id.seed.hex
seed = random_id.seed.hex

backend_service_account_email = module.iam.backend_service_account_email
compute_network_id = module.network.network_id
Expand All @@ -62,7 +62,7 @@ module "db" {

module "storage" {
source = "./modules/storage"
seed = random_id.seed.hex
seed = random_id.seed.hex

backend_service_account_email = module.iam.backend_service_account_email
cors_origins = ["https://${var.website_domain}"]
Expand Down
74 changes: 37 additions & 37 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,14 @@ output "db_private_ip_address" {
}

output "db_database_name" {
value = module.db.database_name
value = module.db.database_name
description = "Internal PostgreSQL db name inside the Cloud SQL instance."
}

output "db_root_password" {
value = module.db.database_root_password
description = "The database root password"
sensitive = true
sensitive = true
}

### Storage ###
Expand Down Expand Up @@ -160,51 +160,51 @@ output "deliveries_bucket" {

output "shell" {
sensitive = true
value = templatefile("${path.module}/env.tftpl", {env: {
GCP_PROJECT: var.project,
GCP_LOCATION: var.region,
SERVER_DOMAIN: var.website_domain,
WEBHOOKS_ENDPOINT: "https://${var.website_domain}/webhooks",
value = templatefile("${path.module}/env.tftpl", { env : {
GCP_PROJECT : var.project,
GCP_LOCATION : var.region,
SERVER_DOMAIN : var.website_domain,
WEBHOOKS_ENDPOINT : "https://${var.website_domain}/webhooks",

# IAM
BACKEND_SERVICE_ACCOUNT: module.iam.backend_service_account_email,
BACKEND_SERVICE_ACCOUNT : module.iam.backend_service_account_email,

# Network
PUBLIC_IP_NAME: module.network.gke_public_v4_name,
PUBLIC_IP_ADDRESS: module.network.gke_public_v4_address,
PUBLIC_IPV6_NAME: module.network.gke_public_v6_name,
PUBLIC_IPV6_ADDRESS: module.network.gke_public_v6_address,
MQTT_IP_NAME: module.network.mqtt_v4_name,
MQTT_IP_ADDRESS: module.network.mqtt_v4_address,
MQTT_IPV6_NAME: module.network.mqtt_v6_name,
MQTT_IPV6_ADDRESS: module.network.mqtt_v6_address,
MQTT_BROKER_ENDPOINT: module.dns.mqtt_endpoint,
PUBLIC_IP_NAME : module.network.gke_public_v4_name,
PUBLIC_IP_ADDRESS : module.network.gke_public_v4_address,
PUBLIC_IPV6_NAME : module.network.gke_public_v6_name,
PUBLIC_IPV6_ADDRESS : module.network.gke_public_v6_address,
MQTT_IP_NAME : module.network.mqtt_v4_name,
MQTT_IP_ADDRESS : module.network.mqtt_v4_address,
MQTT_IPV6_NAME : module.network.mqtt_v6_name,
MQTT_IPV6_ADDRESS : module.network.mqtt_v6_address,
MQTT_BROKER_ENDPOINT : module.dns.mqtt_endpoint,

# Artifacts
ARTIFACT_REGISTRY_DOMAIN: module.artifacts.repository_domain,
BACKEND_IMAGE: "${module.artifacts.repository_url}/spacelift-backend",
LAUNCHER_IMAGE: "${module.artifacts.launcher_repository_url}/spacelift-launcher"
ARTIFACT_REGISTRY_DOMAIN : module.artifacts.repository_domain,
BACKEND_IMAGE : "${module.artifacts.repository_url}/spacelift-backend",
LAUNCHER_IMAGE : "${module.artifacts.launcher_repository_url}/spacelift-launcher"

# Buckets
OBJECT_STORAGE_BUCKET_DELIVERIES=module.storage.deliveries_bucket,
OBJECT_STORAGE_BUCKET_LARGE_QUEUE_MESSAGES=module.storage.large_queue_messages_bucket,
OBJECT_STORAGE_BUCKET_MODULES=module.storage.modules_bucket,
OBJECT_STORAGE_BUCKET_POLICY_INPUTS=module.storage.policy_inputs_bucket,
OBJECT_STORAGE_BUCKET_RUN_LOGS=module.storage.run_logs_bucket,
OBJECT_STORAGE_BUCKET_STATES=module.storage.states_bucket,
OBJECT_STORAGE_BUCKET_USER_UPLOADED_WORKSPACES=module.storage.user_uploaded_workspaces_bucket,
OBJECT_STORAGE_BUCKET_WORKSPACE=module.storage.workspace_bucket,
OBJECT_STORAGE_BUCKET_METADATA=module.storage.metadata_bucket
OBJECT_STORAGE_BUCKET_UPLOADS=module.storage.uploads_bucket
OBJECT_STORAGE_BUCKET_UPLOADS_URL="https://storage.googleapis.com"
OBJECT_STORAGE_BUCKET_DELIVERIES = module.storage.deliveries_bucket,
OBJECT_STORAGE_BUCKET_LARGE_QUEUE_MESSAGES = module.storage.large_queue_messages_bucket,
OBJECT_STORAGE_BUCKET_MODULES = module.storage.modules_bucket,
OBJECT_STORAGE_BUCKET_POLICY_INPUTS = module.storage.policy_inputs_bucket,
OBJECT_STORAGE_BUCKET_RUN_LOGS = module.storage.run_logs_bucket,
OBJECT_STORAGE_BUCKET_STATES = module.storage.states_bucket,
OBJECT_STORAGE_BUCKET_USER_UPLOADED_WORKSPACES = module.storage.user_uploaded_workspaces_bucket,
OBJECT_STORAGE_BUCKET_WORKSPACE = module.storage.workspace_bucket,
OBJECT_STORAGE_BUCKET_METADATA = module.storage.metadata_bucket
OBJECT_STORAGE_BUCKET_UPLOADS = module.storage.uploads_bucket
OBJECT_STORAGE_BUCKET_UPLOADS_URL = "https://storage.googleapis.com"

# Database
DATABASE_NAME=module.db.database_name
DATABASE_USER=module.db.database_iam_user
DATABASE_CONNECTION_NAME=module.db.database_connection_name
DB_ROOT_PASSWORD=module.db.database_root_password
DATABASE_NAME = module.db.database_name
DATABASE_USER = module.db.database_iam_user
DATABASE_CONNECTION_NAME = module.db.database_connection_name
DB_ROOT_PASSWORD = module.db.database_root_password

#GKE
GKE_CLUSTER_NAME=module.gke.gke_cluster_name
}})
GKE_CLUSTER_NAME = module.gke.gke_cluster_name
} })
}
4 changes: 2 additions & 2 deletions provider.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ terraform {
}

provider "google" {
region = var.region
project = var.project
region = var.region
project = var.project
default_labels = var.labels
}

0 comments on commit 981afd9

Please sign in to comment.