You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the random_string resource needs tainting to generate another random string.
Would it be useful to have a similar object which actually generate a string everytime, not only when tainted.
The use case (which I am facing now) is:
have dumb worker(s) with names (actual hostnames, via cloudinit in my case) genearated via random_string
the master service registers the worker(s) with their hostname name, it needs to be unique
when a worker registers (after deployment or after reboots), if master finds the same name, it assumes it's the same worker and will assume some pre-existing data structure present
in this scenario if I rebuild a worker, but I forget to taint the random_string resource, it will come up with the same name, which creates a number of problems.
the only solution in my scenario for this is to wrap terraform to some scripts which tain the resource.
the weak point is that it's hard to understand when the random resource needs tainting. It requires tainting if and only if the aws instance is re-created. not always nor never.
Preferable soltion
have the random string generated everytime the aws_instance/aws_spot_request is generated.
ideally it will not force the instance to be recreated everytime, but obtain the random string when it's the instance is re-created and keep the same name if it's untouched or only re-provisioned.
To be honest, I have no clue how to obtain it, I don't think a "data" object would cover the use case.
AIUI it would generate a string at every 'plan'
The text was updated successfully, but these errors were encountered:
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
locked and limited conversation to collaborators
Apr 3, 2020
This issue was closed.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This is a feature request.
Currently the random_string resource needs tainting to generate another random string.
Would it be useful to have a similar object which actually generate a string everytime, not only when tainted.
The use case (which I am facing now) is:
in this scenario if I rebuild a worker, but I forget to taint the random_string resource, it will come up with the same name, which creates a number of problems.
the only solution in my scenario for this is to wrap terraform to some scripts which tain the resource.
the weak point is that it's hard to understand when the random resource needs tainting. It requires tainting if and only if the aws instance is re-created. not always nor never.
Preferable soltion
have the random string generated everytime the aws_instance/aws_spot_request is generated.
ideally it will not force the instance to be recreated everytime, but obtain the random string when it's the instance is re-created and keep the same name if it's untouched or only re-provisioned.
To be honest, I have no clue how to obtain it, I don't think a "data" object would cover the use case.
AIUI it would generate a string at every 'plan'
The text was updated successfully, but these errors were encountered: