Skip to content

Commit 998af80

Browse files
committed
revert app_enable_public_access var and add missing cloudflare dependency on domain mapping
1 parent 7b17e9c commit 998af80

4 files changed

Lines changed: 1 addition & 13 deletions

File tree

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,6 @@ No modules.
231231
| <a name="input_app_command"></a> [app\_command](#input\_app\_command) | Command to run the container | `list(string)` | <pre>[<br/> "hrafnar",<br/> "serve"<br/>]</pre> | no |
232232
| <a name="input_app_config_files"></a> [app\_config\_files](#input\_app\_config\_files) | Configuration files to mount as volumes from Secret Manager. Key is the config name, value contains file content and mount path. | <pre>map(object({<br/> content = string # File content to store in Secret Manager<br/> mount_path = string # Path where file will be mounted in container (e.g., "/etc/config/app.yaml")<br/> }))</pre> | `{}` | no |
233233
| <a name="input_app_cpu"></a> [app\_cpu](#input\_app\_cpu) | CPU allocation for the hrafnar application | `string` | `"1000m"` | no |
234-
| <a name="input_app_enable_public_access"></a> [app\_enable\_public\_access](#input\_app\_enable\_public\_access) | Enable public access to the hrafnar application | `bool` | `true` | no |
235234
| <a name="input_app_env_vars"></a> [app\_env\_vars](#input\_app\_env\_vars) | Environment variables for the hrafnar application | `map(string)` | `{}` | no |
236235
| <a name="input_app_image"></a> [app\_image](#input\_app\_image) | Container image for the hrafnar application (without tag) | `string` | n/a | yes |
237236
| <a name="input_app_image_sha"></a> [app\_image\_sha](#input\_app\_image\_sha) | Container image SHA (takes precedence over tag if provided) | `string` | `""` | no |

cloud-run.tf

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ resource "google_cloud_run_service" "main_app" {
1313
"run.googleapis.com/execution-environment" = "gen2"
1414
# CPU allocation
1515
"run.googleapis.com/cpu-throttling" = "false",
16-
# Ingress control - internal only when public access is disabled
17-
"run.googleapis.com/ingress" = var.app_enable_public_access ? "all" : "internal"
1816
# Direct VPC Egress
1917
"run.googleapis.com/network-interfaces" = jsonencode([{
2018
"network" = google_compute_network.main.id
@@ -243,7 +241,6 @@ resource "google_cloud_run_service" "main_app" {
243241

244242
# IAM policy to allow public access to the hrafnar application
245243
resource "google_cloud_run_service_iam_member" "main_app_public" {
246-
count = var.app_enable_public_access ? 1 : 0
247244
location = google_cloud_run_service.main_app.location
248245
project = google_cloud_run_service.main_app.project
249246
service = google_cloud_run_service.main_app.name
@@ -270,5 +267,5 @@ resource "google_cloud_run_domain_mapping" "main_app" {
270267
route_name = google_cloud_run_service.main_app.name
271268
}
272269

273-
depends_on = [google_cloud_run_service.main_app]
270+
depends_on = [google_cloud_run_service.main_app, cloudflare_dns_record.app]
274271
}

dns.tf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,4 @@ resource "cloudflare_dns_record" "app" {
1717
proxied = false # Must be DNS-only initially for domain mapping to work
1818

1919
comment = "Managed by Terraform - Application endpoint for ${local.resource_prefix} hrafnar application"
20-
21-
depends_on = [google_cloud_run_domain_mapping.main_app]
2220
}

variables.tf

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -208,12 +208,6 @@ variable "app_port" {
208208
default = 8080
209209
}
210210

211-
variable "app_enable_public_access" {
212-
description = "Enable public access to the hrafnar application"
213-
type = bool
214-
default = true
215-
}
216-
217211
variable "app_command" {
218212
description = "Command to run the container"
219213
type = list(string)

0 commit comments

Comments
 (0)