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

Added Terraform Azure Partner ID #4663

Merged
merged 4 commits into from
Oct 24, 2019
Merged

Added Terraform Azure Partner ID #4663

merged 4 commits into from
Oct 24, 2019

Conversation

echuvyrov
Copy link
Contributor

Added Terraform Azure Partner GUID

@ghost ghost added the size/XS label Oct 19, 2019
} else {
// otherwise, if pid is not present in config files, send Terraform GUID
terraformGUID := "222c6c49-1b0a-5959-a213-6608f9eb8820"
client.UserAgent = fmt.Sprintf("%s pid-%s", client.UserAgent, terraformGUID)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use only a single Sprintf after the if else (with a local variable), to eliminate the code duplication?

Copy link
Collaborator

@katbyte katbyte Oct 21, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
client.UserAgent = fmt.Sprintf("%s pid-%s", client.UserAgent, terraformGUID)
if partnerID == "" {
partnerID := "222c6c49-1b0a-5959-a213-6608f9eb8820"
}
client.UserAgent = fmt.Sprintf("%s pid-%s", client.UserAgent, partnerID)

@katbyte
Copy link
Collaborator

katbyte commented Oct 21, 2019

Hi @echuvyrov,

Could you please explain the rationale for this PR & change? What does that GUID represent?

@katbyte katbyte added this to the v1.36.0 milestone Oct 24, 2019
@katbyte katbyte merged commit 45731d5 into hashicorp:master Oct 24, 2019
tombuildsstuff added a commit that referenced this pull request Oct 24, 2019
@ghost
Copy link

ghost commented Oct 29, 2019

This has been released in version 1.36.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 1.36.0"
}
# ... other configuration ...

@schuettecarsten
Copy link

schuettecarsten commented Oct 29, 2019

Sorry, this change is absolutely unacceptable.
If no provider_id is specified, then no provider_id should be sent to Azure.

I've created #4747 to remove the default partner_id.
Please read my explanation there and upvote the bug report.

@tesharp
Copy link
Contributor

tesharp commented Oct 29, 2019

To ask same as @katbyte
Could you please explain the rationale for this PR & change?
Why has this been added as default?

@OliverCole
Copy link

@paultyng I understand you want to lock #4747, but I think there is the unresolved question of why @katbyte’s reasonable query was either ignored or answered out of band?

@echuvyrov
Copy link
Contributor Author

Apologies for not responding to this right away.

As Mitchell mentioned in his response, @katbyte and I work together on the Terraform provider for Azure (although she does all the heavy lifting). We have weekly syncs where we discuss issues that our joint customers bring to us and pending PRs. We discussed the Partner ID integration during one of the calls and did not loop back around to respond on the PR what had been discussed. That was a major oversight that we will work to avoid in the future.

@OliverCole
Copy link

@echuvyrov Thanks for clarifying.

@ghost
Copy link

ghost commented Nov 24, 2019

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators Nov 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants