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

[Bug]: Dangling resources after running acceptance tests with a custom CA bundle defined #31692

Open
liath opened this issue May 31, 2023 · 1 comment
Labels
bug Addresses a defect in current functionality. provider Pertains to the provider itself, rather than any interaction with AWS. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.

Comments

@liath
Copy link
Contributor

liath commented May 31, 2023

Terraform Core Version

1.4.6

AWS Provider Version

main

Affected Resource(s)

All

Expected Behavior

Resources created for acceptance tests should be cleaned up after they've run.

Actual Behavior

Resource are unable to be cleaned up and are thus left littered around.

Relevant Error/Panic Output Snippet

$ make testacc TESTS=TestAccIAMUserDataSource_basic PKG=iam                                                                                                           <aws:personal> <region:us-east-1>
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/iam/... -v -count 1 -parallel 20 -run='TestAccIAMUserDataSource_basic'  -timeout 180m
=== RUN   TestAccIAMUserDataSource_basic
=== PAUSE TestAccIAMUserDataSource_basic
=== CONT  TestAccIAMUserDataSource_basic
    testing_new.go:88: Error running post-test destroy, there may be dangling resources: exit status 1

        Error: Invalid provider configuration

        Provider "registry.terraform.io/hashicorp/aws" requires explicit
        configuration. Add a provider block to the root module and configure the
        provider's required arguments as described in the provider documentation.


        Error: configuring Terraform AWS Provider: loading configuration: unable to add custom RootCAs HTTPClient, has no WithTransportOptions, *http.Client

          with provider["registry.terraform.io/hashicorp/aws"],
          on <empty> line 0:
          (source code not available)

--- FAIL: TestAccIAMUserDataSource_basic (19.11s)
FAIL
FAIL    github.com/hashicorp/terraform-provider-aws/internal/service/iam        23.939s
FAIL
make: *** [testacc] Error 1

Terraform Configuration Files

N/A

Steps to Reproduce

# or wherever your default bundle may live, it doesn't matter the failure is caused by the var being set
export AWS_CA_BUNDLE="/etc/ssl/cert.pem"
# run any acceptance test
make testacc TESTS=TestAccIAMUserDataSource_basic PKG=iam 
# observe error message

Debug Output

No response

Panic Output

Error: configuring Terraform AWS Provider: loading configuration: unable to add custom RootCAs HTTPClient, has no WithTransportOptions, *http.Client

Important Factoids

No response

References

This was resolved elsewhere by switching to the http client from aws-sdk. hashicorp/aws-sdk-go-base#116

Would you like to implement a fix?

None

@liath liath added bug Addresses a defect in current functionality. needs-triage Waiting for first response or review from a maintainer. labels May 31, 2023
@github-actions
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this 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.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@justinretzolk justinretzolk added tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. provider Pertains to the provider itself, rather than any interaction with AWS. and removed needs-triage Waiting for first response or review from a maintainer. labels Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Addresses a defect in current functionality. provider Pertains to the provider itself, rather than any interaction with AWS. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

No branches or pull requests

2 participants