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_kubernetes_cluster - support for the azure_monitor_kubernetes_metrics property #19530

Merged

Conversation

ms-henglu
Copy link
Contributor

=== RUN   TestAccKubernetesCluster_azureMonitorProfile
=== PAUSE TestAccKubernetesCluster_azureMonitorProfile
=== CONT  TestAccKubernetesCluster_azureMonitorProfile
--- PASS: TestAccKubernetesCluster_azureMonitorProfile (999.95s)
PASS

@ms-henglu ms-henglu changed the title azurerm_kubernetes_cluster - azure_monitor_profile azurerm_kubernetes_cluster - support for the azure_monitor_profile property Dec 2, 2022
@ms-henglu
Copy link
Contributor Author

Hi @tombuildsstuff - Thanks for the code review. I've updated this PR as suggested. Please take another look, thanks!

@ms-henglu ms-henglu changed the title azurerm_kubernetes_cluster - support for the azure_monitor_profile property azurerm_kubernetes_cluster - support for the azure_monitor_kubernetes_metrics property Dec 5, 2022
@ms-henglu ms-henglu force-pushed the ticket-14362631-aks-azure-monitor-profile branch from 1f776a9 to 537aca8 Compare December 9, 2022 07:25
Comment on lines 310 to 329
"azure_monitor_kubernetes_metrics": {
Type: pluginsdk.TypeList,
MaxItems: 1,
Optional: true,
Elem: &pluginsdk.Resource{
Schema: map[string]*pluginsdk.Schema{
"metric_annotations_allow_list": {
Type: pluginsdk.TypeString,
Optional: true,
ValidateFunc: validation.StringIsNotEmpty,
},

"metric_labels_allow_list": {
Type: pluginsdk.TypeString,
Optional: true,
ValidateFunc: validation.StringIsNotEmpty,
},
},
},
},
Copy link
Member

@stephybun stephybun Dec 9, 2022

Choose a reason for hiding this comment

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

azure and kubernetes seem redundant here, perhaps this would be sufficient

Suggested change
"azure_monitor_kubernetes_metrics": {
Type: pluginsdk.TypeList,
MaxItems: 1,
Optional: true,
Elem: &pluginsdk.Resource{
Schema: map[string]*pluginsdk.Schema{
"metric_annotations_allow_list": {
Type: pluginsdk.TypeString,
Optional: true,
ValidateFunc: validation.StringIsNotEmpty,
},
"metric_labels_allow_list": {
Type: pluginsdk.TypeString,
Optional: true,
ValidateFunc: validation.StringIsNotEmpty,
},
},
},
},
"monitor_metrics": {
Type: pluginsdk.TypeList,
MaxItems: 1,
Optional: true,
Elem: &pluginsdk.Resource{
Schema: map[string]*pluginsdk.Schema{
"annotations_allowed": {
Type: pluginsdk.TypeString,
Optional: true,
ValidateFunc: validation.StringIsNotEmpty,
},
"labels_allowed": {
Type: pluginsdk.TypeString,
Optional: true,
ValidateFunc: validation.StringIsNotEmpty,
},
},
},
},

Copy link
Member

@stephybun stephybun left a comment

Choose a reason for hiding this comment

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

Thanks @ms-henglu LGTM 👍

@stephybun stephybun merged commit 6ec6670 into hashicorp:main Dec 13, 2022
stephybun added a commit that referenced this pull request Dec 13, 2022
favoretti pushed a commit to favoretti/terraform-provider-azurerm that referenced this pull request Jan 12, 2023
…tes_metrics` property (hashicorp#19530)

* `azurerm_kubernetes_cluster` - `azure_monitor_profile`

* change schema

* fmt

* rename fields

* fix minor issues in docs

Co-authored-by: Steph <steph@hashicorp.com>
favoretti pushed a commit to favoretti/terraform-provider-azurerm that referenced this pull request Jan 12, 2023
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 13, 2023
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.

3 participants