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

azurerm_application_insights - support for sampling_percentage #4925

Merged
merged 7 commits into from
Nov 21, 2019
Merged

azurerm_application_insights - support for sampling_percentage #4925

merged 7 commits into from
Nov 21, 2019

Conversation

aqche
Copy link
Contributor

@aqche aqche commented Nov 20, 2019

Fixes #4487

Adds the sampling_percentage argument for the azurerm_application_insights resource.

--- PASS: TestAccAzureRMApplicationInsights_complete (92.46s)
PASS
ok      github.com/terraform-providers/terraform-provider-azurerm/azurerm       92.504s

Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

hey @aqche

Thanks for this PR :)

Taking a look through this is looking good - if we can fix up the minor comments then this otherwise LGTM 👍

Thanks!

azurerm/resource_arm_application_insights.go Outdated Show resolved Hide resolved
@@ -111,6 +116,10 @@ func resourceArmApplicationInsightsCreateUpdate(d *schema.ResourceData, meta int
ApplicationType: insights.ApplicationType(applicationType),
}

if v, ok := d.GetOk("sampling_percentage"); ok {
Copy link
Contributor

Choose a reason for hiding this comment

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

since this is a float it'll have a default value of 0.0 so this won't be valid; as such is it worth defaulting this value to 100% in the schema?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good to know, making 100% the default sounds good to me

@aqche
Copy link
Contributor Author

aqche commented Nov 21, 2019

@tombuildsstuff thanks for the feedback, pushed up updates and build is passing. feel free to take another look when you have the chance!

@ghost ghost removed the waiting-response label Nov 21, 2019
Type: schema.TypeFloat,
Optional: true,
Default: 100,
},
Copy link
Collaborator

Choose a reason for hiding this comment

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

As this is a percentage could we validate it is between 0 and 100?

@aqche
Copy link
Contributor Author

aqche commented Nov 21, 2019

@katbyte thanks for the review, added the validation and looks like the build is passing. Let me know what you think!

@katbyte katbyte added this to the v1.37.0 milestone Nov 21, 2019
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

thanks for the revisions @aqche! LGTM now 🚀

@katbyte katbyte merged commit 517c543 into hashicorp:master Nov 21, 2019
katbyte added a commit that referenced this pull request Nov 21, 2019
@aqche aqche deleted the azurerm_application_insights_sampling_percentage branch November 21, 2019 23:11
@ghost
Copy link

ghost commented Nov 26, 2019

This has been released in version 1.37.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.37.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Mar 29, 2020

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 👉 [email protected]. Thanks!

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

Successfully merging this pull request may close these issues.

Support sampling_percentage In azurerm_application_insights
3 participants