Skip to content
This repository has been archived by the owner on Jan 31, 2021. It is now read-only.

Commit

Permalink
Support Custom VPC Tag Lookup (#4)
Browse files Browse the repository at this point in the history
Support Custom VPC Tag Lookup
  • Loading branch information
dennybaa authored and osterman committed Jul 20, 2018
1 parent d215888 commit 47f3d21
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ Available targets:
| enabled | Set to false to prevent the module from creating or accessing any resources | string | `true` | no |
| masters_name | K8s masters subdomain name in the Kops DNS zone | string | `masters` | no |
| nodes_name | K8s nodes subdomain name in the Kops DNS zone | string | `nodes` | no |
| vpc_tag | Tag used to lookup the Kops VPC | string | `Name` | no |
| vpc_tag_values | Tag values list to lookup the Kops VPC | string | `<list>` | no |

## Outputs

Expand Down Expand Up @@ -102,11 +104,11 @@ Check out these related projects.

File a GitHub [issue](https://github.com/cloudposse/terraform-aws-kops-metadata/issues), send us an [email][email] or join our [Slack Community][slack].

## Commerical Support
## Commercial Support

Work directly with our team of DevOps experts via email, slack, and video conferencing.

We provide *commercial support* for all of our [Open Source][github] projects. As a *Dedicated Support* customer, you have access to our team of subject matter experts at a fraction of the cost of a fulltime engineer.
We provide [*commercial support*][commercial_support] for all of our [Open Source][github] projects. As a *Dedicated Support* customer, you have access to our team of subject matter experts at a fraction of the cost of a full-time engineer.

[![E-Mail](https://img.shields.io/badge/email-hello@cloudposse.com-blue.svg)](mailto:hello@cloudposse.com)

Expand All @@ -116,7 +118,7 @@ We provide *commercial support* for all of our [Open Source][github] projects. A
- **Bug Fixes.** We'll rapidly work to fix any bugs in our projects.
- **Build New Terraform Modules.** We'll develop original modules to provision infrastructure.
- **Cloud Architecture.** We'll assist with your cloud strategy and design.
- **Implementation.** We'll provide hands on support to implement our reference architectures.
- **Implementation.** We'll provide hands-on support to implement our reference architectures.


## Community Forum
Expand Down Expand Up @@ -200,6 +202,7 @@ Check out [our other projects][github], [apply for a job][jobs], or [hire us][hi
[docs]: https://docs.cloudposse.com/
[website]: https://cloudposse.com/
[github]: https://github.com/cloudposse/
[commercial_support]: https://github.com/orgs/cloudposse/projects
[jobs]: https://cloudposse.com/jobs/
[hire]: https://cloudposse.com/contact/
[slack]: https://slack.cloudposse.com/
Expand Down
2 changes: 2 additions & 0 deletions docs/terraform.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
| enabled | Set to false to prevent the module from creating or accessing any resources | string | `true` | no |
| masters_name | K8s masters subdomain name in the Kops DNS zone | string | `masters` | no |
| nodes_name | K8s nodes subdomain name in the Kops DNS zone | string | `nodes` | no |
| vpc_tag | Tag used to lookup the Kops VPC | string | `Name` | no |
| vpc_tag_values | Tag values list to lookup the Kops VPC | string | `<list>` | no |

## Outputs

Expand Down
4 changes: 2 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ data "aws_vpc" "kops" {
count = "${var.enabled == "true" ? 1 : 0}"

filter {
name = "tag:Name"
values = ["${var.dns_zone}"]
name = "tag:${var.vpc_tag}"
values = ["${concat(var.vpc_tag_values, list(var.dns_zone))}"]
}
}

Expand Down
10 changes: 10 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,13 @@ variable "nodes_name" {
default = "nodes"
description = "K8s nodes subdomain name in the Kops DNS zone"
}

variable "vpc_tag" {
default = "Name"
description = "Tag used to lookup the Kops VPC"
}

variable "vpc_tag_values" {
default = []
description = "Tag values list to lookup the Kops VPC"
}

0 comments on commit 47f3d21

Please sign in to comment.