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

tests/resource/aws_ec2_client_vpn_endpoint: Sweeper failing due to associations #14115

Closed
bflad opened this issue Jul 9, 2020 · 1 comment · Fixed by #14146
Closed

tests/resource/aws_ec2_client_vpn_endpoint: Sweeper failing due to associations #14115

bflad opened this issue Jul 9, 2020 · 1 comment · Fixed by #14146
Assignees
Labels
service/ec2 Issues and PRs that pertain to the ec2 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.

Comments

@bflad
Copy link
Contributor

bflad commented Jul 9, 2020

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • 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
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Affected Resource(s)

  • aws_ec2_client_vpn_endpoint

Expected Behavior

Sweeper able to delete all EC2 Client VPN Endpoints in given region, delegating to other required resource sweepers if necessary.

Actual Behavior

2020/07/09 08:48:07 [DEBUG] Running Sweeper (aws_ec2_client_vpn_endpoint) in region (us-west-2)
2020/07/09 08:48:07 [INFO] Deleting Client VPN Endpoint: cvpn-endpoint-032094b1edaf8d7da
2020/07/09 08:48:08 [ERROR] Error running Sweeper (aws_ec2_client_vpn_endpoint) in region (us-west-2): error deleting Client VPN Endpoint (cvpn-endpoint-032094b1edaf8d7da): ClientVpnEndpointAssociationExists: The endpoint that you're trying to delete has associations cvpn-assoc-061760dfeca46f8de
	status code: 400, request id: 23bcccf6-343e-4b32-aaa9-f8c4ad0f623d

Steps to Reproduce

  1. go test ./aws -v -timeout=10h -sweep-allow-failures -sweep=us-west-2 -sweep-run=aws_ec2_client_vpn_endpoint
@bflad bflad added tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/ec2 Issues and PRs that pertain to the ec2 service. labels Jul 9, 2020
@bflad bflad self-assigned this Jul 9, 2020
bflad added a commit that referenced this issue Jul 9, 2020
Reference: #14115

Output from sweeper:

```console
$ go test ./aws -v -timeout=10h -sweep-allow-failures -sweep=us-west-2 -sweep-run=aws_ec2_client_vpn_endpoint
2020/07/09 09:18:19 [WARN] Sweeper has dependency (aws_workspaces_workspace), but that sweeper was not found
2020/07/09 09:18:19 [DEBUG] Running Sweepers for region (us-west-2):
2020/07/09 09:18:19 [DEBUG] Running Sweeper (aws_fsx_windows_file_system) in region (us-west-2)
2020/07/09 09:18:19 [INFO] Building AWS auth structure
2020/07/09 09:18:19 [INFO] Setting AWS metadata API timeout to 100ms
2020/07/09 09:18:19 [INFO] Ignoring AWS metadata API endpoint at default location as it doesn't return any instance-id
2020/07/09 09:18:19 [INFO] AWS Auth provider used: "SharedCredentialsProvider"
2020/07/09 09:18:19 [DEBUG] Trying to get account information via sts:GetCallerIdentity
2020/07/09 09:18:19 [DEBUG] Trying to get account information via sts:GetCallerIdentity
2020/07/09 09:18:21 [WARN] Sweeper (aws_workspaces_directory) has dependency (aws_workspaces_workspace), but that sweeper was not found
2020/07/09 09:18:21 [DEBUG] Running Sweeper (aws_workspaces_directory) in region (us-west-2)
2020/07/09 09:18:21 [DEBUG] Running Sweeper (aws_ec2_client_vpn_network_association) in region (us-west-2)
2020/07/09 09:18:23 [INFO] Deleting EC2 Client VPN Target Network: cvpn-assoc-061760dfeca46f8de
2020/07/09 09:18:24 [DEBUG] Waiting for Client VPN endpoint to disassociate with target network: cvpn-assoc-061760dfeca46f8de
2020/07/09 09:18:24 [DEBUG] Waiting for state to become: [disassociated]
2020/07/09 09:23:22 [INFO] Deleting EC2 Client VPN Target Network: cvpn-assoc-0c84136d3bb041419
2020/07/09 09:23:22 [DEBUG] Waiting for Client VPN endpoint to disassociate with target network: cvpn-assoc-0c84136d3bb041419
2020/07/09 09:23:22 [DEBUG] Waiting for state to become: [disassociated]
2020/07/09 09:27:48 [DEBUG] Sweeper (aws_ec2_client_vpn_endpoint) has dependency (aws_directory_service_directory), running..
2020/07/09 09:27:48 [DEBUG] Sweeper (aws_directory_service_directory) has dependency (aws_fsx_windows_file_system), running..
2020/07/09 09:27:48 [DEBUG] Sweeper (aws_fsx_windows_file_system) already ran in region (us-west-2)
2020/07/09 09:27:48 [DEBUG] Sweeper (aws_directory_service_directory) has dependency (aws_workspaces_directory), running..
2020/07/09 09:27:48 [WARN] Sweeper (aws_workspaces_directory) has dependency (aws_workspaces_workspace), but that sweeper was not found
2020/07/09 09:27:48 [DEBUG] Sweeper (aws_workspaces_directory) already ran in region (us-west-2)
2020/07/09 09:27:48 [DEBUG] Running Sweeper (aws_directory_service_directory) in region (us-west-2)
2020/07/09 09:27:49 [DEBUG] Sweeper (aws_ec2_client_vpn_endpoint) has dependency (aws_ec2_client_vpn_network_association), running..
2020/07/09 09:27:49 [DEBUG] Sweeper (aws_ec2_client_vpn_network_association) already ran in region (us-west-2)
2020/07/09 09:27:49 [DEBUG] Running Sweeper (aws_ec2_client_vpn_endpoint) in region (us-west-2)
2020/07/09 09:27:49 [INFO] Deleting EC2 Client VPN Endpoint: cvpn-endpoint-032094b1edaf8d7da
2020/07/09 09:27:50 [DEBUG] Waiting for state to become: []
2020/07/09 09:27:50 [INFO] Deleting EC2 Client VPN Endpoint: cvpn-endpoint-0a777253d4dd52eba
2020/07/09 09:27:51 [DEBUG] Waiting for state to become: []
2020/07/09 09:27:52 [DEBUG] Sweeper (aws_directory_service_directory) has dependency (aws_fsx_windows_file_system), running..
2020/07/09 09:27:52 [DEBUG] Sweeper (aws_fsx_windows_file_system) already ran in region (us-west-2)
2020/07/09 09:27:52 [DEBUG] Sweeper (aws_directory_service_directory) has dependency (aws_workspaces_directory), running..
2020/07/09 09:27:52 [WARN] Sweeper (aws_workspaces_directory) has dependency (aws_workspaces_workspace), but that sweeper was not found
2020/07/09 09:27:52 [DEBUG] Sweeper (aws_workspaces_directory) already ran in region (us-west-2)
2020/07/09 09:27:52 [DEBUG] Sweeper (aws_directory_service_directory) already ran in region (us-west-2)
2020/07/09 09:27:52 Sweeper Tests ran successfully:
  - aws_ec2_client_vpn_endpoint
  - aws_fsx_windows_file_system
  - aws_workspaces_directory
  - aws_ec2_client_vpn_network_association
  - aws_directory_service_directory
ok    github.com/terraform-providers/terraform-provider-aws/aws 575.715s
```
@bflad bflad linked a pull request Aug 18, 2020 that will close this issue
@ghost
Copy link

ghost commented Sep 19, 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 Sep 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/ec2 Issues and PRs that pertain to the ec2 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
1 participant