-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Fix contradiction in terms with provider documentation (#10815) #10874
Conversation
(Test failed 1/2 on Travis' timeout.) |
@@ -53,7 +53,7 @@ var scalewayMutexKV = mutexkv.NewMutexKV() | |||
func providerConfigure(d *schema.ResourceData) (interface{}, error) { | |||
config := Config{ |
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.
please leave the access_key
in for now, for backwards compatibility.
It could look like this:
apiKey := ""
if v, ok := d.Get("token").(string); ok {
apiKey = v
} else {
if v, ok := d.Get("access_key").(string); ok {
apiKey = v
}
}
…
Config{
APIKey: apiKey,
}
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.
Sorry for the delay, fixed.
@@ -10,17 +10,17 @@ import ( | |||
func Provider() terraform.ResourceProvider { | |||
return &schema.Provider{ | |||
Schema: map[string]*schema.Schema{ | |||
"access_key": &schema.Schema{ |
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.
please keep access_key
here and mark it as Deprecated: true,
, for backwards compatability.
e.g.
"access_key": &schema.Schema{
Deprecated: true,
},
"token": &schema.Schema{
},
…
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.
Sorry for the delay, fixed.
hey @OJFord, thanks for making the requested adjustments. Sadly the tests are now broken:
would you mind adjusting the compilation errors? |
The parameters previously termed by Terraform: 1. Organization 2. Access key Are referred to, respectively, by Scaleway [0] as: 1. Access key 2. Token which is a confusing contradiction for a user. Since Scaleway terms (1) both 'access key' [0] and 'organization ID' [1], @nicolai86 suggested keeping the latter as already used, but changing (2) for 'token'; removing the contradiction. This commit thus changes the parameters to: 1. Organization 2. Token Closes hashicorp#10815. [0] - https://cloud.scaleway.com/#/credentials [1] - https://www.scaleway.com/docs/retrieve-my-organization-id-throught-the-api
Scaleway now provides x86 servers [0] as well as ARM. This commit removes 'ARM' from various references suggesting that might be the only option. [0] - https://blog.online.net/2016/03/08/c2-insanely-affordable-x64-servers/
@nicolai86 Sorted. |
This LGTM :) Thanks for all the work on this @OJFord and @nicolai86 |
properly fetch configuration from env - leftover from #10874
properly fetch configuration from env - leftover from #10874
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. |
This PR fixes a contradiction in the API access terminology used by Scaleway and Terraform; each previously using
access_key
for different parameters. Discussion in #10815.I've also included a removal of 'ARM' from the documentation (e.g. 'ARM server') to reflect the fact that Scaleway now also provides x86 servers.