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

New Resource: azurerm_data_factory_credential_user_managed_identity #24307

Merged
merged 25 commits into from
Jan 5, 2024
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
simplify update
  • Loading branch information
bruceharrison1984 committed Jan 3, 2024
commit e9d333b1e7beb7f0a503fe2e573ad5a17ea1c290
Original file line number Diff line number Diff line change
@@ -213,24 +213,15 @@ func (r DataFactoryCredentialUserAssignedManagedIdentityResource) Update() sdk.R

existing, err := client.CredentialOperationsGet(ctx, *id, credentials.CredentialOperationsGetOperationOptions{})
if err != nil {
if existing.HttpResponse.Status == "404" {
return fmt.Errorf("checking for presence of existing %s: %+v", id.ID(), err)
}
return fmt.Errorf("checking for presence of existing %s: %+v", id.ID(), err)
}

credential := credentials.ManagedIdentityCredentialResource{
Type: existing.Model.Type,
Name: existing.Model.Name,
Id: existing.Model.Id,
Properties: credentials.ManagedIdentityCredential{
Annotations: existing.Model.Properties.Annotations,
Description: existing.Model.Properties.Description,
TypeProperties: &credentials.ManagedIdentityTypeProperties{
ResourceId: existing.Model.Properties.TypeProperties.ResourceId,
},
},
if existing.Model == nil {
return fmt.Errorf("model was nil for %s", id)
}

credential := *existing.Model

if metadata.ResourceData.HasChange("description") {
credential.Properties.Description = &data.Description
}
Loading