aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap
AWS::EC2::VPC - Missing proper defaults for optional parameters in Cloud Control definition
- Dominant language
- No language data
- Stars
- 1.1k
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
### Name of the resource
AWS::EC2::VPC
### Resource Name
_No response_
### Issue Description
using `awscc` terraform provider without specifying optional parameters yields in changes due to missing default values for
- `enable_dns_hostnames`
- `enable_dns_support`
- `instance_tenancy`
1. create a vpc using the definition below
2. perform a 2nd terraform apply - here you'll see the default values attempt to change and fail
### Terraform awscc provider
```hcl
resource "awscc_ec2_vpc" "test" {
cidr_block = "10.0.0.0/16"
tags = [{
key = "test"
value = "test"
},
{
key = "test2"
value = "test2"
}
]
}
```
### 2nd `terraform apply` attempts to change optional parameter values to null
```
# awscc_ec2_vpc.test will be updated in-place
~ resource "awscc_ec2_vpc" "test" {
- enable_dns_hostnames = false -> null
- enable_dns_support = true -> null
id = "vpc-0e070ec0bd051d661"
- instance_tenancy = "default" -> null
~ tags = [
+ {
+ key = "test2"
+ value = "test2"
},
# (1 unchanged element hidden)
]
# (6 unchanged attributes hidden)
}
```
### Expected Behavior
optional values should yield no change when not specified
### Observed Behavior
a change is seen because default values are not properly set in resource object definition
### Test Cases
see above
### Other Details
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.