-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
dependencies: update containerservice
to 2023-06-02-preview
#24473
dependencies: update containerservice
to 2023-06-02-preview
#24473
Conversation
Dependent on hashicorp/pandora#3612 |
go.mod
Outdated
@@ -17,7 +17,7 @@ require ( | |||
github.com/google/go-cmp v0.5.9 | |||
github.com/google/uuid v1.3.1 | |||
github.com/hashicorp/go-azure-helpers v0.65.0 | |||
github.com/hashicorp/go-azure-sdk v0.20240111.1094251 | |||
github.com/hashicorp/go-azure-sdk v0.20240111.1120634 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's been mentioned frequently that the go-azure-sdk
should always be bumped in a separate PR to avoid conflicts and the versions becoming outdated quickly, which has already happened in this case. Please remove this.
func flattenClusterDataSourceIdentity(input *managedclusters.ManagedClusterIdentity) (*[]interface{}, error) { | ||
if input == nil { | ||
return nil, nil | ||
} | ||
identityIds := make(map[string]identity.UserAssignedIdentityDetails) | ||
if input.UserAssignedIdentities != nil { | ||
for k, v := range *input.UserAssignedIdentities { | ||
identityIds[k] = identity.UserAssignedIdentityDetails{ | ||
PrincipalId: v.PrincipalId, | ||
ClientId: v.ClientId, | ||
} | ||
} | ||
} | ||
|
||
out := identity.SystemOrUserAssignedMap{ | ||
IdentityIds: identityIds, | ||
} | ||
if input.Type != nil { | ||
out.Type = identity.Type(*input.Type) | ||
} | ||
if input.PrincipalId != nil { | ||
out.PrincipalId = *input.PrincipalId | ||
} | ||
if input.TenantId != nil { | ||
out.TenantId = *input.TenantId | ||
} | ||
|
||
return identity.FlattenSystemOrUserAssignedMap(&out) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't be necessary anymore since a fix for this was pushed to Pandora
hashicorp/pandora#3614
func flattenClusterDataSourceIdentity(input *managedclusters.ManagedClusterIdentity) (*[]interface{}, error) { | |
if input == nil { | |
return nil, nil | |
} | |
identityIds := make(map[string]identity.UserAssignedIdentityDetails) | |
if input.UserAssignedIdentities != nil { | |
for k, v := range *input.UserAssignedIdentities { | |
identityIds[k] = identity.UserAssignedIdentityDetails{ | |
PrincipalId: v.PrincipalId, | |
ClientId: v.ClientId, | |
} | |
} | |
} | |
out := identity.SystemOrUserAssignedMap{ | |
IdentityIds: identityIds, | |
} | |
if input.Type != nil { | |
out.Type = identity.Type(*input.Type) | |
} | |
if input.PrincipalId != nil { | |
out.PrincipalId = *input.PrincipalId | |
} | |
if input.TenantId != nil { | |
out.TenantId = *input.TenantId | |
} | |
return identity.FlattenSystemOrUserAssignedMap(&out) | |
} |
hey @ms-henglu We’ve made some structural changes to
We’ve updated the Provider to use the new Go Module structure in PR #24636 - as such would you mind rebasing this Pull Request on top of Thanks! |
94b5cb8
to
29e15e1
Compare
Hi @tombuildsstuff , thanks! I've rebased this PR. Please take another look. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests look fine, thanks @ms-henglu LGTM 👍
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. |
No description provided.