From 2785042be87978064639f453c845e4ae8dc82fdd Mon Sep 17 00:00:00 2001 From: rrangith Date: Thu, 18 Nov 2021 11:37:06 -0500 Subject: [PATCH 1/2] Add encryption-in-transit-supported attribute to aws_ec2_instance_type --- internal/service/ec2/instance_type_data_source.go | 6 ++++++ internal/service/ec2/instance_type_data_source_test.go | 1 + website/docs/d/ec2_instance_type.html.markdown | 1 + 3 files changed, 8 insertions(+) diff --git a/internal/service/ec2/instance_type_data_source.go b/internal/service/ec2/instance_type_data_source.go index d11582993d7..a660865283b 100644 --- a/internal/service/ec2/instance_type_data_source.go +++ b/internal/service/ec2/instance_type_data_source.go @@ -112,6 +112,11 @@ func DataSourceInstanceType() *schema.Resource { Computed: true, }, + "encryption_in_transit_supported": { + Type: schema.TypeBool, + Computed: true, + }, + "fpgas": { Type: schema.TypeSet, Computed: true, @@ -384,6 +389,7 @@ func dataSourceInstanceTypeRead(d *schema.ResourceData, meta interface{}) error } d.Set("efa_supported", v.NetworkInfo.EfaSupported) d.Set("ena_support", v.NetworkInfo.EnaSupport) + d.Set("encryption_in_transit_supported", v.NetworkInfo.EncryptionInTransitSupported) if v.FpgaInfo != nil { fpgaList := make([]interface{}, len(v.FpgaInfo.Fpgas)) for i, fpg := range v.FpgaInfo.Fpgas { diff --git a/internal/service/ec2/instance_type_data_source_test.go b/internal/service/ec2/instance_type_data_source_test.go index c10a88d24ce..702aecc49fb 100644 --- a/internal/service/ec2/instance_type_data_source_test.go +++ b/internal/service/ec2/instance_type_data_source_test.go @@ -31,6 +31,7 @@ func TestAccEC2InstanceTypeDataSource_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceBasic, "ebs_optimized_support", "default"), resource.TestCheckResourceAttr(resourceBasic, "efa_supported", "false"), resource.TestCheckResourceAttr(resourceBasic, "ena_support", "required"), + resource.TestCheckResourceAttr(resourceBasic, "encryption_in_transit_supported", "false"), resource.TestCheckResourceAttr(resourceBasic, "free_tier_eligible", "false"), resource.TestCheckResourceAttr(resourceBasic, "hibernation_supported", "true"), resource.TestCheckResourceAttr(resourceBasic, "hypervisor", "nitro"), diff --git a/website/docs/d/ec2_instance_type.html.markdown b/website/docs/d/ec2_instance_type.html.markdown index c76665a69e3..e1c6ea3b597 100644 --- a/website/docs/d/ec2_instance_type.html.markdown +++ b/website/docs/d/ec2_instance_type.html.markdown @@ -51,6 +51,7 @@ In addition to the argument above, the following attributes are exported: * `ebs_performance_maximum_throughput` - The maximum throughput performance for an EBS-optimized instance type, in MBps. * `efa_supported` - Indicates whether Elastic Fabric Adapter (EFA) is supported. * `ena_support` - Indicates whether Elastic Network Adapter (ENA) is supported. +* `encryption_in_transit_supported` - Indicates whether encryption in-transit between instances is supported. * `fpgas` - Describes the FPGA accelerator settings for the instance type. * `fpgas.#.count` - The count of FPGA accelerators for the instance type. * `fpgas.#.manufacturer` - The manufacturer of the FPGA accelerator. From 42bd55ccd36b03f62dac500a724123caf9ba60f8 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Thu, 18 Nov 2021 13:49:09 -0500 Subject: [PATCH 2/2] Add CHANGELOG entry. --- .changelog/21837.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/21837.txt diff --git a/.changelog/21837.txt b/.changelog/21837.txt new file mode 100644 index 00000000000..1d9d808fb0f --- /dev/null +++ b/.changelog/21837.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +data-source/aws_ec2_instance_type: Add `encryption_in_transit_supported` attribute +``` \ No newline at end of file