Skip to content

Commit

Permalink
Merge pull request #36 from confusdcodr/microsoft-ad
Browse files Browse the repository at this point in the history
Add edition variable to support MicrosoftAD option
  • Loading branch information
confusdcodr authored Apr 17, 2020
2 parents f7d0c7a + d183a6d commit e7d83fb
Show file tree
Hide file tree
Showing 10 changed files with 98 additions and 12 deletions.
3 changes: 1 addition & 2 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[bumpversion]
current_version = 1.0.4
current_version = 1.1.0
commit = True
message = Bumps version to {new_version}
tag = False
tag_name = {new_version}

10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

### 1.1.0

**Released**: 2020.04.17

**Commit Delta**: [Change from 1.0.4 release](https://github.com/plus3it/terraform-aws-tardigrade-directory-service/compare/1.0.4...1.1.0)

**Summary**:

* Adds edition variable to support MicrosoftAD selection

### 1.0.4

**Released**: 2019.10.28
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,16 @@ Terraform module to create a directory
|------|-------------|------|---------|:--------:|
| name | The fully qualified name for the directory, such as corp.example.com | `string` | n/a | yes |
| password | The password for the directory administrator or connector user | `string` | n/a | yes |
| size | The size of the directory (Small or Large) | `string` | n/a | yes |
| subnet\_ids | The identifiers of the subnets for the directory servers (2 subnets in 2 different AZs) | `list(string)` | n/a | yes |
| vpc\_id | The identifier of the VPC that the directory is in | `string` | n/a | yes |
| alias | The alias for the directory, unique amongst all aliases in AWS (required for enable\_sso) | `string` | `null` | no |
| connect\_settings | Connector related information about the directory (required for ADConnector) | `list(string)` | `[]` | no |
| create\_directory\_service | Controls whether to create the directory service | `bool` | `true` | no |
| description | A textual description for the directory | `string` | `null` | no |
| edition | (Required for the MicrosoftAD type only) The MicrosoftAD edition (Standard or Enterprise). | `string` | `null` | no |
| enable\_sso | Whether to enable single-sign on for the directory (requires alias) | `bool` | `false` | no |
| short\_name | The short name of the directory, such as CORP | `string` | `null` | no |
| size | (Required for SimpleAD and ADConnector) The size of the directory (Small or Large) | `string` | `null` | no |
| tags | A mapping of tags to assign to the resource | `map(string)` | `{}` | no |
| type | Either SimpleAD, ADConnector or MicrosoftAD | `string` | `"SimpleAD"` | no |

Expand Down
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ resource "aws_directory_service_directory" "this" {
alias = var.alias
description = var.description
enable_sso = var.enable_sso
edition = var.edition

vpc_settings {
vpc_id = var.vpc_id
Expand Down
2 changes: 1 addition & 1 deletion tests/baseline/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module "vpc" {
private_subnets = ["10.0.1.0/24", "10.0.2.0/24"]
}

module "example" {
module "baseline" {
source = "../../"
providers = {
aws = aws
Expand Down
7 changes: 0 additions & 7 deletions tests/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,6 @@ golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a h1:aYOabOQFp6Vj6W1F80affTUvO9UxmJRx8K0gsfABByQ=
golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
<<<<<<< HEAD
golang.org/x/sys v0.0.0-20190922100055-0a153f010e69 h1:rOhMmluY6kLMhdnrivzec6lLgaVbMHMn2ISQXJeJ5EM=
golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191110163157-d32e6e3b99c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
=======
>>>>>>> Update testing framework to check for terraform files
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
Expand Down Expand Up @@ -175,7 +169,6 @@ google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZi
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
Expand Down
25 changes: 25 additions & 0 deletions tests/microsoft_ad/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Baseline Test


<!-- BEGIN TFDOCS -->
## Requirements

| Name | Version |
|------|---------|
| terraform | >= 0.12 |

## Providers

| Name | Version |
|------|---------|
| random | n/a |

## Inputs

No input.

## Outputs

No output.

<!-- END TFDOCS -->
46 changes: 46 additions & 0 deletions tests/microsoft_ad/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
provider aws {
region = "us-east-1"
}

resource "random_string" "password" {
length = 10
min_upper = 1
min_lower = 1
min_numeric = 1
min_special = 1
}

resource "random_string" "domain" {
length = 10
upper = false
number = false
special = false
}

module "vpc" {
source = "github.com/terraform-aws-modules/terraform-aws-vpc?ref=v2.15.0"

providers = {
aws = aws
}

name = "tardigrade-directory-service-testing"
cidr = "10.0.0.0/16"
azs = ["us-east-1a", "us-east-1b"]
private_subnets = ["10.0.1.0/24", "10.0.2.0/24"]
}

module "microsoft_ad_enterprise" {
source = "../../"
providers = {
aws = aws
}

create_directory_service = true
name = "corp.${random_string.domain.result}.com"
password = random_string.password.result
type = "MicrosoftAD"
edition = "Standard"
subnet_ids = module.vpc.private_subnets
vpc_id = module.vpc.vpc_id
}
4 changes: 4 additions & 0 deletions tests/microsoft_ad/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

terraform {
required_version = ">= 0.12"
}
9 changes: 8 additions & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ variable "password" {
}

variable "size" {
description = "The size of the directory (Small or Large)"
description = "(Required for SimpleAD and ADConnector) The size of the directory (Small or Large)"
type = string
default = null
}

variable "vpc_id" {
Expand Down Expand Up @@ -64,6 +65,12 @@ variable "type" {
default = "SimpleAD"
}

variable "edition" {
description = "(Required for the MicrosoftAD type only) The MicrosoftAD edition (Standard or Enterprise)."
type = string
default = null
}

variable "tags" {
description = "A mapping of tags to assign to the resource"
type = map(string)
Expand Down

0 comments on commit e7d83fb

Please sign in to comment.