aws / aws/aws-cdk

(ecs): expose managedStorageConfiguration on ICluster interface

Open
#36,499 1 comment 0 reactions 0 assignees View on GitHub
@aws-cdk/aws-ecs effort/medium feature-request p2
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
2d 3h
Merged PRs (30d)
83

Description

### Describe the feature

Expose managedStorageConfiguration property on the ICluster interface, following the same pattern as executeCommandConfiguration.

Currently, managedStorageConfiguration is only available as a private property (_managedStorageConfiguration) on the Cluster class and is not accessible via the ICluster interface. This makes it impossible to read the managed storage configuration from an imported cluster.

### Use Case

When importing an ECS cluster using Cluster.fromClusterAttributes(), users cannot access the managedStorageConfiguration property. This is inconsistent with executeCommandConfiguration, which is already exposed on ICluster.

Example
- A user creates a cluster with Fargate ephemeral storage encryption in one stack
- In another stack, they import the cluster and need to reference the managed storage configuration
- Currently, there's no way to pass or access this information through the ICluster interface

### Proposed Solution

1. Add managedStorageConfiguration to the ICluster interface:
export interface ICluster extends IResource {
// ... existing properties ...
readonly managedStorageConfiguration?: ManagedStorageConfiguration;
}

2. Add managedStorageConfiguration to ClusterAttributes interface:
export interface ClusterAttributes {
// ... existing properties ...
readonly managedStorageConfiguration?: ManagedStorageConfiguration;
}

3. Add a public getter to the Cluster class (similar to executeCommandConfiguration)
4. Implement the property in ImportedCluster class

This follows the exact same pattern used for executeCommandConfiguration.

### Other Information

_No response_

### Acknowledgements

- [x] I may be able to implement this feature request
- [ ] This feature might incur a breaking change

### AWS CDK Library version (aws-cdk-lib)

2.x
### AWS CDK CLI version

2.x

### Environment details (OS name and version, etc.)

all

Contributor guide

Open the contributing guide

Research direction

Start by tracing executeCommandConfiguration through the ICluster, ClusterAttributes, Cluster, and ImportedCluster definitions in the ECS cluster implementation. Follow that existing pattern for managedStorageConfiguration and verify that a cluster imported with Cluster.fromClusterAttributes() exposes the configuration through ICluster. Done means the property is available for both regular and imported clusters.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
cloud
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.