-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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/service/ec2: Add aws_ec2_client_vpn_network_association sweeper #14116
Conversation
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 ```
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.
LGTM -- just a comment re: error messaging
r := resourceAwsEc2ClientVpnNetworkAssociation() | ||
d := r.Data(nil) | ||
d.SetId(associationID) | ||
d.Set("client_vpn_endpoint_id", endpointID) | ||
err := r.Delete(d, client) |
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.
interesting use of resource !
}) | ||
|
||
if testSweepSkipSweepError(err) { | ||
log.Printf("[WARN] Skipping Client VPN Endpoint sweep for %s: %s", region, err) |
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.
small change here to reflect the resource being sweeped: Network Association
or Target Network
instead of Endpoint
Replaced by #14146 |
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! |
Community Note
Closes #14115
Release note for CHANGELOG:
Output from sweeper: