diff --git a/README.md b/README.md index 9cc79d8d..0de6a28e 100644 --- a/README.md +++ b/README.md @@ -268,6 +268,8 @@ No modules. | [ami](#output\_ami) | AMI ID that was used to create the instance. | | [arn](#output\_arn) | The ARN of the instance | | [capacity\_reservation\_specification](#output\_capacity\_reservation\_specification) | Capacity reservation specification of the instance | +| [ebs\_block\_device](#output\_ebs\_block\_device) | EBS block device information | +| [ephemeral\_block\_device](#output\_ephemeral\_block\_device) | Ephemeral block device information | | [iam\_instance\_profile\_arn](#output\_iam\_instance\_profile\_arn) | ARN assigned by AWS to the instance profile | | [iam\_instance\_profile\_id](#output\_iam\_instance\_profile\_id) | Instance profile's ID | | [iam\_instance\_profile\_unique](#output\_iam\_instance\_profile\_unique) | Stable and unique string identifying the IAM instance profile | @@ -284,6 +286,7 @@ No modules. | [private\_ip](#output\_private\_ip) | The private IP address assigned to the instance. | | [public\_dns](#output\_public\_dns) | The public DNS name assigned to the instance. For EC2-VPC, this is only available if you've enabled DNS hostnames for your VPC | | [public\_ip](#output\_public\_ip) | The public IP address assigned to the instance, if applicable. NOTE: If you are using an aws\_eip with your instance, you should refer to the EIP's address directly and not use `public_ip` as this field will change after the EIP is attached | +| [root\_block\_device](#output\_root\_block\_device) | Root block device information | | [spot\_bid\_status](#output\_spot\_bid\_status) | The current bid status of the Spot Instance Request | | [spot\_instance\_id](#output\_spot\_instance\_id) | The Instance ID (if any) that is currently fulfilling the Spot Instance request | | [spot\_request\_state](#output\_spot\_request\_state) | The current request state of the Spot Instance Request | diff --git a/examples/complete/README.md b/examples/complete/README.md index 99e48366..380f3bdc 100644 --- a/examples/complete/README.md +++ b/examples/complete/README.md @@ -66,6 +66,8 @@ No inputs. |------|-------------| | [ec2\_complete\_arn](#output\_ec2\_complete\_arn) | The ARN of the instance | | [ec2\_complete\_capacity\_reservation\_specification](#output\_ec2\_complete\_capacity\_reservation\_specification) | Capacity reservation specification of the instance | +| [ec2\_complete\_ebs\_block\_device](#output\_ec2\_complete\_ebs\_block\_device) | EBS block device information | +| [ec2\_complete\_ephemeral\_block\_device](#output\_ec2\_complete\_ephemeral\_block\_device) | Ephemeral block device information | | [ec2\_complete\_iam\_instance\_profile\_arn](#output\_ec2\_complete\_iam\_instance\_profile\_arn) | ARN assigned by AWS to the instance profile | | [ec2\_complete\_iam\_instance\_profile\_id](#output\_ec2\_complete\_iam\_instance\_profile\_id) | Instance profile's ID | | [ec2\_complete\_iam\_instance\_profile\_unique](#output\_ec2\_complete\_iam\_instance\_profile\_unique) | Stable and unique string identifying the IAM instance profile | @@ -78,6 +80,7 @@ No inputs. | [ec2\_complete\_private\_dns](#output\_ec2\_complete\_private\_dns) | The private DNS name assigned to the instance. Can only be used inside the Amazon EC2, and only available if you've enabled DNS hostnames for your VPC | | [ec2\_complete\_public\_dns](#output\_ec2\_complete\_public\_dns) | The public DNS name assigned to the instance. For EC2-VPC, this is only available if you've enabled DNS hostnames for your VPC | | [ec2\_complete\_public\_ip](#output\_ec2\_complete\_public\_ip) | The public IP address assigned to the instance, if applicable. NOTE: If you are using an aws\_eip with your instance, you should refer to the EIP's address directly and not use `public_ip` as this field will change after the EIP is attached | +| [ec2\_complete\_root\_block\_device](#output\_ec2\_complete\_root\_block\_device) | Root block device information | | [ec2\_complete\_tags\_all](#output\_ec2\_complete\_tags\_all) | A map of tags assigned to the resource, including those inherited from the provider default\_tags configuration block | | [ec2\_multiple](#output\_ec2\_multiple) | The full output of the `ec2_module` module | | [ec2\_spot\_instance\_arn](#output\_ec2\_spot\_instance\_arn) | The ARN of the instance | diff --git a/examples/complete/outputs.tf b/examples/complete/outputs.tf index f99f56c1..14272480 100644 --- a/examples/complete/outputs.tf +++ b/examples/complete/outputs.tf @@ -74,6 +74,21 @@ output "ec2_complete_iam_instance_profile_unique" { value = module.ec2_complete.iam_instance_profile_unique } +output "ec2_complete_root_block_device" { + description = "Root block device information" + value = module.ec2_complete.root_block_device +} + +output "ec2_complete_ebs_block_device" { + description = "EBS block device information" + value = module.ec2_complete.ebs_block_device +} + +output "ec2_complete_ephemeral_block_device" { + description = "Ephemeral block device information" + value = module.ec2_complete.ephemeral_block_device +} + # EC2 T2 Unlimited output "ec2_t2_unlimited_id" { description = "The ID of the instance" diff --git a/outputs.tf b/outputs.tf index 1fc2b80a..1e5c90aa 100644 --- a/outputs.tf +++ b/outputs.tf @@ -116,3 +116,21 @@ output "iam_instance_profile_unique" { description = "Stable and unique string identifying the IAM instance profile" value = try(aws_iam_instance_profile.this[0].unique_id, null) } + +################################################################################ +# Block Devices +################################################################################ +output "root_block_device" { + description = "Root block device information" + value = try(aws_instance.this[0].root_block_device, null) +} + +output "ebs_block_device" { + description = "EBS block device information" + value = try(aws_instance.this[0].ebs_block_device, null) +} + +output "ephemeral_block_device" { + description = "Ephemeral block device information" + value = try(aws_instance.this[0].ephemeral_block_device, null) +}