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

Add support for user assigned identities in AKS #8737

Merged

Conversation

flo-02-mu
Copy link
Contributor

@flo-02-mu flo-02-mu commented Oct 3, 2020

This is an attempt to add support of user assigned identities in AKS as suggested in #7979
This is still a preview feature.

Fixes #7979

@flo-02-mu flo-02-mu changed the title 7979 aks user assigned identities Add support for user assigned identities in AKS Oct 3, 2020
Signed-off-by: flo_02_mu <[email protected]>
@flo-02-mu
Copy link
Contributor Author

The PR will become a lot smaller if the API upgrade is handled upfront, e.g. in #8982

@favoretti
Copy link
Collaborator

@flo-02-mu working on addressing feedback on #8982 as we speak..

@ghost ghost added size/M and removed size/XXL labels Nov 5, 2020
@tombuildsstuff tombuildsstuff modified the milestones: v2.39.0, v2.40.0 Nov 26, 2020
@cdunford

This comment has been minimized.

@tombuildsstuff tombuildsstuff modified the milestones: v2.40.0, v2.41.0 Dec 10, 2020
@etaham
Copy link

etaham commented Dec 16, 2020

I believe the functionality went GA a few days ago.

@tombuildsstuff tombuildsstuff modified the milestones: v2.41.0, v2.42.0 Dec 17, 2020
Copy link
Contributor

@timja timja left a comment

Choose a reason for hiding this comment

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

LGTM, I suggest adding more validation and have provided a PR for it at flo-02-mu#1

@tombuildsstuff / @katbyte any chance of another review ❤️

}, false),
},
"user_assigned_identity_id": {
Type: schema.TypeString,
Optional: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

there doesn't appear to be any validation for this actually being set,
I was able to submit this without and terraform started applying, I got this error back from the API:

Error: creating Managed Kubernetes Cluster "ss-demo-01-aks" (Resource Group "ss-demo-01-rg"): containerservice.ManagedClustersClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="LinkedInvalidPropertyId" Message="Property id '' at path '' is invalid. Expect fully qualified resource Id that start with '/subscriptions/{subscriptionId}' or '/providers/{resourceProviderNamespace}/'."

  on .terraform/modules/kubernetes/12-kubernetes-cluster.tf line 5, in resource "azurerm_kubernetes_cluster" "kubernetes_cluster":
   5: resource "azurerm_kubernetes_cluster" "kubernetes_cluster" {

I've created a PR for this here: flo-02-mu#1

after my change you get:

Error: when `identity.type` is UserAssigned then `user_assigned_identity_id` must be set

  on .terraform/modules/kubernetes/12-kubernetes-cluster.tf line 5, in resource "azurerm_kubernetes_cluster" "kubernetes_cluster":
   5: resource "azurerm_kubernetes_cluster" "kubernetes_cluster" {

@katbyte katbyte modified the milestones: v2.42.0, v2.43.0 Jan 8, 2021
@ghost ghost added size/L and removed size/M labels Jan 13, 2021
Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

hey @flo-02-mu

Thanks for this PR - apologies for the delayed review here!

I've taken a look through and left some comments inline but if we can fix those up then this should be otherwise good to merge 👍

Thanks!

Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

LGTM 👍

…igned-identities

# Conflicts:
#	azurerm/internal/services/containers/kubernetes_cluster_data_source.go
@ghost ghost added size/M and removed size/L labels Jan 14, 2021
@tombuildsstuff tombuildsstuff merged commit 45e5597 into hashicorp:master Jan 18, 2021
tombuildsstuff added a commit that referenced this pull request Jan 18, 2021
@flo-02-mu flo-02-mu deleted the 7979-aks-user-assigned-identities branch January 18, 2021 21:37
@favoretti
Copy link
Collaborator

favoretti commented Jan 19, 2021 via email

@ghost
Copy link

ghost commented Jan 21, 2021

This has been released in version 2.44.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 = "~> 2.44.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Feb 17, 2021

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!

@ghost ghost locked as resolved and limited conversation to collaborators Feb 17, 2021
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.

Support for user assigned identites for AKS
9 participants