Skip to content

(aws-ecr): Repository.addToResourcePolicy returns incorrect result #12412

@jericht

Description

@jericht

The addToResourcePolicy method of the Repository construct is returning a AddToResourcePolicyResult with statementAdded to false (see code). It looks like it should be setting statementAdded to true instead.

Reproduction Steps

  1. Call addToResourcePolicy on an instance of the Repository class with a valid PolicyStatement argument

What did you expect to happen?

The return value of the method should have statementAdded as true.

What actually happened?

The return value of the method had statementAdded as false.

Environment

  • CDK CLI Version : 1.73.0
  • Framework Version: 1.73.0
  • Node.js Version: v12.20.0
  • OS : Linux
  • Language (Version): Typescript (4.0.5)

Other


This is 🐛 Bug Report

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-ecrRelated to Amazon Elastic Container RegistrybugThis issue is a bug.effort/mediumMedium work item – several days of effortp2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions