|
| 1 | +########################## |
| 2 | +# Used by container registry |
| 3 | +########################## |
| 4 | + |
| 5 | +resource "google_storage_bucket" "artifacts_balmy_ground_195100_appspot_com" { |
| 6 | + force_destroy = false |
| 7 | + location = "US" |
| 8 | + name = "artifacts.balmy-ground-195100.appspot.com" |
| 9 | + project = local.project_name |
| 10 | + public_access_prevention = "inherited" |
| 11 | + storage_class = "STANDARD" |
| 12 | +} |
| 13 | +resource "google_storage_bucket" "us_artifacts_balmy_ground_195100_appspot_com" { |
| 14 | + force_destroy = false |
| 15 | + location = "US" |
| 16 | + name = "us.artifacts.balmy-ground-195100.appspot.com" |
| 17 | + project = local.project_name |
| 18 | + public_access_prevention = "inherited" |
| 19 | + storage_class = "STANDARD" |
| 20 | +} |
| 21 | + |
| 22 | +########################## |
| 23 | +# Darklang classic |
| 24 | +########################## |
| 25 | + |
| 26 | +# Bucket to download the rust-based static assets cli |
| 27 | +resource "google_storage_bucket" "dark_cli" { |
| 28 | + force_destroy = false |
| 29 | + location = "US" |
| 30 | + name = "dark-cli" |
| 31 | + project = local.project_name |
| 32 | + public_access_prevention = "inherited" |
| 33 | + storage_class = "STANDARD" |
| 34 | + website { |
| 35 | + main_page_suffix = "index.html" |
| 36 | + not_found_page = "404.html" |
| 37 | + } |
| 38 | +} |
| 39 | + |
| 40 | +# For assets used as part of the osx cross-compilation used by the rust-based cli |
| 41 | +resource "google_storage_bucket" "dark_osxcross_files" { |
| 42 | + force_destroy = false |
| 43 | + location = "US" |
| 44 | + name = "dark-osxcross-files" |
| 45 | + project = local.project_name |
| 46 | + public_access_prevention = "inherited" |
| 47 | + storage_class = "STANDARD" |
| 48 | +} |
| 49 | + |
| 50 | +# Bucket for storing customer static assets on darklang-classic |
| 51 | +resource "google_storage_bucket" "dark_static_assets" { |
| 52 | + cors { |
| 53 | + max_age_seconds = 3600 |
| 54 | + method = ["GET"] |
| 55 | + origin = ["*"] |
| 56 | + response_header = ["Content-Type"] |
| 57 | + } |
| 58 | + force_destroy = false |
| 59 | + location = "US" |
| 60 | + name = "dark-static-assets" |
| 61 | + project = local.project_name |
| 62 | + public_access_prevention = "inherited" |
| 63 | + storage_class = "STANDARD" |
| 64 | + website { |
| 65 | + main_page_suffix = "index.html" |
| 66 | + not_found_page = "404.html" |
| 67 | + } |
| 68 | +} |
| 69 | + |
| 70 | +# Dev-environment bucket for testing static assets on darklang-classic |
| 71 | +resource "google_storage_bucket" "dark_static_assets_dev" { |
| 72 | + force_destroy = false |
| 73 | + location = "US" |
| 74 | + name = "dark-static-assets-dev" |
| 75 | + project = local.project_name |
| 76 | + public_access_prevention = "inherited" |
| 77 | + storage_class = "STANDARD" |
| 78 | + website { |
| 79 | + not_found_page = "404.html" |
| 80 | + } |
| 81 | +} |
| 82 | + |
| 83 | +# Bucket for storing customer traces on darklang-classic |
| 84 | +resource "google_storage_bucket" "dark_traces" { |
| 85 | + force_destroy = false |
| 86 | + location = "US-WEST1" |
| 87 | + name = "dark-traces" |
| 88 | + project = local.project_name |
| 89 | + public_access_prevention = "enforced" |
| 90 | + storage_class = "STANDARD" |
| 91 | + uniform_bucket_level_access = true |
| 92 | +} |
| 93 | + |
| 94 | +# Bucket for static assets for the old editor (darklang-classic) |
| 95 | +resource "google_storage_bucket" "darklang_static_assets" { |
| 96 | + cors { |
| 97 | + max_age_seconds = 3600 |
| 98 | + method = ["GET"] |
| 99 | + origin = ["https://*.darklang.com", "https://darklang.com"] |
| 100 | + response_header = ["Content-Type"] |
| 101 | + } |
| 102 | + force_destroy = false |
| 103 | + location = "US" |
| 104 | + name = "darklang-static-assets" |
| 105 | + project = local.project_name |
| 106 | + public_access_prevention = "inherited" |
| 107 | + storage_class = "STANDARD" |
| 108 | + uniform_bucket_level_access = true |
| 109 | + website { |
| 110 | + not_found_page = "404.html" |
| 111 | + } |
| 112 | +} |
| 113 | + |
| 114 | +########################## |
| 115 | +# Darklang AI deployment |
| 116 | +########################## |
| 117 | + |
| 118 | +# Downloads for the new cli(s) |
| 119 | +resource "google_storage_bucket" "darklang_downloads" { |
| 120 | + force_destroy = false |
| 121 | + location = "US" |
| 122 | + name = "darklang-downloads" |
| 123 | + project = local.project_name |
| 124 | + public_access_prevention = "inherited" |
| 125 | + storage_class = "STANDARD" |
| 126 | + uniform_bucket_level_access = true |
| 127 | + autoclass { |
| 128 | + enabled = true |
| 129 | + } |
| 130 | +} |
| 131 | + |
| 132 | +# Bucket for storing customer traces on darklang-classic |
| 133 | +resource "google_storage_bucket" "dark_traces_ai" { |
| 134 | + force_destroy = false |
| 135 | + location = "US-WEST1" |
| 136 | + name = "dark-traces-ai" |
| 137 | + project = local.project_name |
| 138 | + public_access_prevention = "enforced" |
| 139 | + storage_class = "STANDARD" |
| 140 | + uniform_bucket_level_access = true |
| 141 | +} |
0 commit comments