googleComputeBackendServiceSignedUrlKey
A key for signing Cloud CDN signed URLs for Backend Services.
To get more information about BackendServiceSignedUrlKey, see:
- API documentation
- How-to Guides
- Using Signed URLs
\~> Warning: All arguments including keyValue
will be stored in the raw state as plain-text. Read more about sensitive data in state.
Example Usage - Backend Service Signed Url Key
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
import * as random from "./.gen/providers/random";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google, random.
For a more precise conversion please use the --provider flag in convert.*/
const googleComputeHttpHealthCheckDefault =
new google.computeHttpHealthCheck.ComputeHttpHealthCheck(this, "default", {
check_interval_sec: 1,
name: "test",
request_path: "/",
timeout_sec: 1,
});
const googleComputeInstanceTemplateWebserver =
new google.computeInstanceTemplate.ComputeInstanceTemplate(
this,
"webserver",
{
disk: [
{
auto_delete: true,
boot: true,
source_image: "debian-cloud/debian-11",
},
],
machine_type: "e2-medium",
name: "standard-webserver",
network_interface: [
{
network: "default",
},
],
}
);
const randomIdUrlSignature = new random.id.Id(this, "url_signature", {
byte_length: 16,
});
const googleComputeInstanceGroupManagerWebservers =
new google.computeInstanceGroupManager.ComputeInstanceGroupManager(
this,
"webservers",
{
base_instance_name: "webserver",
name: "my-webservers",
target_size: 1,
version: [
{
instance_template: googleComputeInstanceTemplateWebserver.id,
name: "primary",
},
],
zone: "us-central1-f",
}
);
const googleComputeBackendServiceExampleBackend =
new google.computeBackendService.ComputeBackendService(
this,
"example_backend",
{
backend: [
{
group: googleComputeInstanceGroupManagerWebservers.instanceGroup,
},
],
description: "Our company website",
enable_cdn: true,
health_checks: [googleComputeHttpHealthCheckDefault.id],
name: "my-backend-service",
port_name: "http",
protocol: "HTTP",
timeout_sec: 10,
}
);
new google.computeBackendServiceSignedUrlKey.ComputeBackendServiceSignedUrlKey(
this,
"backend_key",
{
backend_service: googleComputeBackendServiceExampleBackend.name,
key_value: randomIdUrlSignature.b64Url,
name: "test-key",
}
);
Argument Reference
The following arguments are supported:
-
name
- (Required) Name of the signed URL key. -
keyValue
- (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. -
backendService
- (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.
Attributes Reference
In addition to the arguments listed above, the following computed attributes are exported:
id
- an identifier for the resource with formatprojects/{{project}}/global/backendServices/{{backendService}}
Timeouts
This resource provides the following Timeouts configuration options:
create
- Default is 20 minutes.delete
- Default is 20 minutes.
Import
This resource does not support import.
User Project Overrides
This resource supports User Project Overrides.