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

Truncated returned resources #52

Open
clarlam opened this issue Sep 26, 2019 · 1 comment
Open

Truncated returned resources #52

clarlam opened this issue Sep 26, 2019 · 1 comment

Comments

@clarlam
Copy link

clarlam commented Sep 26, 2019

Running the command the list out all aws_iam_policies and it's only ever returning a max of 100

terracognita aws --hcl policy.tf --tfstate .terraform/terraform.tfstate -i aws_iam_policy --access-key=$AWS_ACCESS_KEY_ID --secret-key=$AWS_SECRET_ACCESS_KEY --region=$AWS_REGION --verbose > output

the head of the verbose log output showing the return call for iam

ts=2019-09-26T22:09:32.809406641Z caller=import.go:47 func=provider.Import filters="\n\tTags:    [],\n\tInclude: [aws_iam_policy],\n\tExclude: [],\n"
ts=2019-09-26T22:09:32.809421957Z caller=import.go:57 func=provider.Import resource=aws_iam_policy msg="fetching the list of resources"
ts=2019-09-26T22:09:32.857468923Z caller=import.go:70 func=provider.Import resource=aws_iam_policy id=arn:aws:iam::XXXX:policy/XXXX total=100 current=1 msg="reading from TF"

I also did a spot check against the aws cli command to check how many local/customer managed IAM policies the account is using/attached and it's definitely over 100. Not sure where it's being truncated.

aws list-policies --only-attached --scope Local | grep PolicyName | wc -l

@xlr-8
Copy link
Contributor

xlr-8 commented Sep 27, 2019

Thanks for reporting, we might have a hint on where it's coming from (pagination/filtering issue), we'll investigate further to validate or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants