Skip to content

Commit

Permalink
spring_cloud_java_deployment_resource wait LRO (#15833)
Browse files Browse the repository at this point in the history
Co-authored-by: heiazuo <[email protected]>
  • Loading branch information
qiqingzhang and heiazuo authored Mar 20, 2022
1 parent 4a92e4a commit 9876d70
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,13 @@ func resourceSpringCloudJavaDeploymentDelete(d *pluginsdk.ResourceData, meta int
return err
}

if _, err := client.Delete(ctx, id.ResourceGroup, id.SpringName, id.AppName, id.DeploymentName); err != nil {
future, err := client.Delete(ctx, id.ResourceGroup, id.SpringName, id.AppName, id.DeploymentName)
if err != nil {
return fmt.Errorf("deleting Spring Cloud Deployment %q (Spring Cloud Service %q / App %q / resource Group %q): %+v", id.DeploymentName, id.SpringName, id.AppName, id.ResourceGroup, err)
}
if err := future.WaitForCompletionRef(ctx, client.Client); err != nil {
return fmt.Errorf("waiting for deletion of %q: %+v", id, err)
}

return nil
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ resource "azurerm_spring_cloud_java_deployment" "test" {
runtime_version = "Java_11"
quota {
cpu = "500m"
memory = "4Gi"
cpu = "2"
memory = "2Gi"
}
environment_variables = {
Expand Down

0 comments on commit 9876d70

Please sign in to comment.