forked from cloudposse/terraform-aws-efs
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert to use my label module, add enable option, add future upstrea…
…m changes
- Loading branch information
Steven Nemetz
committed
Dec 15, 2017
1 parent
5274a41
commit 09efbc3
Showing
4 changed files
with
152 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,26 @@ | ||
output "id" { | ||
value = "${aws_efs_file_system.default.id}" | ||
description = "ID of EFS" | ||
value = "${element(concat(aws_efs_file_system.default.*.id, list("")),0)}" | ||
} | ||
|
||
/* | ||
output "host" { | ||
value = "${module.dns.hostname}" | ||
description = "Assigned DNS-record for the EFS" | ||
value = "${module.dns.hostname}" | ||
} | ||
|
||
*/ | ||
output "dns_name" { | ||
value = "${aws_efs_file_system.default.id}.efs.${var.aws_region}.amazonaws.com" | ||
description = "" | ||
value = "${element(concat(aws_efs_file_system.default.*.id, list("")),0)}.efs.${local.region}.amazonaws.com" | ||
} | ||
output "security_group" { | ||
value = "${aws_security_group.default.id}" | ||
description = "" | ||
value = "${element(concat(aws_security_group.default.*.id, list("")),0)}" | ||
} | ||
output "mount_target_ids" { | ||
value = ["${aws_efs_mount_target.default.*.id}"] | ||
description = "List of IDs of the EFS mount targets" | ||
value = ["${aws_efs_mount_target.default.*.id}"] | ||
} | ||
|
||
output "mount_target_ips" { | ||
value = ["${aws_efs_mount_target.default.*.ip_address}"] | ||
description = "List of IPs of the EFS mount targets" | ||
value = ["${aws_efs_mount_target.default.*.ip_address}"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module "efs" { | ||
source = "../" | ||
name = "CapMe" | ||
environment = "Dev" | ||
#organization = "CorpXyZ" | ||
#attributes = ["role", "policy", "use", ""] | ||
#tags = "${map("Key", "Value")}" | ||
zone_id = "" | ||
security_groups = [] | ||
subnets = [] | ||
vpc_id = "" | ||
#enabled = false | ||
} | ||
|
||
# Test: | ||
# enabled = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,88 @@ | ||
variable "namespace" { | ||
default = "global" | ||
} | ||
|
||
variable "stage" { | ||
default = "default" | ||
// Variables specific to module label | ||
variable "attributes" { | ||
description = "Suffix name with additional attributes (policy, role, etc.)" | ||
type = "list" | ||
default = [] | ||
} | ||
variable "delimiter" { | ||
description = "Delimiter to be used between `name`, `namespaces`, `attributes`, etc." | ||
type = "string" | ||
default = "-" | ||
} | ||
variable "environment" { | ||
description = "Environment (ex: dev, qa, stage, prod)" | ||
type = "string" | ||
} | ||
|
||
variable "name" { | ||
default = "app" | ||
description = "Base name for resource" | ||
type = "string" | ||
} | ||
|
||
variable "security_groups" { | ||
type = "list" | ||
variable "namespace-env" { | ||
description = "Prefix name with the environment" | ||
default = true | ||
} | ||
|
||
variable "vpc_id" {} | ||
|
||
variable "aws_region" {} | ||
|
||
variable "subnets" { | ||
type = "list" | ||
variable "namespace-org" { | ||
description = "Prefix name with the organization. If both env and org namespaces are used, format will be <org>-<env>-<name>" | ||
default = false | ||
} | ||
|
||
variable "availability_zones" { | ||
type = "list" | ||
variable "organization" { | ||
description = "Organization name" | ||
type = "string" | ||
default = "" | ||
} | ||
|
||
variable "zone_id" {} | ||
|
||
variable "delimiter" { | ||
type = "string" | ||
default = "-" | ||
variable "tags" { | ||
description = "A map of additional tags to add" | ||
type = "map" | ||
default = {} | ||
} | ||
|
||
variable "attributes" { | ||
type = "list" | ||
default = [] | ||
// Variables specific to module route53-cluster-hostname | ||
variable "dns_ttl" { | ||
description = "TTL of the DNS record" | ||
type = "string" | ||
default = "60" | ||
} | ||
variable "zone_id" { | ||
description = "Route53 DNS zone ID" | ||
type = "string" | ||
default = "" | ||
} | ||
|
||
variable "tags" { | ||
type = "map" | ||
default = {} | ||
// Variables specific to this module | ||
variable "enabled" { | ||
description = "Set to false to prevent the module from creating anything" | ||
default = true | ||
} | ||
variable "encrypted" { | ||
description = "If true, the disk will be encrypted" | ||
type = "string" | ||
default = "false" | ||
} | ||
variable "kms_key_id" { | ||
description = "ARN for the KMS encryption key. When specifying kms_key_id, encrypted needs to be set to true" | ||
type = "string" | ||
default = "" | ||
} | ||
variable "performance_mode" { | ||
description = "The file system performance mode. Can be either generalPurpose or maxIO" | ||
type = "string" | ||
default = "generalPurpose" | ||
} | ||
variable "region" { | ||
description = "AWS region" | ||
type = "string" | ||
default = "" | ||
} | ||
variable "security_groups" { | ||
description = "AWS security group IDs to allow to connect to the EFS" | ||
type = "list" | ||
} | ||
variable "subnets" { | ||
description = "AWS subnet IDs" | ||
type = "list" | ||
} | ||
variable "vpc_id" { | ||
description = "AWS VPC ID" | ||
type = "string" | ||
} |