Skip to content

Commit

Permalink
Merge pull request #37409 from DanielRieske/f/migrate-vpnsite-sdkv2
Browse files Browse the repository at this point in the history
Migrate `vpnsite` resources to AWS Go SDKv2
  • Loading branch information
ewbankkit authored May 21, 2024
2 parents eae23a8 + 1232b93 commit d922391
Show file tree
Hide file tree
Showing 34 changed files with 1,121 additions and 1,498 deletions.
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

0 comments on commit d922391

Please sign in to comment.