Skip to content

Commit

Permalink
initial release
Browse files Browse the repository at this point in the history
a
  • Loading branch information
johnricords committed Feb 27, 2024
1 parent 50e06c4 commit 36acbf1
Show file tree
Hide file tree
Showing 9 changed files with 91 additions and 61 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -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
Expand Down
26 changes: 3 additions & 23 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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**:

Expand Down
13 changes: 0 additions & 13 deletions CHANGELOG.template.md

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
53 changes: 30 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -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

<!-- 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_ec2_account"></a> [ec2\_account](#input\_ec2\_account) | Object of inputs for ec2 account settings | <pre>object({<br> ebs_encryption_by_default = optional(object({<br> enabled = optional(bool, true)<br> default_kms_key = optional(string)<br> }), {})<br> image_block_public_access = optional(object({<br> state = optional(string, "block-new-sharing")<br> }), {})<br> serial_console_access = optional(object({<br> enabled = optional(bool, false)<br> }))<br> })</pre> | `{}` | no |

## Outputs

No outputs.

<!-- END TFDOCS -->
18 changes: 18 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
resource "aws_ebs_encryption_by_default" "this" {
enabled = var.ec2_account.ebs_encryption_by_default.enabled
}

resource "aws_ebs_default_kms_key" "this" {
count = var.ec2_account.ebs_encryption_by_default.default_kms_key != null ? 1 : 0
key_arn = var.ec2_account.ebs_encryption_by_default.default_kms_key
}

resource "aws_ec2_image_block_public_access" "this" {
state = var.ec2_account.image_block_public_access.state
}

resource "aws_ec2_serial_console_access" "this" {
count = var.ec2_account.serial_console_access != null ? 1 : 0

enabled = var.ec2_account.serial_console_access.enabled
}
18 changes: 18 additions & 0 deletions tests/all-inputs/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module "ec2_account" {
source = "../.."

ec2_account = {
ebs_encryption_by_default = {
enabled = true
default_kms_key = null
}

image_block_public_access = {
state = "block-new-sharing"
}

serial_console_access = {
enabled = true
}
}
}
3 changes: 3 additions & 0 deletions tests/defaults/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module "ec2_account" {
source = "../.."
}
17 changes: 17 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
variable "ec2_account" {
description = "Object of inputs for ec2 account settings"
type = object({
ebs_encryption_by_default = optional(object({
enabled = optional(bool, true)
default_kms_key = optional(string)
}), {})
image_block_public_access = optional(object({
state = optional(string, "block-new-sharing")
}), {})
serial_console_access = optional(object({
enabled = optional(bool, false)
}))
})
default = {}
nullable = false
}

0 comments on commit 36acbf1

Please sign in to comment.