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

Migrate vpnsite resources to AWS Go SDKv2 #37409

Merged
merged 20 commits into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions internal/acctest/acctest.go
Original file line number Diff line number Diff line change
Expand Up @@ -1932,7 +1932,7 @@ func CheckACMPCACertificateAuthorityActivateRootCA(ctx context.Context, certific
return func(s *terraform.State) error {
conn := Provider.Meta().(*conns.AWSClient).ACMPCAClient(ctx)

if v := string(certificateAuthority.Type); v != string(acmpcatypes.CertificateAuthorityTypeRoot) {
if v := certificateAuthority.Type; v != acmpcatypes.CertificateAuthorityTypeRoot {
return fmt.Errorf("attempting to activate ACM PCA %s Certificate Authority", v)
}

Expand Down Expand Up @@ -2001,7 +2001,7 @@ func CheckACMPCACertificateAuthorityActivateSubordinateCA(ctx context.Context, r
return func(s *terraform.State) error {
conn := Provider.Meta().(*conns.AWSClient).ACMPCAClient(ctx)

if v := string(certificateAuthority.Type); v != string(acmpcatypes.CertificateAuthorityTypeSubordinate) {
if v := certificateAuthority.Type; v != acmpcatypes.CertificateAuthorityTypeSubordinate {
return fmt.Errorf("attempting to activate ACM PCA %s Certificate Authority", v)
}

Expand Down Expand Up @@ -2036,14 +2036,14 @@ func CheckACMPCACertificateAuthorityActivateSubordinateCA(ctx context.Context, r
// Wait for certificate status to become ISSUED.
waiter := acmpca.NewCertificateIssuedWaiter(conn)
params := &acmpca.GetCertificateInput{
CertificateAuthorityArn: aws.String(arn),
CertificateAuthorityArn: aws.String(rootCertificateAuthorityArn),
CertificateArn: issueCertOutput.CertificateArn,
}

err = waiter.Wait(ctx, params, CertificateIssueTimeout)

if err != nil {
return fmt.Errorf("waiting for ACM PCA Certificate Authority (%s) Subordinate CA certificate to become ISSUED: %w", arn, err)
return fmt.Errorf("waiting for ACM PCA Certificate Authority (%s) Subordinate CA certificate (%s) to become ISSUED: %w", arn, aws.StringValue(issueCertOutput.CertificateArn), err)
}

getCertOutput, err := conn.GetCertificate(ctx, &acmpca.GetCertificateInput{
Expand Down
19 changes: 13 additions & 6 deletions internal/service/ec2/exports_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ var (
ResourceInstanceMetadataDefaults = newInstanceMetadataDefaultsResource
ResourceIPAMOrganizationAdminAccount = resourceIPAMOrganizationAdminAccount
ResourceKeyPair = resourceKeyPair
ResourceMainRouteTableAssociation = resourceMainRouteTableAssociation
ResourceNetworkACL = resourceNetworkACL
ResourceNetworkACLRule = resourceNetworkACLRule
ResourceNetworkInterface = resourceNetworkInterface
Expand All @@ -43,20 +44,22 @@ var (
FindClientVPNEndpointByID = findClientVPNEndpointByID
FindClientVPNNetworkAssociationByTwoPartKey = findClientVPNNetworkAssociationByTwoPartKey
FindClientVPNRouteByThreePartKey = findClientVPNRouteByThreePartKey
FindCustomerGatewayByID = findCustomerGatewayByID
FindEBSVolumeAttachment = findVolumeAttachment
FindEIPByAllocationID = findEIPByAllocationID
FindEIPByAssociationID = findEIPByAssociationID
FindEIPDomainNameAttributeByAllocationID = findEIPDomainNameAttributeByAllocationID
FindFastSnapshotRestoreByTwoPartKey = findFastSnapshotRestoreByTwoPartKey
FindInstanceMetadataDefaults = findInstanceMetadataDefaults
FindKeyPairByName = findKeyPairByName
FindMainRouteTableAssociationByID = findMainRouteTableAssociationByID
FindNetworkACLByIDV2 = findNetworkACLByIDV2
FindNetworkInterfaceByIDV2 = findNetworkInterfaceByIDV2
FindRouteByIPv4DestinationV2 = findRouteByIPv4DestinationV2
FindRouteByIPv6DestinationV2 = findRouteByIPv6DestinationV2
FindRouteByPrefixListIDDestinationV2 = findRouteByPrefixListIDDestinationV2
FindRouteTableAssociationByIDV2 = findRouteTableAssociationByIDV2
FindRouteTableByIDV2 = findRouteTableByIDV2
FindRouteByIPv4DestinationV2 = findRouteByIPv4Destination
FindRouteByIPv6DestinationV2 = findRouteByIPv6Destination
FindRouteByPrefixListIDDestinationV2 = findRouteByPrefixListIDDestination
FindRouteTableAssociationByIDV2 = findRouteTableAssociationByID
FindRouteTableByIDV2 = findRouteTableByID
FindVolumeAttachmentInstanceByID = findVolumeAttachmentInstanceByID
FindVPCEndpointByIDV2 = findVPCEndpointByIDV2
FindVPCEndpointConnectionByServiceIDAndVPCEndpointIDV2 = findVPCEndpointConnectionByServiceIDAndVPCEndpointIDV2
Expand All @@ -66,7 +69,11 @@ var (
FindVPCEndpointServiceConfigurationByIDV2 = findVPCEndpointServiceConfigurationByIDV2
FindVPCEndpointServicePermissionV2 = findVPCEndpointServicePermissionV2
FindVPCEndpointSubnetAssociationExistsV2 = findVPCEndpointSubnetAssociationExistsV2
FindVPNGatewayRoutePropagationExistsV2 = findVPNGatewayRoutePropagationExistsV2
FindVPNConnectionByID = findVPNConnectionByID
FindVPNConnectionRouteByTwoPartKey = findVPNConnectionRouteByTwoPartKey
FindVPNGatewayByID = findVPNGatewayByID
FindVPNGatewayVPCAttachmentByTwoPartKey = findVPNGatewayVPCAttachmentByTwoPartKey
FindVPNGatewayRoutePropagationExistsV2 = findVPNGatewayRoutePropagationExists
FlattenNetworkInterfacePrivateIPAddresses = flattenNetworkInterfacePrivateIPAddresses
IPAMServicePrincipal = ipamServicePrincipal
NewAttributeFilterList = newAttributeFilterList
Expand Down
Loading
Loading