-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Fix Cognito RoleMapping validation for Token types #2894
Fix Cognito RoleMapping validation for Token types #2894
Conversation
Just seen another pull request for this after checking for the issue but it was missing tests: #2246. Happy to rebase this on the previous PR so that @makapuu's work can be accepted too. Also, I wanted to add a wider acceptance test for |
@tomelliff thanks for your work here. Given #2246 (comment) and #1803 being merged could you rebase against #2246 and help finish this up? We'd greatly appreciate it. 😄 🚀 |
If the mapping_rule isn't set then this should be the equivalent of it not having any mapping rules defined. Looks like the negation was missed on this. Fixes hashicorp#2232
04fff6b
to
dbdba5a
Compare
@bflad I've rebased against that commit so it's now included along with my further changes plus the test. Let me know if you need anything else. |
@bflad Did you need anything else from me on this? Would be great if we can get this fix in for the next release because then I think I can tear out my Cloudformation workarounds for what was the missing Terraform Cognito resources plus this bug. |
@tomelliff thanks for the gentle ping - I missed coming back to this for you. Sorry about that. 😢 Taking a look now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for the rebase, fix, and additional unit test, this looks good!
make testacc TEST=./aws TESTARGS='-run=TestAccAWSCognitoIdentityPoolRolesAttachment'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -run=TestAccAWSCognitoIdentityPoolRolesAttachment -timeout 120m
=== RUN TestAccAWSCognitoIdentityPoolRolesAttachment_basic
--- PASS: TestAccAWSCognitoIdentityPoolRolesAttachment_basic (22.64s)
=== RUN TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappings
--- PASS: TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappings (36.52s)
=== RUN TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappingsWithAmbiguousRoleResolutionError
--- PASS: TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappingsWithAmbiguousRoleResolutionError (6.35s)
=== RUN TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappingsWithRulesTypeError
--- PASS: TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappingsWithRulesTypeError (6.14s)
=== RUN TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappingsWithTokenTypeError
--- PASS: TestAccAWSCognitoIdentityPoolRolesAttachment_roleMappingsWithTokenTypeError (6.80s)
PASS
ok github.com/terraform-providers/terraform-provider-aws/aws 78.494s
This has been released in terraform-provider-aws version 1.9.0. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
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! |
If the mapping_rule isn't set then this should be the equivalent of it not having any mapping rules defined.
Looks like the negation was missed on this.
Fixes #2232