opentofu/builtin/providers/aws
Paul Hinze 73d20b4c58 providers/aws: add root_block_device to aws_instance
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
2015-02-18 13:15:11 -06:00
..
config.go Merge pull request #525 from pmoust/patch-2 2014-12-15 16:40:35 -08:00
network_acl_entry_test.go aws_network_acl: return error if protocol is invalid 2014-12-08 16:53:05 +05:30
network_acl_entry.go aws_network_acl: return error if protocol is invalid 2014-12-08 16:53:05 +05:30
provider_test.go Read the "standard" AWS environment variables 2015-01-22 16:09:25 -05:00
provider.go add aws_vpc_peering_connection 2015-02-12 10:45:29 +01:00
resource_aws_autoscaling_group_test.go providers/aws: test for allowing in-place lC update 2015-02-17 16:12:02 -08:00
resource_aws_autoscaling_group.go providers/aws: test for allowing in-place lC update 2015-02-17 16:12:02 -08:00
resource_aws_db_instance_test.go Fix aws_db_instance to not recreate each time 2015-01-28 12:03:26 -05:00
resource_aws_db_instance.go Support storage_type parameter for aws_db_instance 2015-01-30 13:01:10 -05:00
resource_aws_db_parameter_group_test.go core: refactoring the way sets work internally v2 2014-12-12 23:21:20 +01:00
resource_aws_db_parameter_group.go Implement apply_method for RDS parameters 2015-01-30 13:06:15 -05:00
resource_aws_db_security_group_test.go Refactored the last two resources 2014-11-24 14:04:48 +01:00
resource_aws_db_security_group.go Refactored the last two resources 2014-11-24 14:04:48 +01:00
resource_aws_db_subnet_group_test.go Making some last tweaks and fixing some acc tests 2014-11-24 21:22:18 +01:00
resource_aws_db_subnet_group.go Refactored about 90% 2014-11-21 17:58:34 +01:00
resource_aws_eip_test.go Refactored about 90% 2014-11-21 17:58:34 +01:00
resource_aws_eip.go Refactored about 90% 2014-11-21 17:58:34 +01:00
resource_aws_elb_test.go provider/aws: fix for #915 - aws_elb.health_check attributes does not update during update 2015-02-02 19:25:54 -08:00
resource_aws_elb.go update CHANGELOG 2015-02-17 09:44:44 -08:00
resource_aws_instance_test.go providers/aws: add root_block_device to aws_instance 2015-02-18 13:15:11 -06:00
resource_aws_instance.go providers/aws: add root_block_device to aws_instance 2015-02-18 13:15:11 -06:00
resource_aws_internet_gateway_test.go Merge branch 'add-ig-tags' of https://github.com/robzienert/terraform into robzienert-add-ig-tags 2015-01-10 15:28:14 -08:00
resource_aws_internet_gateway.go Merge branch 'add-ig-tags' of https://github.com/robzienert/terraform into robzienert-add-ig-tags 2015-01-10 15:28:14 -08:00
resource_aws_key_pair_test.go add aws_key_pair resource 2014-12-18 01:27:06 -08:00
resource_aws_key_pair.go add aws_key_pair resource 2014-12-18 01:27:06 -08:00
resource_aws_launch_configuration_test.go Add test for launch configuration with spot price 2015-01-23 15:51:25 -06:00
resource_aws_launch_configuration.go Add spot_price parameter to aws_launch_configuration resource 2015-01-21 22:48:04 -06:00
resource_aws_main_route_table_association_test.go provider/aws: aws_main_route_table_association 2015-02-03 13:47:43 -06:00
resource_aws_main_route_table_association.go provider/aws: aws_main_route_table_association 2015-02-03 13:47:43 -06:00
resource_aws_network_acl_test.go builtin/providers/aws: vet fix 2014-12-17 12:37:46 +01:00
resource_aws_network_acl.go builtin/providers/aws: vet fix 2014-12-17 12:37:46 +01:00
resource_aws_route53_record_test.go Auto add full domain suffix if not present 2015-02-11 16:39:25 -08:00
resource_aws_route53_record.go simplify HasSuffix check 2015-02-11 16:49:03 -08:00
resource_aws_route53_zone_test.go Refactored about 90% 2014-11-21 17:58:34 +01:00
resource_aws_route53_zone.go Refactored about 90% 2014-11-21 17:58:34 +01:00
resource_aws_route_table_association_test.go Refactored about 90% 2014-11-21 17:58:34 +01:00
resource_aws_route_table_association.go Refactored about 90% 2014-11-21 17:58:34 +01:00
resource_aws_route_table_test.go allow vpc_peering_connection_id in aws_route_table 2015-02-10 17:50:29 +01:00
resource_aws_route_table.go Merge pull request #963 from julienba/master 2015-02-18 06:56:28 -08:00
resource_aws_s3_bucket_test.go Making some last tweaks and fixing some acc tests 2014-11-24 21:22:18 +01:00
resource_aws_s3_bucket.go Refactored about 90% 2014-11-21 17:58:34 +01:00
resource_aws_security_group_test.go adding support for egress rules in AWS Security Groups 2015-01-23 09:46:20 -05:00
resource_aws_security_group.go providers/aws: egress should be computed 2015-02-18 09:27:55 -08:00
resource_aws_subnet_test.go builtin/providers/aws: vet fix 2014-12-17 12:37:46 +01:00
resource_aws_subnet.go Merge pull request #889 from bitglue/deleted_subnet 2015-02-17 09:30:48 -08:00
resource_aws_vpc_peering_connection_test.go add aws_vpc_peering_connection 2015-02-12 10:45:29 +01:00
resource_aws_vpc_peering_connection.go allow update 2015-02-18 10:45:12 +01:00
resource_aws_vpc_test.go added vpc tenancy argument 2014-12-10 16:10:00 +05:30
resource_aws_vpc.go Adding default security group id attribute reference on creation of VPC. Fixes issue #466. 2014-12-23 11:43:33 +05:30
structure_test.go Fixed bug with final_snapshot_identifier and skip_final_snapshot and removed apply_method as an option for now and am only supporting immediate mode 2014-11-05 11:03:06 -08:00
structure.go Implement apply_method for RDS parameters 2015-01-30 13:06:15 -05:00
tags_test.go argument and verb formatting fixes reported by go vet 2014-11-02 13:56:44 +01:00
tags.go "Computed" should be false 2015-01-03 18:33:18 +11:00