-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Add support for provisioners to modules #1240
Comments
+1 |
2 similar comments
+1 |
+1 |
Interesting idea, I wonder, do you think Or the |
I agree with @catsby that the null resource + The biggest complication here is: how do we know when a module is new? Do we just do it the first time a module completely applies? What if resources are added/removed to a module? Do we do it whenever dependent resources in the module recreate? etc. I'm not saying those are unsolvable problems by any means, but I think we have a ways to go in core land before we can look into this (such as splitting provisioners out into their own graph nodes). In the mean time, there is a great workaround with |
Is there documentation for I'm trying to module "server" {
source="./openstack"
}
resource "null_resource" "something" {
triggers {
# What goes here?
}
provisioner "remote_exec" {
inline = [
"echo Hello world"
]
}
} edit: Looks like |
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. |
It is possible to use provisioners inside the module's code, but in case of
local-exec
, I'd personally discourage people from doing so (depending on what they're trying to do obviously).I think it's hard to guess for the module's author what platform that local system will be etc. etc.
I can imagine the implementation could be as simple as this:
The text was updated successfully, but these errors were encountered: