diff --git a/chronicle/provider.go b/chronicle/provider.go index 48c5179..1d96fe4 100644 --- a/chronicle/provider.go +++ b/chronicle/provider.go @@ -303,7 +303,7 @@ func getAPIAuthOpts(d *schema.ResourceData) []chronicle.Option { if v, ok := d.GetOk("backstoryapi_credentials"); ok { opts = append(opts, chronicle.WithBackstoryAPICredentials(v.(string))) - } else if v, ok := d.GetOk("backstoryapi_access_token"); ok { + } else if v, ok := d.GetOk("backstoryapi_credentials"); ok { opts = append(opts, chronicle.WithBackstoryAPIAccessToken(v.(string))) } else { env := envSearch(chronicle.BackstoryAPIEnvVar) @@ -314,7 +314,7 @@ func getAPIAuthOpts(d *schema.ResourceData) []chronicle.Option { if v, ok := d.GetOk("ingestionapi_credentials"); ok { opts = append(opts, chronicle.WithIngestionAPICredentials(v.(string))) - } else if v, ok := d.GetOk("ingestionapi_access_token"); ok { + } else if v, ok := d.GetOk("ingestionapi_credentials"); ok { opts = append(opts, chronicle.WithIngestionAPIAccessToken(v.(string))) } else { env := envSearch(chronicle.IngestionAPIEnvVar)