Skip to content

Commit eea3dd1

Browse files
authored
Merge pull request #8 from lorengordon/feat/ebs-public-snapshots
2 parents 9a807bb + d7cfece commit eea3dd1

File tree

7 files changed

+36
-4
lines changed

7 files changed

+36
-4
lines changed

.bumpversion.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 1.0.0
2+
current_version = 1.1.0
33
commit = True
44
message = Bumps version to {new_version}
55
tag = False

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).
66

7+
### [1.1.0](https://github.com/plus3it/terraform-aws-tardigrade-ec2-account/releases/tag/1.1.0)
8+
9+
**Released**: 2024.09.20
10+
11+
**Summary**:
12+
13+
* Supports configuring the option to block public sharing of ebs snapshots
14+
715
### [1.0.0](https://github.com/plus3it/terraform-aws-tardigrade-ec2-account/releases/tag/1.0.0)
816

917
**Released**: 2024.02.16

README.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ Module to manage EC2 account settings
44
<!-- BEGIN TFDOCS -->
55
## Requirements
66

7-
No requirements.
7+
| Name | Version |
8+
|------|---------|
9+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.62.0 |
810

911
## Providers
1012

1113
| Name | Version |
1214
|------|---------|
13-
| <a name="provider_aws"></a> [aws](#provider\_aws) | n/a |
15+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.62.0 |
1416

1517
## Resources
1618

@@ -21,7 +23,7 @@ No requirements.
2123

2224
| Name | Description | Type | Default | Required |
2325
|------|-------------|------|---------|:--------:|
24-
| <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 |
26+
| <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><br> ebs_snapshot_block_public_access = optional(object({<br> state = optional(string, "block-all-sharing")<br> }), {})<br><br> image_block_public_access = optional(object({<br> state = optional(string, "block-new-sharing")<br> }), {})<br><br> serial_console_access = optional(object({<br> enabled = optional(bool, false)<br> }))<br> })</pre> | `{}` | no |
2527

2628
## Outputs
2729

main.tf

+4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ resource "aws_ebs_default_kms_key" "this" {
77
key_arn = var.ec2_account.ebs_encryption_by_default.default_kms_key
88
}
99

10+
resource "aws_ebs_snapshot_block_public_access" "this" {
11+
state = var.ec2_account.ebs_snapshot_block_public_access.state
12+
}
13+
1014
resource "aws_ec2_image_block_public_access" "this" {
1115
state = var.ec2_account.image_block_public_access.state
1216
}

tests/all-inputs/main.tf

+4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ module "ec2_account" {
77
default_kms_key = null
88
}
99

10+
ebs_snapshot_block_public_access = {
11+
state = "block-new-sharing"
12+
}
13+
1014
image_block_public_access = {
1115
state = "block-new-sharing"
1216
}

variables.tf

+6
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,15 @@ variable "ec2_account" {
55
enabled = optional(bool, true)
66
default_kms_key = optional(string)
77
}), {})
8+
9+
ebs_snapshot_block_public_access = optional(object({
10+
state = optional(string, "block-all-sharing")
11+
}), {})
12+
813
image_block_public_access = optional(object({
914
state = optional(string, "block-new-sharing")
1015
}), {})
16+
1117
serial_console_access = optional(object({
1218
enabled = optional(bool, false)
1319
}))

versions.tf

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
terraform {
2+
required_providers {
3+
aws = {
4+
source = "hashicorp/aws"
5+
version = ">= 5.62.0"
6+
}
7+
}
8+
}

0 commit comments

Comments
 (0)