Skip to content

Commit 7580cdc

Browse files
authored
Merge pull request #33 from unifio/issue32-instance_tenancy_aws_provider_fix
#32 Support aws provider instance_tenancy value
2 parents ab45e0e + c276eaa commit 7580cdc

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
* full ipv6 support
33
* vpc endpoints
44

5+
## 0.3.6 (Jul 11, 2018)
6+
7+
#### BUG FIXES:
8+
* Resolved [issue](https://github.com/unifio/terraform-aws-vpc/issues/32) caused by [terraform-provider-aws v1.25.0](https://github.com/terraform-providers/terraform-provider-aws/issues/2514). Addressed by adding a default `instance_tenancy` when one isn't supplied using a local variable.
9+
510
## 0.3.5 (March 11, 2018)
611

712
#### IMPROVEMENTS / NEW FEATURES:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Name | Type | Required | Description
3838
`enable_dns` | string | Default: `true` | Specifies whether DNS resolution is supported for the VPC.
3939
`enable_hostnames` | string | Default: `true` | Specifies whether the instances launched in the VPC get DNS hostnames.
4040
`flow_log_traffic_type` | string | Default: `ALL` | The type of traffic to capture. Valid values: ACCEPT,REJECT,ALL.
41-
`instance_tenancy` | string | Default: `default` | The allowed tenancy of instances launched into the VPC. Only other option at this time is `dedicated`, which will force any instance launched into the VPC to be dedicated, regardless of the tenancy option specified when the instance is launched.
41+
`instance_tenancy` | string | Default: `default` | The allowed tenancy of instances launched into the VPC. Other options at this time are `dedicated` and `host`. These will both force any instance launched into the VPC to be dedicated, regardless of the tenancy option specified when the instance is launched. See [EC2 Dedicated Instance Doc](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-instance.html) for more information.
4242
`stack_item_label` | string | Default: `qckstrt` | Short form identifier for this stack. This value is used to create the "Name" tag for resources created by this stack item, and also serves as a unique key for re-use.
4343
`stack_item_fullname` | string | Default: `VPC Quick Start` | Long form descriptive name for this stack item. This value is used to create the "application" tag for resources created by this stack item.
4444
`vpc_cidr` | string | Default: `172.16.0.0/21` | The CIDR block you want the VPC to cover.

base/main.tf

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,15 @@ terraform {
55
required_version = "> 0.11.0"
66
}
77

8+
## Set default instance tennancy if not provided
9+
locals {
10+
default_instance_tenancy = "${length(var.instance_tenancy) >= 1 ? "${var.instance_tenancy}" : "default"}"
11+
}
12+
813
## Provisions Virtual Private Cloud (VPC)
914
resource "aws_vpc" "vpc" {
1015
cidr_block = "${var.vpc_cidr}"
11-
instance_tenancy = "${var.instance_tenancy}"
16+
instance_tenancy = "${local.default_instance_tenancy}"
1217
enable_dns_support = "${var.enable_dns}"
1318
enable_dns_hostnames = "${var.enable_hostnames}"
1419
enable_classiclink = "${var.enable_classiclink}"

0 commit comments

Comments
 (0)