-
Notifications
You must be signed in to change notification settings - Fork 13
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
LanguageExtensions and Serverless-2016-10-31 conflicts - Support Intrinsic Function in DependsOn #109
Comments
This issue is also reported in SAM repo, however, there is no way we can resolve this without making a backward incompatible change. The only possible workaround is to have |
Thanks for raising this issue @GavinZZ. We'll triage it and will post updates here. |
So, just want to confirm that I'm able to reproduce the problem. When LanguageExtensions is used then the template is passed to SAM with I want to make sure I understand your suggestion regarding the intrinsic function @GavinZZ. Are you suggesting something like this? DependsOn: !Join
- ''
- - 'resApiGateway'
- !Ref paramEnvironment
- 'Stage' |
Thanks for help investigating it. I'm suggesting exactly like you mentioned. |
Just to update the status here. Thanks @GavinZZ for the suggestion. What you propose is more of a feature than a bugfix, but I also couldn't think of a simpler way to address the issue. We will discuss internally if this is a feature we want to build and if so if there is dev capacity to build it. |
I am facing this same issue, in my template I am crating dynamically some Alarms that are attached to a CompositeAlarm, For the Alarm creation I am using a Count to loop throw my ressources and create an alarm for each one:
I want to add a DependsOn section like this, but it's not working:
When I check the cloudFormation ressources, I saw that the alarms are created with logical Ids : Alarm1, Alarm2 ...
is there any clean solution for this please? |
@MalikAtalla-AWS Any update on this feature? I've a number of reports that customers are stuck due to this conflict. |
I’ve found a workaround for cases where one resource depends on another. You can split the dependent resource into a separate stack, and then deploy the stacks sequentially to ensure the proper order Before
After:
|
Community Note
Tell us about the bug
It appears that if
AWS::LanguageExtensions
is removed,paramEnvironment
is treated as an intrinsic function, then theAWS::ApiGateway::Stage
resource gets correct generated with the nameresApiGatewayStage
.However, if we add
AWS::LanguageExtensions
,paramEnvironment
is a fixed value afterAWS::LanguageExtensions
transform, then the resource name for ApiGateway Stage becomesresApiGatewaylocalStage
.Code for the above logic can be found here
However, if there is another resource say
resUsagePlan
that depends on the generated resourceAWS::ApiGateway::Stage
, this would be a deadlock for the customer because they don't know the exact generated name (depending onparamEnvironment
), andAWS::LanguageExtensions
doesn't allow intrinsics function inDependsOn
.Additional context
I do NOT think it's a bug from either SAM Transform or
AWS::LanguageExtensions
transform itself. However, when they both exists in a template like described above, customers can only resolve this issue by using intrinsic function inDependsOn
, which is not supported byLanguageExtensions
The text was updated successfully, but these errors were encountered: