|
| 1 | +--- |
| 2 | +layout: "tfe" |
| 3 | +page_title: "Terraform Enterprise: tfe_hyok_configuration" |
| 4 | +description: |- |
| 5 | + Manages HYOK configurations. |
| 6 | +--- |
| 7 | + |
| 8 | +# tfe_hyok_configuration |
| 9 | + |
| 10 | +Defines a HYOK configuration resource. |
| 11 | + |
| 12 | +~> **NOTE:** This resource requires using the provider with HCP Terraform on the HCP Terraform Premium edition. Refer to [HCP Terraform pricing](https://www.hashicorp.com/en/pricing?product_intent=terraform&tab=terraform) for details. |
| 13 | + |
| 14 | +## Example Usage |
| 15 | + |
| 16 | +Basic usage: |
| 17 | + |
| 18 | +```hcl |
| 19 | +resource "tfe_hyok_configuration" "gcp_example" { |
| 20 | + organization = "my-hyok-org" |
| 21 | + name = "my-key-name" |
| 22 | + kek_id = "key1" |
| 23 | + agent_pool_id = "apool-MFtsuFxHkC9pCRgB" |
| 24 | + gcp_oidc_configuration_id = "gcpoidc-PuXEeRoSaK3ENGj9" |
| 25 | +
|
| 26 | + kms_options { |
| 27 | + key_location = "global" |
| 28 | + key_ring_id = "example-key-ring" |
| 29 | + } |
| 30 | +} |
| 31 | +``` |
| 32 | + |
| 33 | + |
| 34 | +## Argument Reference |
| 35 | + |
| 36 | +The following arguments are supported: |
| 37 | +* `name` - (Required) Label for the HYOK configuration to be used within HCP Terraform. |
| 38 | +* `kek_id` - (Required) Refers to the name of your key encryption key stored in your key management service. |
| 39 | +* `agent_pool_id` - (Required) The ID of the agent-pool to associate with the HYOK configuration. |
| 40 | +* `vault_oidc_configuration_id` - (Optional) The ID of the TFE Vault OIDC configuration. If this is set, no other OIDC configuration IDs should be set. |
| 41 | +* `aws_oidc_configuration_id` - (Optional) The ID of the TFE AWS OIDC configuration. If this is set, no other OIDC configuration IDs should be set. |
| 42 | +* `gcp_oidc_configuration_id` - (Optional) The ID of the TFE GCP OIDC configuration. If this is set, no other OIDC configuration IDs should be set. |
| 43 | +* `azure_oidc_configuration_id` - (Optional) The ID of the TFE Azure OIDC configuration. If this is set, no other OIDC configuration IDs should be set. |
| 44 | +* `organization` - (Optional) Name of the organization. If omitted, organization must be defined in the provider config. |
| 45 | + |
| 46 | +The `kms_options` block is optional, and is used to specify additional fields for some key management services. Supported arguments are: |
| 47 | +* `key_region` - (Optional) The AWS region where your key is located. |
| 48 | +* `key_location` - (Optional) The location in which the GCP key ring exists. |
| 49 | +* `key_ring_id` - (Optional) The root resource for Google Cloud KMS keys and key versions. |
| 50 | + |
| 51 | +## Attributes Reference |
| 52 | + |
| 53 | +In addition to all arguments above, the following attributes are exported: |
| 54 | + |
| 55 | +* `id` - The HYOK configuration ID. |
| 56 | + |
| 57 | +## Import |
| 58 | +HYOK configurations can be imported by ID. |
| 59 | + |
| 60 | +Example: |
| 61 | + |
| 62 | +```shell |
| 63 | +terraform import tfe_hyok_configuration.gcp_example hyokc-XqYizSPQmeiG1aHJ |
| 64 | +``` |
0 commit comments