-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
azurerm_application_insights
- support for sampling_percentage
#4925
Conversation
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.
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!
@@ -111,6 +116,10 @@ func resourceArmApplicationInsightsCreateUpdate(d *schema.ResourceData, meta int | |||
ApplicationType: insights.ApplicationType(applicationType), | |||
} | |||
|
|||
if v, ok := d.GetOk("sampling_percentage"); ok { |
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.
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?
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.
good to know, making 100% the default sounds good to me
Co-Authored-By: Tom Harvey <[email protected]>
…tps://github.com/aqche/terraform-provider-azurerm into azurerm_application_insights_sampling_percentage
@tombuildsstuff thanks for the feedback, pushed up updates and build is passing. feel free to take another look when you have the chance! |
Type: schema.TypeFloat, | ||
Optional: true, | ||
Default: 100, | ||
}, |
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.
As this is a percentage could we validate it is between 0 and 100?
@katbyte thanks for the review, added the validation and looks like the build is passing. Let me know what you think! |
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.
thanks for the revisions @aqche! LGTM now 🚀
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 ... |
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! |
Fixes #4487
Adds the
sampling_percentage
argument for theazurerm_application_insights
resource.