This website requires JavaScript.
Explore
Help
Sign In
resilien
/
terraform
Watch
2
Star
0
Fork
You've already forked terraform
0
Code
Issues
Pull Requests
Projects
Releases
Wiki
Activity
cdebf2820d
terraform
/
command
/
testdata
/
import-provider-aliased
/
main.tf
9 lines
93 B
Terraform
Raw
Normal View
History
Unescape
Escape
core: provide config to all import context tests We're going to use config to determine provider dependencies, so we need to always provide a config when instantiating a context or we'll end up loading no providers at all. We previously had a test for running "terraform import -config=''" to disable the config entirely, but this test is now removed because it makes no sense. The actual functionality its testing still remains for now, but it will be removed in a subsequent commit when we start requiring that a resource to be imported must already exist in configuration.
2017-04-22 02:19:37 +02:00
provider
"
test
"
{
foo
=
"
bar
"
alias
=
"
alias
"
}
command: require resource to be in config before import Previously we encouraged users to import a resource and _then_ write the configuration block for it. This ordering creates lots of risk, since for various reasons users can end up subsequently running Terraform without any configuration in place, which then causes Terraform to want to destroy the resource that was imported. Now we invert this and require a minimal configuration block be written first. This helps ensure that the user ends up with a correlated resource config and state, protecting against any inconsistency caused by typos. This addresses #11835.
2017-05-17 03:26:20 +02:00
resource
"
test_instance
"
"
foo
"
{
}