Overview
In the Resource Catalog’s Governance view, you can define policies on your infrastructure resources based on governance best practices in your organization, such as improving ownership tag coverage on resources or ensuring versioning on critical resources is up-to-date. Instead of writing custom scripts or lambdas that scan every resource, Datadog gives you visibility into problematic resources so that you can focus on remediation.
Specifically, you can:
- Define a custom policy, which involves choosing a resource type, the attribute on the resource type, and target values the attribute should have.
- Define a tagging policy, which involves a resource type and the desired tag key and value the resource type should have.
- Access a dedicated view for each policy where you can see its list of non-compliant resources and compliance score.
- Filter, group, and export the list of non-compliant resources for a policy so you can prioritize and assign the work.
Create a custom policy
Custom policies require specific values in your cloud resource attributes within Datadog based on your organization’s infrastructure best practices.
To create a custom policy:
- Navigate to Infrastructure > Resource Catalog and click the Governance tab.
- Click the New Custom Policy button.
- Select a resource type from the dropdown menu.
- Optionally, search for additional dataset filters.
- Select a target resource attribute and desired value.
- Optionally, add instructions for remediation.
- A name is automatically generated based on the data entered, but you can modify it.
- Click Create Custom Policy.
Click the new policy to review all non-compliant resources and filter them by region, environment, account, service, or team. You can also group them by attributes or tags.
Create a tagging policy
Tagging policies require specific tag keys and tag value formats on your infrastructure resources across Datadog.
To create a tagging policy:
- Navigate to Infrastructure > Resource Catalog and click the Governance tab.
- Click the New Tagging Policy button.
- Choose the resource types the policy applies to.
- Define the required tag key and its allowed values.
- A name is automatically generated based on the data entered, but you can modify it.
- Click Create Tagging Policy.
Click the new policy to review all non-compliant resources and filter them by cloud, region, environment, account, service, team, or tag. You can also group them by attributes or tags.
Updating policies
To update a policy, click the policy, then click the Edit button and modify as needed.
Deleting policies
To delete a custom or tagging policy, click the policy, then click the Delete button.
Exporting policies
To export the list of non-compliant resources for a policy, click the policy, then click the Export as CSV button.
Further Reading
Additional helpful documentation, links, and articles: