Answers: <p>The <code>ImageTagMutability</code> property in ECR is not currently supported in CloudFormation, as verified by experimentation (nor is it part of the LifecyclePolicy property). There is sometimes lag between feature availability in CloudFormation, and the mutability flag <a href="https://aws.amazon.com/about-aws/whats-new/2019/07/amazon-ecr-now-supports-immutable-image-tags/" rel="nofollow noreferrer">was only introduced in late July</a>.</p>
  
  <p>This comes up elsewhere in the corners of AWS, including:</p>
  
  <ul>
  <li>AWS Global Accelerator - this entire service is not provisionable using CloudFormation.</li>
  <li>AWS WAF geo match rules cannot be created in CFN.</li>
  </ul>
  
Answers: CC BY-SA 4.0
Answers: 2019-09-04T13:53:01.653Z
Answers: 2019-09-04T13:53:01.653Z
Answers: Dan1701
Body: <p>When one would like to create an Elastic Container Registry then it is possible to set 'image tag mutability':</p>
  <blockquote>
  <p>Image tag mutability</p>
  <p>The image tag mutability setting for the
  repository. Select &quot;immutable&quot; to prevent image tags from being
  overwritten by subsequent image pushes using the same tag. Mutable
  Immutable</p>
  </blockquote>
  <p>According to <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-repository.html" rel="nofollow noreferrer">this user guide</a> it does not seem to be possible to configure this using AWS CloudFormation.</p>
  
Comments: CC BY-SA 4.0
Comments: 2019-10-14T07:04:55.810Z
Comments: As Dan1701 said unfortunately it takes some time for features to make it into CloudFormation. Not that this is a suitable answer, but just in case you have the ability to use a different tool... have a look at Terraform (which does support ECR immutable image tags) or Pulumi (which probably does, but I don't use it so am not sure).
Comments: Tim Malone
Tags: <aws-cloudformation><aws-ecr>
Title: How to set 'image tag mutability' using CloudFormation?
UserDisplayName: 030
ThreadText: # How to set 'image tag mutability' using CloudFormation?
  
  (Asked by: username_0 on 2019-09-04)
  
  When one would like to create an Elastic Container Registry then it is possible to set 'image tag mutability':
  
  > Image tag mutability
  >
  > The image tag mutability setting for the
  > repository. Select "immutable" to prevent image tags from being
  > overwritten by subsequent image pushes using the same tag. Mutable
  > Immutable
  
  According to [this user guide](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecr-repository.html) it does not seem to be possible to configure this using AWS CloudFormation.
  
  **Tags:** aws-cloudformation, aws-ecr
  
  > **Comments:**
  > **username_1**: As username_2 said unfortunately it takes some time for features to make it into CloudFormation. Not that this is a suitable answer, but just in case you have the ability to use a different tool... have a look at Terraform (which does support ECR immutable image tags) or Pulumi (which probably does, but I don't use it so am not sure).  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2019-09-04. Score: 3 | Accepted answer
  
  The `ImageTagMutability` property in ECR is not currently supported in CloudFormation, as verified by experimentation (nor is it part of the LifecyclePolicy property). There is sometimes lag between feature availability in CloudFormation, and the mutability flag [was only introduced in late July](https://aws.amazon.com/about-aws/whats-new/2019/07/amazon-ecr-now-supports-immutable-image-tags/).
  
  This comes up elsewhere in the corners of AWS, including:
  
  * AWS Global Accelerator - this entire service is not provisionable using CloudFormation.
  * AWS WAF geo match rules cannot be created in CFN.
  
  
  ---
  
  