-
-
Notifications
You must be signed in to change notification settings - Fork 72
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
Error "Provider produced invalid object" when import existing commercetools_project_settings into terraform state #538
Comments
Looks like it is something to do with |
Hi @stanislavhordiyenko Thanks for the additional info. I will take a look! |
@demeyerthom please let me know if you need more information on this issue. I am more than happy to provide you with more details. |
Hi @stanislavhordiyenko I am having some issue reproducing the settings. Could you maybe provide me with the bit of terraform you are trying to apply, as well as the json of the project before you run the terraform plan/apply? I think this is related to unexpected values coming back from the API. Also, I am not 100% certain what configuration is |
@demeyerthom I will create a separate CT project this week, reproduce a bug there, and then will share tf with you as well as the access to the project (I will need an email to invite). |
@demeyerthom I was able to reproduce the issue in a blank CT project. Could you please let me know how can I share access to the project with you as I need to add your email. Alternatively, I can share my tf file with API key with you so that you can run it locally. Please, suggest a secure channel for communication. Thank you. |
Terraform file:
Project JSON before apply:
@demeyerthom as I said earlier, I am more than happy to provide you access to the project as well as the keys so that you can reproduce the issue on your local machine. This is a test project and no confidential data can be found there. Thank you. |
Hi @stanislavhordiyenko Gave it another go with your terraform and a clean trial environment. I noticed that your json has some country codes that are not default, as well as the indexing for products etc enabled. Did this happen manually before doing the apply? I made the same changes by hand to bring the state in line, but the terraform import still succeeds. Some of the projects fields are eventually consistent (like the search statusses) which can cause errors when terraform receives a different status from what it expected. You can add me to the project if you want, I can take a look there if I can reproduce it. |
Version information
Describe the bug
I would like to create
commercetools_project_settings
resource and map it (with import { }) to already created project in Commercetools. When I run plan, I get the error below:Unfortunately, no information is provided when I ran plan command with debug option, no enough information what went wrong.
I added all scopes for API key.
I usually add a bare minimum to the resource, and then add import block so that terraform can show me exactly what is missing or needs to be changed, so that I can reflect this in code.
Could you please suggest me what information to provide so that we can identify and fix the issue?
On contrary, when I run this on an empty project with no configuration, it works. Even with limited scopes for the API key.
Thank you.
The text was updated successfully, but these errors were encountered: