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

azurerm_batch_pool - Fix terraform fails to execute(re-run) if azure_batch_pool is deleted outside of terraform #19780

Merged
merged 1 commit into from Jan 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion internal/services/batch/batch_pool_resource.go
Expand Up @@ -1064,7 +1064,9 @@ func resourceBatchPoolRead(d *pluginsdk.ResourceData, meta interface{}) error {
resp, err := client.Get(ctx, id.ResourceGroup, id.BatchAccountName, id.Name)
if err != nil {
if utils.ResponseWasNotFound(resp.Response) {
return fmt.Errorf("%s was not found", *id)
log.Printf("[INFO] %s was not found - removing from state", *id)
d.SetId("")
return nil
}
return fmt.Errorf("retrieving %s: %+v", *id, err)
}
Expand Down