Skip to content

Commit

Permalink
refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
James Woolfenden committed Aug 7, 2020
1 parent 7579c20 commit 9836e81
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 22 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ jobs:
strategy:
matrix:
python-version: [3.7]

steps:
- uses: actions/checkout@v2
with:
ref: master
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ default_language_version:
python: python3
repos:
- repo: git://github.com/pre-commit/pre-commit-hooks
rev: v3.1.0
rev: v3.2.0
hooks:
- id: check-json
- id: check-merge-conflict
Expand All @@ -18,7 +18,7 @@ repos:
- id: detect-aws-credentials
- id: detect-private-key
- repo: git://github.com/Lucas-C/pre-commit-hooks
rev: v1.1.7
rev: v1.1.9
hooks:
- id: forbid-tabs
exclude_types:
Expand All @@ -34,11 +34,11 @@ repos:
hooks:
- id: shell-lint
- repo: git://github.com/igorshubovych/markdownlint-cli
rev: v0.23.1
rev: v0.23.2
hooks:
- id: markdownlint
- repo: git://github.com/adrienverge/yamllint
rev: v1.23.0
rev: v1.24.2
hooks:
- id: yamllint
name: yamllint
Expand Down
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![Build Status](https://github.com/JamesWoolfenden/terraform-aws-codebuild/workflows/Verify%20and%20Bump/badge.svg?branch=master)](https://github.com/JamesWoolfenden/terraform-aws-codebuild)
[![Latest Release](https://img.shields.io/github/release/JamesWoolfenden/terraform-aws-codebuild.svg)](https://github.com/JamesWoolfenden/terraform-aws-codebuild/releases/latest)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
[![pre-commit](https://img.shields.io/badge/checkov-verified-brightgreen)](https://www.checkov.io/)
[![checkov](https://img.shields.io/badge/checkov-verified-brightgreen)](https://www.checkov.io/)

Terraform module to provision an AWS [`codebuild`](https://aws.amazon.com/codebuild/) CI/CD system.

Expand Down Expand Up @@ -51,10 +51,6 @@ These templates implement the module terraform-aws-codebuild. It includes a numb
In the root directory there is an example `buildspec.yml`. This is a build specification you can supply to CodeCommit. It includes some basic codebuild functionality to drive semantic versioning using SSM parameters.

<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Requirements

No requirements.

## Providers

| Name | Version |
Expand All @@ -64,7 +60,7 @@ No requirements.
## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
|------|-------------|------|---------|:-----:|
| artifact | Populates the Artifact block | `map` | <pre>{<br> "namespace_type": "NONE",<br> "packaging": "NONE"<br>}</pre> | no |
| artifact\_type | The Artifact type, S3, CODEPIPELINE or NO\_ARTIFACT | `string` | `"S3"` | no |
| bucketname | n/a | `string` | `""` | no |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,10 @@ resource "aws_iam_policy" "additionalneeds" {
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": "lex:*",
"Resource": "*"
},
{
"Sid": "VisualEditor2",
"Effect": "Allow",
"Action": "s3:*",
"Action": "s3:listbuckets",
"Resource": [
"arn:aws:s3:::aws-lexbot-wilbur-${data.aws_caller_identity.current.account_id}-artifacts/*",
"arn:aws:s3:::aws-lexbot-wilbur-${data.aws_caller_identity.current.account_id}-artifacts"
Expand Down
11 changes: 7 additions & 4 deletions example/examplea/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Makefile
# Makefile
ifdef OS
BLAT = $(powershell -noprofile rm .\.terraform\ -force -recurse)
else
Expand All @@ -16,13 +16,15 @@ init:
$(RM)
terraform init -reconfigure

plan: init
plan:
terraform plan -refresh=true

p:
terraform plan -refresh=true

build: init
apply: build

build:
terraform apply -auto-approve

check: init
Expand All @@ -35,12 +37,13 @@ docs:
terraform-docs md . > README.md

valid:
tflint
terraform fmt -check=true -diff=true
checkov -d . --external-checks-dir ../../checkov

target:
@read -p "Enter Module to target:" MODULE;
terraform apply -target $$MODULE

purge:
$(BLAT)
terraform init -reconfigure
2 changes: 1 addition & 1 deletion example/examplea/provider.aws.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
provider "aws" {
region = "eu-west-1"
version = "2.68.0"
version = "3.00.0"
}

provider "local" {
Expand Down
1 change: 1 addition & 0 deletions validate.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ Set-Location example/examplea
Remove-Item .terraform -force -Recurse -ErrorAction SilentlyContinue
terraform init
terraform validate
make valid
Pop-Location
1 change: 1 addition & 0 deletions validate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ cd example/examplea || return
rm .terraform -fr
terraform init
terraform validate
make valid

0 comments on commit 9836e81

Please sign in to comment.