hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.81k stars 9.16k forks source link

Add user_group argument to aws_elasticache_replication_group #20328

Closed jamesglennan closed 2 years ago

jamesglennan commented 3 years ago

Community Note

Description

Recently user and user group resources for elasticache were added to the terraform provider. However there is not currently a way to associate a user group with a replication group.

New or Affected Resource(s)

Impacted Existing Data Sources

Potential Terraform Configuration

resource "aws_elasticache_replication_group" "test" {
  replication_group_id          = test_replication_group
  replication_group_description = "test description"
  node_type                     = "cache.t3.small"
  port                          = 6379
  apply_immediately             = true
  auto_minor_version_upgrade    = false
  maintenance_window            = "tue:06:30-tue:07:30"
  snapshot_window               = "01:00-02:00"
  user_group_ids                = [aws_elasticache_user_group.test.id]
}

resource "aws_elasticache_user" "test" {
  user_id       = test_user_group
  user_name     = "default"
  access_string = "on ~app::* -@all +@read +@hash +@bitmap +@geo -setbit -bitfield -hset -hsetnx -hmset -hincrby -hincrbyfloat -hdel -bitop -geoadd -georadius -georadiusbymember"
  engine        = "REDIS"
  passwords     = ["password123456789"]
}
resource "aws_elasticache_user_group" "test" {
  user_group_id = test_user_group
  engine        = "REDIS"
  user_ids      = [aws_elasticache_user.test.user_id]
}

References

https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Clusters.RBAC.html https://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_CreateReplicationGroup.html#API_CreateReplicationGroup_RequestParameters

jamesglennan commented 3 years ago

I currently have some code that I've been working on for this, so happy to take this on

edbighead commented 2 years ago

was very surprised we can add aws_elasticache_user_group but can not associate it, waiting for the PR to be merged

github-actions[bot] commented 2 years ago

This functionality has been released in v3.74.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

github-actions[bot] commented 2 years ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.