The short answer: 404 NotAuthorizedOrNotFound does not tell you which of two things happened. Oracle's API error reference defines it as "A resource specified via the URI (path or query parameters) of the request was not found, or you do not have authorization to access that resource". The same code for an OCID that does not exist and for a resource that exists but your group cannot see. In practice that is three causes: the OCID, the compartment or the region is wrong; there is no policy covering your group in that compartment (or it is attached to the wrong compartment); or the CLI profile points at another tenancy or another region. Three read-only commands separate them, and it pays to start with the last one: the profile check.
What follows is what I do when this error lands in a terraform apply or in an oci ... get that worked yesterday.…