Skip to content

Commit

Permalink
Add new Enhanced Origin API fields. (#6846) (#328)
Browse files Browse the repository at this point in the history
Resolves hashicorp/terraform-provider-google#13073

Signed-off-by: Modular Magician <magic-modules@google.com>

Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician committed Dec 1, 2022
1 parent 0ed8cff commit 8ac8863
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions network_services_edge_cache_origin_advanced/main.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

resource "google_network_services_edge_cache_origin" "fallback" {
name = "my-fallback-${local.name_suffix}"
origin_address = "gs://media-edge-fallback"
origin_address = "fallback.example.com"
description = "The default bucket for media edge test"
max_attempts = 3
protocol = "HTTP"
Expand All @@ -19,6 +18,27 @@ resource "google_network_services_edge_cache_origin" "fallback" {
response_timeout = "60s"
read_timeout = "5s"
}
origin_override_action {
url_rewrite {
host_rewrite = "example.com"
}
header_action {
request_headers_to_add {
header_name = "x-header"
header_value = "value"
replace = true
}
}
}
origin_redirect {
redirect_conditions = [
"MOVED_PERMANENTLY",
"FOUND",
"SEE_OTHER",
"TEMPORARY_REDIRECT",
"PERMANENT_REDIRECT",
]
}
}

resource "google_network_services_edge_cache_origin" "default" {
Expand Down

0 comments on commit 8ac8863

Please sign in to comment.