hashicorp / terraform-provider-hcp

Terraform provider for HashiCorp Cloud Platform.
Mozilla Public License 2.0
50 stars 48 forks source link

`hcp_service_principal_key` documentation example has errors #1132

Open thomashashi opened 1 week ago

thomashashi commented 1 week ago

Terraform Version and Provider Version

Terraform version:  1.9.7
HCP provider version: 0.99.0

Affected Resource(s)

Terraform Configuration Files

[...]
resource "hcp_service_principal_key" "key" {
  service_principal = hcp_service_principal.example.resource_name
  rotation_triggers {
    rotation_time = time_rotating.key_rotation.rotation_rfc3339
  }
}

Debug Output

Screenshot 2024-11-13 at 13 28 08

Blocks of type "rotation_triggers" are not expected here.

Correct example

[...]
resource "hcp_service_principal_key" "key" {
  service_principal = hcp_service_principal.example.resource_name
  rotate_triggers = {
    rotation_time = time_rotating.key_rotation.rotation_rfc3339
  }
}

Community Note

thomashashi commented 1 week ago

From, FYI: https://registry.terraform.io/providers/hashicorp/hcp/latest/docs/resources/service_principal_key