Skip to content

Resource: awsElasticacheUserGroup

Provides an ElastiCache user group resource.

Example Usage

/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const awsElasticacheUserTest = new aws.elasticacheUser.ElasticacheUser(
  this,
  "test",
  {
    accessString:
      "on ~app::* -@all +@read +@hash +@bitmap +@geo -setbit -bitfield -hset -hsetnx -hmset -hincrby -hincrbyfloat -hdel -bitop -geoadd -georadius -georadiusbymember",
    engine: "REDIS",
    passwords: ["password123456789"],
    userId: "testUserId",
    userName: "default",
  }
);
const awsElasticacheUserGroupTest =
  new aws.elasticacheUserGroup.ElasticacheUserGroup(this, "test_1", {
    engine: "REDIS",
    userGroupId: "userGroupId",
    userIds: [awsElasticacheUserTest.userId],
  });
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsElasticacheUserGroupTest.overrideLogicalId("test");

Argument Reference

The following arguments are required:

  • engine - (Required) The current supported value is redis.
  • userGroupId - (Required) The ID of the user group.

The following arguments are optional:

  • userIds - (Optional) The list of user IDs that belong to the user group.
  • tags - (Optional) Key-value map of resource tags. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • id - The user group identifier.
  • arn - The ARN that identifies the user group.
  • tagsAll - A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.

Import

ElastiCache user groups can be imported using the userGroupId, e.g.,

$ terraform import aws_elasticache_user_group.my_user_group userGoupId1