diff --git a/internal/generic/resource.go b/internal/generic/resource.go index 7ebe244ac..24653e09b 100644 --- a/internal/generic/resource.go +++ b/internal/generic/resource.go @@ -394,7 +394,11 @@ func (r *genericResource) Create(ctx context.Context, request resource.CreateReq err = waiter.Wait(ctx, &cloudcontrol.GetResourceRequestStatusInput{RequestToken: output.ProgressEvent.RequestToken}, r.createTimeout) - id := aws.ToString(progressEvent.Identifier) + // If the resource failed to create, then Identifier may be a nil ptr + var id string + if progressEvent.Identifier != nil { + id = aws.ToString(progressEvent.Identifier) + } if err != nil { response.Diagnostics.Append(ServiceOperationWaiterErrorDiag("Cloud Control API", "CreateResource", err))