Skip to content

Commit e95a22d

Browse files
authored
Merge pull request #1 from datafold/gerard-cx-2440-switch-to-versioned-terraform-aws
feat: Release first version of terraform-aws-datafold
2 parents ba5040d + 9530a1c commit e95a22d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+2707
-0
lines changed

.envrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export TFENV_AUTO_INSTALL=true
2+
3+
tfenv install
4+
5+
terraform --version

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @datafold/datafold-engineering

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
## What type of PR is this? (check all applicable)
2+
3+
Specify one of the following as the first element in the title:
4+
5+
- build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
6+
- ci: Changes to our CI configuration files and scripts (examples: CircleCi, SauceLabs)
7+
- docs: Documentation only changes
8+
- feat: A new feature
9+
- fix: A bug fix
10+
- perf: A code change that improves performance
11+
- refactor: A code change that neither fixes a bug nor adds a feature
12+
- test: Adding missing tests or correcting existing tests
13+
14+
The NOTABLE CHANGES that will create a new entry in CHANGELOG.md and
15+
create a new tag are these types:
16+
17+
- feat
18+
- fix
19+
20+
## Description
21+
22+
<Add your description here>

.github/workflows/pr-title.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: "Validate PR Title"
2+
3+
on:
4+
pull_request_target:
5+
types: [opened, edited, synchronize]
6+
7+
jobs:
8+
main:
9+
name: Validate PR title
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: amannn/[email protected]
13+
env:
14+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15+
with:
16+
# Allowed types: https://github.com/commitizen/conventional-commit-types
17+
# build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
18+
# ci: Changes to our CI configuration files and scripts (examples: CircleCi, SauceLabs)
19+
# docs: Documentation only changes
20+
# feat: NOTABLE CHANGE: A new feature
21+
# fix: NOTABLE CHANGE: A bug fix
22+
# perf: A code change that improves performance
23+
# refactor: A code change that neither fixes a bug nor adds a feature
24+
# test: Adding missing tests or correcting existing tests
25+
types: |
26+
fix
27+
feat
28+
docs
29+
style
30+
refactor
31+
perf
32+
test
33+
build
34+
ci
35+
chore
36+
revert
37+
requireScope: false
38+
subjectPattern: ^[A-Z].+$
39+
subjectPatternError: |
40+
The subject "{subject}" found in the pull request title "{title}"
41+
didn't match the configured pattern. Please ensure that the subject
42+
starts with an uppercase character. See .github/workflows/pr-title.yaml
43+
44+
These conventional commits can then be used to automatically generate the CHANGELOG.md
45+
wip: true
46+
validateSingleCommit: true
47+
validateSingleCommitMatchesPrTitle: true

.github/workflows/release.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Build and release
2+
on:
3+
push:
4+
branches:
5+
- main
6+
paths:
7+
- '*.tf'
8+
- '**/*.tf'
9+
- '.github/workflows/release.yaml'
10+
11+
jobs:
12+
build:
13+
name: Release
14+
runs-on: ubuntu-latest
15+
if: github.repository_owner == 'datafold'
16+
17+
steps:
18+
- name: Check out repository
19+
uses: actions/checkout@v4
20+
with:
21+
token: ${{ secrets.DATAFOLD_RELEASE_TOKEN }}
22+
persist-credentials: false
23+
24+
- name: Release
25+
uses: cycjimmy/semantic-release-action@v4
26+
with:
27+
semantic_version: 19.0.2
28+
extra_plugins: |
29+
@semantic-release/[email protected]
30+
@semantic-release/[email protected]
31+
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.DATAFOLD_RELEASE_TOKEN }}
34+
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: tfsec-pr-commenter
2+
on:
3+
pull_request:
4+
5+
jobs:
6+
tfsec:
7+
name: tfsec PR commenter
8+
runs-on: ubuntu-latest
9+
if: github.repository_owner == 'datafold'
10+
11+
permissions:
12+
contents: read
13+
pull-requests: write
14+
15+
steps:
16+
- name: Clone repo
17+
uses: actions/checkout@v3
18+
19+
- name: tfsec
20+
uses: aquasecurity/[email protected]
21+
with:
22+
github_token: ${{ github.token }}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Validate Terraform
2+
on:
3+
pull_request:
4+
types: [opened, reopened, synchronize, labeled, unlabeled]
5+
workflow_dispatch:
6+
7+
jobs:
8+
terraform-validate:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@v3
13+
14+
- name: Validate Terraform modules
15+
uses: devops-infra/[email protected]
16+
with:
17+
dir_filter: modules

.gitignore

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Local .terraform directories
2+
**/.terraform/*
3+
4+
# .tfstate files
5+
*.tfstate
6+
*.tfstate.*
7+
8+
# Crash log files
9+
crash.log
10+
crash.*.log
11+
12+
# Exclude all .tfvars files, which are likely to contain sensitive data, such as
13+
# password, private keys, and other secrets. These should not be part of version
14+
# control as they are data points which are potentially sensitive and subject
15+
# to change depending on the environment.
16+
*.tfvars
17+
*.tfvars.json
18+
19+
# Ignore override files as they are usually used to override resources locally and so
20+
# are not checked in
21+
override.tf
22+
override.tf.json
23+
*_override.tf
24+
*_override.tf.json
25+
26+
# Include override files you do wish to add to version control using negated pattern
27+
# !example_override.tf
28+
29+
# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan
30+
# example: *tfplan*
31+
32+
# Ignore CLI configuration files
33+
.terraformrc
34+
terraform.rc
35+
36+
# VSCode workspace dir
37+
**/.vscode/*
38+
**/.idea/*
39+
*.DS_Store
40+
**/.lh
41+
.history
42+
43+
*.key
44+
*.key.pub
45+
.env
46+
47+
# virtual environments
48+
.venv
49+
venv

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
repos:
2+
- repo: https://github.com/terraform-docs/terraform-docs
3+
rev: "v0.17.0"
4+
hooks:
5+
- id: terraform-docs-go
6+
args: ["markdown", "table", "--output-file", "README.md", "./"]
7+

.releaserc.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"branches": ["main"],
3+
"ci": false,
4+
"plugins": [
5+
["@semantic-release/commit-analyzer", { "preset": "conventionalcommits" }],
6+
[
7+
"@semantic-release/release-notes-generator",
8+
{ "preset": "conventionalcommits" }
9+
],
10+
[
11+
"@semantic-release/github",
12+
{
13+
"successComment": "This ${issue.pull_request ? 'PR is included' : 'issue has been resolved'} in version ${nextRelease.version} :tada:",
14+
"labels": false,
15+
"releasedLabels": false
16+
}
17+
],
18+
[
19+
"@semantic-release/changelog",
20+
{
21+
"changelogFile": "CHANGELOG.md",
22+
"changelogTitle": "# Changelog\n\nSee this file for notable changes between versions."
23+
}
24+
],
25+
[
26+
"@semantic-release/git",
27+
{
28+
"assets": ["CHANGELOG.md"],
29+
"message": "chore(release): version ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
30+
}
31+
]
32+
]
33+
}

0 commit comments

Comments
 (0)