Skip to content

Commit 89d1ffc

Browse files
authored
Code snippet for asset tagging (so far AWS only) (#79)
1 parent 870ec45 commit 89d1ffc

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

practices/cloud-services.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,28 @@
4040
* Understand and be able to justify vendor lock in (see [outsource from the bottom up](../patterns/outsource-bottom-up.md)).
4141
* Build in [governance as a side effect](../patterns/governance-side-effect.md), e.g.
4242
* Segregate production and non-production workloads.
43-
* Infrastructure must be tagged to identity the service so that unnecessary resources don't go unnoticed.
43+
* <details><summary>Infrastructure must be tagged to identity the service so that unnecessary resources don't go unnoticed (click to expand)</summary>
44+
45+
AWS Config rule to identify EC2 assets not tagged with "CostCenter" and "Owner":
46+
```yaml
47+
{
48+
"ConfigRuleName": "RequiredTagsForEC2Instances",
49+
"Description": "Checks whether the CostCenter and Owner tags are applied to EC2 instances.",
50+
"Scope": {
51+
"ComplianceResourceTypes": [
52+
"AWS::EC2::Instance"
53+
]
54+
},
55+
"Source": {
56+
"Owner": "AWS",
57+
"SourceIdentifier": "REQUIRED_TAGS"
58+
},
59+
"InputParameters": "{\"tag1Key\":\"CostCenter\",\"tag2Key\":\"Owner\"}"
60+
}
61+
```
62+
Further reading: [AWS Config](https://aws.amazon.com/config/)
63+
64+
TO DO: Azure equivalent
65+
</details>
66+
4467
* Configure audit tools such as CloudTrail.

0 commit comments

Comments
 (0)