-
Notifications
You must be signed in to change notification settings - Fork 4k
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: unable to import FargateComputeEnvironment with from_fargate_compute_environment_arn #25979
Comments
Looks like this requires vpc here
But fromFargateComputeEnvironmentArn is not having any vpc info
|
Thanks for reporting this, I'm finding the same behavior. It's because the import class extends aws-cdk/packages/@aws-cdk/aws-batch-alpha/lib/managed-compute-environment.ts Lines 1071 to 1079 in 104bf32
However, since the import class extends aws-cdk/packages/@aws-cdk/aws-batch-alpha/lib/managed-compute-environment.ts Lines 221 to 225 in 104bf32
Should probably extend
|
…rgateComputeEnvironmentArn (#25985) Change the superclass of the [Import](https://github.com/aws/aws-cdk/blob/104bf32798b02f8f3c3ec5aaa05e31c35b4a38da/packages/%40aws-cdk/aws-batch-alpha/lib/managed-compute-environment.ts#L1071) class instantiated by `fromFargateComputeEnvironmentArn` from `ManagedComputeEnvironmentBase` to `Resource`. This prevents errors due to the required `vpc` parameter of the old superclass [being passed](https://github.com/aws/aws-cdk/blob/104bf32798b02f8f3c3ec5aaa05e31c35b4a38da/packages/%40aws-cdk/aws-batch-alpha/lib/managed-compute-environment.ts#L1077-L1079) as `undefined`. Closes #25979. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
Describe the bug
When importing a fargate compute environment that is created outside of the stack the following error occurs:
Expected Behavior
The resource gets imported and can be referenced
Current Behavior
The error occurs and unable reference resources
Reproduction Steps
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.81.0
Framework Version
2.83.1
Node.js Version
v19.8.1
OS
Mac OS 12.6
Language
Python
Language Version
3.11
Other information
No response
The text was updated successfully, but these errors were encountered: