Skip to content

Commit

Permalink
Merge pull request #44 from reactiveops/nickhuanca/v3.0.0
Browse files Browse the repository at this point in the history
Adjustment to Module
  • Loading branch information
endzyme authored Oct 24, 2018
2 parents 34e12b0 + ddfb5ad commit cd96d45
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 31 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ requirements: bin/terraform ## Install required software

test: requirements ## Execute all tests
@echo "Temp directory: $(TEMPDIR)"
@cp tests/provider.tf temp_provider.tf
@bin/terraform init > /dev/null 2>&1
@for i in `find . -name terraform.\*.tfvars.example`; do \
bin/terraform plan -var-file $$i 1> $(TEMPDIR)/$$i.output && \
Expand Down
11 changes: 1 addition & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ This module has been tested with Terraform version 0.11.8
module "vpc" {
source = "git::ssh://[email protected]/reactiveops/terraform-vpc.git?ref=2.0.2"
aws_access_key = "${var.aws_access_key}"
aws_secret_key = "${var.aws_secret_key}"
aws_region = "${var.aws_region}"
az_count = "${var.az_count}"
Expand All @@ -31,8 +29,6 @@ module "vpc" {
* Create the required variables either in `main.tf` or a separate `variables.tf` file:

```
variable "aws_access_key" {}
variable "aws_secret_key" {}
variable "aws_region" {}
variable "aws_azs" {}
Expand Down Expand Up @@ -155,12 +151,7 @@ This repo contains a few `.tfvars.example` files in the root illustrating differ

### Setup

Running `make test` requires an actual AWS account for plan generation. The AWS account used requires read-only access to VPC/EC2 resources. No changes are applied. Credentials can be set via environment variables.

```
export TF_VAR_aws_access_key=XXXXXXXXXXXXXXXXX
export TF_VAR_aws_secret_key=XXXXXXXXXXXXXXXXXXXXXXXXXXXX
```
Running `make test` requires an actual AWS account for plan generation. The AWS account used requires read-only access to VPC/EC2 resources. No changes are applied. Credentials should be inferred from your awscli config, usually found in `~/.aws/config`.

### Executing tests

Expand Down
19 changes: 0 additions & 19 deletions aws-vpc.tf

This file was deleted.

8 changes: 8 additions & 0 deletions tests/provider.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
variable "aws_access_key" {}
variable "aws_secret_key" {}

provider "aws" {
access_key = "${var.aws_access_key}"
secret_key = "${var.aws_secret_key}"
region = "${var.aws_region}"
}
2 changes: 0 additions & 2 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
#See the License for the specific language governing permissions and
#limitations under the License.

variable "aws_access_key" {}
variable "aws_secret_key" {}
variable "aws_region" {}

variable "aws_vpc_name" {
Expand Down

0 comments on commit cd96d45

Please sign in to comment.