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

Better error message needed when trying to create tenant in region when one already exists #5967

Open
ocofaigh opened this issue Feb 4, 2025 · 1 comment
Labels
service/Cloud Logs Issues related to Cloud Logs

Comments

@ocofaigh
Copy link
Contributor

ocofaigh commented Feb 4, 2025

IBM Cloud only supports 1 tenant per region. When you try to create a new tenant in a region that already has one, you get this error:

 2025/02/03 16:57:52 Terraform apply | Error: ---
 2025/02/03 16:57:52 Terraform apply | id: terraform-99c5b7b1
 2025/02/03 16:57:52 Terraform apply | summary: 'CreateTenantWithContext failed: Conflict'
 2025/02/03 16:57:52 Terraform apply | severity: error
 2025/02/03 16:57:52 Terraform apply | resource: ibm_logs_router_tenant
 2025/02/03 16:57:52 Terraform apply | operation: create
 2025/02/03 16:57:52 Terraform apply | component:
 2025/02/03 16:57:52 Terraform apply |   name: github.com/IBM-Cloud/terraform-provider-ibm
 2025/02/03 16:57:52 Terraform apply |   version: 1.71.3
 2025/02/03 16:57:52 Terraform apply | ---

It is very hard for a consumer to know what this error means. Requesting a better error message to be displayed that is more clear to the end user.

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform CLI and Terraform IBM Provider Version

Affected Resource(s)

  • ibm_logs_router_tenant

Terraform Configuration Files

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.

# Copy-paste your Terraform configurations here - for large Terraform configs,
# please share a link to the ZIP file.

Debug Output

Panic Output

Expected Behavior

Actual Behavior

Steps to Reproduce

  1. terraform apply

Important Factoids

References

  • #0000
@github-actions github-actions bot added the service/Cloud Logs Issues related to Cloud Logs label Feb 4, 2025
@ocofaigh
Copy link
Contributor Author

ocofaigh commented Feb 6, 2025

Similar request for this error. Consumer has no idea what it means:

 2025/02/06 07:20:31 Terraform apply | Error: ---
 2025/02/06 07:20:31 Terraform apply | id: terraform-b13d0bdb
 2025/02/06 07:20:31 Terraform apply | summary: 'CreateTenantWithContext failed: Bad Request'
 2025/02/06 07:20:31 Terraform apply | severity: error
 2025/02/06 07:20:31 Terraform apply | resource: ibm_logs_router_tenant
 2025/02/06 07:20:31 Terraform apply | operation: create
 2025/02/06 07:20:31 Terraform apply | component:
 2025/02/06 07:20:31 Terraform apply |   name: github.com/IBM-Cloud/terraform-provider-ibm
 2025/02/06 07:20:31 Terraform apply |   version: 1.74.0
 2025/02/06 07:20:31 Terraform apply | ---

Edit: Turns out this error means the value for 'targets.name' is not valid. The value must be between 1 and 35 characters in length and can only contain these characters: ^[a-zA-Z][a-zA-Z0-9-]*$."
I created a new issue to track adding validation for that in the provider

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service/Cloud Logs Issues related to Cloud Logs
Projects
None yet
Development

No branches or pull requests

1 participant