Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support pagination for data source aws_autoscaling_groups #4422

Closed
yurygoncharuk opened this issue May 2, 2018 · 6 comments · Fixed by #4433
Closed

Support pagination for data source aws_autoscaling_groups #4422

yurygoncharuk opened this issue May 2, 2018 · 6 comments · Fixed by #4433
Labels
bug Addresses a defect in current functionality. good first issue Call to action for new contributors looking for a place to start. Smaller or straightforward issues. service/autoscaling Issues and PRs that pertain to the autoscaling service.
Milestone

Comments

@yurygoncharuk
Copy link

Hi there,

I have a lot of autoscaling groups(more than 500) in my aws account. When I try to get a list of ASG(autoscaling groups) via Data Source: aws_autoscaling_groups and then make some changes to got ASG I get only first 50 groups and apply my changes only to these groups.

As I know, AWS has a limit of 50 rows per page. How can I get next page with my ASG or the whole list?

Terraform v0.11.7
Provider.aws: version = 1.16

Thank you for any help.

@bflad
Copy link
Contributor

bflad commented May 2, 2018

Thanks for this report @yurygoncharuk -- it looks like we need to implement the SDK paginator (conn.DescribeAutoScalingGroupsPages) for this call as its not currently implementing any resp.NextToken checks:

https://github.com/terraform-providers/terraform-provider-aws/blob/cbc11fcfd799b508a857f5bdea49cea0c8b037ed/aws/data_source_aws_autoscaling_groups.go#L69

@bflad bflad added bug Addresses a defect in current functionality. good first issue Call to action for new contributors looking for a place to start. Smaller or straightforward issues. service/autoscaling Issues and PRs that pertain to the autoscaling service. labels May 2, 2018
jmcarp added a commit to jmcarp/terraform-provider-aws that referenced this issue May 3, 2018
@bflad bflad added this to the v1.18.0 milestone May 4, 2018
@bflad
Copy link
Contributor

bflad commented May 4, 2018

The fix for this is now in master and will be released in v1.18.0 of the AWS provider, likely middle of next week.

@bflad
Copy link
Contributor

bflad commented May 10, 2018

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

@yurygoncharuk
Copy link
Author

Thank you for your help.
This fix works ok and I can get whole list of ASG, but when I try to use any filter I get only 50 ASG again

Terraform v0.11.7
Provider.aws: version = 1.18

@geekinsanemx
Copy link

geekinsanemx commented May 31, 2019

Hi Guys, fix worked up to versions

@bflad @jmcarp @yurygoncharuk

Terraform v0.11.14

  • provider.aws v1.37.0

in provider aws = v1.38.0 it started failed again with error:

Error: Error refreshing state: 1 error occurred:
* data.aws_autoscaling_groups.groups: 1 error occurred:
* data.aws_autoscaling_groups.groups: data.aws_autoscaling_groups.groups: Error fetching Autoscaling Groups: ValidationError: The number of group names that may be passed in is limited to 50
status code: 400, request id: e9636e8e-835f-11e9-9dee-bb59bb459bff

I noticed may be related to change #5766 (#5766),

with terraform v0.12.0 that provider version is not supported :

Provider "aws" v1.38.0 is not compatible with Terraform 0.12.0.

Provider version 2.7.0 is the earliest compatible version. Select it with
the following version constraint:

version = "~> 2.7"

since that aws provider version 2.7 upto latest 2.12 it fails with error:

Error: Error fetching Autoscaling Groups: ValidationError: The number of group names that may be passed in is limited to 50
status code: 400, request id: e71431ad-8360-11e9-82f8-491dfddd30a3

on error-slacknotifier.tf line 24, in data "aws_autoscaling_groups" "groups":
24: data "aws_autoscaling_groups" "groups" {

can we reopen this issue? or can I open a new issue report ?

Thanks!

@ghost
Copy link

ghost commented Mar 29, 2020

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. good first issue Call to action for new contributors looking for a place to start. Smaller or straightforward issues. service/autoscaling Issues and PRs that pertain to the autoscaling service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants