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

EC2-Classic retirement phase 1: Resource and attribute deprecation #26427

Merged
merged 13 commits into from
Aug 24, 2022
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
43 changes: 43 additions & 0 deletions .changelog/26427.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
```release-note:note
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
```

```release-note:note
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
```

```release-note:note
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
```

```release-note:note
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
```

```release-note:note
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
```

```release-note:note
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
```

```release-note:note
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
```

```release-note:note
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
```

```release-note:note
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
```

```release-note:note
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
```

```release-note:note
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
```
16 changes: 9 additions & 7 deletions internal/service/autoscaling/launch_configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,15 +306,17 @@ func ResourceLaunchConfiguration() *schema.Resource {
},
},
"vpc_classic_link_id": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Deprecated: `With the retirement of EC2-Classic the vpc_classic_link_id attribute has been deprecated and will be removed in a future version.`,
},
"vpc_classic_link_security_groups": {
Type: schema.TypeSet,
Optional: true,
ForceNew: true,
Elem: &schema.Schema{Type: schema.TypeString},
Type: schema.TypeSet,
Optional: true,
ForceNew: true,
Elem: &schema.Schema{Type: schema.TypeString},
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.`,
},
},
}
Expand Down
14 changes: 8 additions & 6 deletions internal/service/ec2/vpc_.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,16 @@ func ResourceVPC() *schema.Resource {
Computed: true,
},
"enable_classiclink": {
Type: schema.TypeBool,
Optional: true,
Computed: true,
Type: schema.TypeBool,
Optional: true,
Computed: true,
Deprecated: `With the retirement of EC2-Classic the enable_classiclink attribute has been deprecated and will be removed in a future version.`,
},
"enable_classiclink_dns_support": {
Type: schema.TypeBool,
Optional: true,
Computed: true,
Type: schema.TypeBool,
Optional: true,
Computed: true,
Deprecated: `With the retirement of EC2-Classic the enable_classiclink_dns_support attribute has been deprecated and will be removed in a future version.`,
},
"enable_dns_hostnames": {
Type: schema.TypeBool,
Expand Down
14 changes: 8 additions & 6 deletions internal/service/ec2/vpc_peering_connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,19 +84,21 @@ var vpcPeeringConnectionOptionsSchema = &schema.Schema{
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"allow_classic_link_to_remote_vpc": {
Type: schema.TypeBool,
Optional: true,
Default: false,
Type: schema.TypeBool,
Optional: true,
Default: false,
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.`,
},
"allow_remote_vpc_dns_resolution": {
Type: schema.TypeBool,
Optional: true,
Default: false,
},
"allow_vpc_to_remote_classic_link": {
Type: schema.TypeBool,
Optional: true,
Default: false,
Type: schema.TypeBool,
Optional: true,
Default: false,
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.`,
},
},
},
Expand Down
13 changes: 7 additions & 6 deletions internal/service/elasticache/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,12 +244,13 @@ func ResourceCluster() *schema.Resource {
},
},
"security_group_names": {
Type: schema.TypeSet,
Optional: true,
Computed: true,
ForceNew: true,
Elem: &schema.Schema{Type: schema.TypeString},
Set: schema.HashString,
Type: schema.TypeSet,
Optional: true,
Computed: true,
ForceNew: true,
Elem: &schema.Schema{Type: schema.TypeString},
Set: schema.HashString,
Deprecated: `With the retirement of EC2-Classic the security_group_names attribute has been deprecated and will be removed in a future version.`,
},
"security_group_ids": {
Type: schema.TypeSet,
Expand Down
2 changes: 2 additions & 0 deletions internal/service/elasticache/security_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ func ResourceSecurityGroup() *schema.Resource {
Set: schema.HashString,
},
},

DeprecationMessage: `With the retirement of EC2-Classic the aws_elasticache_security_group resource has been deprecated and will be removed in a future version.`,
}
}

Expand Down
7 changes: 4 additions & 3 deletions internal/service/rds/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -453,9 +453,10 @@ func ResourceInstance() *schema.Resource {
},
},
"security_group_names": {
Type: schema.TypeSet,
Optional: true,
Elem: &schema.Schema{Type: schema.TypeString},
Type: schema.TypeSet,
Optional: true,
Elem: &schema.Schema{Type: schema.TypeString},
Deprecated: `With the retirement of EC2-Classic the security_group_names attribute has been deprecated and will be removed in a future version.`,
},
"skip_final_snapshot": {
Type: schema.TypeBool,
Expand Down
2 changes: 2 additions & 0 deletions internal/service/rds/security_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ func ResourceSecurityGroup() *schema.Resource {
},

CustomizeDiff: verify.SetTagsDiff,

DeprecationMessage: `With the retirement of EC2-Classic the aws_db_security_group resource has been deprecated and will be removed in a future version.`,
}
}

Expand Down
9 changes: 5 additions & 4 deletions internal/service/redshift/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,11 @@ func ResourceCluster() *schema.Resource {
Computed: true,
},
"cluster_security_groups": {
Type: schema.TypeSet,
Optional: true,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
Type: schema.TypeSet,
Optional: true,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
Deprecated: `With the retirement of EC2-Classic the cluster_security_groups attribute has been deprecated and will be removed in a future version.`,
},
"cluster_subnet_group_name": {
Type: schema.TypeString,
Expand Down
2 changes: 2 additions & 0 deletions internal/service/redshift/security_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ func ResourceSecurityGroup() *schema.Resource {
Set: resourceSecurityGroupIngressHash,
},
},

DeprecationMessage: `With the retirement of EC2-Classic the aws_redshift_security_group resource has been deprecated and will be removed in a future version.`,
}
}

Expand Down
2 changes: 2 additions & 0 deletions website/docs/r/db_security_group.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ EC2-Classic Platform. For instances inside a VPC, use the
[`aws_db_instance.vpc_security_group_ids`](/docs/providers/aws/r/db_instance.html#vpc_security_group_ids)
attribute instead.

!> **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.

## Example Usage

```terraform
Expand Down
2 changes: 2 additions & 0 deletions website/docs/r/elasticache_security_group.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ clusters.
ElastiCache cluster **outside** of a VPC. If you are using a VPC, see the
[ElastiCache Subnet Group resource](elasticache_subnet_group.html).

!> **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.

## Example Usage

```terraform
Expand Down
5 changes: 4 additions & 1 deletion website/docs/r/redshift_security_group.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ description: |-

# Resource: aws_redshift_security_group

Creates a new Amazon Redshift security group. You use security groups to control access to non-VPC clusters
Creates a new Amazon Redshift security group. You use security groups to control access to non-VPC clusters.

!> **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.


## Example Usage

Expand Down