title: "no basic auth credentials" when trying to pull an image from a private ECR
body: <p>I have the following line somewhere in the middle of my Dockerfile to retrieve an image from my private ECR.</p>
  
  <pre><code>FROM **********.dkr.ecr.ap-southeast-1.amazonaws.com/prod/*************:ff03401
  </code></pre>
  
  <p>This is the error that I get in AWS Codebuild when trying to build this:</p>
  
  <blockquote>
    <p>Step 21/36 : FROM **********.dkr.ecr.ap-southeast-1.amazonaws.com/prod/*************:ff03401 
    Get https://**********.dkr.ecr.ap-southeast-1.amazonaws.com/prod/*************/manifests/ff03401: no basic auth credentials </p>
  </blockquote>
  
  <p>How can one provide these credentials in the most secure way, and in a way that can also be <code>terraform</code>ed?</p>