Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Service principal names are not validated and the error message is unhelpful #858

Open
cliffchapmanrbx opened this issue Jun 4, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@cliffchapmanrbx
Copy link

Terraform Version and Provider Version

Terraform version: Terraform v1.6.4
HCP provider version: v0.90.0

Affected Resource(s)

  • hcp_service_principal

Terraform Configuration Files

data "hcp_organization" "my-organization" {}


resource "hcp_service_principal" "org_admin_terraform" {
  name = "org_admin_terraform"
  parent = data.hcp_organization.my-organization.resource_name
}

Debug Output

This is the relevant output:

hcp_service_principal.org_admin_terraform: Creating...
╷
│ Error: Error creating service principal
│
│   with hcp_service_principal.org_admin_terraform,
│   on main.tf line 41, in resource "hcp_service_principal" "org_admin_terraform":
│   41: resource "hcp_service_principal" "org_admin_terraform" {
│
│ [POST /2019-12-10/iam/{parent_resource_name}/service-principals][500] ServicePrincipalsService_CreateServicePrincipal default  &{Code:13 Details:[] Message:couldn't prepare new service principal data}

Expected Behavior

The Web UI shows a validation error. Terraform should also show a validation error, preferably as early as possible.

If it must be late, the error message should indicate the exact issue.

image

Actual Behavior

No problems until terraform apply, and the produced error {Code:13 Details:[] Message:couldn't prepare new service principal data} doesn't help much.

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
@cliffchapmanrbx cliffchapmanrbx added the bug Something isn't working label Jun 4, 2024
@cliffchapmanrbx cliffchapmanrbx changed the title Service principle names are not validated and the error message is unhelpful Service principal names are not validated and the error message is unhelpful Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant