generated from plus3it/repo-template
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from johnricords/initialDev
- Loading branch information
Showing
10 changed files
with
103 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,13 @@ | ||
## repo-template | ||
## terraform-aws-tardigrade-resource-group | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). | ||
|
||
### 1.1.0 | ||
### [1.0.0] (https://github.com/plus3it/terraform-aws-tardigrade-resource-group/releases/tag/1.0.0) | ||
|
||
**Commit Delta**: N/A | ||
|
||
**Released**: 2023.01.27 | ||
|
||
**Summary**: | ||
|
||
* Updated workflow files to be consumable and reusable, and now points to actions-workflows repo | ||
|
||
### 1.0.0 | ||
|
||
**Commit Delta**: N/A | ||
|
||
**Released**: 2023.01.10 | ||
**Released**: 2023.03.16 | ||
|
||
**Summary**: | ||
|
||
* Initial release of capability | ||
* Initial capability release, create an AWS resource group |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
SHELL := /bin/bash | ||
|
||
include $(shell test -f .tardigrade-ci || curl -sSL -o .tardigrade-ci "https://raw.githubusercontent.com/plus3it/tardigrade-ci/master/bootstrap/Makefile.bootstrap"; echo .tardigrade-ci) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,27 @@ | ||
# repo-template | ||
Generic repo template for Plus3IT repositories | ||
|
||
To use this template: | ||
|
||
1. Select the green "Use this template" button, or [click here](https://github.com/plus3it/repo-template/generate). | ||
2. Select the repo Owner, give the repo a name, enter a description, select Public or Private, and click "Create repository from template". | ||
3. Clone the repository and create a new branch. | ||
4. Edit the following files to customize them for the new repository: | ||
* `LICENSE` | ||
* Near the end of the file, edit the date and change the repository name | ||
* `CHANGELOG.template.md` | ||
* Rename to `CHANGELOG.md`, replacing the repo-template changelog | ||
* Edit templated items for the new repo | ||
* `.bumpversion.cfg` | ||
* Edit the version number for the new repo, ask team if not sure what to | ||
start with | ||
* `README.md` | ||
* Replace contents for the new repo | ||
* `.github/` | ||
* Inspect dependabot and workflow files in case changes are needed for | ||
the new repo | ||
5. Commit the changes and open a pull request | ||
<!-- BEGIN TFDOCS --> | ||
## Requirements | ||
|
||
No requirements. | ||
|
||
## Providers | ||
|
||
| Name | Version | | ||
|------|---------| | ||
| <a name="provider_aws"></a> [aws](#provider\_aws) | n/a | | ||
|
||
## Resources | ||
|
||
| Name | Type | | ||
|------|------| | ||
|
||
## Inputs | ||
|
||
| Name | Description | Type | Default | Required | | ||
|------|-------------|------|---------|:--------:| | ||
| <a name="input_resource_group"></a> [resource\_group](#input\_resource\_group) | Object of configuration attributes for the resource group | <pre>object({<br> name = string<br> description = optional(string)<br><br> resource_query = object({<br> type = optional(string, "TAG_FILTERS_1_0")<br> query = object({<br> ResourceTypeFilters = optional(list(string), ["AWS::AllSupported"])<br> TagFilters = list(object({<br> Key = string,<br> Values = list(string)<br> }))<br> })<br> })<br> })</pre> | n/a | yes | | ||
|
||
## Outputs | ||
|
||
No outputs. | ||
|
||
<!-- END TFDOCS --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
resource "aws_resourcegroups_group" "this" { | ||
name = var.resource_group.name | ||
description = var.resource_group.description | ||
|
||
resource_query { | ||
query = jsonencode(var.resource_group.resource_query.query) | ||
type = var.resource_group.resource_query.type | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
module "resource_group" { | ||
source = "../.." | ||
resource_group = { | ||
name = local.name | ||
|
||
resource_query = { | ||
type = local.type | ||
query = local.query | ||
} | ||
} | ||
} | ||
|
||
locals { | ||
name = "ec2_grouped_by_something" | ||
type = "TAG_FILTERS_1_0" | ||
query = { | ||
ResourceTypeFilters = ["AWS::EC2::Instance", "AWS::S3::Bucket"] | ||
TagFilters = [{ | ||
Key = "some_tag_key" | ||
Values = ["some_tag_value"] | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
variable "resource_group" { | ||
description = "Object of configuration attributes for the resource group" | ||
type = object({ | ||
name = string | ||
description = optional(string) | ||
|
||
resource_query = object({ | ||
type = optional(string, "TAG_FILTERS_1_0") | ||
query = object({ | ||
ResourceTypeFilters = optional(list(string), ["AWS::AllSupported"]) | ||
TagFilters = list(object({ | ||
Key = string, | ||
Values = list(string) | ||
})) | ||
}) | ||
}) | ||
}) | ||
|
||
validation { | ||
condition = lower(var.resource_group.name) != "aws" | ||
error_message = "The resource_group.name must not begin with aws or AWS" | ||
} | ||
|
||
validation { | ||
condition = contains( | ||
["TAG_FILTERS_1_0", "CLOUDFORMATION_STACK_1_0"], | ||
var.resource_group.resource_query.type | ||
) | ||
error_message = "The resource_group.resource_query.type must be one of: TAG_FILTERS_1_O, CLOUDFORMATION_STACK_1_0" | ||
} | ||
} |