cloudposse / cloudposse/terraform-aws-ec2-instance
The default value `ebs_optimized = true` makes some instance types unable to provision.
- Dominant language
- HCL
- Stars
- 169
- Forks
- 216
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the Bug
Because the default value of `ebs_optimized` changed to true in this PR #159, some instance types (such as t2.micro) are unable to provision because they are simply unsupported for EBS-optimized instances.
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-optimized.html
So the following code causes an error:
```
module "my-ec2" {
source = "cloudposse/ec2-instance/aws"
version = "1.1.0"
vpc_id = module.shared_vpc.vpc_id
ami = "ami-06fdbb60c8e83aa5e"
instance_type = "t2.micro"
ami_owner = "137112412989"
subnet = module.shared_dynamic_subnets.private_subnet_ids[0]
}
```
```
Error: creating EC2 Instance: Unsupported: The requested configuration is currently not supported. Please check the documentation for supported configurations.
```
### Expected Behavior
EC2 instances of types that do not support EBS-optimized configurations can still be provisioned using default values.
### Steps to Reproduce
Terraform v1.5.6
aws = {
source = "hashicorp/aws"
version = ">=5.12.0, <6.0.0"
}
Then applying the code above will reproduce.
### Screenshots
_No response_
### Environment
_No response_
### Additional Context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.