diff --git a/docs/resources/rediscloud_acl_role.md b/docs/resources/rediscloud_acl_role.md index da82cbb2..9379c71a 100644 --- a/docs/resources/rediscloud_acl_role.md +++ b/docs/resources/rediscloud_acl_role.md @@ -12,41 +12,26 @@ Creates a Role in your Redis Enterprise Cloud Account. ## Example Usage ```hcl -resource "rediscloud_acl_role" "role-resource-implicit" { - name = "fast-admin" - rule { - # An implicit dependency is recommended - name = rediscloud_acl_role.cache_reader.name - # Implicit dependencies used throughout - database { - subscription = rediscloud_active_active_subscription_database.subscription-resource-1.id - database = rediscloud_active_active_subscription_database.database-resource-1.db_id - regions = [ - for r in rediscloud_active_active_subscription_database.database-resource-1.override_region : r.name - ] - } - database { - subscription = rediscloud_subscription.subscription-resource-2.id - database = rediscloud_subscription_database.database-resource-2.db_id - } - } +resource "rediscloud_acl_rule" "rule-resource" { + name = "my-rule" + rule = "+@read ~cache:*" } -resource "rediscloud_acl_role" "role-resource-explicit" { - name = "fast-admin" +resource "rediscloud_acl_role" "role-resource" { + name = "my-role" rule { - name = "cache-reader" - # Active-Active database omitted for brevity + name = rediscloud_acl_rule.rule-resource.name database { - subscription = 123456 - database = 9830 + subscription = rediscloud_subscription.subscription-resource.id + database = rediscloud_subscription_database.database-resource.db_id } } + # An explicit resource dependency can be used if preferred depends_on = [ - rediscloud_acl_rule.cache_reader, - rediscloud_subscription.subscription-resource-2, - rediscloud_subscription_database.database-resource-2 + rediscloud_acl_rule.rule-resource, + rediscloud_subscription.subscription-resource, + rediscloud_subscription_database.database-resource ] } ``` @@ -55,16 +40,12 @@ resource "rediscloud_acl_role" "role-resource-explicit" { The following arguments are supported: -* `name` - (Required) A meaningful name for the role. Must be unique. **This can be modified, but since the Role is - referred to - by name (and not ID), this could break existing references. See the [User](rediscloud_acl_user.md) resource - documentation.** +* `name` - (Required) A meaningful name for the role. Must be unique. * `rule` - (Required, minimum 1) A set of rule association objects, documented below. The `rule` block supports: -* `name` (Required) - Name of the Rule. It is recommended an implicit dependency is used here. `depends_on` could be - used instead by waiting for a Rule resource with a matching `name`. +* `name` (Required) - Name of the Rule. * `database` - (Required, minimum 1) a set of database association objects, documented below. The `database` block supports: