-
Notifications
You must be signed in to change notification settings - Fork 59
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
When application.data contains an array getting Error expected type 'string' #240
Comments
The current provider only validates for schema.TypeMap: terraform-provider-fusionauth/fusionauth/resource_fusionauth_application.go Lines 91 to 95 in 5698966
Where for user.data it does some json related function in dataToUserRequest: terraform-provider-fusionauth/fusionauth/resource_fusionauth_user.go Lines 130 to 133 in 5698966
with jsonStringToMapStringInterface terraform-provider-fusionauth/fusionauth/helpers.go Lines 69 to 91 in 5698966
and userResponseToData: terraform-provider-fusionauth/fusionauth/resource_fusionauth_user.go Lines 186 to 190 in 5698966
with mapStringInterfaceToJSONString terraform-provider-fusionauth/fusionauth/helpers.go Lines 95 to 115 in 5698966
|
@TomKimber thanks for the recent update. I wanted to update the ticket to reconfirm the bug with 0.2.0, when not defining it the plan crashes because it is checking the applied data in the application.
When defining it in the specification the terraform plan:
it fails with the following error:
|
Thanks for reconfirming this issue with the current version @Aaron-Ritter. I'm aware of the inconsistent implementation of the "data" field across resources you've highlighted. I did look at fixing this as part of the last release but it wouldn't be possible without breaking changes to the schemas of the resources. I'll take another look at this to see if this can be fixed without breaking changes. If not, it'll be fixed as part of a larger release in the near future. |
Thanks for the clarification @TomKimber and great work! To be fair with 0.2.0 some of the configurations had to be updated to follow the new spec, so if you are referring to this as a breaking change, at least from our point of view is acceptable. In fact our deployment is broken and i guess anyone facing this has a broken upgrade with terraform too. We are only able to use it for restaging our environment (basically the first inital deployment) but as soon these data sets are populated by using it terraform breaks. update What i mean by breaking change is that e.g. form_configuration changed from:
to:
|
@Aaron-Ritter What version of the provider were you updating from? I've just tested with the prior release (v0.1.111) and I'm not able to replicate. When I try to use the format in your "from" version Terraform throws " Inappropriate value for attribute "form_configuration": list of object required". Certainly, your "to" example should have been the format for both versions. I suspect the Data field handling consolidation will require some breaking changes for some resources. Once that's nearing release, I'll note that both here and in the release notes. |
Thanks @TomKimber, a info would be great in the release notes. And to be fair, if it is similar to the issues i faced now To clarify, do you consider it a breaking change because it would require a complete re-staging with a new version of the terraform provider or similar to what i experienced now by adjusting the configuration for it to work again with my existing state? The last version i tested it properly was 0.1.108. Another example was from:
to:
|
@Aaron-Ritter Apologies - My definition of a breaking change here is a change that requires users to change their existing config to run a plan/apply following a provider version update e.g. I would consider your examples a result of breaking changes. The Data field change would be an example of this requiring users to change their existing Terraform configuration if they're currently passing maps into the Data field. Any state migrations required would be handled by the provider. This would not require a complete re-staging of your environments. |
When the following data is stored in the application data in a valid json format:
It will complain with the following error:
The text was updated successfully, but these errors were encountered: