This repository has been archived by the owner on Jan 21, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 262
Include LogicalID in name of terraform resource #555
Comments
kaufers
added a commit
to kaufers/infrakit
that referenced
this issue
May 22, 2017
Currently, the hostname for the Softlayer terraform resource is either the instance name (ie, "instance-12345") if the `@hostname_prefix` property is not set; else it's formatted as `<@hostname_prefix>-<timestamp>` (ie, "given-prefix-12345). This approach makes sense for workers but having a more predictable naming scheme for managers would be more usable. This commit updates the naming scheme to use the `LogicalID` (if set) instead of the timestamp when generating the hostname. See issue docker-archive#555. Note that the instance name remains unchanged; it's only the `hostname` property that is being updated. Signed-off-by: Steven Kaufer <kaufer@us.ibm.com>
kaufers
added a commit
to kaufers/infrakit
that referenced
this issue
May 22, 2017
Currently, the hostname for the Softlayer terraform resource is either the instance name (ie, "instance-12345") if the `@hostname_prefix` property is not set; else it's formatted as `<@hostname_prefix>-<timestamp>` (ie, "given-prefix-12345). This approach makes sense for workers but having a more predictable naming scheme for managers would be more usable. This commit updates the naming scheme to use the `LogicalID` (if set) instead of the timestamp when generating the hostname. See issue docker-archive#555. Note that the instance name remains unchanged; it's only the `hostname` property that is being updated. Signed-off-by: Steven Kaufer <kaufer@us.ibm.com>
PR 558 addressed updating the hostname with the logical ID. The outstanding part of this issue deals with the naming of the instance; should the instance (and the associated file) still have the timestamp suffix or should it use the logical ID? Note that the code currently looks for files that match |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Currently, the
hostname
for the Softlayer terraform resource is either the instance name (ie, "instance-12345") if the@hostname_prefix
property is not set; else it's formatted as<@hostname_prefix>-<timestamp>
(ie, "given-prefix-12345).This approach makes sense for workers but having a more predictable naming scheme for managers would be more usable. Instead of using the random timestamp could we just use the
LogicalID
?Then, for example, a manager with a
LogicalID
ofmgr-1
would either have ahostname
of:mgr-1
(if no hostname prefix is specified)<given-prefix>-mgr-1
My only concern here would be collisions. If a manager was in the process of being deleted then there might be a conflict until the VM was actually removed; but then the next
terraform apply
would work.Can we also use the
LogicalID
for the instance name? Then the managers would be named something likeinstance-mgr-1
and the associated file would beinstance-mgr-1.tf.json
. Again, we'd need to check for file collisions.Thoughts on this @chungers? Thanks!
The text was updated successfully, but these errors were encountered: