[!NOTE]
I've taken the liberty of adding more nil dereference checks around the existing logic, as I wasn't comfortable with how the current code was just blindly trusting the pointers would contain an actual reference 😬
While it would be great to have an acceptance test which covers this, we don't have time for that at the moment so I'll create an issue to remember that we need to add it later.
Fixes https://github.com/fastly/terraform-provider-fastly/issues/860