Skip to content

Commit

Permalink
Merge pull request #21837 from rrangith/f-add-encryption-in-transit-s…
Browse files Browse the repository at this point in the history
…upported-to-ec2-instance-type

Add encryption-in-transit-supported attribute to aws_ec2_instance_type
  • Loading branch information
ewbankkit authored Nov 18, 2021
2 parents 889a927 + 42bd55c commit f6c1bd4
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changelog/21837.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
data-source/aws_ec2_instance_type: Add `encryption_in_transit_supported` attribute
```
6 changes: 6 additions & 0 deletions internal/service/ec2/instance_type_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions internal/service/ec2/instance_type_data_source_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down
1 change: 1 addition & 0 deletions website/docs/d/ec2_instance_type.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit f6c1bd4

Please sign in to comment.