Skip to content

Latest commit

 

History

History
124 lines (84 loc) · 3.74 KB

cloud_provider_azure_credential.md

File metadata and controls

124 lines (84 loc) · 3.74 KB
page_title subcategory description
grafana_cloud_provider_azure_credential Resource - terraform-provider-grafana
Cloud Provider

grafana_cloud_provider_azure_credential (Resource)

Example Usage

resource "grafana_cloud_provider_azure_credential" "test" {
  stack_id      = "1"
  name          = "test-name"
  client_id     = "my-client-id"
  client_secret = "my-client-secret"
  tenant_id     = "my-tenant-id"

  resource_tags_to_add_to_metrics = ["tag1", "tag2"]

  resource_discovery_tag_filter {
    key   = "key-1"
    value = "value-1"
  }

  resource_discovery_tag_filter {
    key   = "key-2"
    value = "value-2"
  }

  auto_discovery_configuration {
    subscription_id = "my-subscription_id"

    resource_type_configurations {
      resource_type_name = "Microsoft.App/containerApps"

      metric_configuration {
        name = "TotalCoresQuotaUsed"
      }
    }

    resource_type_configurations {
      resource_type_name = "Microsoft.Storage/storageAccounts/tableServices"

      metric_configuration {
        name         = "Availability"
        dimensions   = ["GeoType", "ApiName"]
        aggregations = ["Average"]
      }
    }

  }
}

Schema

Required

  • client_id (String) The client ID of the Azure Credential.
  • client_secret (String, Sensitive) The client secret of the Azure Credential.
  • name (String) The name of the Azure Credential.
  • stack_id (String) The StackID of the Grafana Cloud instance. Part of the Terraform Resource ID.
  • tenant_id (String) The tenant ID of the Azure Credential.

Optional

  • auto_discovery_configuration (Block List) The list of auto discovery configurations. (see below for nested schema)
  • resource_discovery_tag_filter (Block List) The list of tag filters to apply to resources. (see below for nested schema)
  • resource_tags_to_add_to_metrics (Set of String) The list of resource tags to add to metrics.

Read-Only

  • id (String) The Terraform Resource ID. This has the format "{{ stack_id }}:{{ resource_id }}".
  • resource_id (String) The ID given by the Grafana Cloud Provider API to this Azure Credential resource.

Nested Schema for auto_discovery_configuration

Required:

  • resource_type_configurations (List of Object) The list of resource type configurations. (see below for nested schema)
  • subscription_id (String) The subscription ID of the Azure account.

Nested Schema for auto_discovery_configuration.resource_type_configurations

Required:

Nested Schema for auto_discovery_configuration.resource_type_configurations.metric_configuration

Required:

  • aggregations (List of String)
  • dimensions (List of String)
  • name (String)

Nested Schema for resource_discovery_tag_filter

Required:

  • key (String) The key of the tag filter.
  • value (String) The value of the tag filter.

Import

Import is supported using the following syntax:

terraform import grafana_cloud_provider_azure_credential.name "{{ stack_id }}:{{ resource_id }}"