Skip to content

AKS: omsagent config key doesn't honor case after disabling and then enabling it #10716

Open
@magodo

Description

@magodo

A first create AKS with omsagent set to enabled, the omsagent config key is case sensitive:

Create AKS with omsagent enabled
REQUEST
{
    ...
    "properties": {
        "addonProfiles": {
            "omsagent": {
                "config": {
                    "logAnalyticsWorkspaceResourceID": "/subscriptions/0-0-0-0/resourcegroups/example222/providers/microsoft.operationalinsights/workspaces/example222"
                },
                "enabled": true
            }
        }
    },
    ...
}

RESPONSE

(same as REQUEST)

Then if I disable the omsagent then enable it, the case of the omsagent.config is lost (i.e. logAnalyticsWorkspaceResourceID):

Enable omsagent after firstly disabling it
REQUEST
{
    ...
    "properties": {                                                                                                                                                                                                                                                                       
        "addonProfiles": {                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
            "omsagent": {                                                                                                                                                                                                                                                                 
                "config": {                                                                                                                                                                                                                                                               
                    "logAnalyticsWorkspaceResourceID": "/subscriptions/0-0-0-0/resourcegroups/example222/providers/microsoft.operationalinsights/workspaces/example222"                                                                                      
                },                                                                                                                                                                                                                                                                        
                "enabled": true                                                                                                                                                                                                                                                           
            }                                                                                                                                                                                                                                                                             
        }
    },
    ...
}
RESPONSE
{
    ...
    "properties": {                                                                                                                                                                                                                                                                       
        "addonProfiles": {                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
            "omsagent": {                                                                                                                                                                                                                                                                 
                "config": {                                                                                                                                                                                                                                                               
                    "loganalyticsworkspaceresourceid": "/subscriptions/0-0-0-0/resourcegroups/example222/providers/microsoft.operationalinsights/workspaces/example222"                                                                                      
                },                                                                                                                                                                                                                                                                        
                "enabled": true                                                                                                                                                                                                                                                           
            }                                                                                                                                                                                                                                                                             
        }
    },
    ...
}

The expected behavior is to always respect the case.

Related issue: hashicorp/terraform-provider-azurerm#8344

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    AKSService AttentionWorkflow: This issue is responsible by Azure service team.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions