A KeyRing
is a toplevel logical grouping of CryptoKeys
.
To get more information about KeyRing, see:
resource "google_kms_key_ring" "example-keyring" {
name = "keyring-example"
location = "global"
}
The following arguments are supported:
name
-
(Required)
The resource name for the KeyRing.
location
-
(Required)
The location for the KeyRing.
A full list of valid locations can be found by running gcloud kms locations list
.
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}}/locations/{{location}}/keyRings/{{name}}
This resource provides the following Timeouts configuration options:
create
- Default is 20 minutes.delete
- Default is 20 minutes.KeyRing can be imported using any of these accepted formats:
projects/{{project}}/locations/{{location}}/keyRings/{{name}}
{{project}}/{{location}}/{{name}}
{{location}}/{{name}}
In Terraform v1.5.0 and later, use an import
block to import KeyRing using one of the formats above. For example:
import {
id = "projects/{{project}}/locations/{{location}}/keyRings/{{name}}"
to = google_kms_key_ring.default
}
When using the terraform import
command, KeyRing can be imported using one of the formats above. For example:
$ terraform import google_kms_key_ring.default projects/{{project}}/locations/{{location}}/keyRings/{{name}}
$ terraform import google_kms_key_ring.default {{project}}/{{location}}/{{name}}
$ terraform import google_kms_key_ring.default {{location}}/{{name}}
This resource supports User Project Overrides.