Skip to content

Commit

Permalink
enable InstanceMetadataTags on EC2 patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-nowak committed Aug 23, 2024
1 parent 01e684a commit 18daa5d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/cold-coins-flow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@guardian/cdk": minor
---

enable InstanceMetadataTags on EC2 patterns
1 change: 1 addition & 0 deletions src/constructs/autoscaling/asg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ export class GuAutoScalingGroup extends GuAppAwareConstruct(AutoScalingGroup) {
// Favour HTTPS only egress rules by default.
securityGroup: GuHttpsEgressSecurityGroup.forVpc(scope, { app, vpc }),
requireImdsv2: !withoutImdsv2,
instanceMetadataTags: true,
userData,
role,
httpPutResponseHopLimit,
Expand Down
2 changes: 2 additions & 0 deletions src/patterns/ec2-app/__snapshots__/base.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -890,6 +890,7 @@ exports[`the GuEC2App pattern can produce a restricted EC2 app locked to specifi
"InstanceType": "t4g.medium",
"MetadataOptions": {
"HttpTokens": "required",
"InstanceMetadataTags": "enabled",
},
"SecurityGroupIds": [
{
Expand Down Expand Up @@ -1785,6 +1786,7 @@ exports[`the GuEC2App pattern should produce a functional EC2 app with minimal a
"InstanceType": "t4g.medium",
"MetadataOptions": {
"HttpTokens": "required",
"InstanceMetadataTags": "enabled",
},
"SecurityGroupIds": [
{
Expand Down

0 comments on commit 18daa5d

Please sign in to comment.