diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cfa91e3..e0cf945 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,10 +1,9 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.3.0 + rev: v4.4.0 hooks: - id: check-added-large-files args: ['--maxkb=500'] - - id: check-executables-have-shebangs - id: pretty-format-json args: ['--autofix', '--no-sort-keys', '--indent=2'] - id: check-byte-order-marker @@ -18,7 +17,7 @@ repos: args: ['--allow-missing-credentials'] - id: trailing-whitespace - repo: https://github.com/antonbabenko/pre-commit-terraform - rev: v1.73.0 + rev: v1.77.1 hooks: - id: terraform_fmt - id: terraform_docs diff --git a/CHANGELOG.md b/CHANGELOG.md index d84f614..f60500b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,8 +5,13 @@ All notable changes to this project will be documented in this file. ## [Unreleased] -- Removing unneeded variables -- Upgrade Amazon Linux AMI version to use 5.10 kernal version +- DEVOPS-1761 Updated volume type for EBS volume for the instance to use + + + +## [2.4.0] - 2022-07-13 + +- Upgrade Amazon Linux AMI version to use 5.10 kernel version ([#19](https://github.com/umotif-public/terraform-aws-bastion/issues/19)) @@ -127,7 +132,8 @@ All notable changes to this project will be documented in this file. - Initial commit -[Unreleased]: https://github.com/umotif-public/terraform-aws-bastion/compare/2.3.0...HEAD +[Unreleased]: https://github.com/umotif-public/terraform-aws-bastion/compare/2.4.0...HEAD +[2.4.0]: https://github.com/umotif-public/terraform-aws-bastion/compare/2.3.0...2.4.0 [2.3.0]: https://github.com/umotif-public/terraform-aws-bastion/compare/2.2.0...2.3.0 [2.2.0]: https://github.com/umotif-public/terraform-aws-bastion/compare/2.1.0...2.2.0 [2.1.0]: https://github.com/umotif-public/terraform-aws-bastion/compare/2.0.3...2.1.0 diff --git a/README.md b/README.md index 41f91fa..3763c11 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,6 @@ No modules. | [aws_launch_template.bastion](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/launch_template) | resource | | [aws_security_group.bastion](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group) | resource | | [aws_ami.amazon_linux](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ami) | data source | -| [aws_caller_identity.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) | data source | | [aws_iam_policy_document.bastion_role_assume_role_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source | | [aws_iam_policy_document.bastion_role_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source | | [aws_partition.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/partition) | data source | @@ -94,7 +93,6 @@ No modules. | [asg\_scale\_up\_max\_size](#input\_asg\_scale\_up\_max\_size) | Auto Scalling Group value for maximum capacity of bastion hosts. Scale up action. | `number` | `1` | no | | [asg\_scale\_up\_min\_size](#input\_asg\_scale\_up\_min\_size) | Auto Scalling Group value for minimum capacity of bastion hosts. Scale up action. | `number` | `1` | no | | [asg\_scale\_up\_recurrence](#input\_asg\_scale\_up\_recurrence) | The time when recurring future actions will start. Start time is specified by the user following the Unix cron syntax format. Scale up action. | `string` | `"0 9 * * MON-FRI"` | no | -| [availability\_zones](#input\_availability\_zones) | Availability zones for the default Ireland region. | `list(string)` |
[
"eu-west-1a",
"eu-west-1b",
"eu-west-1c"
]
| no | | [bastion\_instance\_types](#input\_bastion\_instance\_types) | Bastion instance types used for spot instances. | `list(string)` |
[
"t4g.nano",
"t4g.micro",
"t4g.small"
]
| no | | [delete\_on\_termination](#input\_delete\_on\_termination) | Whether the volume should be destroyed on instance termination. | `bool` | `true` | no | | [desired\_capacity](#input\_desired\_capacity) | Auto Scalling Group value for desired capacity of bastion hosts. | `number` | `1` | no | @@ -112,15 +110,13 @@ No modules. | [name\_prefix](#input\_name\_prefix) | A prefix used for naming resources. | `string` | n/a | yes | | [on\_demand\_base\_capacity](#input\_on\_demand\_base\_capacity) | Auto Scalling Group value for desired capacity for instance lifecycle type on-demand of bastion hosts. | `number` | `0` | no | | [public\_subnets](#input\_public\_subnets) | Classless Inter-Domain Routing ranges for public subnets. | `list(string)` | n/a | yes | -| [region](#input\_region) | AWS region in which resources will get deployed. Defaults to Ireland. | `string` | `"eu-west-1"` | no | | [ssh\_key\_name](#input\_ssh\_key\_name) | SSH key used to connect to the bastion host | `string` | n/a | yes | -| [ssh\_port](#input\_ssh\_port) | SSH port used to access a bastion host. | `number` | `22` | no | | [tags](#input\_tags) | Default tags attached to all resources. | `map(string)` |
{
"ServiceType": "ceng-eks"
}
| no | | [termination\_policies](#input\_termination\_policies) | A list of policies to decide how the instances in the auto scale group should be terminated. The allowed values are OldestInstance, NewestInstance, OldestLaunchConfiguration, ClosestToNextInstanceHour, OldestLaunchTemplate, AllocationStrategy. | `list(string)` |
[
"OldestInstance"
]
| no | | [time\_zone](#input\_time\_zone) | Used for ASG Scale Up/Down. Valid values are the canonical names of the IANA time zones (such as Etc/GMT+9 or London/Europe) | `string` | `"Etc/UTC"` | no | | [userdata\_file\_content](#input\_userdata\_file\_content) | The user data to provide when launching the instance. | `string` | `""` | no | | [volume\_size](#input\_volume\_size) | The size of the volume in gigabytes. | `number` | `20` | no | -| [volume\_type](#input\_volume\_type) | The type of volume. Can be `standard`, `gp2`, or `io1`. | `string` | `"gp2"` | no | +| [volume\_type](#input\_volume\_type) | The volume type. Can be one of standard, 'gp2', 'gp3', 'io1', 'io2', 'sc1' or 'st1'. | `string` | `"gp3"` | no | | [vpc\_id](#input\_vpc\_id) | VPC ID where bastion hosts and security groups will be created. | `string` | n/a | yes | ## Outputs diff --git a/data.tf b/data.tf index e896dd6..414ca0a 100644 --- a/data.tf +++ b/data.tf @@ -1,4 +1,3 @@ -data "aws_caller_identity" "current" {} data "aws_partition" "current" {} data "aws_ami" "amazon_linux" { diff --git a/examples/core/versions.tf b/examples/core/versions.tf new file mode 100644 index 0000000..fee37b2 --- /dev/null +++ b/examples/core/versions.tf @@ -0,0 +1,7 @@ +terraform { + required_version = ">= 1.0.11" + + required_providers { + aws = ">= 4.0.0, < 5.0.0" + } +} diff --git a/variables.tf b/variables.tf index 52864f2..7684a92 100644 --- a/variables.tf +++ b/variables.tf @@ -3,18 +3,6 @@ variable "name_prefix" { type = string } -variable "region" { - type = string - default = "eu-west-1" - description = "AWS region in which resources will get deployed. Defaults to Ireland." -} - -variable "availability_zones" { - type = list(string) - default = ["eu-west-1a", "eu-west-1b", "eu-west-1c"] - description = "Availability zones for the default Ireland region." -} - variable "bastion_instance_types" { type = list(string) description = "Bastion instance types used for spot instances." @@ -80,11 +68,6 @@ variable "min_size" { default = 1 } -variable "ssh_port" { - description = "SSH port used to access a bastion host." - default = 22 -} - variable "ingress_cidr_blocks" { type = list(string) description = "List of CIDR ranges to allow ssh access at security group level. Defaults to 0.0.0.0/0" @@ -205,8 +188,8 @@ variable "encrypted" { variable "volume_type" { type = string - description = "The type of volume. Can be `standard`, `gp2`, or `io1`." - default = "gp2" + description = "The volume type. Can be one of standard, 'gp2', 'gp3', 'io1', 'io2', 'sc1' or 'st1'." + default = "gp3" } variable "time_zone" {