Skip to content

Commit

Permalink
Merge pull request #2 from Datatamer/DEV-14115
Browse files Browse the repository at this point in the history
DEV-14115 Make variable naming more consistent.
  • Loading branch information
daniosim authored Nov 5, 2020
2 parents 7c8e613 + febe015 commit 5e47281
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 16 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Tamr Terraform ADLS Gen2 module

# v0.2.0 - Nov 4th 2020
* Renames `name` to `instance_name` for clarity
* Renames `resource_group_location` to `location`

# v0.1.0 - Aug 5th 2020
* Tamr ADLS Gen2 module added
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ This repo follows the [terraform standard module structure](https://www.terrafor
Inline example implementation of the module. This is the most basic example of what it would look like to use this module.
```
module "minimal" {
source = "git::https://github.com/Datatamer/terraform-azure-adls-gen2?ref=0.1.0"
source = "git::https://github.com/Datatamer/terraform-azure-adls-gen2?ref=0.2.0"
name = "tamradlsgen2"
instance_name = "tamradlsgen2"
resource_group_name = "example-resource-group"
resource_group_location = "East US 2"
location = "East US 2"
}
```
## Minimal
Expand All @@ -29,19 +29,20 @@ This modules creates:
| Name | Version |
|------|---------|
| terraform | >= 0.12 |
| azurerm | >= 2.11.0 |

## Providers

| Name | Version |
|------|---------|
| azurerm | n/a |
| azurerm | >= 2.11.0 |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| name | Name of ADLS Gen2 instance (lowercase and numbers only, must be fewer than 18 characters.) | `string` | n/a | yes |
| resource\_group\_location | Location of resource group | `string` | n/a | yes |
| instance\_name | Name of ADLS Gen2 instance (lowercase and numbers only, must be fewer than 18 characters.) | `string` | n/a | yes |
| location | Location of resource group | `string` | n/a | yes |
| resource\_group\_name | Name of resource group | `string` | n/a | yes |
| access\_tier | Storage account access tier | `string` | `"Hot"` | no |
| account\_kind | Storage account kind | `string` | `"StorageV2"` | no |
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.0
0.2.0
6 changes: 3 additions & 3 deletions examples/minimal/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ resource "azurerm_subnet" "example-subnet" {
module "minimal" {
source = "../../"

name = "adlsgen2tamr"
resource_group_name = azurerm_resource_group.adls-gen2-rg.name
resource_group_location = azurerm_resource_group.adls-gen2-rg.location
instance_name = "adlsgen2tamr"
resource_group_name = azurerm_resource_group.adls-gen2-rg.name
location = azurerm_resource_group.adls-gen2-rg.location
}

module "rules" {
Expand Down
6 changes: 3 additions & 3 deletions main.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
resource "azurerm_storage_account" "adls-gen2-storage" {
// Name must be lowercase and numbers only, must be fewer than 18 characters
name = "${var.name}storage"
name = "${var.instance_name}storage"
resource_group_name = var.resource_group_name
location = var.resource_group_location
location = var.location

account_replication_type = var.replication_type
account_kind = var.account_kind
Expand All @@ -15,7 +15,7 @@ resource "azurerm_storage_account" "adls-gen2-storage" {
}

resource "azurerm_storage_data_lake_gen2_filesystem" "adls-gen2" {
name = var.name
name = var.instance_name
storage_account_id = azurerm_storage_account.adls-gen2-storage.id

properties = var.fs_properties
Expand Down
4 changes: 2 additions & 2 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
variable "name" {
variable "instance_name" {
description = "Name of ADLS Gen2 instance (lowercase and numbers only, must be fewer than 18 characters.)"
type = string
}
Expand All @@ -8,7 +8,7 @@ variable "resource_group_name" {
type = string
}

variable "resource_group_location" {
variable "location" {
description = "Location of resource group"
type = string
}
Expand Down
4 changes: 3 additions & 1 deletion versions.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

terraform {
required_version = ">= 0.12"
required_providers {
azurerm = ">= 2.11.0"
}
}

0 comments on commit 5e47281

Please sign in to comment.