Skip to content

Commit

Permalink
update code
Browse files Browse the repository at this point in the history
  • Loading branch information
neil-yechenwei committed Dec 2, 2022
1 parent 4407ff2 commit 8b9dd54
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/hashicorp/go-azure-sdk/resource-manager/managedservices/2019-06-01/registrationassignments"
"github.com/hashicorp/go-azure-sdk/resource-manager/managedservices/2022-10-01/registrationdefinitions"
"github.com/hashicorp/go-uuid"
"github.com/hashicorp/terraform-provider-azurerm/helpers/tf"
"github.com/hashicorp/terraform-provider-azurerm/internal/clients"
"github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk"
"github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation"
Expand Down Expand Up @@ -87,6 +88,10 @@ func resourceLighthouseAssignmentCreate(d *pluginsdk.ResourceData, meta interfac
}
}

if !response.WasNotFound(existing.HttpResponse) {
return tf.ImportAsExistsError("azurerm_lighthouse_assignment", id.ID())
}

parameters := registrationassignments.RegistrationAssignment{
Properties: &registrationassignments.RegistrationAssignmentProperties{
RegistrationDefinitionId: d.Get("lighthouse_definition_id").(string),
Expand Down

0 comments on commit 8b9dd54

Please sign in to comment.