Skip to content

Commit

Permalink
Merge pull request #27 from unifio/yl-wip
Browse files Browse the repository at this point in the history
TF updates to remove deprecation warnings
  • Loading branch information
yuhunglin authored May 31, 2018
2 parents b444882 + 9861deb commit 1afc960
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 28 deletions.
57 changes: 57 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
common: &common
working_directory: ~/repo

docker:
- image: unifio/ci:3.0.551-ruby-2.5.1

environment:
AWS_REGION: 'us-east-2'
TF_PLUGIN_CACHE_DIR: '/root/.terraform.d/plugin-cache'

version: 2

jobs:
build:
<<: *common

steps:
- checkout

- run:
name: Verify
environment:
CI_REPORTS: 'reports'
COVALENCE_TEST_ENVS: 'basic,complete'
command: |
mkdir reports
bundle exec rake ci
- store_test_results:
path: reports

- run:
name: Basic
command: |
bundle exec rake basic:defaults:apply
## TODO: Currently need to run this twice to account for a race condition in LC updates
bundle exec rake basic:lc-options:apply || true
bundle exec rake basic:lc-options:apply
bundle exec rake basic:asg-options:apply
bundle exec rake basic:asg-options:destroy
- run:
name: Complete
command: |
bundle exec rake complete:lc-ebs-new:apply
## TODO: Currently need to run this twice to account for a race condition in LC updates
bundle exec rake complete:lc-ebs-snap:apply || true
bundle exec rake complete:lc-ebs-snap:apply
bundle exec rake complete:lc-ebs-snap:destroy
bundle exec rake complete:asg-elb:apply
bundle exec rake complete:asg-elb-wait:apply
bundle exec rake complete:asg-elb-wait:destroy
experimental:
notify:
branches:
only:
- master
23 changes: 0 additions & 23 deletions circle.yml

This file was deleted.

4 changes: 2 additions & 2 deletions examples/complete/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ EOF
}

resource "aws_iam_instance_profile" "instance_profile" {
name = "${var.stack_item_label}-${var.region}"
roles = ["${aws_iam_role.role.name}"]
name = "${var.stack_item_label}-${var.region}"
role = "${aws_iam_role.role.name}"

lifecycle {
create_before_destroy = true
Expand Down
4 changes: 1 addition & 3 deletions group/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ terraform {
}

## Creates cloudconfig fragments for tagging
data "aws_region" "current" {
current = true
}
data "aws_region" "current" {}

data "template_file" "name" {
template = "${var.instance_based_naming_enabled == "true" ? file("${path.module}/templates/name.tpl") : ""}"
Expand Down

0 comments on commit 1afc960

Please sign in to comment.