Skip to content

Commit 4b12c9e

Browse files
authored
Add option to enable detailed EC2 monitoring
This adds the option to enable EC2 detailed monitoring for instances. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-launchtemplatedata-monitoring.html
1 parent 79352fa commit 4b12c9e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

templates/aws-stack.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ Metadata:
7575
- ManagedPolicyARN
7676
- InstanceRoleName
7777
- IMDSv2Tokens
78+
- EnableDetailedMonitoring
7879

7980
- Label:
8081
default: Auto-scaling Configuration
@@ -442,6 +443,14 @@ Parameters:
442443
- "true"
443444
- "false"
444445
Default: "false"
446+
447+
EnableDetailedMonitoring:
448+
Type: String
449+
Description: Enable detailed EC2 monitoring
450+
AllowedValues:
451+
- "true"
452+
- "false"
453+
Default: "false"
445454

446455
Rules:
447456
HasToken:
@@ -919,6 +928,8 @@ Resources:
919928
HttpTokens: !Ref IMDSv2Tokens
920929
# Allow containers using a Docker network on the host to receive IDMSv2 responses
921930
HttpPutResponseHopLimit: 2
931+
Monitoring:
932+
Enabled: !Ref EnableDetailedMonitoring
922933
ImageId: !If
923934
- HasImageId
924935
- !Ref ImageId

0 commit comments

Comments
 (0)