-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8c93704
commit cc2b79b
Showing
3 changed files
with
40 additions
and
28 deletions.
There are no files selected for viewing
21 changes: 10 additions & 11 deletions
21
cdk_integration_tests/src/python/ECSClusterContainerInsights/fail__1__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 10 additions & 11 deletions
21
cdk_integration_tests/src/python/ECSClusterContainerInsights/pass.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,20 @@ | ||
from aws_cdk import core | ||
import aws_cdk as core | ||
from constructs import Construct | ||
from aws_cdk import aws_ecs as ecs | ||
from aws_cdk import aws_ec2 as ec2 | ||
|
||
class MyECSClusterStack(core.Stack): | ||
def __init__(self, scope: core.Construct, id: str, **kwargs) -> None: | ||
def __init__(self, scope: Construct, id: str, **kwargs) -> None: | ||
super().__init__(scope, id, **kwargs) | ||
|
||
# Define ECS Cluster with Cluster Settings | ||
cluster = ecs.CfnCluster( | ||
self, 'MyECSCluster', | ||
cluster_name='my-ecs-cluster', | ||
cluster_settings=[{ | ||
'name': 'containerInsights', | ||
'value': 'enabled' | ||
}] | ||
# Other properties for your ECS Cluster | ||
vpc = ec2.Vpc(self, "Vpc", | ||
ip_protocol=ec2.IpProtocol.DUAL_STACK | ||
) | ||
|
||
cluster = ecs.Cluster(self, "EcsCluster", vpc=vpc, container_insights=True) | ||
cluster2 = ecs.Cluster(self, "EcsCluster2", vpc=vpc, container_insights_v2=ecs.ContainerInsights.ENHANCED) | ||
cluster3 = ecs.Cluster(self, "EcsCluster3", vpc=vpc, container_insights_v2=ecs.ContainerInsights.ENABLED) | ||
|
||
app = core.App() | ||
MyECSClusterStack(app, "MyECSClusterStack") | ||
app.synth() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters