Skip to content
This repository has been archived by the owner on Nov 27, 2020. It is now read-only.

Commit

Permalink
Merge pull request #13 from aztfmod/vnext
Browse files Browse the repository at this point in the history
July 2020
  • Loading branch information
arnaudlh authored Jul 23, 2020
2 parents 3b3659c + 5077781 commit a849928
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 22 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/master.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#
# Copyright (c) Microsoft Corporation
# Licensed under the MIT License.
#

name: caf_landing_zones_github_actions

on:
push:
branches:
- master
- vnext
pull_request:
branches:
- master
- vnext

jobs:
tfsec:
name: Run TFsec
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Terraform security scan
uses: triat/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
docs:
name: Run Terraform-docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: Run Terraform-docs
uses: Dirrk/[email protected]
with:
tf_docs_working_dir: .
tf_docs_output_file: README.md
tf_docs_output_method: inject
tf_docs_git_push: 'true'
54 changes: 35 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[![VScodespaces](https://img.shields.io/endpoint?url=https%3A%2F%2Faka.ms%2Fvso-badge)](https://online.visualstudio.com/environments/new?name=terraform-azurerm-caf-log-analytics&repo=aztfmod/terraform-azurerm-caf-log-analytics)
[![Gitter](https://badges.gitter.im/aztfmod/community.svg)](https://gitter.im/aztfmod/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)

# Deploys Azure Monitor Log Analytics
Creates the log analytics and monitoring solutions.
Expand All @@ -19,21 +20,42 @@ module "log_analytics" {
}
```

## Inputs
<!--- BEGIN_TF_DOCS --->
## Requirements

| Name | Type | Default | Description |
| -- | -- | -- | -- |
| resource_group_name | string | None | (Required) Name of the resource group where to create the resource. Changing this forces a new resource to be created. |
| name | string | None | (Required) Name for the objects created (before naming convention applied.) |
| location | string | None | (Required) Specifies the Azure location to deploy the resource. Changing this forces a new resource to be created. |
| tags | map | None | (Required) Map of tags for the deployment. |
| solution_plan_map | map | None | (Optional) Map structure containing the list of solutions to be enabled. (see details of the structure in the Parameters section below) |
| retention_in_days | number | None | (Optional) The workspace data retention in days. Possible values are either 7 (Free Tier only) or range between 30 and 730. |
| convention | string | None | (Required) Naming convention to be used (check at the naming convention module for possible values). |
| prefix | string | None | (Optional) Prefix to be used. |
| postfix | string | None | (Optional) Postfix to be used. |
| max_length | string | None | (Optional) maximum length to the name of the resource. |
No requirements.

## Providers

| Name | Version |
|------|---------|
| azurecaf | n/a |
| azurerm | n/a |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| convention | (Required) Naming convention to be used (check at the naming convention module for possible values). | `string` | n/a | yes |
| location | (Required) Location of the resources | `any` | n/a | yes |
| max\_length | (Optional) You can speficy a maximum length to the name of the resource | `string` | `""` | no |
| name | (Required) Log Analytics workspace name | `any` | n/a | yes |
| postfix | (Optional) You can use a postfix to the name of the resource | `string` | `""` | no |
| prefix | (Optional) You can use a prefix to the name of the resource | `string` | `""` | no |
| resource\_group\_name | (Required) Resource group name | `any` | n/a | yes |
| retention\_in\_days | (Optional) The workspace data retention in days. Possible values are either 7 (Free Tier only) or range between 30 and 730. | `string` | `""` | no |
| solution\_plan\_map | (Optional) Map structure containing the list of solutions to be enabled. | `map(any)` | `{}` | no |
| tags | (Required) tagging for the log analytics workspace | `any` | n/a | yes |

## Outputs

| Name | Description |
|------|-------------|
| id | Output the object ID |
| name | Output the object name |
| object | Output the full object |

<!--- END_TF_DOCS --->

## Parameters

Expand Down Expand Up @@ -73,10 +95,4 @@ solution_plan_map = {
```


## Outputs

| Name | Type | Description |
| -- | -- | -- |
| object | object | Returns the full object of the created log analytics. |
| name | string | Returns the name of the created log analytics. |
| id | string | Returns the ID of the created log analytics. |
15 changes: 13 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,16 @@ locals {
module_tag = {
"module" = basename(abspath(path.module))
}
tags = merge(var.tags, local.module_tag)
}
tags = merge(var.tags,local.module_tag)
}

terraform {
required_providers {
azurecaf = {
source = "aztfmod/azurecaf"
}
azurerm = {
source = "hashicorp/azurerm"
}
}
}
3 changes: 2 additions & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ variable "tags" {
}

variable "convention" {
description = "(Required) Naming convention method to use"
description = "(Required) Naming convention to be used (check at the naming convention module for possible values)."
type = string
}

variable "prefix" {
Expand Down

0 comments on commit a849928

Please sign in to comment.