Skip to content

Commit 28b4561

Browse files
Add the PRO roles to aws_quicksight_account_subscriptionresource (#44638)
* Add pro roles * Update documentation * Add changelog
1 parent 32a1ecd commit 28b4561

File tree

3 files changed

+44
-1
lines changed

3 files changed

+44
-1
lines changed

.changelog/44638.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
```release-note:enhancement
2+
resource/aws_quicksight_account_subscription: Add `admin_pro_group`, `author_pro_group`, and `reader_pro_group` arguments
3+
```
4+
5+
```release-note:note
6+
resource/aws_quicksight_account_subscription: Because we cannot easily test all this functionality, it is best effort and we ask for community help in testing
7+
```

internal/service/quicksight/account_subscription.go

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,13 @@ func resourceAccountSubscription() *schema.Resource {
6464
Elem: &schema.Schema{Type: schema.TypeString},
6565
ForceNew: true,
6666
},
67+
"admin_pro_group": {
68+
Type: schema.TypeList,
69+
Optional: true,
70+
MinItems: 1,
71+
Elem: &schema.Schema{Type: schema.TypeString},
72+
ForceNew: true,
73+
},
6774
"authentication_method": {
6875
Type: schema.TypeString,
6976
Required: true,
@@ -77,6 +84,13 @@ func resourceAccountSubscription() *schema.Resource {
7784
Elem: &schema.Schema{Type: schema.TypeString},
7885
ForceNew: true,
7986
},
87+
"author_pro_group": {
88+
Type: schema.TypeList,
89+
Optional: true,
90+
MinItems: 1,
91+
Elem: &schema.Schema{Type: schema.TypeString},
92+
ForceNew: true,
93+
},
8094
names.AttrAWSAccountID: quicksightschema.AWSAccountIDSchema(),
8195
"contact_number": {
8296
Type: schema.TypeString,
@@ -126,6 +140,13 @@ func resourceAccountSubscription() *schema.Resource {
126140
MinItems: 1,
127141
Elem: &schema.Schema{Type: schema.TypeString},
128142
},
143+
"reader_pro_group": {
144+
Type: schema.TypeList,
145+
Optional: true,
146+
ForceNew: true,
147+
MinItems: 1,
148+
Elem: &schema.Schema{Type: schema.TypeString},
149+
},
129150
"realm": {
130151
Type: schema.TypeString,
131152
Optional: true,
@@ -161,14 +182,26 @@ func resourceAccountSubscriptionCreate(ctx context.Context, d *schema.ResourceDa
161182
input.AdminGroup = flex.ExpandStringValueList(v.([]any))
162183
}
163184

185+
if v, ok := d.GetOk("admin_pro_group"); ok && len(v.([]any)) > 0 {
186+
input.AdminProGroup = flex.ExpandStringValueList(v.([]any))
187+
}
188+
164189
if v, ok := d.GetOk("author_group"); ok && len(v.([]any)) > 0 {
165190
input.AuthorGroup = flex.ExpandStringValueList(v.([]any))
166191
}
167192

193+
if v, ok := d.GetOk("author_pro_group"); ok && len(v.([]any)) > 0 {
194+
input.AuthorProGroup = flex.ExpandStringValueList(v.([]any))
195+
}
196+
168197
if v, ok := d.GetOk("reader_group"); ok && len(v.([]any)) > 0 {
169198
input.ReaderGroup = flex.ExpandStringValueList(v.([]any))
170199
}
171200

201+
if v, ok := d.GetOk("reader_pro_group"); ok && len(v.([]any)) > 0 {
202+
input.ReaderProGroup = flex.ExpandStringValueList(v.([]any))
203+
}
204+
172205
if v, ok := d.GetOk("contact_number"); ok {
173206
input.ContactNumber = aws.String(v.(string))
174207
}

website/docs/r/quicksight_account_subscription.html.markdown

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description: |-
1010

1111
Terraform resource for managing an AWS QuickSight Account Subscription.
1212

13-
~> Due to the absence of the `admin_group`, `author_group`, and `reader_group` fields in the [`DescribeAccountSettings`](https://docs.aws.amazon.com/quicksight/latest/APIReference/API_DescribeAccountSettings.html) API response, changes made to these groups post-subscription will not be detected by this resource.
13+
~> Due to the absence of the `admin_group`, `author_group`, `reader_group`, `admin_pro_group`, `author_pro_group`, and `reader_pro_group` fields in the [`DescribeAccountSettings`](https://docs.aws.amazon.com/quicksight/latest/APIReference/API_DescribeAccountSettings.html) API response, changes made to these groups post-subscription will not be detected by this resource.
1414

1515
## Example Usage
1616

@@ -36,7 +36,9 @@ The following arguments are optional:
3636

3737
* `active_directory_name` - (Optional) Name of your Active Directory. This field is required if `ACTIVE_DIRECTORY` is the selected authentication method of the new Amazon QuickSight account.
3838
* `admin_group` - (Optional) Admin group associated with your Active Directory or IAM Identity Center account. This field is required if `ACTIVE_DIRECTORY` or `IAM_IDENTITY_CENTER` is the selected authentication method of the new Amazon QuickSight account.
39+
* `admin_pro_group` - (Optional) Admin PRO group associated with your Active Directory or IAM Identity Center account.
3940
* `author_group` - (Optional) Author group associated with your Active Directory or IAM Identity Center account.
41+
* `author_pro_group` - (Optional) Author PRO group associated with your Active Directory or IAM Identity Center account.
4042
* `aws_account_id` - (Optional, Forces new resource) AWS account ID. Defaults to automatically determined account ID of the Terraform AWS provider.
4143
* `contact_number` - (Optional) A 10-digit phone number for the author of the Amazon QuickSight account to use for future communications. This field is required if `ENTERPPRISE_AND_Q` is the selected edition of the new Amazon QuickSight account.
4244
* `directory_id` - (Optional) Active Directory ID that is associated with your Amazon QuickSight account.
@@ -45,6 +47,7 @@ The following arguments are optional:
4547
* `iam_identity_center_instance_arn` - (Optional) The Amazon Resource Name (ARN) for the IAM Identity Center instance.
4648
* `last_name` - (Optional) Last name of the author of the Amazon QuickSight account to use for future communications. This field is required if `ENTERPPRISE_AND_Q` is the selected edition of the new Amazon QuickSight account.
4749
* `reader_group` - (Optional) Reader group associated with your Active Directory or IAM Identity Center account.
50+
* `reader_pro_group` - (Optional) Reader PRO group associated with your Active Directory or IAM Identity Center account.
4851
* `realm` - (Optional) Realm of the Active Directory that is associated with your Amazon QuickSight account.
4952
* `region` - (Optional) Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the [provider configuration](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#aws-configuration-reference).
5053

0 commit comments

Comments
 (0)