awsx.ecr.RegistryImage
deletion fails after credential refresh
#1537
Labels
awaiting-upstream
The issue cannot be resolved without action in another repository (may be owned by Pulumi).
kind/bug
Some behavior is incorrect or out of spec
Describe what happened
I'm using https://www.pulumi.com/registry/packages/awsx/api-docs/ecr/registryimage/ to manage Docker images stored in ECR. Normally, I can create and delete these resources correctly by running
pulumi up
. However, if I've been away long enough to need to refresh my AWS credentials, thenawsx.ecr.RegistryImage
deletions are (and remain) broken.Here's an example timeline:
aws sso login
pulumi up
. Apulumi_awsx.ecr.RegistryImage
is created.RegistryImage
out for a different one (different Pulumi resource name, different image to push).pulumi up
again. This works: it creates a newpulumi_awsx.ecr.RegistryImage
, and at the end of the run deletes the oldRegistryImage
.aws sso login
again, because my credentials have expired.RegistryImage
out again, just like on Monday, again creating a whole new Pulumi resource and deleting the old one.pulumi up
again, just like on Monday. All AWS resources are updated correctly, except deleting the oldpulumi_awsx.ecr.RegistryImage
fails with a 403.So to be explicit:
aws sso login
on both days, and all other AWS resources work.pulumi up
2x on the same day, then there's no problem withpulumi_awsx.ecr.RegistryImage
- creation and deletion work. So my Pulumi code seems correct.pulumi_awsx.ecr.RegistryImage
.My
requirements.txt
has up-to-date versions of the Pulumi SDKs:This issue is a blocker for our ability to use
awsx.ecr.RegistryImage
, and thereby makes it really hard for us to use AWS ECR via Pulumi.As a workaround we are setting the
keep_remotely=True
setting onawsx.ecr.RegistryImage
; that way we don't experience the 403, but leaves the image in the registry, which is not long-term feasible for us.Sample program
Here is an example of Python code that exhibits this issue:
Log output
Affected Resource(s)
awsx.ecr.RegistryImage
, deletion onlyOutput of
pulumi about
$ pulumi about
CLI
Version 3.100.0
Go Version go1.21.5
Go Compiler gc
Plugins
NAME VERSION
python unknown
Host
OS ubuntu
Version 20.04
Arch x86_64
This project is written in python: executable='/home/vscode/.rye/shims/python3' version='3.10.16'
Current Stack: [REDACTED]
TYPE URN
[REDACTED]
Found no pending operations associated with reboot-dev/aws-test1
Backend
Name pulumi.com
URL https://app.pulumi.com/[REDACTED]
User [REDACTED]
Organizations [REDACTED]
Token type personal
Dependencies:
NAME VERSION
build 1.0.3
certifi 2019.11.28
chardet 3.0.4
dbus-python 1.2.16
idna 2.8.0
isort 5.12.0
mypy 1.2.0
pip 23.0.1
Pygments 2.3.1
PyGObject 3.36.0
python-apt 2.0.1+ubuntu0.20.4.1
PyYAML 5.3.1
requests 2.22.0
requests-unixsocket 0.2.0
ruff 0.1.14
setuptools 65.5.0
six 1.14.0
urllib3 1.25.8
yapf 0.40.2
Pulumi locates its logs in /tmp by default
Additional context
From my naive external view, it looks like
awsx.ecr.RegistryImage
deletion is still using the old credentials, while e.g. creation uses new credentials. Could that be?Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
The text was updated successfully, but these errors were encountered: