Skip to content

Commit

Permalink
Merge pull request #15482 from lonegunmanb/f-15474
Browse files Browse the repository at this point in the history
Data Source: `azurerm_automation_account` Fix #15474 by adding nil check
  • Loading branch information
tombuildsstuff authored Feb 17, 2022
2 parents 9ce9e71 + a3cfd32 commit 30ce074
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,10 @@ func dataSourceAutomationAccountRead(d *pluginsdk.ResourceData, meta interface{}
}
return fmt.Errorf("retreiving Automation Account Registration Information %s: %+v", id, err)
}
d.Set("primary_key", iresp.Keys.Primary)
d.Set("secondary_key", iresp.Keys.Secondary)
if iresp.Keys != nil {
d.Set("primary_key", iresp.Keys.Primary)
d.Set("secondary_key", iresp.Keys.Secondary)
}
d.Set("endpoint", iresp.Endpoint)
return nil
}

0 comments on commit 30ce074

Please sign in to comment.