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

AKS block azure_active_directory_role_based_access_control always produces a warning due to managed field being both required and deprecated #25756

Closed
1 task done
adamzeyinsurity opened this issue Apr 25, 2024 · 2 comments

Comments

@adamzeyinsurity
Copy link

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 "+1" or "me too" comments, 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.2

AzureRM Provider Version

3.100.0

Affected Resource(s)/Data Source(s)

azurerm_kubernetes_cluster

Terraform Configuration Files

# Please note that this is not a working config, just a subset to illustrate where the problem lies

resource "azurerm_kubernetes_cluster" "cluster" {
    azure_active_directory_role_based_access_control {
        managed                 = true
        azure_rbac_enabled      = false
        tenant_id               = var.provider_tenant_id
        admin_group_object_ids  = [var.admin_k8s_group_id]
    }
}

Debug Output/Panic Output

N/A

Expected Behaviour

As part of the transition from AADv1 to AADv2, the "managed" field in the API only supports a value of "true" for new clusters. This field has a default value of "false" in azurerm. As a result, using AADv2 requires that the field be explicitly set to "true" in the terraform config. The expected behaviour is either that the field can be removed and will be defaulted to "true" (which is the only valid value) or that it can be left in-place set to "true".

Actual Behaviour

PR 25200 (#25200) marked the field as deprecated, producing a warning if the field is present and set to true. If you omit the field, it defaults to false, which will produce an error. If you include the field, you get the warning. There is no way to use AADv2 without producing either an error or a warning.

Steps to Reproduce

Run a terraform plan or apply that uses AADv2

Important Factoids

No response

References

#25200

@stephybun
Copy link
Member

Thanks for raising this issue @adamzeyinsurity.

The initial implementation of the AAD block and the way the behaviour has changed has unfortunately brought us to this situation. We appreciate the pro-activeness in migrating off the legacy Entra integration for AKS and in bringing your
config into a state that is agreeable with changes that will be made in 4.0. The reasoning for this is explained over in #25707.

Copy link

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 have found a problem that seems similar to this, 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 May 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants