-
Notifications
You must be signed in to change notification settings - Fork 122
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
provider/hcloud: Add hcloud discovery #159
Conversation
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! Exactly what I need right now!
@ashwin-venkatesh @alvin-huang any chance you could review this PR ? Do you have somebody else from HashiCorp to suggest ? Thanks! |
test/tf/hcloud/versions.tf
Outdated
terraform { | ||
required_providers { | ||
hcloud = { | ||
source = "terraform-providers/hcloud" |
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.
Could you pin the provider to a version requirement here? We've had issues in the past of providers updating in the background to latest and failing tests when older resource arguments/attributes get deprecated.
@@ -0,0 +1,46 @@ | |||
provider "hcloud" { |
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.
Picking an arbitrary place but running a terraform fmt
in the test/tf/hcloud
directory will line up the equal signs and make this look nicer 😄
This LGTM but I would like another look from someone on @hashicorp/consul-core in case I missed something. |
@@ -59,6 +60,7 @@ var Providers = map[string]Provider{ | |||
"triton": &triton.Provider{}, | |||
"vsphere": &vsphere.Provider{}, | |||
"packet": &packet.Provider{}, | |||
"hcloud": &hcloud.Provider{}, |
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.
Question for @dnephin or @alvin-huang:
What should the determining factors be to have a provider added to the default provider list? If k8s
isn't a default should this new provider be part of the default set? Or maybe k8s
should be in the default too?
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 think with the switch to Go modules we lost the ability to pull in go-discover without k8s dependencies so maybe we should just put k8s in the default set (or separate out that provider dir into its own go module.
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 think we probably forgot to add k8s
into the map at the time? I don't recall a particular reason why it was excluded.
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.
Actually there's some notes in the original PR #55
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.
Yeah at the time we could have per-provider dependencies that wouldn't get used unless you pulled in that package. With Go modules that is no longer the case unless we were to add a go.mod to the k8s provider and version it specifically.
For this PR I see no reason to not make it default if the only reason k8s wasn't was due to dependencies.
Thanks to all the HashiCorp team for the kind and quick reaction :-) |
Thanks for the review. I have adapted the notes and committed the adjustments. |
Any chance this could be merged now? I'm very much looking forward to this. :) Fixes #73. |
version = "1.21.0" | ||
} | ||
} | ||
required_version = ">= 0.13" |
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.
Right now our circle ci configuration is setup to use terraform 0.12. So I have a feeling this will fail.
@alvin-huang Do you think we should update all the tf in this repo to 0.13 and use it or should we roll the version requirements of this PR back to tf 0.12 and do the 0.13 upgrade later.
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 think it would be best to pin it back to 0.12 and we can go through and migrate all the providers to 0.13 config at once at a separate time. @shortner can you make that change?
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.
Friendly ping @shortner. :)
Seems like the owner of this pull request is an inactive GitHub user. With all respect to the dev, I have opened a pull request that includes some fixes and enhancements over this PR. I hope it can be merged soon :) |
This Pull Request add the Implementation of the hcloud (Hetzner Cloud) provider.
Usage