You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No, when the project is imported into state via terraform import, all of its configuration is imported, as it should. The problem is, when using the import blocks, the generated resource contains a very little information about the imported project. The problem is that we've created the project manually initially, and some custom quotas were applied.
When it gets imported into the state, the state contains the custom state info about the imported project A, but the generated resource does not contain the quotas at all. That leads to the fact, that resource HCL declaration of the project A is actually different from the state as the resource declaration relies on the default quotas.
Summary: This can be solved easily by just generating the resource with all available information on the server, so that the definition of the resource in the state file is identical to the definition of the generated HCL resource. Most cloud providers like AWS, GCP do exactly that.
It is not a bug as such, so I do not think the default here is necessary.
Panic Output
If Terraform produced a panic, please provide a link to a GitHub Gist containing the output of the crash.log.
Expected Behavior
The generated project resource should include all information, as it is typically done by an import block in other providers. For instance, the quotas information and etc.
Hi @mipo256 , thanks for your report. We will take it into consideration for the next version of the project resource. The current version is somewhat outdated. I guess we will need a few months to deliver it.
Hi there,
No, when the project is imported into state via
terraform import
, all of its configuration is imported, as it should. The problem is, when using theimport
blocks, the generated resource contains a very little information about the imported project. The problem is that we've created the project manually initially, and some custom quotas were applied.When it gets imported into the state, the state contains the custom state info about the imported project
A
, but the generated resource does not contain the quotas at all. That leads to the fact, that resource HCL declaration of the projectA
is actually different from the state as the resource declaration relies on the default quotas.Summary: This can be solved easily by just generating the resource with all available information on the server, so that the definition of the resource in the state file is identical to the definition of the generated HCL resource. Most cloud providers like AWS, GCP do exactly that.
Therefore, if the project that we've created
Terraform Version
Terraform version: v1.8.0
Selectel provider: 5.3.0
Openstack provider: 2.0.0
Affected Resource(s)
Resources:
selectel_vpc_project_v2
Terraform Configuration Files
I've created the demo repository to demonstrate the problem
Debug Output
It is not a bug as such, so I do not think the default here is necessary.
Panic Output
If Terraform produced a panic, please provide a link to a GitHub Gist containing the output of the
crash.log
.Expected Behavior
The generated project resource should include all information, as it is typically done by an
import
block in other providers. For instance, the quotas information and etc.Actual Behavior
The generated project resource looked like this:
Steps to Reproduce
Checkout to demo repository, fill the variables with the approriate values and run
./import.sh
to generate the resource block.Important Factoids
No
References
No
The text was updated successfully, but these errors were encountered: