Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

r/aws_default_vpc: Change enable_network_address_usage_metrics to Optional+Computed #29607

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/29607.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
resource/aws_default_vpc: Change `enable_network_address_usage_metrics` to Optional+Computed, matching the `aws_vpc` resource
```
2 changes: 1 addition & 1 deletion internal/service/ec2/vpc_default_vpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func ResourceDefaultVPC() *schema.Resource {
"enable_network_address_usage_metrics": {
Type: schema.TypeBool,
Optional: true,
Default: true,
Computed: true,
},
"existing_default_vpc": {
Type: schema.TypeBool,
Expand Down
8 changes: 4 additions & 4 deletions internal/service/ec2/vpc_default_vpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func testAccDefaultVPC_Existing_basic(t *testing.T) {
resource.TestCheckResourceAttr(resourceName, "enable_classiclink_dns_support", "false"),
resource.TestCheckResourceAttr(resourceName, "enable_dns_hostnames", "true"),
resource.TestCheckResourceAttr(resourceName, "enable_dns_support", "true"),
resource.TestCheckResourceAttr(resourceName, "enable_network_address_usage_metrics", "true"),
resource.TestCheckResourceAttr(resourceName, "enable_network_address_usage_metrics", "false"),
resource.TestCheckResourceAttr(resourceName, "existing_default_vpc", "true"),
resource.TestCheckResourceAttr(resourceName, "force_destroy", "false"),
resource.TestCheckResourceAttr(resourceName, "instance_tenancy", "default"),
Expand Down Expand Up @@ -150,7 +150,7 @@ func testAccDefaultVPC_Existing_assignGeneratedIPv6CIDRBlock(t *testing.T) {
resource.TestCheckResourceAttr(resourceName, "enable_classiclink_dns_support", "false"),
resource.TestCheckResourceAttr(resourceName, "enable_dns_hostnames", "true"),
resource.TestCheckResourceAttr(resourceName, "enable_dns_support", "true"),
resource.TestCheckResourceAttr(resourceName, "enable_network_address_usage_metrics", "true"),
resource.TestCheckResourceAttr(resourceName, "enable_network_address_usage_metrics", "false"),
resource.TestCheckResourceAttr(resourceName, "existing_default_vpc", "true"),
resource.TestCheckResourceAttr(resourceName, "force_destroy", "false"),
resource.TestCheckResourceAttr(resourceName, "instance_tenancy", "default"),
Expand Down Expand Up @@ -227,7 +227,7 @@ func testAccDefaultVPC_NotFound_basic(t *testing.T) {
resource.TestCheckResourceAttr(resourceName, "enable_classiclink_dns_support", "false"),
resource.TestCheckResourceAttr(resourceName, "enable_dns_hostnames", "true"),
resource.TestCheckResourceAttr(resourceName, "enable_dns_support", "true"),
resource.TestCheckResourceAttr(resourceName, "enable_network_address_usage_metrics", "true"),
resource.TestCheckResourceAttr(resourceName, "enable_network_address_usage_metrics", "false"),
resource.TestCheckResourceAttr(resourceName, "existing_default_vpc", "false"),
resource.TestCheckResourceAttr(resourceName, "force_destroy", "false"),
resource.TestCheckResourceAttr(resourceName, "instance_tenancy", "default"),
Expand Down Expand Up @@ -276,7 +276,7 @@ func testAccDefaultVPC_NotFound_assignGeneratedIPv6CIDRBlock(t *testing.T) {
resource.TestCheckResourceAttr(resourceName, "enable_classiclink_dns_support", "false"),
resource.TestCheckResourceAttr(resourceName, "enable_dns_hostnames", "true"),
resource.TestCheckResourceAttr(resourceName, "enable_dns_support", "true"),
resource.TestCheckResourceAttr(resourceName, "enable_network_address_usage_metrics", "true"),
resource.TestCheckResourceAttr(resourceName, "enable_network_address_usage_metrics", "false"),
resource.TestCheckResourceAttr(resourceName, "existing_default_vpc", "false"),
resource.TestCheckResourceAttr(resourceName, "force_destroy", "false"),
resource.TestCheckResourceAttr(resourceName, "instance_tenancy", "default"),
Expand Down
1 change: 0 additions & 1 deletion website/docs/r/default_vpc.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ The arguments of an `aws_default_vpc` differ slightly from those of [`aws_vpc`](

* The `cidr_block` and `instance_tenancy` arguments become computed attributes
* The default value for `enable_dns_hostnames` is `true`
* The default value for `enable_network_address_usage_metrics` is `true`

The following additional arguments are supported:

Expand Down