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

add object similar to random_string resource which generates data without explicit taint #18179

Closed
kalfa opened this issue Jun 4, 2018 · 3 comments

Comments

@kalfa
Copy link

kalfa commented Jun 4, 2018

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:

  • 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'

@ghost
Copy link

ghost commented Jun 4, 2018

This issue has been automatically migrated to hashicorp/terraform-provider-random#31 because it looks like an issue with that provider. If you believe this is not an issue with the provider, please reply to hashicorp/terraform-provider-random#31.

@ghost ghost closed this as completed Jun 4, 2018
@kalfa
Copy link
Author

kalfa commented Jun 4, 2018

thanks

@ghost
Copy link

ghost commented Apr 3, 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 Apr 3, 2020
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants