Skip to content

Commit 120d5b7

Browse files
rename module
1 parent e51aefd commit 120d5b7

File tree

5 files changed

+181
-33
lines changed

5 files changed

+181
-33
lines changed

.github/workflows/main.yaml

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: validate
2+
# This workflow is triggered on pushes to the repository.
3+
on: [push, pull_request]
4+
5+
jobs:
6+
tflint:
7+
name: TFLint
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@master
11+
- name: TFLint
12+
uses: docker://wata727/tflint
13+
14+
fmt:
15+
name: Code Format
16+
runs-on: ubuntu-latest
17+
container:
18+
image: hashicorp/terraform:latest
19+
steps:
20+
- uses: actions/checkout@master
21+
- run: |
22+
terraform fmt --recursive -check=true
23+
24+
docs:
25+
name: Pre-Commit-Hook
26+
runs-on: macOS-latest
27+
steps:
28+
- uses: actions/checkout@master
29+
- name: Install Deps
30+
run: |
31+
brew install pre-commit terraform-docs terraform tflint
32+
- name: Check All Files
33+
run: |
34+
pre-commit run --all-files
35+
36+
minimum:
37+
name: Minimum version check
38+
runs-on: ubuntu-latest
39+
container:
40+
image: hashicorp/terraform:0.12.25
41+
steps:
42+
- uses: actions/checkout@master
43+
- name: Validate Code
44+
env:
45+
TF_WARN_OUTPUT_ERRORS: 1
46+
run: |
47+
cat > provider.tf <<~EOS
48+
provider "aws" {
49+
region = "us-west-1"
50+
}
51+
EOS
52+
terraform init
53+
terraform validate -var "alias_name=test"

.github/workflows/release.yaml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: bump version
2+
on:
3+
push:
4+
branches:
5+
- master
6+
7+
env:
8+
WITH_V: true
9+
DEFAULT_BUMP: patch
10+
INITIAL_VERSION: 0.0.0
11+
TERRAFORM_VERSION: 0.12
12+
13+
jobs:
14+
build:
15+
name: release new version
16+
runs-on: ubuntu-latest
17+
if: "!contains(github.event.head_commit.message, 'skip')"
18+
steps:
19+
- uses: actions/checkout@master
20+
with:
21+
fetch-depth: '10'
22+
23+
- name: register values
24+
id: register
25+
run: |
26+
echo "::set-output name=release_timestamp::$(date +%Y-%m-%d_%H.%m)"
27+
echo "::set-output name=tag_hash::${GITHUB_SHA::8}"
28+
echo "::set-output name=changelog::$(git log -1 --pretty=format:"%s")"
29+
30+
- name: Bump version and push tag
31+
uses: anothrNick/[email protected]
32+
id: tag
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
36+
- name: create release
37+
id: create_release
38+
uses: actions/[email protected]
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
with:
42+
tag_name: ${{ steps.tag.outputs.tag }}
43+
release_name: release ${{ steps.register.outputs.release_timestamp}}
44+
draft: false
45+
prerelease: false
46+
body: |
47+
Changes in this Release ${{ steps.register.outputs.changelog }}
48+
- ${{ steps.register.outputs.changelog }}
49+
- Terraform Version: ${{ env.TERRAFORM_VERSION }}

.pre-commit-config.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v2.4.0
3+
rev: v3.0.1
44
hooks:
55
- id: check-added-large-files
66
args: ['--maxkb=500']
@@ -17,7 +17,7 @@ repos:
1717
- id: detect-aws-credentials
1818
args: ['--allow-missing-credentials']
1919
- repo: git://github.com/antonbabenko/pre-commit-terraform
20-
rev: v1.21.0
20+
rev: v1.30.0
2121
hooks:
2222
- id: terraform_fmt
2323
- id: terraform_docs

CHANGELOG.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,14 @@
33

44

55

6-
<a name="v2.1.0"></a>
7-
## [v2.1.0] - 0001-01-01
6+
<a name="v2.9.0"></a>
7+
## [v2.9.0] - 2020-05-18
88

9+
ENHANCEMENTS:
10+
- added conditional creation
911

12+
BREAKING CHANGES:
13+
- module renamed
1014

1115
<a name="v2.0.0"></a>
1216
## v2.0.0 - 2019-12-22

README.md

+71-29
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,37 @@
1-
# terraform-aws-proxy-sqlserver
1+
# terraform-aws-proxy-nginx
2+
3+
Terraform AWS SQL nginx Proxy server
4+
5+
[![](https://img.shields.io/github/license/terraform-module/terraform-aws-proxy-nginx)](https://github.com/terraform-module/terraform-aws-proxy-nginx)
6+
![](https://img.shields.io/github/v/tag/terraform-module/terraform-aws-proxy-nginx)
7+
[![](https://img.shields.io/github/workflow/status/terraform-module/terraform-aws-proxy-nginx/validator/master)](https://github.com/terraform-module/terraform-aws-proxy-nginx/actions?query=is%3Acompleted)
8+
![](https://github.com/terraform-module/terraform-aws-proxy-nginx/workflows/Validator/badge.svg)
9+
![](https://github.com/terraform-module/terraform-aws-proxy-nginx/workflows/Labeler/badge.svg)
10+
![](https://img.shields.io/issues/github/terraform-module/terraform-aws-proxy-nginx)
11+
![](https://img.shields.io/github/issues/terraform-module/terraform-aws-proxy-nginx)
12+
![](https://img.shields.io/github/issues-closed/terraform-module/terraform-aws-proxy-nginx)
13+
[![](https://img.shields.io/github/languages/code-size/terraform-module/terraform-aws-proxy-nginx)](https://github.com/terraform-module/terraform-aws-proxy-nginx)
14+
[![](https://img.shields.io/github/repo-size/terraform-module/terraform-aws-proxy-nginx)](https://github.com/terraform-module/terraform-aws-proxy-nginx)
15+
![](https://img.shields.io/github/languages/top/terraform-module/terraform-aws-proxy-nginx?color=green&logo=terraform&logoColor=blue)
16+
![](https://img.shields.io/github/commit-activity/m/terraform-module/terraform-aws-proxy-nginx)
17+
![](https://img.shields.io/github/contributors/terraform-module/terraform-aws-proxy-nginx)
18+
![](https://img.shields.io/github/last-commit/terraform-module/terraform-aws-proxy-nginx)
19+
[![Maintenance](https://img.shields.io/badge/Maintenu%3F-oui-green.svg)](https://GitHub.com/terraform-module/terraform-aws-proxy-nginx/graphs/commit-activity)
220

3-
Terraform AWS SQL Proxy server
4-
5-
[Module Resistry](https://registry.terraform.io/modules/terraform-module/proxy-sqlserver)
621

722
## Usage example
823

924
Here's the gist of using it directly from github.
1025

1126
```hcl
1227
module proxy {
13-
source = "terraform-module/proxy-sqlserver/aws"
28+
source = "terraform-module/proxy-nginx/aws"
1429
version = "2.3.0"
30+
1531
name = format("%s-proxy", var.environment)
1632
instance_type = "m3.medium"
1733
subnet_ids = "subnet-2342234"
18-
ssh_authorized_key = "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAGEA3FSyQwBI6Z+nCSjUUk8EEAnnkhXlukKoUPND/RRClWz2s5TCzIkd3Ou5+Cyz71X0XmazM3l5WgeErvtIwQMyT1KjNoMhoJMrJnWqQPOt5Q8zWd9qG7PBl9+eiH5qV7NZ mykey@host"
34+
ssh_authorized_key = "ssh-rsa AAAA mykey@host"
1935
sql_server_fqdn = "dabase.example.com"
2036
region = "us-west-2"
2137
security_group_ids = "sg-asdfasdg"
@@ -32,54 +48,74 @@ module proxy {
3248
## Module Variables
3349

3450
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
51+
## Requirements
52+
53+
| Name | Version |
54+
|------|---------|
55+
| terraform | >= 0.12 |
56+
57+
## Providers
58+
59+
| Name | Version |
60+
|------|---------|
61+
| aws | n/a |
62+
| template | n/a |
63+
3564
## Inputs
3665

3766
| Name | Description | Type | Default | Required |
38-
|------|-------------|:----:|:-----:|:-----:|
39-
| ami | The EC2 image ID to launch. | string | `""` | no |
40-
| connection\_timeout | Database connection timeout. | number | `"10"` | no |
41-
| cpu\_credits | The credit option for CPU usage \(unlimited or standard\) | string | `"standart"` | no |
42-
| docker\_compose\_version | Version of docker-compose to install. | string | `"1.25.0"` | no |
43-
| expiredate | In hours when access should expire. | string | `"100h"` | no |
44-
| instance\_count | Number of instances to launch | number | `"1"` | no |
45-
| instance\_type | The type of instance to start. e.g. 't2.micro' | string | n/a | yes |
46-
| name | Name to be used on all resources as prefix | string | n/a | yes |
47-
| nginx\_version | Version of NGINX to deploy. | string | `"1.17.6"` | no |
48-
| region | AWS Region where to deploy resources to. | string | n/a | yes |
49-
| security\_group\_ids | A list of security group IDs to associate with | list(string) | `"null"` | no |
50-
| sql\_server\_fqdn | Sql server fqdn. | string | n/a | yes |
51-
| sql\_server\_port | User name with home dictory. | number | `"1433"` | no |
52-
| ssh\_authorized\_key | Add keys to user's authorized keys file. | string | n/a | yes |
53-
| subnet\_ids | A list of VPC Subnet IDs to launch in. | list(string) | n/a | yes |
54-
| tags | A mapping of tags to assign to the resource | map(string) | `{}` | no |
55-
| user\_name | User name with home dictory. | string | `"clouduser"` | no |
67+
|------|-------------|------|---------|:--------:|
68+
| ami | The EC2 image ID to launch. | `string` | `""` | no |
69+
| connection\_timeout | Database connection timeout. | `number` | `10` | no |
70+
| cpu\_credits | The credit option for CPU usage (unlimited or standard) | `string` | `"standart"` | no |
71+
| docker\_compose\_version | Version of docker-compose to install. | `string` | `"1.25.0"` | no |
72+
| expiredate | In hours when access should expire. | `string` | `"100h"` | no |
73+
| instance\_count | Number of instances to launch | `number` | `1` | no |
74+
| instance\_type | The type of instance to start. e.g. 't2.micro' | `string` | n/a | yes |
75+
| name | Name to be used on all resources as prefix | `string` | n/a | yes |
76+
| nginx\_version | Version of NGINX to deploy. | `string` | `"1.17.6"` | no |
77+
| region | AWS Region where to deploy resources to. | `string` | n/a | yes |
78+
| security\_group\_ids | A list of security group IDs to associate with | `list(string)` | `null` | no |
79+
| sql\_server\_fqdn | Sql server fqdn. | `string` | n/a | yes |
80+
| sql\_server\_port | User name with home dictory. | `number` | `1433` | no |
81+
| ssh\_authorized\_key | Add keys to user's authorized keys file. | `string` | n/a | yes |
82+
| subnet\_ids | A list of VPC Subnet IDs to launch in. | `list(string)` | n/a | yes |
83+
| tags | A mapping of tags to assign to the resource | `map(string)` | `{}` | no |
84+
| user\_name | User name with home dictory. | `string` | `"clouduser"` | no |
5685

5786
## Outputs
5887

5988
| Name | Description |
6089
|------|-------------|
6190
| id | The ID of the instance |
6291
| public\_ip | IP addresses assigned to the instance, if applicable |
63-
| user\_account\_expiration | |
92+
| user\_account\_expiration | n/a |
6493

6594
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
6695

6796
## Commands
6897

6998
<!-- START makefile-doc -->
7099
```
71-
$ make help
100+
$ make help
72101
hooks Commit hooks setup
73102
validate Validate with pre-commit hooks
74103
changelog Update changelog
75-
release Create release version
104+
release Create release version
76105
```
77106
<!-- END makefile-doc -->
78107

79108

109+
### :memo: Guidelines
110+
111+
- :memo: Use a succinct title and description.
112+
- :bug: Bugs & feature requests can be be opened
113+
- :signal_strength: Support questions are better asked on [Stack Overflow](https://stackoverflow.com/)
114+
- :blush: Be nice, civil and polite ([as always](http://contributor-covenant.org/version/1/4/)).
115+
80116
## License
81117

82-
Copyright 2019 ivankatliarhcuk
118+
Copyright 2019 Ivan Katliarhcuk
83119

84120
MIT Licensed. See [LICENSE](./LICENSE) for full details.
85121

@@ -89,4 +125,10 @@ Submit a pull request
89125

90126
# Authors
91127

92-
Currently maintained by [Ivan Katliarchuk](https://github.com/ivankatliarchuk) and these [awesome contributors](https://github.com/terraform-module/terraform-module-blueprint/graphs/contributors).
128+
Currently maintained by [Ivan Katliarchuk](https://github.com/ivankatliarchuk) and these [awesome contributors](https://github.com/terraform-module/terraform-aws-proxy-nginx/graphs/contributors).
129+
130+
[![ForTheBadge uses-git](http://ForTheBadge.com/images/badges/uses-git.svg)](https://GitHub.com/)
131+
132+
## Terraform Registry
133+
134+
- [Module](https://registry.terraform.io/modules/terraform-module/proxy-nginx/aws)

0 commit comments

Comments
 (0)