A key for signing Cloud CDN signed URLs for Backend Services.
To get more information about BackendServiceSignedUrlKey, see:
resource "random_id" "url_signature" {
byte_length = 16
}
resource "google_compute_backend_service_signed_url_key" "backend_key" {
name = "test-key"
key_value = random_id.url_signature.b64_url
backend_service = google_compute_backend_service.example_backend.name
}
resource "google_compute_backend_service" "example_backend" {
name = "my-backend-service"
description = "Our company website"
port_name = "http"
protocol = "HTTP"
timeout_sec = 10
enable_cdn = true
backend {
group = google_compute_instance_group_manager.webservers.instance_group
}
health_checks = [google_compute_http_health_check.default.id]
}
resource "google_compute_instance_group_manager" "webservers" {
name = "my-webservers"
version {
instance_template = google_compute_instance_template.webserver.id
name = "primary"
}
base_instance_name = "webserver"
zone = "us-central1-f"
target_size = 1
}
resource "google_compute_instance_template" "webserver" {
name = "standard-webserver"
machine_type = "e2-medium"
network_interface {
network = "default"
}
disk {
source_image = "debian-cloud/debian-11"
auto_delete = true
boot = true
}
}
resource "google_compute_http_health_check" "default" {
name = "test"
request_path = "/"
check_interval_sec = 1
timeout_sec = 1
}
The following arguments are supported:
name
-
(Required)
Name of the signed URL key.
key_value
-
(Required)
128-bit key value used for signing the URL. The key value must be a
valid RFC 4648 Section 5 base64url encoded string.
Note: This property is sensitive and will not be displayed in the plan.
backend_service
-
(Required)
The backend service this signed URL key belongs.
project
- (Optional) The ID of the project in which the resource belongs.
If it is not provided, the provider project is used.In addition to the arguments listed above, the following computed attributes are exported:
id
- an identifier for the resource with format projects/{{project}}/global/backendServices/{{backend_service}}
This resource provides the following Timeouts configuration options:
create
- Default is 20 minutes.delete
- Default is 20 minutes.This resource does not support import.
This resource supports User Project Overrides.