-
Notifications
You must be signed in to change notification settings - Fork 881
fix: Reduce variables needed for Docker template #3442
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
Conversation
examples/templates/docker/main.tf
Outdated
} | ||
|
||
provider "coder" { | ||
# host = data.coder_provisioner.me.os == "windows" ? "npipe:////.//pipe//docker_engine" : "unix:///var/run/docker.sock" |
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.
why is this commented out? this works on MacOS but not sure if it would on Windows
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.
Oops, wasn't intentional. Fixed!
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.
Cool - confirmed it still works
This should make initial setup a bit simpler!
fdb76f2
to
6aa6928
Compare
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.
Still works!
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.
Nice, liking the cleaner templates!
@@ -84,7 +46,7 @@ variable "docker_image" { | |||
} | |||
|
|||
resource "docker_volume" "home_volume" { | |||
name = "coder-${data.coder_workspace.me.owner}-${lower(data.coder_workspace.me.name)}-root" | |||
name = "coder-${data.coder_workspace.me.owner_id}-${lower(data.coder_workspace.me.id)}-root" |
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.
This change might trigger #3386 for certain users who like to keep up-to-date with our templates. I think this is a change we really want, but I'd like for some warning/notifying facility to be in place before we do.
At minimum, we should list this as a breaking change in the release notes and warn of the behavior (update template + update workspace = volume loss).
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.
I'll add it to the release notes on the patch.
We advertise that users shouldn't stay up-to-date with our templates, so I'm not very concerned about updating.
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.
We advertise that users shouldn't stay up-to-date with our templates, so I'm not very concerned about updating.
Hmm, I don't see this mentioned in examples
or e.g. the docker
template?
Anyway, my main motivation behind being extra careful about #3386 & co. is that I don't want our current users to lose confidence in Coder because they lost their volume (even if it's due to their own configuration/changes).
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.
Fair enough. I can also exclude this if you feel it's sketchy. It's not needed for the improvement.
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.
I'm going to exclude it for right now. It's not worth the possible tumult for users.
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.
Fair enough. I can also exclude this if you feel it's sketchy. It's not needed for the improvement.
If that's ok, we could at least defer it until we make the change to all templates? Since I don't know if/when we'll have a solution for #3386, I won't ask us to defer until then. But doing it all at once minimizes the spread, at least.
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.
Yup, removed!
PostgreSQL 13 doesn't support the M series architecture.
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.
Noticed there was one more case of name->id.
PS. Beautiful work with kreuzwerker/docker 2.20.2 😍
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com>
Hello @kylecarbs , could you please add reference to the issue this pull request is related to? |
This should make initial setup a bit simpler!