Skip to content

Data Source: azurermAdvisorRecommendations

Use this data source to access information about an existing Advisor Recommendations.

Example Usage

import * as cdktf from "cdktf";
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
new azurerm.provider.AzurermProvider(this, "azurerm", {
  features: [{}],
});
const dataAzurermAdvisorRecommendationsExample =
  new azurerm.dataAzurermAdvisorRecommendations.DataAzurermAdvisorRecommendations(
    this,
    "example",
    {
      filter_by_category: ["security", "cost"],
      filter_by_resource_groups: ["example-resgroups"],
    }
  );
new cdktf.TerraformOutput(this, "recommendations", {
  value: dataAzurermAdvisorRecommendationsExample.recommendations,
});

Arguments Reference

The following arguments are supported:

  • filterByCategory - (Optional) Specifies a list of categories in which the Advisor Recommendations will be listed. Possible values are highAvailability, security, performance, cost and operationalExcellence.

  • filterByResourceGroups - (Optional) Specifies a list of resource groups about which the Advisor Recommendations will be listed.

Attributes Reference

In addition to the Arguments listed above - the following Attributes are exported:

  • id - The ID of the Advisor Recommendations.

  • recommendations - One or more recommendations blocks as defined below.


A recommendations block exports the following:

  • category - The category of the recommendation.

  • description - The description of the issue or the opportunity identified by the recommendation.

  • impact - The business impact of the recommendation.

  • recommendationName - The name of the Advisor Recommendation.

  • recommendationTypeId - The recommendation type id of the Advisor Recommendation.

  • resourceName - The name of the identified resource of the Advisor Recommendation.

  • resourceType - The type of the identified resource of the Advisor Recommendation.

  • suppressionNames - A list of Advisor Suppression names of the Advisor Recommendation.

  • updatedTime - The most recent time that Advisor checked the validity of the recommendation..

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • read - (Defaults to 10 minutes) Used when retrieving the Advisor Recommendations.