enhance: compatible with Authorization.Scheme is null pointer
@@ -108,10 +108,13 @@ func doBaseFlattening(d *schema.ResourceData, serviceEndpoint *serviceendpoint.S
d.Set("service_endpoint_name", serviceEndpoint.Name)
d.Set("project_id", projectID)
d.Set("description", serviceEndpoint.Description)
+
+ if serviceEndpoint.Authorization != nil && serviceEndpoint.Authorization.Scheme != nil {
d.Set("authorization", &map[string]interface{}{
"scheme": *serviceEndpoint.Authorization.Scheme,
})
}
+}
// makeProtectedSchema create protected schema
func makeProtectedSchema(r *schema.Resource, keyName, envVarName, description string) {
