Skip to content

Commit

Permalink
Merge pull request #5 from GSA/refactor
Browse files Browse the repository at this point in the history
Update module source
  • Loading branch information
Brian Fitzwater - IDI-C authored Sep 27, 2019
2 parents d521bf4 + e2102da commit 73bc9b6
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
command: curl -L -o /tmp/tflint.zip https://github.com/wata727/tflint/releases/download/v0.9.2/tflint_linux_amd64.zip && unzip /tmp/tflint.zip -d /usr/local/bin
- run:
name: Check Terraform configurations with tflint
command: find . -name ".terraform" -prune -o -type f -name "*.tf" -exec dirname {} \;|sort -u | while read m; do (cd "$m" && tflint --ignore-rule=terraform_module_pinned_source && echo "√ $m") || exit 1 ; done
command: find . -name ".terraform" -prune -o -type f -name "*.tf" -exec dirname {} \;|sort -u | while read m; do (cd "$m" && tflint && echo "√ $m") || exit 1 ; done
lint_handler:
environment:
AWS_DEFAULT_REGION: us-east-1
Expand Down
30 changes: 0 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ account the Lambda function is installed in.
- [Example Usage](#example-usage)
- [Terraform Module Inputs](#terraform-module-inputs)
- [Terraform Module Outputs](#terraform-module-outputs)
- [Non-Module Installation](#non-module-installation)
- [Environment Variables](#environment-variables)
- [CircleCI Environment Variables](#circleci-environment-variables)
- [Lambda Function Environment Variables](#lambda-function-environment-variables)
Expand Down Expand Up @@ -191,35 +190,6 @@ See the [examples](terraform/examples) directory for more examples.

[top](#top)

## Non-Module Installation

It is also possible to build and apply locally without using as a Terraform
module.

1. Install system dependencies.
1. [Go](https://golang.org/)
1. [Dep](https://golang.github.io/dep/docs/installation.html)
1. [GolangCI-Lint](https://github.com/golangci/golangci-lint)
1. [gosec](https://github.com/securego/gosec)
1. [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/installing.html)
1. [Terraform](https://www.terraform.io/)
1. [Configure AWS](https://www.terraform.io/docs/providers/aws/#authentication) with credentials for your AWS account locally.
1. Set the the environment variables specified in the CircleCI section below.
1. Copy the `terrafrom/terraform.tfvars.example` file to `terraform/terraform.tfvars` and set the values as necessary for your environment.
1. Validate and test the code

```bash
make test
```

1. Build and deploy

```bash
make deploy
```

[top](#top)

## Environment Variables

### CircleCI Environment Variables
Expand Down
2 changes: 1 addition & 1 deletion examples/example-master.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// list all accounts and inventory each one using the OrganizationAccessRole
// if accounts_info = ""
module "example_master" {
source = "github.com/GSA/grace-inventory/terraform"
source = "github.com/GSA/grace-inventory?ref=v0.1.1"
accounts_info = ""
source_file = "../../release/grace-inventory-lambda.zip"
appenv = "development"
Expand Down
2 changes: 1 addition & 1 deletion examples/example-mgmt-all.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// if accounts_info = "" and master_account_id and master_role_name are set
// and the roles are assumable by the Lambda function's IAM role
module "example_mgmt_all" {
source = "github.com/GSA/grace-inventory/terraform"
source = "github.com/GSA/grace-inventory?ref=v0.1.1"
accounts_info = ""
master_account_id = "111111111111"
master_role_name = "AssumableRole"
Expand Down
2 changes: 1 addition & 1 deletion examples/example-self.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// The default behavior is to inventory only the account the lambda function
// is installed in (i.e. accounts_info = "self"
module "example_self" {
source = "github.com/GSA/grace-inventory/terraform"
source = "github.com/GSA/grace-inventory?ref=v0.1.1"
source_file = "../../release/grace-inventory-lambda.zip"
appenv = "development"
project_name = "grace"
Expand Down

0 comments on commit 73bc9b6

Please sign in to comment.