From c46948c0e0494a8c101cca937fae1e1918e9638d Mon Sep 17 00:00:00 2001 From: John Ricords <122303445+johnricords@users.noreply.github.com> Date: Thu, 15 Feb 2024 22:33:52 -0500 Subject: [PATCH] initial release a --- .bumpversion.cfg | 2 +- CHANGELOG.md | 26 +++------------------ CHANGELOG.template.md | 13 ----------- LICENSE | 2 +- README.md | 53 ++++++++++++++++++++++++------------------- main.tf | 11 +++++++++ tests/main.tf | 17 ++++++++++++++ variables.tf | 14 ++++++++++++ 8 files changed, 77 insertions(+), 61 deletions(-) delete mode 100644 CHANGELOG.template.md create mode 100644 main.tf create mode 100644 tests/main.tf create mode 100644 variables.tf diff --git a/.bumpversion.cfg b/.bumpversion.cfg index a5731e4..fab32b7 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 1.2.0 +current_version = 1.0.0 commit = True message = Bumps version to {new_version} tag = False diff --git a/CHANGELOG.md b/CHANGELOG.md index 222e408..435f147 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,32 +1,12 @@ -## repo-template +## terraform-aws-tardigrade-ec2-account 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.2.0] (https://github.com/plus3it/repo-template/releases/tag/1.2.0) +### [1.0.0](https://github.com/plus3it/terraform-aws-tardigrade-ec2-account/releases/tag/1.0.0) -**Summary**: - -* Updated SHA value for Github Actions Workflows -* Updated CHANGELOG.template.md file -* Added Master branch in release workflow logic to make migration to Github Actions more efficient - -### 1.1.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**: 2024.02.16 **Summary**: diff --git a/CHANGELOG.template.md b/CHANGELOG.template.md deleted file mode 100644 index c61f573..0000000 --- a/CHANGELOG.template.md +++ /dev/null @@ -1,13 +0,0 @@ -## {{ repo-name }} - -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/). - -### [{{Major.Minor.Patch}}](https://github.com/plus3it/{{RepoName}}/releases/tag/{{Major.Minor.Patch}}) - -**Released**: {{ YYYY.MM.DD }} - -**Summary**: - -* {{ Bulleted descriptions of enhancements, changes, or fixes }} diff --git a/LICENSE b/LICENSE index 598c4b8..d31e673 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2023 Maintainers of plus3it/repo-template + Copyright 2024 Maintainers of plus3it/terraform-aws-tardigrade-ec2-account Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/README.md b/README.md index ceff70c..b54bef4 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,30 @@ -# 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 +# terraform-aws-tardigrade-ec2-account +Module to manage EC2 account settings + + +## Requirements + +No requirements. + +## Providers + +| Name | Version | +|------|---------| +| [aws](#provider\_aws) | n/a | + +## Resources + +| Name | Type | +|------|------| + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| [ec2\_account\_settings](#input\_ec2\_account\_settings) | Object of inputs for ec2 account settings |
object({
aws_ebs_encryption_by_default = optional(object({
enabled = optional(bool)
}))
aws_ec2_image_block_public_access = object({
state = string
})
aws_ec2_serial_console_access = optional(object({
enabled = bool
}))
})
| n/a | yes | + +## Outputs + +No outputs. + + diff --git a/main.tf b/main.tf new file mode 100644 index 0000000..3ca7b60 --- /dev/null +++ b/main.tf @@ -0,0 +1,11 @@ +resource "aws_ebs_encryption_by_default" "this" { + enabled = var.ec2_account_settings.aws_ebs_encryption_by_default.enabled +} + +resource "aws_ec2_image_block_public_access" "test" { + state = var.ec2_account_settings.aws_ec2_image_block_public_access.state +} + +resource "aws_ec2_serial_console_access" "example" { + enabled = var.ec2_account_settings.aws_ec2_serial_console_access.enabled +} diff --git a/tests/main.tf b/tests/main.tf new file mode 100644 index 0000000..80367a8 --- /dev/null +++ b/tests/main.tf @@ -0,0 +1,17 @@ +module "ec2_account" { + source = "../" + + ec2_account_settings = { + aws_ebs_encryption_by_default = { + enabled = true + } + + aws_ec2_image_block_public_access = { + state = "block-new-sharing" + } + + aws_ec2_serial_console_access = { + enabled = true + } + } +} diff --git a/variables.tf b/variables.tf new file mode 100644 index 0000000..bc90510 --- /dev/null +++ b/variables.tf @@ -0,0 +1,14 @@ +variable "ec2_account_settings" { + description = "Object of inputs for ec2 account settings" + type = object({ + aws_ebs_encryption_by_default = optional(object({ + enabled = optional(bool) + })) + aws_ec2_image_block_public_access = object({ + state = string + }) + aws_ec2_serial_console_access = optional(object({ + enabled = bool + })) + }) +}