Created
December 30, 2016 19:54
-
-
Save mooyoul/f71ca268ea8416cc5db212e5153fd136 to your computer and use it in GitHub Desktop.
Terraform 101 - Modules
This file contains hidden or 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
variable "access_key" {} | |
variable "secret_key" {} | |
variable "region" { | |
default = "ap-northeast-2" | |
} | |
variable "key_name" {} | |
variable "key_path" {} | |
provider "aws" { | |
access_key = "${var.access_key}" | |
secret_key = "${var.secret_key}" | |
region = "${var.region}" | |
} | |
module "consul" { | |
# source 속성의 원본 값은 아래와 같으나, | |
# 현재 Consul의 Terraform의 AWS 템플릿에 서울 리전 (ap-northeast-2) AMI가 정의되지 않아 | |
# AWS 서울 리전으로 사용할 수 없는 문제가 있어 fork한 버전을 대신 사용합니다. | |
# Consul PR URL: https://github.com/hashicorp/consul/pull/2620 | |
# 위 PR이 머지된다면, 아래 코드를 사용하셔도 무방합니다. | |
# | |
# source = "github.com/hashicorp/consul/terraform/aws" | |
source = "github.com/mooyoul/consul?ref=tf-module-support-aws-seoul//terraform/aws" | |
key_name = "${var.key_name}" | |
key_path = "${var.key_path}" | |
region = "${var.region}" | |
servers = "3" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment