-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
aws_batch_alpha: [object Object] in Cfn template synthetized image name with ECR image #25250
Comments
Yes I can reproduce this bug. Thank you for your report. |
I have same issue, more over I have wrong also first part of image name: code, shortened: const container: EcsFargateContainerDefinition = new EcsFargateContainerDefinition( return new EcsJobDefinition(scope, "dailyJobDefinition", { container, ... });` |
…d with `[Object object]` (#25466) We were using `Tokenization.resolve()`, which uses a generic token resolver that does `${token1}${token2}` instead of creating an `Fn::Split` object. The only reason that token existed was to mutate the L1 object after synthesis so subclasses could fill in the `executionRole`. The `executionRole` was meant to be optional for EC2 jobs and required for Fargate jobs. Setting the `loggingConfig` being defined would force it to be defined it for EC2 Jobs. However, the `loggingConfig` was always defined, because it was set to a `Lazy` (which could result in `undefined`, but that doesn't matter: it was defined during synthesis). So the `executionRole` was always being set: ``` this.executionRole = props.executionRole ?? (this.logDriverConfig ? createExecutionRole(this, 'ExecutionRole') : undefined); ``` This PR makes it clear that the `executionRole` is created by default. Closes #25250 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
Describe the bug
With the update to the new aws_batch_alpha API in 2.74 now using an ECR image synthetizes an incorrect image name in the JobDefinition: it has
[object Object]
instead of the intrinsicAWS::URLSuffix
(i.e.amazonaws.com
).Expected Behavior
I expect the output of the code snippet below to be something like this
Or eventually with the following for
Image
aboveCurrent Behavior
But the synthesis output is like this, note
[object Object]
inImage
Reproduction Steps
The following code snipped generated the faulty example above.
Possible Solution
No idea, but there seems to be a problem with the rendering of tokens.
Additional Information/Context
No response
CDK CLI Version
2.76
Framework Version
2.76
Node.js Version
v16.18.1
OS
Linux
Language
Typescript
Language Version
4.9.5
Other information
No response
The text was updated successfully, but these errors were encountered: