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
Match the config arguments to those in the provider. #256
Match the config arguments to those in the provider. #256
Conversation
api_token name is used in the Provider and should match what is used here in Terraformer
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
@googlebot I signed it! |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
providers/logzio/logzio_provider.go
Outdated
@@ -26,8 +26,8 @@ import ( | |||
|
|||
type LogzioProvider struct { | |||
terraform_utils.Provider | |||
token string | |||
baseURL string | |||
api_token string // this must match the Config in the 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.
Need to be apiToken, and baseURL
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.
The intention was to avoid having to make changes to the logzio terraform provider which might have knock on issues.
If the string doesn't match, like using baseURL
there coerceValue
function returns unexpected attribute baseURL
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.
in GetConfig
function it's can be api_token
as string in map, but golang variables name can be baseURL
and apiToken
. LogzioProvider get settings from GetConfig
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 misunderstood what you were saying, sorry.
Corrected now
@owenrumney Thanks! |
Terraform 0.12 is grabbing the values coming back for the provider logzio_terraform_provider but these aren't being matched in the terraformer provider for logzio.
Changing the looked up values in terraformer rather than the provide to avoid downstream breaking.
token -> api_token
baseURL -> base_url