terraform-aws-autoscaling-route53-srv
所属分类:网络编程
开发工具:HCL
文件大小:0KB
下载次数:0
上传日期:2018-02-21 19:37:56
上 传 者:
sh-1993
说明: 管理路由53 DNS SRV记录以引用一组自动扩展组中的所有服务器,
(Manages a Route 53 DNS SRV record to refer to all servers in a set of auto scaling groups,)
文件列表:
LICENSE (10267, 2018-02-21)
example/ (0, 2018-02-21)
example/SetAwsEnvironment.ps1 (665, 2018-02-21)
example/autoscaling.tf (782, 2018-02-21)
example/main.tf (1001, 2018-02-21)
example/provider.tf (259, 2018-02-21)
example/variables.tf (474, 2018-02-21)
example/vpc.tf (224, 2018-02-21)
iam.tf (1565, 2018-02-21)
lambda/ (0, 2018-02-21)
lambda/Package.ps1 (534, 2018-02-21)
lambda/update_route53.zip (8542758, 2018-02-21)
lambda/update_route53/ (0, 2018-02-21)
lambda/update_route53/.eslintrc.yml (117, 2018-02-21)
lambda/update_route53/index.js (3263, 2018-02-21)
lambda/update_route53/package-lock.json (54795, 2018-02-21)
lambda/update_route53/package.json (646, 2018-02-21)
main.tf (2308, 2018-02-21)
outputs.tf (180, 2018-02-21)
variables.tf (1377, 2018-02-21)
# AWS Autoscaling Route 53 DNS SRV
## Overview
This module creates the necessary AWS objects to manage a Route 53 DNS SRV record for one or more autoscaling groups.
Primarily, it creates a Lambda function which is triggered anytime one of the autoscaling groups scales in or out,
which then updates the DNS SRV record.
## Usage
Simply supply a hosted zone, a list of auto scaling groups, and information about the service you want to register.
For example, to track nodes in a Couchbase cluster:
```terraform
module "autoscaling_srv" {
source = "brantburnett/autoscaling-route53-srv/aws"
version = "~> 0.1.0"
function_name = "CouchbaseClusterSrvManager"
hosted_zone_id = "Z0982089720"
service_name = "couchbase"
service_protocol = "tcp"
service_port = 11210
autoscaling_group_names = [
"${aws_autoscaling_group.example.name}",
]
}
```
## Adding to an existing Autoscaling Group
If you apply this module to an existing autoscaling group, you must manually trigger the Lambda function
the first time to create the Route 53 record. Normally, it is only triggered when instances are launched
or terminated in the auto scaling group.
## Adding to a new Autoscaling Group
If you are adding to a new autoscaling group, be sure to set "wait_for_capacity_timeout" to "0" on the
autoscaling group. Otherwise Terraform will wait for the instances to be available before moving on
to create the Lambda function (which will usually depend the name of the ASG). This will cause the
Lambda function to not be triggered initially, and the Route 53 record will not be created.
Note: If this happens accidentally, you may trigger the Lambda function from the AWS Console to
create the Route 53 record.
## Example
There is an example implementation which creates an autoscaling group and registers it in the
[example folder](https://github.com/brantburnett/terraform-aws-autoscaling-route53-srv/tree/master/example).
近期下载者:
相关文件:
收藏者: