Hello,
today the import {} blocks are a great way to import into the tfstate. The gap i see however is that imports are assumed to be used in a single workspace. There are 2 scenarios where this causes problems:
- using
terraform workspace
if i am not using the default workspace today there is no way to specify to import {} which workspace.
- using .tfvars files for environment separation
if im using a single workspace but calling terraform with -var-files=dev.tfvars then the import blocks are not helpful after a single deployment
I can think of a few options to resolve but I will propose that the import blocks be definable in a new file type *.tfimports and then referencable via the command line like -var-files, ie. -imports=dev.tfimports