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

docker-build declares its own provider and therefore cannot be easily deleted #267

Closed
JavaScriptBach opened this issue Feb 9, 2022 · 7 comments · Fixed by #314
Closed

Comments

@JavaScriptBach
Copy link

Description

The docker-build submodule declares its own docker provider. This means that if I create an instance of this module and later try to delete it, terraform plan will fail with an error like this:

│ Error: Provider configuration not present
│
│ To work with module.docker_image.docker_registry_image.this (orphan) its original provider configuration at
│ module.docker_image.provider["registry.terraform.io/kreuzwerker/docker"] is required, but it has been removed. This occurs when a provider configuration is removed while objects
│ created by that provider still exist in the state. Re-add the provider configuration to destroy module.docker_image.docker_registry_image.this (orphan), after which you can
│ remove the provider configuration again.

This doesn't play well with CI pipelines as the only way to fix this is to manually run terraform state rm. Can you instead tell users to properly declare their docker provider in their root module instead?

See https://stackoverflow.com/a/58403262 for more information.

@github-actions
Copy link

This issue has been automatically marked as stale because it has been open 30 days
with no activity. Remove stale label or comment or this issue will be closed in 10 days

@github-actions github-actions bot added the stale label Mar 12, 2022
@github-actions
Copy link

This issue was automatically closed because of stale in 10 days

@ezawadski-deloitte
Copy link

Re-open this issue. Still a very frustrating issue I deal with regularly.

@antonxo
Copy link

antonxo commented May 23, 2022

I can confirm that this is quite confusing.

@antonbabenko
Copy link
Member

I don't know what I was thinking about while making this, so I will fix this tomorrow :)

@antonbabenko
Copy link
Member

antonbabenko commented May 23, 2022

This issue has been resolved in version 3.2.1 🎉

Today is better than tomorrow!

@github-actions
Copy link

github-actions bot commented Nov 8, 2022

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants