ConfigurationRule is the Schema for the ConfigurationRules API. Provides a Datadog Cloud Configuration Rule resource.
Type
CRD
Group
cloud.datadog.upbound.io
Version
v1alpha1
apiVersion: cloud.datadog.upbound.io/v1alpha1
kind: ConfigurationRule
ConfigurationRuleSpec defines the desired state of ConfigurationRule
No description provided.
(List of String) Fields to group by when generating signals, e.g. @resource. Defaults to empty list. Fields to group by when generating signals, e.g. @resource. Defaults to empty list.
(List of String) Notification targets for signals. Defaults to empty list. Notification targets for signals. Defaults to empty list.
(List of String) Related resource types to be checked by the rule. Defaults to empty list. Related resource types to be checked by the rule. Defaults to empty list.
(List of String) Tags of the rule, propagated to findings and signals. Defaults to empty list. Tags of the rule, propagated to findings and signals. Defaults to empty list.
THIS IS A BETA FIELD. It will be honored unless the Management Policies feature flag is disabled. InitProvider holds the same fields as ForProvider, with the exception of Identifier and other resource reference fields. The fields that are in InitProvider are merged into ForProvider when the resource is created. The same fields are also added to the terraform ignore_changes hook, to avoid updating them after creation. This is useful for fields that are required on creation, but we do not desire to update them after creation, for example because of an external controller is managing them, like an autoscaler.
(List of String) Fields to group by when generating signals, e.g. @resource. Defaults to empty list. Fields to group by when generating signals, e.g. @resource. Defaults to empty list.
(List of String) Notification targets for signals. Defaults to empty list. Notification targets for signals. Defaults to empty list.
(List of String) Related resource types to be checked by the rule. Defaults to empty list. Related resource types to be checked by the rule. Defaults to empty list.
(List of String) Tags of the rule, propagated to findings and signals. Defaults to empty list. Tags of the rule, propagated to findings and signals. Defaults to empty list.
THIS IS A BETA FIELD. It is on by default but can be opted out through a Crossplane feature flag. ManagementPolicies specify the array of actions Crossplane is allowed to take on the managed and external resources. This field is planned to replace the DeletionPolicy field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. If both are custom, the DeletionPolicy field will be ignored. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md
ProviderConfigReference specifies how the provider that will be used to create, observe, update, and delete this managed resource should be configured.
Policies for referencing.
PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret store config to which any connection details for this managed resource should be written. Connection details frequently include the endpoint, username, and password required to connect to the managed resource.
WriteConnectionSecretToReference specifies the namespace and name of a Secret to which any connection details for this managed resource should be written. Connection details frequently include the endpoint, username, and password required to connect to the managed resource. This field is planned to be replaced in a future release in favor of PublishConnectionDetailsTo. Currently, both could be set independently and connection details would be published to both without affecting each other.
ConfigurationRuleStatus defines the observed state of ConfigurationRule.
No description provided.
(List of String) Fields to group by when generating signals, e.g. @resource. Defaults to empty list. Fields to group by when generating signals, e.g. @resource. Defaults to empty list.
(List of String) Notification targets for signals. Defaults to empty list. Notification targets for signals. Defaults to empty list.
(List of String) Related resource types to be checked by the rule. Defaults to empty list. Related resource types to be checked by the rule. Defaults to empty list.
(List of String) Tags of the rule, propagated to findings and signals. Defaults to empty list. Tags of the rule, propagated to findings and signals. Defaults to empty list.
Conditions of the resource.
myrule
apiVersion: cloud.datadog.upbound.io/v1alpha1
kind: ConfigurationRule
metadata:
annotations:
meta.upbound.io/example-id: cloud/v1alpha1/configurationrule
labels:
testing.upbound.io/example-name: myrule
name: myrule
spec:
forProvider:
enabled: true
groupBy:
- "@resource"
message: Rule has triggered
name: My cloud configuration rule
notifications:
- "@channel"
policy: |
package datadog
import data.datadog.output as dd_output
import future.keywords.contains
import future.keywords.if
import future.keywords.in
eval(resource) = "skip" if {
# Logic that evaluates to true if the resource should be skipped
true
} else = "pass" {
# Logic that evaluates to true if the resource is compliant
true
} else = "fail" {
# Logic that evaluates to true if the resource is not compliant
true
}
# This part remains unchanged for all rules
results contains result if {
some resource in input.resources[input.main_resource_type]
result := dd_output.format(resource, eval(resource))
}
relatedResourceTypes: []
resourceType: aws_s3_bucket
severity: high
tags:
- some:tag
© 2022 Upbound, Inc.
Discover the building blocksfor your internal cloud platform.