Skip to content

Commit d0dd19b

Browse files
authored
Merge pull request #26427 from hashicorp/td-ec2-classic-retirement-phase1
EC2-Classic retirement phase 1: Resource and attribute deprecation
2 parents 65105f0 + a131e68 commit d0dd19b

13 files changed

+98
-33
lines changed

.changelog/26427.txt

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
```release-note:note
2+
resource/aws_db_security_group: With the retirement of EC2-Classic the`aws_db_security_group` resource has been deprecated and will be removed in a future version
3+
```
4+
5+
```release-note:note
6+
resource/aws_redshift_security_group: With the retirement of EC2-Classic the`aws_redshift_security_group` resource has been deprecated and will be removed in a future version
7+
```
8+
9+
```release-note:note
10+
resource/aws_elasticache_security_group: With the retirement of EC2-Classic the`aws_elasticache_security_group` resource has been deprecated and will be removed in a future version
11+
```
12+
13+
```release-note:note
14+
resource/aws_db_instance: With the retirement of EC2-Classic the`security_group_names` attribute has been deprecated and will be removed in a future version
15+
```
16+
17+
```release-note:note
18+
resource/aws_redshift_cluster: With the retirement of EC2-Classic the`cluster_security_groups` attribute has been deprecated and will be removed in a future version
19+
```
20+
21+
```release-note:note
22+
resource/aws_elasticache_cluster: With the retirement of EC2-Classic the`security_group_names` attribute has been deprecated and will be removed in a future version
23+
```
24+
25+
```release-note:note
26+
resource/aws_launch_configuration: With the retirement of EC2-Classic the`vpc_classic_link_id` and `vpc_classic_link_security_groups` attributes have been deprecated and will be removed in a future version
27+
```
28+
29+
```release-note:note
30+
resource/aws_vpc: With the retirement of EC2-Classic the`enable_classiclink` and `enable_classiclink_dns_support` attributes have been deprecated and will be removed in a future version
31+
```
32+
33+
```release-note:note
34+
resource/aws_vpc_peering_connection: With the retirement of EC2-Classic the`allow_classic_link_to_remote_vpc` and `allow_vpc_to_remote_classic_link` attributes have been deprecated and will be removed in a future version
35+
```
36+
37+
```release-note:note
38+
resource/aws_vpc_peering_connection_accepter: With the retirement of EC2-Classic the`allow_classic_link_to_remote_vpc` and `allow_vpc_to_remote_classic_link` attributes have been deprecated and will be removed in a future version
39+
```
40+
41+
```release-note:note
42+
resource/aws_vpc_peering_connection_options: With the retirement of EC2-Classic the`allow_classic_link_to_remote_vpc` and `allow_vpc_to_remote_classic_link` attributes have been deprecated and will be removed in a future version
43+
```

internal/service/autoscaling/launch_configuration.go

+9-7
Original file line numberDiff line numberDiff line change
@@ -306,15 +306,17 @@ func ResourceLaunchConfiguration() *schema.Resource {
306306
},
307307
},
308308
"vpc_classic_link_id": {
309-
Type: schema.TypeString,
310-
Optional: true,
311-
ForceNew: true,
309+
Type: schema.TypeString,
310+
Optional: true,
311+
ForceNew: true,
312+
Deprecated: `With the retirement of EC2-Classic the vpc_classic_link_id attribute has been deprecated and will be removed in a future version.`,
312313
},
313314
"vpc_classic_link_security_groups": {
314-
Type: schema.TypeSet,
315-
Optional: true,
316-
ForceNew: true,
317-
Elem: &schema.Schema{Type: schema.TypeString},
315+
Type: schema.TypeSet,
316+
Optional: true,
317+
ForceNew: true,
318+
Elem: &schema.Schema{Type: schema.TypeString},
319+
Deprecated: `With the retirement of EC2-Classic the vpc_classic_link_security_groups attribute has been deprecated and will be removed in a future version.`,
318320
},
319321
},
320322
}

internal/service/ec2/vpc_.go

+8-6
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,16 @@ func ResourceVPC() *schema.Resource {
8282
Computed: true,
8383
},
8484
"enable_classiclink": {
85-
Type: schema.TypeBool,
86-
Optional: true,
87-
Computed: true,
85+
Type: schema.TypeBool,
86+
Optional: true,
87+
Computed: true,
88+
Deprecated: `With the retirement of EC2-Classic the enable_classiclink attribute has been deprecated and will be removed in a future version.`,
8889
},
8990
"enable_classiclink_dns_support": {
90-
Type: schema.TypeBool,
91-
Optional: true,
92-
Computed: true,
91+
Type: schema.TypeBool,
92+
Optional: true,
93+
Computed: true,
94+
Deprecated: `With the retirement of EC2-Classic the enable_classiclink_dns_support attribute has been deprecated and will be removed in a future version.`,
9395
},
9496
"enable_dns_hostnames": {
9597
Type: schema.TypeBool,

internal/service/ec2/vpc_peering_connection.go

+8-6
Original file line numberDiff line numberDiff line change
@@ -84,19 +84,21 @@ var vpcPeeringConnectionOptionsSchema = &schema.Schema{
8484
Elem: &schema.Resource{
8585
Schema: map[string]*schema.Schema{
8686
"allow_classic_link_to_remote_vpc": {
87-
Type: schema.TypeBool,
88-
Optional: true,
89-
Default: false,
87+
Type: schema.TypeBool,
88+
Optional: true,
89+
Default: false,
90+
Deprecated: `With the retirement of EC2-Classic the allow_classic_link_to_remote_vpc attribute has been deprecated and will be removed in a future version.`,
9091
},
9192
"allow_remote_vpc_dns_resolution": {
9293
Type: schema.TypeBool,
9394
Optional: true,
9495
Default: false,
9596
},
9697
"allow_vpc_to_remote_classic_link": {
97-
Type: schema.TypeBool,
98-
Optional: true,
99-
Default: false,
98+
Type: schema.TypeBool,
99+
Optional: true,
100+
Default: false,
101+
Deprecated: `With the retirement of EC2-Classic the allow_vpc_to_remote_classic_link attribute has been deprecated and will be removed in a future version.`,
100102
},
101103
},
102104
},

internal/service/elasticache/cluster.go

+7-6
Original file line numberDiff line numberDiff line change
@@ -244,12 +244,13 @@ func ResourceCluster() *schema.Resource {
244244
},
245245
},
246246
"security_group_names": {
247-
Type: schema.TypeSet,
248-
Optional: true,
249-
Computed: true,
250-
ForceNew: true,
251-
Elem: &schema.Schema{Type: schema.TypeString},
252-
Set: schema.HashString,
247+
Type: schema.TypeSet,
248+
Optional: true,
249+
Computed: true,
250+
ForceNew: true,
251+
Elem: &schema.Schema{Type: schema.TypeString},
252+
Set: schema.HashString,
253+
Deprecated: `With the retirement of EC2-Classic the security_group_names attribute has been deprecated and will be removed in a future version.`,
253254
},
254255
"security_group_ids": {
255256
Type: schema.TypeSet,

internal/service/elasticache/security_group.go

+2
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ func ResourceSecurityGroup() *schema.Resource {
4343
Set: schema.HashString,
4444
},
4545
},
46+
47+
DeprecationMessage: `With the retirement of EC2-Classic the aws_elasticache_security_group resource has been deprecated and will be removed in a future version.`,
4648
}
4749
}
4850

internal/service/rds/instance.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -453,9 +453,10 @@ func ResourceInstance() *schema.Resource {
453453
},
454454
},
455455
"security_group_names": {
456-
Type: schema.TypeSet,
457-
Optional: true,
458-
Elem: &schema.Schema{Type: schema.TypeString},
456+
Type: schema.TypeSet,
457+
Optional: true,
458+
Elem: &schema.Schema{Type: schema.TypeString},
459+
Deprecated: `With the retirement of EC2-Classic the security_group_names attribute has been deprecated and will be removed in a future version.`,
459460
},
460461
"skip_final_snapshot": {
461462
Type: schema.TypeBool,

internal/service/rds/security_group.go

+2
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ func ResourceSecurityGroup() *schema.Resource {
8484
},
8585

8686
CustomizeDiff: verify.SetTagsDiff,
87+
88+
DeprecationMessage: `With the retirement of EC2-Classic the aws_db_security_group resource has been deprecated and will be removed in a future version.`,
8789
}
8890
}
8991

internal/service/redshift/cluster.go

+5-4
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,11 @@ func ResourceCluster() *schema.Resource {
122122
Computed: true,
123123
},
124124
"cluster_security_groups": {
125-
Type: schema.TypeSet,
126-
Optional: true,
127-
Computed: true,
128-
Elem: &schema.Schema{Type: schema.TypeString},
125+
Type: schema.TypeSet,
126+
Optional: true,
127+
Computed: true,
128+
Elem: &schema.Schema{Type: schema.TypeString},
129+
Deprecated: `With the retirement of EC2-Classic the cluster_security_groups attribute has been deprecated and will be removed in a future version.`,
129130
},
130131
"cluster_subnet_group_name": {
131132
Type: schema.TypeString,

internal/service/redshift/security_group.go

+2
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ func ResourceSecurityGroup() *schema.Resource {
7373
Set: resourceSecurityGroupIngressHash,
7474
},
7575
},
76+
77+
DeprecationMessage: `With the retirement of EC2-Classic the aws_redshift_security_group resource has been deprecated and will be removed in a future version.`,
7678
}
7779
}
7880

website/docs/r/db_security_group.html.markdown

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ EC2-Classic Platform. For instances inside a VPC, use the
1313
[`aws_db_instance.vpc_security_group_ids`](/docs/providers/aws/r/db_instance.html#vpc_security_group_ids)
1414
attribute instead.
1515

16+
!> **WARNING:** With the retirement of EC2-Classic the `aws_db_security_group` resource has been deprecated and will be removed in a future version. Any existing resources can be removed from [Terraform state](https://www.terraform.io/language/state) using the [`terraform state rm`](https://www.terraform.io/cli/commands/state/rm#command-state-rm) command.
17+
1618
## Example Usage
1719

1820
```terraform

website/docs/r/elasticache_security_group.html.markdown

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ clusters.
1515
ElastiCache cluster **outside** of a VPC. If you are using a VPC, see the
1616
[ElastiCache Subnet Group resource](elasticache_subnet_group.html).
1717

18+
!> **WARNING:** With the retirement of EC2-Classic the `aws_elasticache_security_group` resource has been deprecated and will be removed in a future version. Any existing resources can be removed from [Terraform state](https://www.terraform.io/language/state) using the [`terraform state rm`](https://www.terraform.io/cli/commands/state/rm#command-state-rm) command.
19+
1820
## Example Usage
1921

2022
```terraform

website/docs/r/redshift_security_group.html.markdown

+4-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ description: |-
88

99
# Resource: aws_redshift_security_group
1010

11-
Creates a new Amazon Redshift security group. You use security groups to control access to non-VPC clusters
11+
Creates a new Amazon Redshift security group. You use security groups to control access to non-VPC clusters.
12+
13+
!> **WARNING:** With the retirement of EC2-Classic the `aws_redshift_security_group` resource has been deprecated and will be removed in a future version. Any existing resources can be removed from [Terraform state](https://www.terraform.io/language/state) using the [`terraform state rm`](https://www.terraform.io/cli/commands/state/rm#command-state-rm) command.
14+
1215

1316
## Example Usage
1417

0 commit comments

Comments
 (0)