terraform-provider-google/website/docs/r/compute_backend_bucket_signed_url_key.html.markdown
The Magician 5ea227f7a0 Add backend bucket signed URL key (for CDN) support (#3229)
Signed-off-by: Modular Magician <magic-modules@google.com>
2019-04-01 10:19:55 -07:00

3.3 KiB

layout page_title sidebar_current description
google Google: google_compute_backend_bucket_signed_url_key docs-google-compute-backend-bucket-signed-url-key A key for signing Cloud CDN signed URLs for BackendBuckets.

google_compute_backend_bucket_signed_url_key

A key for signing Cloud CDN signed URLs for BackendBuckets.

To get more information about BackendBucketSignedUrlKey, see:

~> Warning: All arguments including the key's value will be stored in the raw state as plain-text. Read more about sensitive data in state. Because the API does not return the sensitive key value, we cannot confirm or reverse changes to a key outside of Terraform.

Example Usage - Backend Bucket Signed Url Key

resource "google_compute_backend_bucket_signed_url_key" "backend_key" {
  name           = "test-key"
  key_value      = "pPsVemX8GM46QVeezid6Rw=="
  backend_bucket = "${google_compute_backend_bucket.test_backend.name}"
}

resource "google_compute_backend_bucket" "test_backend" {
  name        = "test-signed-backend-bucket"
  description = "Contains beautiful images"
  bucket_name = "${google_storage_bucket.bucket.name}"
  enable_cdn  = true
}

resource "google_storage_bucket" "bucket" {
  name     = "test-storage-bucket"
  location = "EU"
}

Argument Reference

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.

  • backend_bucket - (Required) The backend bucket 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.

Timeouts

This resource provides the following Timeouts configuration options:

  • create - Default is 4 minutes.
  • delete - Default is 4 minutes.

Import

BackendBucketSignedUrlKey can be imported using any of these accepted formats:

$ terraform import google_compute_backend_bucket_signed_url_key.default projects/{{project}}/global/backendBuckets/{{backend_bucket}}/{{name}}
$ terraform import google_compute_backend_bucket_signed_url_key.default {{project}}/{{backend_bucket}}/{{name}}
$ terraform import google_compute_backend_bucket_signed_url_key.default {{backend_bucket}}/{{name}}

-> If you're importing a resource with beta features, make sure to include -provider=google-beta as an argument so that Terraform uses the correct provider to import your resource.