-
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 the daily_data_cap_in_gb & daily_data_cap_notifications_disabled properties #5480
Conversation
…it daily cap stop notify
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 PR @NickMetz! overall this looks great, but i have some questions i've left inline
azurerm/internal/services/applicationinsights/resource_arm_application_insights.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/applicationinsights/resource_arm_application_insights.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/applicationinsights/resource_arm_application_insights.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/applicationinsights/resource_arm_application_insights.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/applicationinsights/resource_arm_application_insights.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/applicationinsights/resource_arm_application_insights.go
Outdated
Show resolved
Hide resolved
@@ -89,6 +89,19 @@ func resourceArmApplicationInsights() *schema.Resource { | |||
|
|||
"tags": tags.Schema(), | |||
|
|||
"daily_cap": { |
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.
This might be better as
"daily_cap": { | |
"daily_traffic_cap_in_gb": { |
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.
This option is related to data which is actually stored in applications insight. So my recommendation would be daily_data_cap_in_gb. 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.
works for me!
ValidateFunc: validation.FloatBetween(0, 1000), | ||
}, | ||
|
||
"stop_send_notification_when_hit_cap": { |
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.
This property is awfully odd, could we invert and reword it to
"stop_send_notification_when_hit_cap": { | |
"daily_traffic_cap_notifications_enabled": { |
where true -> sends false, false -> send true
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.
Hi @katbyte,
agree with you awfully odd. But i think we should name it the other way. Because in general people will only touch this option if they want to stop notifications if cap is hit e.g. disabled = true.
daily_data_cap_notifications_disabled
true -> don't send messages
false -> send messages
default is false
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'm ok with daily_data_cap_notifications_disabled
, thanks!
…llingClient, remove defaults switch to computed, rename billing feature options
@katbyte can you please check my two open questions. If my recommendation is ok, this PR is ready to merge. |
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 those changes @NickMetz! LGTM now 👍
This has been released in version 1.43.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.43.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! |
This PR should fix #584, so we can set now a daily cap for Applications Insight in GB. Beside setting a daily cap for Applications Insight it's also possible now to disable notifications if daily cap is hit.
Compared to other resources this configuration is separated to it's own billing feature api. Which requires to update billing feature api once Application Insight was created.