Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolver stack_output_external is using last region when stack exist in multiple regions #1507

Open
goopilot opened this issue Aug 28, 2024 · 2 comments
Assignees

Comments

@goopilot
Copy link

goopilot commented Aug 28, 2024

Resolver !stack_output_external uses wrong stack in case there are multiple stacks with the same name in different regions exist.

Environment

sceptre --version
Sceptre, version 4.4.2 (same issue with 4.5.0)

python --version
Python 3.12.4

Windows 11/Linux

Steps to reproduce

Test project to reproduce https://plnkr.co/edit/eEfUQ0qHcV0u5lER
Once stack is deployed, running sceptre diff prod will show a difference for stack mytest-sns-sub in ca-cetral-1 region since parameter value of SNStopicARN will be resolved from mytest-sns-topic stack in us-west-2 region

Actual behaviour

sceptre diff prod
*********************************************************************************
No difference to deployed stack mytest-sns-topic
*********************************************************************************
No difference to deployed stack mytest-sns-topic
*********************************************************************************
No difference to deployed stack mytest-sns-sub
*********************************************************************************
--> Difference detected for stack mytest-sns-sub!
---------------------------------------------------------------------------------
Config difference for mytest-sns-sub:

values_changed:
    root.parameters['SNStopicARN']:
        new_value: arn:aws:sns:ca-central-1:XXXXX:test-topic
        old_value: arn:aws:sns:us-west-2:YYYYY:test-topic-us

---------------------------------------------------------------------------------
No template difference
[2024-08-28 14:22:30] - 1 stacks with differences detected.

Same problem when doing sceptre launch

Workaroud

Explicitly provide profile and region:
SNStopicARN: !stack_output_external mytest-sns-topic::snsTopicARN {{profile}}::{{ region }}

This issue resembles #961

@alex-harvey-z3q
Copy link
Contributor

@goopilot did you spend any time figuring out what the issue is? To help me write a fix for it, would you be willing share screens on Teams or the like so you can show me what the problem is?

@goopilot
Copy link
Author

@goopilot did you spend any time figuring out what the issue is? To help me write a fix for it, would you be willing share screens on Teams or the like so you can show me what the problem is?

Hello @alex-harvey-z3q, thanks for looking into it. Unfortunately I have nothing else to add except for original post. I have a feeling that if there are more than one stack with the same name in different regions, parameters of the first stack are applied to the second stack as well instead of creating new instance or the thread...

You can easily reproduce this behaviour flowing steps in the original post.

Let me know if you need more information. I can record my screen if needed.

@alex-harvey-z3q alex-harvey-z3q self-assigned this Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants