Skip to content

Commit

Permalink
fix: upgrade to terraform v0.12, lock provider versions
Browse files Browse the repository at this point in the history
Fixes dwmkerr#88.
  • Loading branch information
dwmkerr committed Jul 18, 2019
1 parent 6dde13c commit c85c1cb
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ created, which is used to install the OpenShift Origin platform on the hosts.

You need:

1. [Terraform](https://www.terraform.io/intro/getting-started/install.html) - `brew update && brew install terraform`
1. [Terraform (0.12 or greater)](https://www.terraform.io/intro/getting-started/install.html) - `brew update && brew install terraform`
2. An AWS account, configured with the cli locally -
```
if [[ "$unamestr" == 'Linux' ]]; then
Expand Down
11 changes: 10 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
// Setup the core provider information.
# Setup our providers so that we have deterministic dependecy resolution.
provider "aws" {
region = "${var.region}"
version = "~> 2.19"
}

provider "local" {
version = "~> 1.3"
}

provider "template" {
version = "~> 2.1"
}

// Create the OpenShift cluster using our module.
Expand Down
4 changes: 2 additions & 2 deletions modules/openshift/06-nodes.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ resource "aws_key_pair" "keypair" {
// Create the master userdata script.
data "template_file" "setup-master" {
template = "${file("${path.module}/files/setup-master.sh")}"
vars {
vars = {
availability_zone = "${data.aws_availability_zones.azs.names[0]}"
}
}
Expand Down Expand Up @@ -61,7 +61,7 @@ resource "aws_instance" "master" {
// Create the node userdata script.
data "template_file" "setup-node" {
template = "${file("${path.module}/files/setup-node.sh")}"
vars {
vars = {
availability_zone = "${data.aws_availability_zones.azs.names[0]}"
}
}
Expand Down
2 changes: 1 addition & 1 deletion modules/openshift/07-dns.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ resource "aws_route53_zone" "internal" {
vpc {
vpc_id = "${aws_vpc.openshift.id}"
}
tags {
tags = {
Name = "OpenShift Internal DNS"
Project = "openshift"
}
Expand Down
2 changes: 1 addition & 1 deletion modules/openshift/09-inventory.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// inventory from the inventory template.
data "template_file" "inventory" {
template = "${file("${path.cwd}/inventory.template.cfg")}"
vars {
vars = {
access_key = "${aws_iam_access_key.openshift-aws-user.id}"
secret_key = "${aws_iam_access_key.openshift-aws-user.secret}"
public_hostname = "${aws_eip.master_eip.public_ip}.xip.io"
Expand Down

0 comments on commit c85c1cb

Please sign in to comment.