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

feat: Add pod identity association resource #34566

Merged
merged 18 commits into from
Nov 29, 2023

Conversation

bryantbiggs
Copy link
Contributor

@bryantbiggs bryantbiggs commented Nov 27, 2023

Description

Relations

References

Output from Acceptance Testing

% make testacc TESTS=TestAccEKSPodIdentityAssociation_ PKG=eks

...

Copy link

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added size/XL Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/eks Issues and PRs that pertain to the eks service. and removed size/XL Managed by automation to categorize the size of a PR. labels Nov 27, 2023
@terraform-aws-provider terraform-aws-provider bot added needs-triage Waiting for first response or review from a maintainer. partner Contribution from a partner. labels Nov 27, 2023
Copy link

Thank you for your contribution! 🚀

Please note that typically Go dependency changes are handled in this repository by dependabot or the maintainers. This is to prevent pull request merge conflicts and further delay reviews of contributions. Remove any changes to the go.mod or go.sum files and commit them into this pull request.

Additional details:

  • Check open pull requests with the dependencies label to view other dependency updates.
  • If this pull request includes an update the AWS Go SDK (or any other dependency) version, only updates submitted via dependabot will be merged. This pull request will need to remove these changes and will need to be rebased after the existing dependency update via dependabot has been merged for this pull request to be reviewed.
  • If this pull request is for supporting a new AWS service:
    • Ensure the new AWS service changes are following the Contributing Guide section on new services, in particular that the dependency addition and initial provider support are in a separate pull request from other changes (e.g. new resources). Contributions not following this item will not be reviewed until the changes are split.
    • If this pull request is already a separate pull request from the above item, you can ignore this message.

@github-actions github-actions bot added the size/XL Managed by automation to categorize the size of a PR. label Nov 27, 2023
@bryantbiggs
Copy link
Contributor Author

@bschaatsbergen / @ewbankkit any ideas on whats missing for these errors? I'm still pretty new with the plugin framework

Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/eks/... -v -count 1 -parallel 20 -run='TestAccEKSPodIdentityAssociation_'  -timeout 360m
=== RUN   TestAccEKSPodIdentityAssociation_basic
=== PAUSE TestAccEKSPodIdentityAssociation_basic
=== RUN   TestAccEKSPodIdentityAssociation_disappears
=== PAUSE TestAccEKSPodIdentityAssociation_disappears
=== CONT  TestAccEKSPodIdentityAssociation_basic
=== CONT  TestAccEKSPodIdentityAssociation_disappears
=== NAME  TestAccEKSPodIdentityAssociation_basic
    pod_identity_association_test.go:33: Step 1/2 error: Error running apply: exit status 1
        
        Error: Provider returned invalid result object after apply
        
        After the apply operation, the provider still indicated an unknown value for
        aws_eks_pod_identity_association.test.modified_at. All values must be known
        after apply, so this is always a bug in the provider and should be reported
        in the provider's own repository. Terraform will still save the other known
        object values in the state.
=== NAME  TestAccEKSPodIdentityAssociation_disappears
    pod_identity_association_test.go:69: Step 1/1 error: Error running apply: exit status 1
        
        Error: Provider returned invalid result object after apply
        
        After the apply operation, the provider still indicated an unknown value for
        aws_eks_pod_identity_association.test.modified_at. All values must be known
        after apply, so this is always a bug in the provider and should be reported
        in the provider's own repository. Terraform will still save the other known
        object values in the state.
=== NAME  TestAccEKSPodIdentityAssociation_basic
    testing_new.go:90: Error running post-test destroy, there may be dangling resources: checking destroyed Amazon EKS (Elastic Kubernetes) Pod Identity Association (id-attribute-not-set): operation error EKS: DescribePodIdentityAssociation, https response error StatusCode: 400, RequestID: da2ac6a3-d821-4cc9-8426-8297d5427b03, InvalidParameterException: The parameter associationId should be 19 characters long.
--- FAIL: TestAccEKSPodIdentityAssociation_basic (676.56s)
=== NAME  TestAccEKSPodIdentityAssociation_disappears
    testing_new.go:90: Error running post-test destroy, there may be dangling resources: checking destroyed Amazon EKS (Elastic Kubernetes) Pod Identity Association (id-attribute-not-set): operation error EKS: DescribePodIdentityAssociation, https response error StatusCode: 400, RequestID: 0d7bcc59-7ab5-41c5-adf6-ba9b27fcfa42, InvalidParameterException: The parameter associationId should be 19 characters long.
--- FAIL: TestAccEKSPodIdentityAssociation_disappears (689.91s)
FAIL
FAIL	github.com/hashicorp/terraform-provider-aws/internal/service/eks	690.065s
FAIL
make: *** [GNUmakefile:346: testacc] Error 1

@bryantbiggs bryantbiggs marked this pull request as ready for review November 27, 2023 18:01
@bryantbiggs
Copy link
Contributor Author

make testacc TESTS=TestAccEKSPodIdentityAssociation_ PKG=eks
==> Checking that code complies with gofmt requirements...
pick 14670e3cf7 fix: Remove tag manipulation logic
TF_ACC=1 go test ./internal/service/eks/... -v -count 1 -parallel 20 -run='TestAccEKSPodIdentityAssociation_'  -timeout 360m
=== RUN   TestAccEKSPodIdentityAssociation_basic
=== PAUSE TestAccEKSPodIdentityAssociation_basic
=== RUN   TestAccEKSPodIdentityAssociation_disappears
=== PAUSE TestAccEKSPodIdentityAssociation_disappears
=== CONT  TestAccEKSPodIdentityAssociation_basic
=== CONT  TestAccEKSPodIdentityAssociation_disappears
=== NAME  TestAccEKSPodIdentityAssociation_basic
    pod_identity_association_test.go:33: Step 1/2 error: Error running post-apply refresh: exit status 1

        Error: listing tags for EKS (Elastic Kubernetes) Pod Identity Association (a-62dlpjeabra3fxb2r)

          with aws_eks_pod_identity_association.test,
          on terraform_plugin_test.tf line 101, in resource "aws_eks_pod_identity_association" "test":
         101: resource "aws_eks_pod_identity_association" "test" {

        operation error EKS: ListTagsForResource, https response error StatusCode:
        400, RequestID: 3fcfb530-9365-4b34-9c7b-c9e1a81d0acf, BadRequestException:
        Invalid input resource arn: bad syntax
--- PASS: TestAccEKSPodIdentityAssociation_disappears (499.10s)
--- FAIL: TestAccEKSPodIdentityAssociation_basic (558.83s)
FAIL
FAIL	github.com/hashicorp/terraform-provider-aws/internal/service/eks	561.939s
FAIL
make: *** [testacc] Error 1

@ewbankkit ewbankkit added new-resource Introduces a new resource. and removed needs-triage Waiting for first response or review from a maintainer. labels Nov 29, 2023
@ewbankkit ewbankkit self-assigned this Nov 29, 2023
% make testacc TESTARGS='-run=TestAccEKSPodIdentityAssociation_basic' PKG=eks
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/eks/... -v -count 1 -parallel 20  -run=TestAccEKSPodIdentityAssociation_basic -timeout 360m
=== RUN   TestAccEKSPodIdentityAssociation_basic
=== PAUSE TestAccEKSPodIdentityAssociation_basic
=== CONT  TestAccEKSPodIdentityAssociation_basic
--- PASS: TestAccEKSPodIdentityAssociation_basic (626.40s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/eks	638.338s
Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀.

% make testacc TESTARGS='-run=TestAccEKSPodIdentityAssociation_' PKG=eks ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/eks/... -v -count 1 -parallel 2  -run=TestAccEKSPodIdentityAssociation_ -timeout 360m
=== RUN   TestAccEKSPodIdentityAssociation_basic
=== PAUSE TestAccEKSPodIdentityAssociation_basic
=== RUN   TestAccEKSPodIdentityAssociation_disappears
=== PAUSE TestAccEKSPodIdentityAssociation_disappears
=== RUN   TestAccEKSPodIdentityAssociation_tags
=== PAUSE TestAccEKSPodIdentityAssociation_tags
=== RUN   TestAccEKSPodIdentityAssociation_updateRoleARN
=== PAUSE TestAccEKSPodIdentityAssociation_updateRoleARN
=== CONT  TestAccEKSPodIdentityAssociation_basic
=== CONT  TestAccEKSPodIdentityAssociation_tags
--- PASS: TestAccEKSPodIdentityAssociation_basic (649.14s)
=== CONT  TestAccEKSPodIdentityAssociation_disappears
--- PASS: TestAccEKSPodIdentityAssociation_tags (693.67s)
=== CONT  TestAccEKSPodIdentityAssociation_updateRoleARN
--- PASS: TestAccEKSPodIdentityAssociation_disappears (603.78s)
--- PASS: TestAccEKSPodIdentityAssociation_updateRoleARN (654.07s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/eks	1349.519s

@ewbankkit
Copy link
Contributor

@bryantbiggs Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit 30dec27 into hashicorp:main Nov 29, 2023
43 checks passed
@github-actions github-actions bot added this to the v5.29.0 milestone Nov 29, 2023
@bryantbiggs bryantbiggs deleted the f-eks-pod-identity-association branch November 29, 2023 23:58
Copy link

github-actions bot commented Dec 1, 2023

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

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

Copy link

github-actions bot commented Jan 1, 2024

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. new-resource Introduces a new resource. partner Contribution from a partner. service/eks Issues and PRs that pertain to the eks service. size/XL Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[New]: EKS Pod Identity
3 participants