Skip to content

Commit

Permalink
🔧 (terraform) attach envs to cloudrun
Browse files Browse the repository at this point in the history
  • Loading branch information
Shion1305 committed Aug 18, 2024
1 parent 28044a0 commit b6c26ce
Showing 1 changed file with 117 additions and 0 deletions.
117 changes: 117 additions & 0 deletions terraform/cloud-run.tf
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,123 @@ resource "google_cloud_run_v2_service" "release" {
port = 8080
}
}
env {
name = "DISCORD_AUTH_URL"
value_source {
secret_key_ref {
secret = data.google_secret_manager_secret.discord_auth_url
version = "latest"
}
}
}
env {
name = "DISCORD_BOT_TOKEN"
value_source {
secret_key_ref {
secret = data.google_secret_manager_secret.discord_bot_token
version = "latest"
}
}
}
env {
name = "DISCORD_CALLBACK_URI"
value_source {
secret_key_ref {
secret = data.google_secret_manager_secret.discord_callback_uri
version = "latest"
}
}
}
env {
name = "DISCORD_CLIENT_ID"
value_source {
secret_key_ref {
secret = data.google_secret_manager_secret.discord_client_id
version = "latest"
}
}
}
env {
name = "DISCORD_CLIENT_SECRET"
value_source {
secret_key_ref {
secret = data.google_secret_manager_secret.discord_client_secret
version = "latest"
}
}
}
env {
name = "DISCORD_GUILD_ID"
value_source {
secret_key_ref {
secret = data.google_secret_manager_secret.discord_guild_id
version = "latest"
}
}
}
env {
name = "DISCORD_MEMBER_ROLE_ID"
value_source {
secret_key_ref {
secret = data.google_secret_manager_secret.discord_member_role_id
version = "latest"
}
}
}
env {
name = "FIREBASE_ADMIN_CERT_PATH"
value_source {
secret_key_ref {
secret = data.google_secret_manager_secret.firebase_admin_cert_path
version = "latest"
}
}
}
env {
name = "JWT_SECRET"
value_source {
secret_key_ref {
secret = data.google_secret_manager_secret.jwt_secret
version = "latest"
}
}
}
env {
name = "LINE_AUTH_URL"
value_source {
secret_key_ref {
secret = data.google_secret_manager_secret.line_auth_url
version = "latest"
}
}
}
env {
name = "LINE_CALLBACK_URI"
value_source {
secret_key_ref {
secret = data.google_secret_manager_secret.line_callback_uri
version = "latest"
}
}
}
env {
name = "LINE_CLIENT_ID"
value_source {
secret_key_ref {
secret = data.google_secret_manager_secret.line_client_id
version = "latest"
}
}
}
env {
name = "LINE_CLIENT_SECRET"
value_source {
secret_key_ref {
secret = data.google_secret_manager_secret.line_client_secret
version = "latest"
}
}
}
}
scaling {
max_instance_count = 100
Expand Down

0 comments on commit b6c26ce

Please sign in to comment.