google_network_services_edge_cache_keyset

EdgeCacheKeyset represents a collection of public keys used for validating signed requests.

To get more information about EdgeCacheKeyset, see:

Open in Cloud Shell

Example Usage - Network Services Edge Cache Keyset Basic

resource "google_network_services_edge_cache_keyset" "default" {
  name                 = "my-keyset"
  description          = "The default keyset"
  public_key {
    id = "my-public-key"
    value = "FHsTyFHNmvNpw4o7-rp-M1yqMyBF8vXSBRkZtkQ0RKY"
  }
  public_key {
    id = "my-public-key-2"
    value = "hzd03llxB1u5FOLKFkZ6_wCJqC7jtN0bg7xlBqS6WVM"
  }
}
Open in Cloud Shell

Example Usage - Network Services Edge Cache Keyset Dual Token

resource "google_secret_manager_secret" "secret-basic" {
  secret_id = "secret-name"

  replication {
    auto {}
  }
}

resource "google_secret_manager_secret_version" "secret-version-basic" {
  secret = google_secret_manager_secret.secret-basic.id

  secret_data = "secret-data"
}

resource "google_network_services_edge_cache_keyset" "default" {
  name        = "my-keyset"
  description = "The default keyset"
  public_key {
    id      = "my-public-key"
    managed = true
  }
  validation_shared_keys {
    secret_version = google_secret_manager_secret_version.secret-version-basic.id
  }
}

Argument Reference

The following arguments are supported:


The public_key block supports:

The validation_shared_keys block supports:

Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

Timeouts

This resource provides the following Timeouts configuration options:

Import

EdgeCacheKeyset can be imported using any of these accepted formats:

In Terraform v1.5.0 and later, use an import block to import EdgeCacheKeyset using one of the formats above. For example:

import {
  id = "projects/{{project}}/locations/global/edgeCacheKeysets/{{name}}"
  to = google_network_services_edge_cache_keyset.default
}

When using the terraform import command, EdgeCacheKeyset can be imported using one of the formats above. For example:

$ terraform import google_network_services_edge_cache_keyset.default projects/{{project}}/locations/global/edgeCacheKeysets/{{name}}
$ terraform import google_network_services_edge_cache_keyset.default {{project}}/{{name}}
$ terraform import google_network_services_edge_cache_keyset.default {{name}}

User Project Overrides

This resource supports User Project Overrides.