Skip to content

Commit cd96d45

Browse files
authored
Merge pull request #44 from reactiveops/nickhuanca/v3.0.0
Adjustment to Module
2 parents 34e12b0 + ddfb5ad commit cd96d45

File tree

5 files changed

+10
-31
lines changed

5 files changed

+10
-31
lines changed

Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ requirements: bin/terraform ## Install required software
1515

1616
test: requirements ## Execute all tests
1717
@echo "Temp directory: $(TEMPDIR)"
18+
@cp tests/provider.tf temp_provider.tf
1819
@bin/terraform init > /dev/null 2>&1
1920
@for i in `find . -name terraform.\*.tfvars.example`; do \
2021
bin/terraform plan -var-file $$i 1> $(TEMPDIR)/$$i.output && \

README.md

+1-10
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ This module has been tested with Terraform version 0.11.8
1616
module "vpc" {
1717
source = "git::ssh://[email protected]/reactiveops/terraform-vpc.git?ref=2.0.2"
1818
19-
aws_access_key = "${var.aws_access_key}"
20-
aws_secret_key = "${var.aws_secret_key}"
2119
aws_region = "${var.aws_region}"
2220
2321
az_count = "${var.az_count}"
@@ -31,8 +29,6 @@ module "vpc" {
3129
* Create the required variables either in `main.tf` or a separate `variables.tf` file:
3230

3331
```
34-
variable "aws_access_key" {}
35-
variable "aws_secret_key" {}
3632
variable "aws_region" {}
3733
3834
variable "aws_azs" {}
@@ -155,12 +151,7 @@ This repo contains a few `.tfvars.example` files in the root illustrating differ
155151

156152
### Setup
157153

158-
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.
159-
160-
```
161-
export TF_VAR_aws_access_key=XXXXXXXXXXXXXXXXX
162-
export TF_VAR_aws_secret_key=XXXXXXXXXXXXXXXXXXXXXXXXXXXX
163-
```
154+
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`.
164155

165156
### Executing tests
166157

aws-vpc.tf

-19
This file was deleted.

tests/provider.tf

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
variable "aws_access_key" {}
2+
variable "aws_secret_key" {}
3+
4+
provider "aws" {
5+
access_key = "${var.aws_access_key}"
6+
secret_key = "${var.aws_secret_key}"
7+
region = "${var.aws_region}"
8+
}

variables.tf

-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
#See the License for the specific language governing permissions and
1313
#limitations under the License.
1414

15-
variable "aws_access_key" {}
16-
variable "aws_secret_key" {}
1715
variable "aws_region" {}
1816

1917
variable "aws_vpc_name" {

0 commit comments

Comments
 (0)