-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
I create stack a
which exports an output which is used by stack b
. Stack b
uses the output as expected on deployment but when calling aws cloudformation list-imports
, the result is an empty list.
Expected Behavior
I expected to see the export, created by stack a
, to have stack b
included in the result set of aws cloudformation list-imports
.
How are you starting LocalStack?
With a docker-compose file
Steps To Reproduce
How are you starting localstack (e.g., bin/localstack
command, arguments, or docker-compose.yml
)
docker compose up
Client commands (e.g., AWS SDK code snippet, or sequence of "awslocal" commands)
t1:
AWSTemplateFormatVersion: '2010-09-09'
Resources:
MyS3Bucket:
Type: AWS::S3::Bucket
Outputs:
BucketNameExport:
Description: Name of the S3 bucket
Value: !Ref MyS3Bucket
Export:
Name: MyS3BucketName
t2.yml
AWSTemplateFormatVersion: '2010-09-09'
Resources:
MyS3Bucket:
Type: AWS::S3::Bucket
Properties:
BucketName: !Sub
- "${Prefix}-${ImportedName}"
- Prefix: my-prefix
ImportedName: !ImportValue MyS3BucketName
Deploy the templates
aws --endpoint-url=http://localhost:4566 cloudformation deploy --template-file localstack/t1.yml --stack-name my-s3-stack --capabilities CAPABILITY_NAMED_IAM
aws --endpoint-url=http://localhost:4566 cloudformation deploy --template-file localstack/t2.yml --stack-name my-s3-stack-2 --capabilities CAPABILITY_NAMED_IAM
Check if bucket name is as expected (it is)
aws --endpoint-url=http://localhost:4566 s3 ls
Check if export is being imported using list imports (it doesn't show up)
aws --endpoint-url=http://localhost:4566 cloudformation list-imports --export-name MyS3BucketName
Environment
- OS: Linux Mint
- LocalStack: Community
LocalStack version: 4.1.2.dev1
LocalStack Docker image sha: sha256:ce66d2f0fae065e79f7ce079b71416e6167e30087a51d02d3b976da4d77de3ab
LocalStack build date: 2025-02-05
LocalStack build git hash: 7f32b7df3
Anything else?
Here it seems like list imports is supported. I tried using both the CLI and boto3, both had an empty result set.