Skip to content
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

Conversation

owenrumney
Copy link
Contributor

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

api_token name is used in the Provider and should match what is used
here in Terraformer
@googlebot
Copy link

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 @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@owenrumney
Copy link
Contributor Author

@googlebot I signed it!

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@@ -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
Copy link
Collaborator

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

Copy link
Contributor Author

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

Copy link
Collaborator

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

Copy link
Contributor Author

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

@sergeylanzman
Copy link
Collaborator

@owenrumney Thanks!

@sergeylanzman sergeylanzman merged commit 46ed7f4 into GoogleCloudPlatform:master Oct 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants