Skip to content

Commit

Permalink
skip resource whose action is create or delete
Browse files Browse the repository at this point in the history
  • Loading branch information
ms-henglu committed Oct 17, 2024
1 parent 54b97e9 commit 2fbe8d4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions types/from_plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ func ListResourcesFromPlan(p *tfjson.Plan) []AzureResource {
if resourceChange == nil || resourceChange.Change == nil {
continue
}
if len(resourceChange.Change.Actions) != 0 && (resourceChange.Change.Actions[0] == tfjson.ActionCreate || resourceChange.Change.Actions[0] == tfjson.ActionDelete) {
log.Printf("[WARN] resource %s.%s's planned action is %v, which is not supported. Please apply the changes before running the migration tool", resourceChange.Type, resourceChange.Name, resourceChange.Change.Actions)
continue
}

switch resourceChange.Type {
case "azapi_resource":
Expand Down

0 comments on commit 2fbe8d4

Please sign in to comment.