The Terraform Exporter for SAP BTP is a tool that helps export resources from a SAP BTP account. It generates Terraform scripts for the import of resources and enables the import of the Terraform state.
Is your feature request related to a problem? Please describe.
Currently the output generated during terraform apply if the user specifies the wrong subaccount is hard to read. As the API returns a 404 (see https://api.sap.com/api/APIAccountsService/path/getSubaccount) identifying that either subaccount or global account is not found, it would be helpful if this could be propagated in a more readable manner
Describe the solution you would like
In case of a 404 during a terraform apply for subaccounts the error message should be transformed to a more readable message
Describe alternatives you have considered
n/a
Additional context
> btptf create-json -s 0815
🚀 Creation of resource list started ...
⣽ collecting resources2024/10/15 12:22:34 error running Apply: exit status 1
Error: API Error Reading Resource Subaccount
with data.btp_subaccount.all,
on main.tf line 1, in data "btp_subaccount" "all":
1: data "btp_subaccount" "all"{
404 Not Found: [no body] [Error: 404]
Error: Value Conversion Error
with data.btp_subaccount.all,
on main.tf line 1, in data "btp_subaccount" "all":
1: data "btp_subaccount" "all"{
An unexpected error was encountered while verifying an attribute value
matched its expected type to prevent unexpected behavior or panics. This is
always an error in the provider. Please report the following to the provider
developer:
Expected framework type from provider logic:
types.MapType[types.SetType[basetypes.StringType]] / underlying type:
tftypes.Map[tftypes.Set[tftypes.String]]
Received framework type from provider logic: types.MapType[!!! MISSING TYPE
!!!] / underlying type: tftypes.Map[tftypes.DynamicPseudoType]
Path: labels
Thanks for the feature request. We evaluate it and update the issue accordingly.
Community Note
Voting for Prioritization
Please vote on this issue by adding a 👍 reaction to the original post 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.
Volunteering to Work on This Issue
If you are interested in working on this issue, please leave a comment.
If this would be your first contribution, please review the contribution guide.
What area do you want to see improved?
other
Is your feature request related to a problem? Please describe.
Currently the output generated during
terraform apply
if the user specifies the wrong subaccount is hard to read. As the API returns a 404 (see https://api.sap.com/api/APIAccountsService/path/getSubaccount) identifying that either subaccount or global account is not found, it would be helpful if this could be propagated in a more readable mannerDescribe the solution you would like
In case of a 404 during a
terraform apply
for subaccounts the error message should be transformed to a more readable messageDescribe alternatives you have considered
n/a
Additional context