Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[datadog_integration_azure] Add resource_collection_enabled #2203

Merged

Conversation

ava-silver
Copy link
Contributor

@ava-silver ava-silver commented Dec 8, 2023

Adds Resource Collection field (resource_collection_enabled) to the Azure Integration.

The new field is optional with no default, as it interacts with cspm_enabled so we want to let the API dictate the behavior when not specified by not providing a default value here.

@ava-silver ava-silver requested a review from a team as a code owner December 8, 2023 17:43
@ava-silver ava-silver requested a review from a team as a code owner December 8, 2023 17:44
@ava-silver ava-silver requested a review from a team December 8, 2023 17:51
Base automatically changed from sherz/azure-framework to master December 8, 2023 18:27
@skarimo skarimo requested a review from a team as a code owner December 8, 2023 18:27
@ava-silver ava-silver removed the request for review from a team December 8, 2023 18:51
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

autogenerated by make docs, not my change

Comment on lines 44 to 45
- `cspm_enabled` (Boolean) When enabled, Datadog’s Cloud Security Management product will scan resource configurations monitored by this app registration.
Note: This requires `resource_collection_enabled` to be set to true. Defaults to `false`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `cspm_enabled` (Boolean) When enabled, Datadog’s Cloud Security Management product will scan resource configurations monitored by this app registration.
Note: This requires `resource_collection_enabled` to be set to true. Defaults to `false`.
- `cspm_enabled` (Boolean) When enabled, Datadog’s Cloud Security Management product scans resource configurations monitored by this app registration.
**Note:** This parameter requires `resource_collection_enabled` to be set to true. `resource_collection_enabled` defaults to `false`, so change it to `true` if you enable `cspm_enabled`.

Copy link
Contributor Author

@ava-silver ava-silver Dec 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the Defaults to false. part is autogenerated at the end, however the resource_collection_enabled is optional, the only constraint set by the API is that if cspm_enabled is true, then resource_collection_enabled cannot be explicitly set to false.

would something like the following work?

**Note:** This parameter cannot be set to true if `resource_collection_enabled` is explicitly set to false, as this feature depends on resource collection. Defaults to `false`.

@@ -41,9 +41,11 @@ resource "datadog_integration_azure" "sandbox" {
- `app_service_plan_filters` (String) This comma-separated list of tags (in the form `key:value,key:value`) defines a filter that Datadog uses when collecting metrics from Azure App Service Plans. Only App Service Plans that match one of the defined tags are imported into Datadog. The rest, including the apps and functions running on them, are ignored. This also filters the metrics for any App or Function running on the App Service Plan(s). Defaults to `""`.
- `automute` (Boolean) Silence monitors for expected Azure VM shutdowns. Defaults to `false`.
- `container_app_filters` (String) This comma-separated list of tags (in the form `key:value,key:value`) defines a filter that Datadog uses when collecting metrics from Azure Container Apps. Only Container Apps that match one of the defined tags are imported into Datadog. Defaults to `""`.
- `cspm_enabled` (Boolean) Enable Cloud Security Management Misconfigurations for your organization. Defaults to `false`.
- `cspm_enabled` (Boolean) When enabled, Datadog’s Cloud Security Management product will scan resource configurations monitored by this app registration.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `cspm_enabled` (Boolean) When enabled, Datadog’s Cloud Security Management product will scan resource configurations monitored by this app registration.
- `cspm_enabled` (Boolean) When enabled, Datadog’s Cloud Security Management product scans resource configurations monitored by this app registration.

Updated suggestion based on our conversation.

@ava-silver ava-silver requested a review from parsons90 December 11, 2023 19:54
@skarimo skarimo merged commit ef28d1e into master Dec 12, 2023
9 checks passed
@skarimo skarimo deleted the ava.silver/azints-1971/add-azure-resource-collection-new-sdk branch December 12, 2023 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants