Skip to content

Commit

Permalink
d/aws_elasticache_cluster: Remove 'security_group_names'.
Browse files Browse the repository at this point in the history
  • Loading branch information
ewbankkit committed Apr 25, 2023
1 parent ede2b39 commit dde3583
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 24 deletions.
16 changes: 10 additions & 6 deletions .changelog/30966.txt
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
```release-note:breaking-change
provider: With the retirement of EC2-Classic the`aws_db_security_group` resource has been removed
provider: With the retirement of EC2-Classic the `aws_db_security_group` resource has been removed
```

```release-note:breaking-change
provider: With the retirement of EC2-Classic the`aws_elasticache_security_group` resource has been removed
provider: With the retirement of EC2-Classic the `aws_elasticache_security_group` resource has been removed
```

```release-note:breaking-change
provider: With the retirement of EC2-Classic the`aws_redshift_security_group` resource has been removed
provider: With the retirement of EC2-Classic the `aws_redshift_security_group` resource has been removed
```

```release-note:breaking-change
resource/aws_db_instance: With the retirement of EC2-Classic the`security_group_names` attribute has been removed
resource/aws_db_instance: With the retirement of EC2-Classic the `security_group_names` attribute has been removed
```

```release-note:breaking-change
data-source/aws_db_instance: With the retirement of EC2-Classic the`db_security_groups` attribute has been removed
data-source/aws_db_instance: With the retirement of EC2-Classic the `db_security_groups` attribute has been removed
```

```release-note:breaking-change
resource/aws_elasticache_cluster: With the retirement of EC2-Classic the`security_group_names` attribute has been removed
resource/aws_elasticache_cluster: With the retirement of EC2-Classic the `security_group_names` attribute has been removed
```

```release-note:breaking-change
data-source/aws_elasticache_cluster: With the retirement of EC2-Classic the `security_group_names` attribute has been removed
```
6 changes: 0 additions & 6 deletions internal/service/elasticache/cluster_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,6 @@ func DataSourceCluster() *schema.Resource {
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
"security_group_names": {
Type: schema.TypeSet,
Computed: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
"snapshot_retention_limit": {
Type: schema.TypeInt,
Computed: true,
Expand Down Expand Up @@ -198,7 +193,6 @@ func dataSourceClusterRead(ctx context.Context, d *schema.ResourceData, meta int
d.Set("ip_discovery", cluster.IpDiscovery)
d.Set("network_type", cluster.NetworkType)
d.Set("preferred_outpost_arn", cluster.PreferredOutpostArn)
d.Set("security_group_names", flattenSecurityGroupNames(cluster.CacheSecurityGroups))
d.Set("security_group_ids", flattenSecurityGroupIDs(cluster.SecurityGroups))

if cluster.CacheParameterGroup != nil {
Expand Down
2 changes: 1 addition & 1 deletion internal/service/elasticache/cluster_data_source_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/hashicorp/terraform-provider-aws/internal/acctest"
)

func TestAccElastiCacheClusterDataSource_Data_basic(t *testing.T) {
func TestAccElastiCacheClusterDataSource_basic(t *testing.T) {
ctx := acctest.Context(t)
if testing.Short() {
t.Skip("skipping long-running test in short mode")
Expand Down
10 changes: 0 additions & 10 deletions internal/service/elasticache/flex.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,6 @@ func flattenSecurityGroupIDs(securityGroups []*elasticache.SecurityGroupMembersh
return result
}

func flattenSecurityGroupNames(securityGroups []*elasticache.CacheSecurityGroupMembership) []string {
result := make([]string, 0, len(securityGroups))
for _, sg := range securityGroups {
if sg.CacheSecurityGroupName != nil {
result = append(result, *sg.CacheSecurityGroupName)
}
}
return result
}

func flattenLogDeliveryConfigurations(logDeliveryConfiguration []*elasticache.LogDeliveryConfiguration) []map[string]interface{} {
if len(logDeliveryConfiguration) == 0 {
return nil
Expand Down
1 change: 0 additions & 1 deletion website/docs/d/elasticache_cluster.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ In addition to all arguments above, the following attributes are exported:
* `ip_discovery` - The IP version advertised in the discovery protocol.
* `network_type` - The IP versions for cache cluster connections.
* `subnet_group_name` – Name of the subnet group associated to the cache cluster.
* `security_group_names` – List of security group names associated with this cache cluster.
* `security_group_ids` – List VPC security groups associated with the cache cluster.
* `parameter_group_name` – Name of the parameter group associated with this cache cluster.
* `replication_group_id` - The replication group to which this cache cluster belongs.
Expand Down

0 comments on commit dde3583

Please sign in to comment.