Skip to content

Commit e5b0dbd

Browse files
committed
Sync from management repo
1 parent 6bd4c3f commit e5b0dbd

File tree

8 files changed

+31
-35
lines changed

8 files changed

+31
-35
lines changed

.github/workflows/pre-commit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: Build matrix
2626
id: matrix
2727
run: |
28-
DIRS=$(python -c "import json; import glob; print(json.dumps([x.replace('/versions.tf', '') for x in glob.glob('./**/versions.tf', recursive=True)]))")
28+
DIRS=$(python -c "import json; import glob; print(json.dumps([x.replace('/providers.tf', '') for x in glob.glob('./**/providers.tf', recursive=True)]))")
2929
echo "::set-output name=directories::$DIRS"
3030
outputs:
3131
directories: ${{ steps.matrix.outputs.directories }}

.gitignore

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ override.tf.json
2929
# example: *tfplan*
3030

3131
.idea/
32+
.vscode/
3233
.terraform.lock.hcl
3334

3435
# go
@@ -81,15 +82,10 @@ _testmain.go
8182

8283
# Python
8384
# Editors
84-
.vscode/
85-
.idea/
8685

8786
# Vagrant
8887
.vagrant/
8988

90-
# Mac/OSX
91-
.DS_Store
92-
9389
# Windows
9490
Thumbs.db
9591

@@ -99,9 +95,6 @@ __pycache__/
9995
*.py[cod]
10096
*$py.class
10197

102-
# C extensions
103-
*.so
104-
10598
# Distribution / packaging
10699
.Python
107100
build/
@@ -206,9 +199,14 @@ venv.bak/
206199
.dmypy.json
207200
dmypy.json
208201

209-
# ignore test related file(s)
210-
**/test**
211-
**.
212-
213-
# ignore terraform external modules
202+
# Terraform external modules
214203
**/.external_modules
204+
205+
# Test files and directories
206+
**/[Tt]est/*
207+
**/[Tt]ests/*
208+
**/*[Tt]est*/*
209+
**/*[Tt]ests*/*
210+
211+
# remote_backend.tf file
212+
**/remote_backend.tf

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
repos:
2-
- repo: git://github.com/antonbabenko/pre-commit-terraform
2+
- repo: https://github.com/antonbabenko/pre-commit-terraform
33
rev: v1.60.0
44
hooks:
55
- id: terraform_fmt

README.md

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,20 @@
1313
<img src="https://img.shields.io/twitter/follow/varuntomar2019?style=social&logo=twitter"></a>
1414
</p>
1515

16-
# Terraform module for AWS Target Group
16+
## Terraform module for AWS Target Group
1717

18-
## Versions
18+
### Versions
1919

2020
- Module tested for Terraform 1.0.1.
21-
- AWS provider version [3.63](https://registry.terraform.io/providers/hashicorp/aws/latest)
21+
- AWS provider version [3.74](https://registry.terraform.io/providers/hashicorp/aws/latest)
2222
- `main` branch: Provider versions not pinned to keep up with Terraform releases.
2323
- `tags` releases: Tags are pinned with versions (use <a href="https://github.com/tomarv2/terraform-aws-target-group/tags" alt="GitHub tag">
2424
<img src="https://img.shields.io/github/v/tag/tomarv2/terraform-aws-target-group" /></a> ).
2525

2626
---
27-
## Usage
27+
### Usage
2828

29-
### Option 1:
29+
#### Option 1:
3030

3131
```
3232
terrafrom init
@@ -36,7 +36,7 @@ terraform destroy -var='teamid=tryme' -var='prjid=project1'
3636
```
3737
**Note:** With this option please take care of remote state storage
3838

39-
### Option 2:
39+
#### Option 2:
4040

4141
#### Recommended method (store remote state in S3 using prjid and teamid to create directory structure):
4242

@@ -84,11 +84,7 @@ tf -c=aws apply -var='teamid=foo' -var='prjid=bar'
8484
tf -c=aws destroy -var='teamid=foo' -var='prjid=bar'
8585
```
8686

87-
**NOTE:**
88-
89-
- Read more on [tfremote](https://github.com/tomarv2/tfremote)
90-
---
91-
87+
**Note:** Read more on [tfremote](https://github.com/tomarv2/tfremote)
9288
##### Target Group
9389
```
9490
module "target_group" {

examples/sample/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ terraform {
22
required_version = ">= 1.0.1"
33
required_providers {
44
aws = {
5-
version = "~> 3.63"
5+
version = "~> 3.74"
66
}
77
}
88
}

locals.tf

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,6 @@ module "global" {
33
}
44

55
locals {
6-
shared_tags = tomap(
7-
{
8-
"Name" = "${var.teamid}-${var.prjid}",
9-
"team" = var.teamid,
10-
"project" = var.prjid
11-
}
12-
)
136
account_id = data.aws_caller_identity.current.account_id
147
region = data.aws_region.current.name
158
}

versions.tf renamed to providers.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ terraform {
22
required_version = ">= 1.0.1"
33
required_providers {
44
aws = {
5-
version = "~> 3.63"
5+
version = "~> 3.74"
66
}
77
}
88
}

tags.tf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
locals {
2+
shared_tags = tomap(
3+
{
4+
"Name" = "${var.teamid}-${var.prjid}",
5+
"Team" = var.teamid,
6+
"Project" = var.prjid
7+
}
8+
)
9+
}

0 commit comments

Comments
 (0)