-
-
Notifications
You must be signed in to change notification settings - Fork 331
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
feat: do not add a the Name tag for docker+machine >= 0.16.2 #522
feat: do not add a the Name tag for docker+machine >= 0.16.2 #522
Conversation
Also see #521 for long-wan-ep's test. |
Still discussing the |
Using the |
Tested out the prefix for the machine name, it looks good to me. One thing to note is that gitlab-runners will add |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, tested with default example
🎉 This PR is included in version 5.2.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Description
This PR checks the version of the docker machine and adds the Name tag if it is not done by the driver itself. It also removes the second
Name
tag from theamazonec2-tags
in theconfig.toml
. In consequence it is no longer possible to change the Name of the Runners as theName
tag is now added by the docker-machine driver (for versions >= 0.16.2).docker_machine_version
>= 0.16.2 automatically adds the Name tag to the EC2 instances. Adding another Name tag here causes the EC2 creation process to fail.To be able to configure the name,
var.overrides["name_docker_machine_runners"]
is added as prefix to the name of the docker machine which is used as name for the EC2 instance by the driver.The main logic was taken from hashicorp/terraform#22688 (comment)
Closes #521
Migrations required
No.
Verification
local.tf
only. Returnstrue
if version >= 0.16.2config.toml
for versions >= 0.16.2 withoverrides["name_docker_machine_runners"]
. No Name tag present.config.toml
for versions >= 0.16.2 withoutoverrides["name_docker_machine_runners"]
. No Name tag present.config.toml
for versions < 0.16.2 withoverrides["name_docker_machine_runners"]
. No Name tag equals the name set in the override.config.toml
for versions < 0.16.2 withoutoverrides["name_docker_machine_runners"]
. Name tag showsvar.environment + "-docker-machine"