-
Notifications
You must be signed in to change notification settings - Fork 6
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
Support override resource unconditionally #4
Comments
Would be nice to have this feature, maybe as an "force-overwrite" option |
@n0rad Thanks for reporting this issue. I agree that there are use cases in which an existing file must be extended. The current behavior of the I am considering an implementation of a separate resource |
👋 I agree that the default behavior should be to fail if the resource already exists, like the convention of terraform. For resources like files and folders, I think users can face more often modifications outside of terraform than usual other terraform resource and so to me the provider should strongly support it. I don't think you have to create another resource since like @StopDenBus said, a flag on the existing resource will probably be enough, but it's up to you. To me users setting the flag to true make it explicilt that terraform must own the content, so I don't think you have to support being able to restore the content, but again it's up to you 🙂 |
I agree with @n0rad. You don't need to create a new resource. Forcing overwrite content means "I know what i do and I have read the small print". |
When declaring a resource that already exists, the provider fail with
Error: file resource: file exists
It could be nice to have a way to make provider's resources override existing resources unconditionally since the provider can be considered as owner of those resource.
In the same manner, when a resource handle by the provider is deleted by something else, the terraform plan is failing because the resource is not found instead of planning to re-write the resource.
The text was updated successfully, but these errors were encountered: