-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Labels
@aws-cdk/aws-batchRelated to AWS BatchRelated to AWS BatchbugThis issue is a bug.This issue is a bug.effort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortgood first issueRelated to contributions. See CONTRIBUTING.mdRelated to contributions. See CONTRIBUTING.mdp1
Description
Describe the bug
In EcsJobDefinition, looks like at the end of the constructor you override the field "jobDefinitionName" with the CfnJobDefinition ref
.
Meaning if we try to access it later, we'll get a different value of what it has been created with.
Expected Behavior
EcsJobDefinition.jobDefinitionName to return the CfnJobDefinition.jobDefinitionName and not the ARN of the resource
Current Behavior
EcsJobDefinition.jobDefinitionNam returns the ARN (+ revision)
Reproduction Steps
const jobDef = new EcsJobDefinition(this, 'Resource', {
// ...
jobDefinitionName: 'toto'
//...
});
jobDef.jobDefinitionName; // a Token which resolves to arn:aws:...:job-definition:toto:1
Possible Solution
Just remove this.jobDefinitionName = this.getResourceNameAttribute(resource.ref);
Additional Information/Context
No response
CDK CLI Version
2.74.0 (build 70e2a33)
Framework Version
No response
Node.js Version
v16.13.0
OS
MacOS
Language
Typescript
Language Version
No response
Other information
No response
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-batchRelated to AWS BatchRelated to AWS BatchbugThis issue is a bug.This issue is a bug.effort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortgood first issueRelated to contributions. See CONTRIBUTING.mdRelated to contributions. See CONTRIBUTING.mdp1