-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding DataSource for KMS Autokey Keyhandle (#12553)
[upstream:0669054c194d06807b6f086a3019755c50f04df2] Signed-off-by: Modular Magician <[email protected]>
- Loading branch information
1 parent
93d806f
commit 44d1aa2
Showing
6 changed files
with
78 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
```release-note:new-datasource | ||
`google_kms_key_handle` | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Copyright (c) HashiCorp, Inc. | ||
// SPDX-License-Identifier: MPL-2.0 | ||
package kms |
3 changes: 3 additions & 0 deletions
3
google/services/kms/data_source_google_kms_key_handle_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Copyright (c) HashiCorp, Inc. | ||
// SPDX-License-Identifier: MPL-2.0 | ||
package kms_test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
subcategory: "Cloud Key Management Service" | ||
description: |- | ||
Provides access to KMS key handle data with Google Cloud KMS. | ||
--- | ||
|
||
# google_kms_key_handle | ||
|
||
Provides access to Google Cloud Platform KMS KeyHandle. For more information see | ||
[the official documentation](https://cloud.google.com/kms/docs/resource-hierarchy#key_handles) | ||
and | ||
[API](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyHandles). | ||
|
||
A key handle is a Cloud KMS resource that helps you safely span the separation of duties to create new Cloud KMS keys for CMEK using Autokey. | ||
|
||
## Example Usage | ||
|
||
```hcl | ||
data "google_kms_key_handle" "my_key_handle" { | ||
name = "eed58b7b-20ad-4da8-ad85-ba78a0d5ab87" | ||
location = "us-central1" | ||
} | ||
``` | ||
|
||
## Argument Reference | ||
|
||
The following arguments are supported: | ||
|
||
* `name` - (Required) The KeyHandle's name. | ||
A KeyHandle name must exist within the provided location and must be valid UUID. | ||
|
||
* `location` - (Required) The Google Cloud Platform location for the KeyHandle. | ||
A full list of valid locations can be found by running `gcloud kms locations list`. | ||
|
||
- - - | ||
|
||
* `project` - (Optional) 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` - The identifier of the created KeyHandle. Its format is `projects/{projectId}/locations/{location}/keyHandles/{keyHandleName}`. |