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

kubernetes_cluster_resource - oms_agent workspace ID parsing broken #28575

Closed
1 task done
KimTEriksson opened this issue Jan 22, 2025 · 1 comment · Fixed by #28583
Closed
1 task done

kubernetes_cluster_resource - oms_agent workspace ID parsing broken #28575

KimTEriksson opened this issue Jan 22, 2025 · 1 comment · Fixed by #28583

Comments

@KimTEriksson
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave comments along the lines of "+1", "me too" or "any updates", they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment and review the contribution guide to help.

Terraform Version

1.8.5

AzureRM Provider Version

3.116.0

Affected Resource(s)/Data Source(s)

kubernetes_cluster_resource

Terraform Configuration Files

resource "azurerm_kubernetes_cluster" "k8s_uks" {
  ...snip...
  oms_agent {
    log_analytics_workspace_id = lower(data.azurerm_log_analytics_workspace.main.id)
  }
  ...snip...
}

Debug Output/Panic Output

Parsing is failing silently here:
https://github.com/hashicorp/terraform-provider-azurerm/blob/4c98155e5485dc6fac2610c4434f75bf2e99afe9/internal/services/containers/kubernetes_addons.go#L506

Expected Behaviour

log_analytics_workspace_id is set to data.azurerm_log_analytics_workspace.main.id

Actual Behaviour

log_analytics_workspace_id is set to null due to case sensitivity

Steps to Reproduce

No response

Important Factoids

No response

References

The same fix should work as in this issue #20478

@GrundstromT
Copy link

Line 506 need to be adjusted to be case insensitive as done for another part in the file for the issue #20478

if lawid, err := workspaces.ParseWorkspaceID(v); err == nil {

The line 506 should be adjusted to the following:
if lawid, err := workspaces.ParseWorkspaceIDInsensitively(v); err == nil {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants