Skip to content

Commit 09249ab

Browse files
committed
feat: add initial project
1 parent f8720e5 commit 09249ab

Some content is hidden

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

55 files changed

+11458
-75
lines changed

.devcontainer/Dockerfile

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
FROM mcr.microsoft.com/vscode/devcontainers/base:1-focal
2+
3+
# Install AWS CLI
4+
RUN apt-get update && \
5+
apt-get install -y unzip python3-pip && \
6+
pip3 install --no-cache-dir --upgrade awscli && \
7+
apt-get clean && \
8+
rm -rf /var/lib/apt/lists/*
9+
10+
# Install Node.js
11+
ENV NODE_VERSION=18.x
12+
RUN curl -sL https://deb.nodesource.com/setup_${NODE_VERSION} | bash - && \
13+
apt-get install -y nodejs && \
14+
npm install -g typescript
15+
16+
# Install Docker CLI
17+
COPY --from=docker:dind /usr/local/bin/docker /usr/local/bin/
18+
19+
# Install Terraform
20+
ENV TERRAFORM_VERSION=1.5.1
21+
ENV TF_PLUGIN_CACHE_DIR=$HOME/.terraform.d/plugin-cache
22+
RUN SYSTEM_ARCH=$(dpkg --print-architecture) \
23+
&& mkdir -p $TF_PLUGIN_CACHE_DIR \
24+
&& curl -OL https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_${SYSTEM_ARCH}.zip \
25+
&& unzip terraform_${TERRAFORM_VERSION}_linux_${SYSTEM_ARCH}.zip \
26+
&& mv terraform /usr/local/bin/ \
27+
&& terraform version \
28+
&& rm terraform_${TERRAFORM_VERSION}_linux_${SYSTEM_ARCH}.zip
29+
30+
# Install Open Policy Agent
31+
RUN wget https://github.com/open-policy-agent/opa/releases/latest/download/opa_linux_amd64 -O /usr/local/bin/opa && \
32+
chmod +x /usr/local/bin/opa
33+
34+
# Verify Installs
35+
RUN terraform --version \
36+
&& aws --version \
37+
&& node --version \
38+
&& npm --version \
39+
&& opa version \
40+
&& tsc --version \
41+
&& docker --version

.devcontainer/devcontainer.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"name": "Terraform",
3+
"dockerFile": "Dockerfile",
4+
"features": {
5+
"ghcr.io/devcontainers/features/docker-in-docker:2.0.1": {},
6+
},
7+
"customizations": {
8+
"vscode": {
9+
"settings": {
10+
"editor.codeActionsOnSave": {
11+
"source.fixAll": true
12+
},
13+
"editor.formatOnSave": true,
14+
"editor.formatOnType": false,
15+
"editor.inlineSuggest.enabled": true,
16+
"terminal.integrated.shell.linux": "/bin/bash",
17+
"[markdown]": {
18+
"editor.rulers": [
19+
80
20+
]
21+
}
22+
},
23+
"extensions": [
24+
"darkriszty.markdown-table-prettify",
25+
"dbaeumer.vscode-eslint",
26+
"editorconfig.editorconfig",
27+
"github.copilot",
28+
"github.vscode-github-actions",
29+
"hashicorp.terraform",
30+
"ms-azuretools.vscode-docker",
31+
"tsandall.opa",
32+
"VisualStudioExptTeam.vscodeintellicode",
33+
],
34+
}
35+
},
36+
}

.editorconfig

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[*]
2+
indent_style = space
3+
indent_size = 2
4+
end_of_line = lf
5+
insert_final_newline = true
6+
trim_trailing_whitespace = true
7+
charset = utf-8
8+
9+
[{Dockerfile,Dockerfile.*}]
10+
indent_size = 4
11+
tab_width = 4
12+
13+
[{Makefile,makefile,GNUmakefile}]
14+
indent_style = tab
15+
indent_size = 4
16+
17+
[Makefile.*]
18+
indent_style = tab
19+
indent_size = 4
20+
21+
[**/*.{go,mod,sum}]
22+
indent_style = tab
23+
indent_size = unset
24+
25+
[**/*.py]
26+
indent_size = 4

.github/.dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"

.github/workflows/release.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout Code
16+
uses: actions/checkout@v3
17+
- name: Bump Version
18+
id: tag_version
19+
uses: mathieudutour/[email protected]
20+
with:
21+
github_token: ${{ secrets.GITHUB_TOKEN }}
22+
default_bump: minor
23+
custom_release_rules: bug:patch:Fixes,chore:patch:Chores,docs:patch:Documentation,feat:minor:Features,refactor:minor:Refactors,test:patch:Tests,ci:patch:Development,dev:patch:Development
24+
- name: Create Release
25+
uses: ncipollo/[email protected]
26+
with:
27+
tag: ${{ steps.tag_version.outputs.new_tag }}
28+
name: ${{ steps.tag_version.outputs.new_tag }}
29+
body: ${{ steps.tag_version.outputs.changelog }}

.github/workflows/semantic-check.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: semantic-check
2+
on:
3+
pull_request_target:
4+
types:
5+
- opened
6+
- edited
7+
- synchronize
8+
9+
permissions:
10+
contents: read
11+
pull-requests: read
12+
13+
jobs:
14+
main:
15+
name: Semantic Commit Message Check
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout Code
19+
uses: actions/checkout@v3
20+
- uses: amannn/[email protected]
21+
name: Check PR for Semantic Commit Message
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
with:
25+
requireScope: false
26+
validateSingleCommit: true

.gitignore

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# .gitignore
2+
3+
# terraform files
4+
*.tfstate
5+
*.tfstate.*.backup
6+
*.tfstate.backup
7+
*.tfplan
8+
*.terraform/
9+
.grunt
10+
11+
# node.js / typescript
12+
node_modules
13+
npm-debug.log
14+
yarn-error.log
15+
dist
16+
out
17+
*.tsbuildinfo
18+
19+
# logs
20+
logs
21+
*.log
22+
npm-debug.log*
23+
yarn-debug.log*
24+
yarn-error.log*
25+
26+
# runtime data
27+
pids
28+
*.pid
29+
*.seed
30+
*.pid.lock
31+
32+
# coverage directories
33+
coverage
34+
lib-cov
35+
36+
# docker files
37+
*.tar
38+
dockerfile.*.bak
39+
40+
# general
41+
tmp
42+
.DS_Store
43+
.env
44+
.env.local
45+
.env.development.local
46+
.env.test.local
47+
.env.production.local
48+
49+
# ides
50+
.vscode
51+
.idea
52+
*.swp
53+
*.swo
54+
55+
# opa
56+
bundle.tar.gz
57+

CONTRIBUTING.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# Contributing to Terraform AWS Cognito Custom SMS Sender Module
2+
3+
We welcome contributions to the project. This document provides information and
4+
guidelines for contributing.
5+
6+
## Development Environment
7+
8+
This repository includes a configuration for a development container using the
9+
[VS Code Remote - Containers extension](https://code.visualstudio.com/docs/remote/containers).
10+
This setup allows you to develop within a Docker container that already has all
11+
the necessary tools and dependencies installed.
12+
13+
The development container is based on Ubuntu 20.04 (Focal) and includes the
14+
following tools:
15+
16+
- AWS CLI
17+
- Node.js
18+
- TypeScript
19+
- Docker CLI
20+
- Terraform
21+
- Open Policy Agent
22+
23+
### Prerequisites
24+
25+
- [Docker](https://www.docker.com/products/docker-desktop) installed on your
26+
local machine.
27+
- [Visual Studio Code](https://code.visualstudio.com/) installed on your
28+
local machine.
29+
- [Remote - Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)
30+
for Visual Studio Code.
31+
32+
### Usage
33+
34+
1. Clone this repository:
35+
36+
```bash
37+
git clone https://github.com/sgtoj/terraform-docker-artifact-packager.git
38+
```
39+
40+
2. Open the repository in Visual Studio Code:
41+
42+
```bash
43+
code terraform-docker-artifact-packager
44+
```
45+
46+
3. When prompted to "Reopen in Container", click "Reopen in Container". This
47+
will start building the Docker image for the development container. If you're
48+
not prompted, you can open the Command Palette (F1 or Ctrl+Shift+P), and run
49+
the "Remote-Containers: Reopen Folder in Container" command.
50+
51+
4. After the development container is built and started, you can use the
52+
Terminal in Visual Studio Code to interact with the container. All commands
53+
you run in the Terminal will be executed inside the container.
54+
55+
### Troubleshooting
56+
57+
If you encounter any issues while using the development container, you can try
58+
rebuilding the container. To do this, open the Command Palette and run the
59+
"Remote-Containers: Rebuild Container" command.
60+
61+
## Contribution Guidelines
62+
63+
We appreciate your interest in contributing to the project. Here are some
64+
guidelines to help ensure your contributions are accepted.
65+
66+
### Issues
67+
68+
- Use the GitHub issue tracker to report bugs or propose new features.
69+
- Before submitting a new issue, please search to make sure it has not already
70+
been reported. If it has, add a comment to the existing issue instead of
71+
creating a new one.
72+
- When reporting a bug, include as much detail as you can. Include the version
73+
of the module you're using, what you expected to happen, what actually
74+
happened, and steps to reproduce the bug.
75+
76+
### Pull Requests
77+
78+
- Submit your changes as a pull request.
79+
- All pull requests should be associated with an issue. If your change isn't
80+
associated with an existing issue, please create one before submitting a pull
81+
request.
82+
- In your pull request, include a summary of the changes, the issue number it
83+
resolves, and any additional information that might be helpful for
84+
understanding your changes.
85+
- Make sure your changes do not break any existing functionality. If your
86+
changes require updates to existing tests or the addition of new ones, include
87+
those in your pull request.
88+
- Follow the existing code style. We use a linter to maintain code quality, so
89+
make sure your changes pass the linter checks.
90+
91+
Thank you for your contributions!

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 Brian Ojeda
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)