mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-20 11:48:24 -06:00
AWS provides a single `BlockDeviceMapping` to manage three different kinds of block devices: (a) The root volume (b) Ephemeral storage (c) Additional EBS volumes Each of these types has slightly different semantics [1]. (a) The root volume is defined by the AMI; it can only be customized with `volume_size`, `volume_type`, and `delete_on_termination`. (b) Ephemeral storage is made available based on instance type [2]. It's attached automatically if _no_ block device mappings are specified, and must otherwise be defined with block device mapping entries that contain only DeviceName set to a device like "/dev/sdX" and VirtualName set to "ephemeralN". (c) Additional EBS volumes are controlled by mappings that omit `virtual_name` and can specify `volume_size`, `volume_type`, `delete_on_termination`, `snapshot_id`, and `encryption`. After deciding to ignore root block devices to fix #859, we had users with configurations that were attempting to manage the root block device chime in on #913. Terraform does not have the primitives to be able to properly handle a single collection of resources that is partially managed and partially computed, so our strategy here is to break out logical sub-resources for Terraform and hide the BlockDeviceMapping inside the provider implementation. Now (a) is supported by the `root_block_device` sub-resource, and (b) and (c) are still both merged together under `block_device`, though I have yet to see ephemeral block devices working properly. Looking into possibly separating out `ephemeral_block_device` and `ebs_block_device` sub-resources as well, which seem like the logical next step. We'll wait until the next big release for this, though, since it will break backcompat. [1] http://bit.ly/ec2bdmap [2] http://bit.ly/instancestorebytype Fixes #913 Refs #858 |
||
---|---|---|
.. | ||
config.go | ||
network_acl_entry_test.go | ||
network_acl_entry.go | ||
provider_test.go | ||
provider.go | ||
resource_aws_autoscaling_group_test.go | ||
resource_aws_autoscaling_group.go | ||
resource_aws_db_instance_test.go | ||
resource_aws_db_instance.go | ||
resource_aws_db_parameter_group_test.go | ||
resource_aws_db_parameter_group.go | ||
resource_aws_db_security_group_test.go | ||
resource_aws_db_security_group.go | ||
resource_aws_db_subnet_group_test.go | ||
resource_aws_db_subnet_group.go | ||
resource_aws_eip_test.go | ||
resource_aws_eip.go | ||
resource_aws_elb_test.go | ||
resource_aws_elb.go | ||
resource_aws_instance_test.go | ||
resource_aws_instance.go | ||
resource_aws_internet_gateway_test.go | ||
resource_aws_internet_gateway.go | ||
resource_aws_key_pair_test.go | ||
resource_aws_key_pair.go | ||
resource_aws_launch_configuration_test.go | ||
resource_aws_launch_configuration.go | ||
resource_aws_main_route_table_association_test.go | ||
resource_aws_main_route_table_association.go | ||
resource_aws_network_acl_test.go | ||
resource_aws_network_acl.go | ||
resource_aws_route53_record_test.go | ||
resource_aws_route53_record.go | ||
resource_aws_route53_zone_test.go | ||
resource_aws_route53_zone.go | ||
resource_aws_route_table_association_test.go | ||
resource_aws_route_table_association.go | ||
resource_aws_route_table_test.go | ||
resource_aws_route_table.go | ||
resource_aws_s3_bucket_test.go | ||
resource_aws_s3_bucket.go | ||
resource_aws_security_group_test.go | ||
resource_aws_security_group.go | ||
resource_aws_subnet_test.go | ||
resource_aws_subnet.go | ||
resource_aws_vpc_peering_connection_test.go | ||
resource_aws_vpc_peering_connection.go | ||
resource_aws_vpc_test.go | ||
resource_aws_vpc.go | ||
structure_test.go | ||
structure.go | ||
tags_test.go | ||
tags.go |