cli icon indicating copy to clipboard operation
cli copied to clipboard

Global automation token cannot `log-tail` for newly created services

Open necipallef opened this issue 1 year ago • 1 comments

Version

Fastly CLI version v10.15.0 (0a1665b5) Built with go version go1.22.7 linux/amd64 (2024-11-05) Viceroy version: viceroy 0.9.7

What happened

I create an automation token on Fastly dashboard, it says it has access to All Services and it is Global, but I create a Compute service later and when I run fastly log-tail --service-id=<SERVICE ID> I get the following error:

INFO: Managed logging enabled on service REDACTED

WARNING: non-200 resp 403

ERROR: unrecoverable error, response code: 403.

If you believe this error is the result of a bug, please file an issue: https://github.com/fastly/cli/issues/new?labels=bug&template=bug_report.md

If I go to Fastly dashboard, delete the old token, and create new one exactly the same way, and use it with fastly profile update --automation-token then log-tail starts working.

necipallef avatar Nov 05 '24 15:11 necipallef

How quickly after creating the service did you attempt to log-tail it? As I understand it the log-tail operation won't work for some time after the service is created... at least a few minutes. I don't think the issue you are experiencing is related to the tokens at all, or even related to the CLI, it's just the behavior of Compute services.

kpfleming avatar Nov 05 '24 15:11 kpfleming