GithubHelp home page GithubHelp logo

vaibhavip-icpl / terraform-azurerm-diagnostic-settings Goto Github PK

View Code? Open in Web Editor NEW

This project forked from claranet/terraform-azurerm-diagnostic-settings

0.0 0.0 0.0 38 KB

Fork of the `terraform-azurerm-diagnostic-settings` module with Claranet's contributions and improvements.

License: Apache License 2.0

HCL 100.00%

terraform-azurerm-diagnostic-settings's Introduction

Azure Diagnostic Settings

Changelog Notice Apache V2 License TF Registry

This module is based on work from Innovation Norway.

This Terraform enables the Diagnostic Settings on a given Azure resource.

Global versioning rule for Claranet Azure modules

Module version Terraform version AzureRM version
>= 5.x.x 0.15.x & 1.0.x >= 2.0
>= 4.x.x 0.13.x >= 2.0
>= 3.x.x 0.12.x >= 2.0
>= 2.x.x 0.12.x < 2.0
< 2.x.x 0.11.x < 2.0

Usage

This module is optimized to work with the Claranet terraform-wrapper tool which set some terraform variables in the environment needed by this module. More details about variables set by the terraform-wrapper available in the documentation.

module "azure_region" {
  source  = "claranet/regions/azurerm"
  version = "x.x.x"

  azure_region = var.azure_region
}

module "rg" {
  source  = "claranet/rg/azurerm"
  version = "x.x.x"

  location    = module.azure_region.location
  client_name = var.client_name
  environment = var.environment
  stack       = var.stack
}

module "logs" {
  source  = "claranet/run-common/azurerm//modules/logs"
  version = "x.x.x"

  client_name         = var.client_name
  environment         = var.environment
  stack               = var.stack
  location            = module.azure_region.location
  location_short      = module.azure_region.location_short
  resource_group_name = module.rg.resource_group_name
}

module "lb" {
  source  = "claranet/lb/azurerm"
  version = "x.x.x"

  client_name    = var.client_name
  environment    = var.environment
  location       = module.azure_region.location
  location_short = module.azure_region.location_short
  stack          = var.stack

  resource_group_name = module.rg.resource_group_name

  allocate_public_ip = true
  enable_nat         = true
}

module "diagnostic_settings" {
  source  = "claranet/diagnostic-settings/azurerm"
  version = "x.x.x"

  resource_id = module.lb.lb_id

  logs_destinations_ids = [
    module.logs.logs_storage_account_id,
    module.logs.log_analytics_workspace_id
  ]
  log_analytics_destination_type = "Dedicated"
}

Providers

Name Version
azurecaf ~> 1.1
azurerm >= 1.31

Modules

No modules.

Resources

Name Type
azurecaf_name.diag resource
azurerm_monitor_diagnostic_setting.main resource
azurerm_monitor_diagnostic_categories.main data source

Inputs

Name Description Type Default Required
custom_name Name of the diagnostic settings, generated if empty. string "" no
log_analytics_destination_type When set to 'Dedicated' logs sent to a Log Analytics workspace will go into resource specific tables, instead of the legacy AzureDiagnostics table. Azure Data Factory is the only compatible resource so far. string "AzureDiagnostics" no
log_categories List of log categories. list(string) null no
logs_destinations_ids List of destination resources IDs for logs diagnostic destination. Can be Storage Account, Log Analytics Workspace and Event Hub. No more than one of each can be set. list(string) n/a yes
metric_categories List of metric categories. list(string) null no
name_prefix Optional prefix for the generated name string "" no
name_suffix Optional suffix for the generated name string "" no
resource_id The ID of the resource on which activate the diagnostic settings. string n/a yes
retention_days The number of days to keep diagnostic logs. number 30 no
use_caf_naming Use the Azure CAF naming provider to generate default resource name. custom_name override this if set. Legacy default name is used if this is set to false. bool true no

Outputs

Name Description
diagnostic_settings_id ID of the Diagnostic Settings.

Related documentation

Azure Diagnostic settings documentation: docs.microsoft.com/en-us/azure/azure-monitor/essentials/diagnostic-settings

terraform-azurerm-diagnostic-settings's People

Contributors

bzspi avatar jmapro avatar jnancel avatar rossifumax avatar semantic-release-bot avatar shr3ps avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.