Skip to content
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

command/import: Fix allow-missing-config option #25352

Merged
merged 1 commit into from
Jun 24, 2020

Conversation

alisdair
Copy link
Contributor

We previously intentionally removed support for the allow-missing-config option to terraform import, requiring that all imported resources have matching config. See #24412.

However, the option was not removed from the import command, and it is widely used. This commit reintroduces support for importing with a missing configuration by falling back to implying the provider FQN based on the resource type.

Fixes #25294

@alisdair alisdair requested a review from a team June 23, 2020 18:15
@alisdair alisdair self-assigned this Jun 23, 2020
We previously intentionally removed support for the allow-missing-config
option to terraform import, requiring that all imported resources have
matching config. See #24412.

However, the option was not removed from the import command, and it is
widely used. This commit reintroduces support for importing with a
missing configuration by falling back to implying the provider FQN based
on the resource type.
@alisdair alisdair force-pushed the alisdair/fix-import-allow-missing-config branch from be8bc25 to 9ab9ef6 Compare June 23, 2020 18:21
@codecov
Copy link

codecov bot commented Jun 23, 2020

Codecov Report

Merging #25352 into master will increase coverage by 0.00%.
The diff coverage is 66.66%.

Impacted Files Coverage Δ
terraform/transform_import_state.go 92.80% <66.66%> (-0.91%) ⬇️
terraform/evaluate.go 53.60% <0.00%> (+0.45%) ⬆️
command/import.go 53.69% <0.00%> (+0.98%) ⬆️
terraform/node_resource_plan.go 93.44% <0.00%> (+1.63%) ⬆️

@alisdair alisdair merged commit f714a9d into master Jun 24, 2020
@alisdair alisdair deleted the alisdair/fix-import-allow-missing-config branch June 24, 2020 17:37
@ghost
Copy link

ghost commented Jul 25, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Jul 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0.13.0 Break Import with Missing Config
2 participants