This repository has been archived by the owner on Feb 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* nits * nits * nits * nits * nits * nits * nits * nits * nits * nits * nits * nits
- Loading branch information
Showing
14 changed files
with
921 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
docker-compose* | ||
.gitignore | ||
.dockerignore | ||
|
||
# Local .terraform directories | ||
**/.terraform/* | ||
|
||
# .tfstate files | ||
**/.tfstate | ||
**/.tfstate.* | ||
|
||
# .tfvars files | ||
**/*.tfvars |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
FROM puneethn/terraform-test-workhorse:0.12.25 | ||
|
||
WORKDIR /go/src/github.com/comtravo/terraform-aws-firehose | ||
COPY . . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
pipeline { | ||
|
||
agent { label 'worker' } | ||
|
||
options { | ||
ansiColor('gnome-terminal') | ||
buildDiscarder(logRotator(numToKeepStr: '30')) | ||
skipDefaultCheckout() | ||
timestamps() | ||
} | ||
|
||
stages { | ||
stage("Checkout SCM") { | ||
steps { | ||
script { | ||
ctCheckout(revision: getMultiBranchName(), wipeWorkspace: true, noTags: true, url: '[email protected]:comtravo/terraform-aws-firehose.git') | ||
} | ||
} | ||
} | ||
|
||
stage("Build and Test") { | ||
steps { | ||
script { | ||
try { | ||
sh(label: 'Building docker image', script: "make build") | ||
sh(label: 'Testing docker image', script: "make test-docker") | ||
} finally { | ||
sh(label: 'Cleanup', script: "make clean") | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#! make | ||
|
||
DOCKER_COMPOSE=docker-compose -f ./docker-compose.yml | ||
DOCKER_COMPOSE_DEVELOP=$(DOCKER_COMPOSE) -f ./docker-compose.develop.yml | ||
|
||
GENERATE_DOCS_COMMAND:=terraform-docs --sort-inputs-by-required markdown table . > README.md | ||
|
||
fmt: | ||
@terraform fmt -recursive | ||
|
||
lint: | ||
@terraform fmt -check -recursive -diff=true | ||
@tflint | ||
|
||
build: | ||
@$(DOCKER_COMPOSE) build | ||
|
||
test: | ||
@cd tests && go test -v -tags=unit | ||
@cd tests && go test -v -tags=integration | ||
|
||
test-docker: | ||
@$(DOCKER_COMPOSE) run --rm terraform make test | ||
@$(DOCKER_COMPOSE) run --rm terraform make lint | ||
@$(DOCKER_COMPOSE) down -v | ||
|
||
develop: | ||
@$(DOCKER_COMPOSE_DEVELOP) run --rm terraform bash | ||
@$(DOCKER_COMPOSE_DEVELOP) down -v | ||
|
||
generate-docs: fmt lint | ||
@$(GENERATE_DOCS_COMMAND) | ||
|
||
clean: | ||
@$(DOCKER_COMPOSE) down -v | ||
@rm -f tests/terraform.tfstate tests/terraform.tfstate.backup | ||
@rm -rf ./terraform | ||
|
||
logs: | ||
@$(DOCKER_COMPOSE) logs -f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
version: '3' | ||
|
||
services: | ||
terraform: | ||
command: bash | ||
volumes: | ||
- ./:/go/src/github.com/comtravo/terraform-aws-firehose | ||
|
||
localstack: | ||
ports: | ||
- 4566:4566 | ||
- 4584-4597:4584-4597 | ||
- 4567-4583:4567-4583 | ||
- 8080:8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
version: '3' | ||
|
||
services: | ||
terraform: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
image: ct-terraform-aws-firehose-module:${GIT_COMMIT:-latest} | ||
environment: | ||
- AWS_REGION=us-east-1 | ||
- AWS_DEFAULT_REGION=us-east-1 | ||
- AWS_ACCESS_KEY_ID=foo | ||
- AWS_SECRET_ACCESS_KEY=bar | ||
- LOCALSTACK_HOST=localstack | ||
depends_on: | ||
- localstack | ||
|
||
localstack: | ||
image: localstack/localstack | ||
environment: | ||
- SERVICES=s3,firehose,iam,sts | ||
- DEFAULT_REGION=us-east-1 | ||
- DOCKER_HOST=unix:///var/run/docker.sock | ||
- DATA_DIR=/tmp/localstack/data | ||
volumes: | ||
- "/var/run/docker.sock:/var/run/docker.sock" | ||
- "localstack-data:/tmp/localstack" | ||
|
||
volumes: | ||
localstack-data: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.