Skip to content

Commit 8896a36

Browse files
committed
Remove all deprecated symbols
Delete the v1 deprecated API now that #1869 has migrated every internal caller off it, so this is a near-pure removal with no callers to chase. - 1208 deprecated function and method wrappers deleted. - Promote the 3 aws error types whose deprecated name held the real struct definition (IpForEc2InstanceNotFound, ParameterForDbInstanceNotFound, OptionGroupOptionSettingForDbInstanceNotFound) to their canonical names and drop the aliases. - Trim the gcp InstanceGroup interface to the surviving Context method, since the deprecated methods it declared are gone. - Remove the deprecated helm SetJsonValues field and its back-compat merge, the 3 deprecated aws account-ID constant aliases, and an unused deprecated test helper. Zero Deprecated markers remain. All 16 submodules plus root build and test-compile green; modularization gates pass.
1 parent c5f289d commit 8896a36

149 files changed

Lines changed: 247 additions & 10888 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

modules/aws/account.go

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -43,40 +43,6 @@ func GetAccountIDContext(t testing.TestingT, ctx context.Context) string {
4343
return id
4444
}
4545

46-
// GetAccountID gets the Account ID for the currently logged in IAM User.
47-
//
48-
// Deprecated: Use [GetAccountIDContext] instead.
49-
func GetAccountID(t testing.TestingT) string {
50-
t.Helper()
51-
52-
return GetAccountIDContext(t, context.Background())
53-
}
54-
55-
// GetAccountIDE gets the Account ID for the currently logged in IAM User.
56-
//
57-
// Deprecated: Use [GetAccountIDContextE] instead.
58-
func GetAccountIDE(t testing.TestingT) (string, error) {
59-
return GetAccountIDContextE(t, context.Background())
60-
}
61-
62-
// GetAccountId gets the Account ID for the currently logged in IAM User.
63-
//
64-
// Deprecated: Use [GetAccountID] instead.
65-
//
66-
//nolint:staticcheck,revive // preserving deprecated function name
67-
func GetAccountId(t testing.TestingT) string {
68-
return GetAccountIDContext(t, context.Background())
69-
}
70-
71-
// GetAccountIdE gets the Account ID for the currently logged in IAM User.
72-
//
73-
// Deprecated: Use [GetAccountIDE] instead.
74-
//
75-
//nolint:staticcheck,revive // preserving deprecated function name
76-
func GetAccountIdE(t testing.TestingT) (string, error) {
77-
return GetAccountIDContextE(t, context.Background())
78-
}
79-
8046
// ExtractAccountIDFromARN extracts the AWS account ID from an IAM ARN.
8147
// An IAM ARN is of the format arn:aws:iam::123456789012:user/test. The account ID is the number after arn:aws:iam::,
8248
// so we split on a colon and return the 5th item.
@@ -112,19 +78,3 @@ func NewStsClientContext(t testing.TestingT, ctx context.Context, region string)
11278

11379
return client
11480
}
115-
116-
// NewStsClient creates a new STS client.
117-
//
118-
// Deprecated: Use [NewStsClientContext] instead.
119-
func NewStsClient(t testing.TestingT, region string) *sts.Client {
120-
t.Helper()
121-
122-
return NewStsClientContext(t, context.Background(), region)
123-
}
124-
125-
// NewStsClientE creates a new STS client.
126-
//
127-
// Deprecated: Use [NewStsClientContextE] instead.
128-
func NewStsClientE(t testing.TestingT, region string) (*sts.Client, error) {
129-
return NewStsClientContextE(t, context.Background(), region)
130-
}

modules/aws/acm.go

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -68,22 +68,6 @@ func GetAcmCertificateArnContext(t testing.TestingT, ctx context.Context, awsReg
6868
return arn
6969
}
7070

71-
// GetAcmCertificateArn gets the ACM certificate for the given domain name in the given region.
72-
//
73-
// Deprecated: Use [GetAcmCertificateArnContext] instead.
74-
func GetAcmCertificateArn(t testing.TestingT, awsRegion string, certDomainName string) string {
75-
t.Helper()
76-
77-
return GetAcmCertificateArnContext(t, context.Background(), awsRegion, certDomainName)
78-
}
79-
80-
// GetAcmCertificateArnE gets the ACM certificate for the given domain name in the given region.
81-
//
82-
// Deprecated: Use [GetAcmCertificateArnContextE] instead.
83-
func GetAcmCertificateArnE(t testing.TestingT, awsRegion string, certDomainName string) (string, error) {
84-
return GetAcmCertificateArnContextE(t, context.Background(), awsRegion, certDomainName)
85-
}
86-
8771
// NewAcmClientContextE creates a new ACM client.
8872
// The ctx parameter supports cancellation and timeouts.
8973
func NewAcmClientContextE(t testing.TestingT, ctx context.Context, region string) (*acm.Client, error) {
@@ -106,19 +90,3 @@ func NewAcmClientContext(t testing.TestingT, ctx context.Context, region string)
10690

10791
return client
10892
}
109-
110-
// NewAcmClient creates a new ACM client.
111-
//
112-
// Deprecated: Use [NewAcmClientContext] instead.
113-
func NewAcmClient(t testing.TestingT, region string) *acm.Client {
114-
t.Helper()
115-
116-
return NewAcmClientContext(t, context.Background(), region)
117-
}
118-
119-
// NewAcmClientE creates a new ACM client.
120-
//
121-
// Deprecated: Use [NewAcmClientContextE] instead.
122-
func NewAcmClientE(t testing.TestingT, awsRegion string) (*acm.Client, error) {
123-
return NewAcmClientContextE(t, context.Background(), awsRegion)
124-
}

modules/aws/ami.go

Lines changed: 0 additions & 195 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,6 @@ const (
2222
CentOsAccountID = "679593333241"
2323
// AmazonAccountID is the AWS account ID (or alias) for Amazon.
2424
AmazonAccountID = "amazon"
25-
26-
// Deprecated: Use [CanonicalAccountID] instead.
27-
CanonicalAccountId = CanonicalAccountID //nolint:staticcheck,revive // preserving deprecated constant name
28-
// Deprecated: Use [CentOsAccountID] instead.
29-
CentOsAccountId = CentOsAccountID //nolint:staticcheck,revive // preserving deprecated constant name
30-
// Deprecated: Use [AmazonAccountID] instead.
31-
AmazonAccountId = AmazonAccountID //nolint:staticcheck,revive // preserving deprecated constant name
3225
)
3326

3427
// DeleteAmiAndAllSnapshotsContextE will delete the given AMI along with all EBS snapshots that backed that AMI.
@@ -63,22 +56,6 @@ func DeleteAmiAndAllSnapshotsContext(t testing.TestingT, ctx context.Context, re
6356
require.NoError(t, err)
6457
}
6558

66-
// DeleteAmiAndAllSnapshots will delete the given AMI along with all EBS snapshots that backed that AMI.
67-
//
68-
// Deprecated: Use [DeleteAmiAndAllSnapshotsContext] instead.
69-
func DeleteAmiAndAllSnapshots(t testing.TestingT, region string, ami string) {
70-
t.Helper()
71-
72-
DeleteAmiAndAllSnapshotsContext(t, context.Background(), region, ami)
73-
}
74-
75-
// DeleteAmiAndAllSnapshotsE will delete the given AMI along with all EBS snapshots that backed that AMI.
76-
//
77-
// Deprecated: Use [DeleteAmiAndAllSnapshotsContextE] instead.
78-
func DeleteAmiAndAllSnapshotsE(t testing.TestingT, region string, ami string) error {
79-
return DeleteAmiAndAllSnapshotsContextE(t, context.Background(), region, ami)
80-
}
81-
8259
// GetEbsSnapshotsForAmiContextE retrieves the EBS snapshots which back the given AMI.
8360
// The ctx parameter supports cancellation and timeouts.
8461
func GetEbsSnapshotsForAmiContextE(t testing.TestingT, ctx context.Context, region string, ami string) ([]string, error) {
@@ -124,22 +101,6 @@ func GetEbsSnapshotsForAmiContext(t testing.TestingT, ctx context.Context, regio
124101
return snapshots
125102
}
126103

127-
// GetEbsSnapshotsForAmi retrieves the EBS snapshots which back the given AMI.
128-
//
129-
// Deprecated: Use [GetEbsSnapshotsForAmiContext] instead.
130-
func GetEbsSnapshotsForAmi(t testing.TestingT, region string, ami string) []string {
131-
t.Helper()
132-
133-
return GetEbsSnapshotsForAmiContext(t, context.Background(), region, ami)
134-
}
135-
136-
// GetEbsSnapshotsForAmiE retrieves the EBS snapshots which back the given AMI.
137-
//
138-
// Deprecated: Use [GetEbsSnapshotsForAmiContextE] instead.
139-
func GetEbsSnapshotsForAmiE(t testing.TestingT, region string, ami string) ([]string, error) {
140-
return GetEbsSnapshotsForAmiContextE(t, context.Background(), region, ami)
141-
}
142-
143104
// GetMostRecentAmiIDContextE gets the ID of the most recent AMI in the given region that has the given owner and matches
144105
// the given filters. Each filter should correspond to the name and values of a filter supported by DescribeImagesInput:
145106
// https://docs.aws.amazon.com/sdk-for-go/api/service/ec2/#DescribeImagesInput
@@ -189,46 +150,6 @@ func GetMostRecentAmiIDContext(t testing.TestingT, ctx context.Context, region s
189150
return amiID
190151
}
191152

192-
// GetMostRecentAmiID gets the ID of the most recent AMI in the given region that has the given owner and matches
193-
// the given filters. Each filter should correspond to the name and values of a filter supported by DescribeImagesInput:
194-
// https://docs.aws.amazon.com/sdk-for-go/api/service/ec2/#DescribeImagesInput
195-
//
196-
// Deprecated: Use [GetMostRecentAmiIDContext] instead.
197-
func GetMostRecentAmiID(t testing.TestingT, region string, ownerID string, filters map[string][]string) string {
198-
t.Helper()
199-
200-
return GetMostRecentAmiIDContext(t, context.Background(), region, ownerID, filters)
201-
}
202-
203-
// GetMostRecentAmiIDE gets the ID of the most recent AMI in the given region that has the given owner and matches
204-
// the given filters. Each filter should correspond to the name and values of a filter supported by DescribeImagesInput:
205-
// https://docs.aws.amazon.com/sdk-for-go/api/service/ec2/#DescribeImagesInput
206-
//
207-
// Deprecated: Use [GetMostRecentAmiIDContextE] instead.
208-
func GetMostRecentAmiIDE(t testing.TestingT, region string, ownerID string, filters map[string][]string) (string, error) {
209-
return GetMostRecentAmiIDContextE(t, context.Background(), region, ownerID, filters)
210-
}
211-
212-
// GetMostRecentAmiId gets the ID of the most recent AMI in the given region that has the given owner and matches
213-
// the given filters.
214-
//
215-
// Deprecated: Use [GetMostRecentAmiID] instead.
216-
//
217-
//nolint:staticcheck,revive // preserving deprecated function name
218-
func GetMostRecentAmiId(t testing.TestingT, region string, ownerId string, filters map[string][]string) string {
219-
return GetMostRecentAmiIDContext(t, context.Background(), region, ownerId, filters)
220-
}
221-
222-
// GetMostRecentAmiIdE gets the ID of the most recent AMI in the given region that has the given owner and matches
223-
// the given filters.
224-
//
225-
// Deprecated: Use [GetMostRecentAmiIDE] instead.
226-
//
227-
//nolint:staticcheck,revive // preserving deprecated function name
228-
func GetMostRecentAmiIdE(t testing.TestingT, region string, ownerId string, filters map[string][]string) (string, error) {
229-
return GetMostRecentAmiIDContextE(t, context.Background(), region, ownerId, filters)
230-
}
231-
232153
// Image sorting code borrowed from: https://github.com/hashicorp/packer/blob/7f4112ba229309cfc0ebaa10ded2abdfaf1b22c8/builder/amazon/common/step_source_ami_info.go
233154
type imageSort []types.Image
234155

@@ -274,22 +195,6 @@ func GetUbuntu1404AmiContext(t testing.TestingT, ctx context.Context, region str
274195
return amiID
275196
}
276197

277-
// GetUbuntu1404Ami gets the ID of the most recent Ubuntu 14.04 HVM x86_64 EBS GP2 AMI in the given region.
278-
//
279-
// Deprecated: Use [GetUbuntu1404AmiContext] instead.
280-
func GetUbuntu1404Ami(t testing.TestingT, region string) string {
281-
t.Helper()
282-
283-
return GetUbuntu1404AmiContext(t, context.Background(), region)
284-
}
285-
286-
// GetUbuntu1404AmiE gets the ID of the most recent Ubuntu 14.04 HVM x86_64 EBS GP2 AMI in the given region.
287-
//
288-
// Deprecated: Use [GetUbuntu1404AmiContextE] instead.
289-
func GetUbuntu1404AmiE(t testing.TestingT, region string) (string, error) {
290-
return GetUbuntu1404AmiContextE(t, context.Background(), region)
291-
}
292-
293198
// GetUbuntu1604AmiContextE gets the ID of the most recent Ubuntu 16.04 HVM x86_64 EBS GP2 AMI in the given region.
294199
// The ctx parameter supports cancellation and timeouts.
295200
func GetUbuntu1604AmiContextE(t testing.TestingT, ctx context.Context, region string) (string, error) {
@@ -315,22 +220,6 @@ func GetUbuntu1604AmiContext(t testing.TestingT, ctx context.Context, region str
315220
return amiID
316221
}
317222

318-
// GetUbuntu1604Ami gets the ID of the most recent Ubuntu 16.04 HVM x86_64 EBS GP2 AMI in the given region.
319-
//
320-
// Deprecated: Use [GetUbuntu1604AmiContext] instead.
321-
func GetUbuntu1604Ami(t testing.TestingT, region string) string {
322-
t.Helper()
323-
324-
return GetUbuntu1604AmiContext(t, context.Background(), region)
325-
}
326-
327-
// GetUbuntu1604AmiE gets the ID of the most recent Ubuntu 16.04 HVM x86_64 EBS GP2 AMI in the given region.
328-
//
329-
// Deprecated: Use [GetUbuntu1604AmiContextE] instead.
330-
func GetUbuntu1604AmiE(t testing.TestingT, region string) (string, error) {
331-
return GetUbuntu1604AmiContextE(t, context.Background(), region)
332-
}
333-
334223
// GetUbuntu2004AmiContextE gets the ID of the most recent Ubuntu 20.04 HVM x86_64 EBS GP2 AMI in the given region.
335224
// The ctx parameter supports cancellation and timeouts.
336225
func GetUbuntu2004AmiContextE(t testing.TestingT, ctx context.Context, region string) (string, error) {
@@ -356,22 +245,6 @@ func GetUbuntu2004AmiContext(t testing.TestingT, ctx context.Context, region str
356245
return amiID
357246
}
358247

359-
// GetUbuntu2004Ami gets the ID of the most recent Ubuntu 20.04 HVM x86_64 EBS GP2 AMI in the given region.
360-
//
361-
// Deprecated: Use [GetUbuntu2004AmiContext] instead.
362-
func GetUbuntu2004Ami(t testing.TestingT, region string) string {
363-
t.Helper()
364-
365-
return GetUbuntu2004AmiContext(t, context.Background(), region)
366-
}
367-
368-
// GetUbuntu2004AmiE gets the ID of the most recent Ubuntu 20.04 HVM x86_64 EBS GP2 AMI in the given region.
369-
//
370-
// Deprecated: Use [GetUbuntu2004AmiContextE] instead.
371-
func GetUbuntu2004AmiE(t testing.TestingT, region string) (string, error) {
372-
return GetUbuntu2004AmiContextE(t, context.Background(), region)
373-
}
374-
375248
// GetUbuntu2204AmiContextE gets the ID of the most recent Ubuntu 22.04 HVM x86_64 EBS GP2 AMI in the given region.
376249
// The ctx parameter supports cancellation and timeouts.
377250
func GetUbuntu2204AmiContextE(t testing.TestingT, ctx context.Context, region string) (string, error) {
@@ -397,22 +270,6 @@ func GetUbuntu2204AmiContext(t testing.TestingT, ctx context.Context, region str
397270
return amiID
398271
}
399272

400-
// GetUbuntu2204Ami gets the ID of the most recent Ubuntu 22.04 HVM x86_64 EBS GP2 AMI in the given region.
401-
//
402-
// Deprecated: Use [GetUbuntu2204AmiContext] instead.
403-
func GetUbuntu2204Ami(t testing.TestingT, region string) string {
404-
t.Helper()
405-
406-
return GetUbuntu2204AmiContext(t, context.Background(), region)
407-
}
408-
409-
// GetUbuntu2204AmiE gets the ID of the most recent Ubuntu 22.04 HVM x86_64 EBS GP2 AMI in the given region.
410-
//
411-
// Deprecated: Use [GetUbuntu2204AmiContextE] instead.
412-
func GetUbuntu2204AmiE(t testing.TestingT, region string) (string, error) {
413-
return GetUbuntu2204AmiContextE(t, context.Background(), region)
414-
}
415-
416273
// GetCentos7AmiContextE returns a CentOS 7 public AMI from the given region.
417274
// WARNING: you may have to accept the terms & conditions of this AMI in AWS MarketPlace for your AWS Account before
418275
// you can successfully launch the AMI.
@@ -442,26 +299,6 @@ func GetCentos7AmiContext(t testing.TestingT, ctx context.Context, region string
442299
return amiID
443300
}
444301

445-
// GetCentos7Ami returns a CentOS 7 public AMI from the given region.
446-
// WARNING: you may have to accept the terms & conditions of this AMI in AWS MarketPlace for your AWS Account before
447-
// you can successfully launch the AMI.
448-
//
449-
// Deprecated: Use [GetCentos7AmiContext] instead.
450-
func GetCentos7Ami(t testing.TestingT, region string) string {
451-
t.Helper()
452-
453-
return GetCentos7AmiContext(t, context.Background(), region)
454-
}
455-
456-
// GetCentos7AmiE returns a CentOS 7 public AMI from the given region.
457-
// WARNING: you may have to accept the terms & conditions of this AMI in AWS MarketPlace for your AWS Account before
458-
// you can successfully launch the AMI.
459-
//
460-
// Deprecated: Use [GetCentos7AmiContextE] instead.
461-
func GetCentos7AmiE(t testing.TestingT, region string) (string, error) {
462-
return GetCentos7AmiContextE(t, context.Background(), region)
463-
}
464-
465302
// GetAmazonLinuxAmiContextE returns an Amazon Linux AMI HVM, SSD Volume Type public AMI for the given region.
466303
// The ctx parameter supports cancellation and timeouts.
467304
func GetAmazonLinuxAmiContextE(t testing.TestingT, ctx context.Context, region string) (string, error) {
@@ -487,22 +324,6 @@ func GetAmazonLinuxAmiContext(t testing.TestingT, ctx context.Context, region st
487324
return amiID
488325
}
489326

490-
// GetAmazonLinuxAmi returns an Amazon Linux AMI HVM, SSD Volume Type public AMI for the given region.
491-
//
492-
// Deprecated: Use [GetAmazonLinuxAmiContext] instead.
493-
func GetAmazonLinuxAmi(t testing.TestingT, region string) string {
494-
t.Helper()
495-
496-
return GetAmazonLinuxAmiContext(t, context.Background(), region)
497-
}
498-
499-
// GetAmazonLinuxAmiE returns an Amazon Linux AMI HVM, SSD Volume Type public AMI for the given region.
500-
//
501-
// Deprecated: Use [GetAmazonLinuxAmiContextE] instead.
502-
func GetAmazonLinuxAmiE(t testing.TestingT, region string) (string, error) {
503-
return GetAmazonLinuxAmiContextE(t, context.Background(), region)
504-
}
505-
506327
// GetEcsOptimizedAmazonLinuxAmiContextE returns an Amazon ECS-Optimized Amazon Linux AMI for the given region. This AMI is useful for running an ECS cluster.
507328
// The ctx parameter supports cancellation and timeouts.
508329
func GetEcsOptimizedAmazonLinuxAmiContextE(t testing.TestingT, ctx context.Context, region string) (string, error) {
@@ -528,22 +349,6 @@ func GetEcsOptimizedAmazonLinuxAmiContext(t testing.TestingT, ctx context.Contex
528349
return amiID
529350
}
530351

531-
// GetEcsOptimizedAmazonLinuxAmi returns an Amazon ECS-Optimized Amazon Linux AMI for the given region. This AMI is useful for running an ECS cluster.
532-
//
533-
// Deprecated: Use [GetEcsOptimizedAmazonLinuxAmiContext] instead.
534-
func GetEcsOptimizedAmazonLinuxAmi(t testing.TestingT, region string) string {
535-
t.Helper()
536-
537-
return GetEcsOptimizedAmazonLinuxAmiContext(t, context.Background(), region)
538-
}
539-
540-
// GetEcsOptimizedAmazonLinuxAmiE returns an Amazon ECS-Optimized Amazon Linux AMI for the given region. This AMI is useful for running an ECS cluster.
541-
//
542-
// Deprecated: Use [GetEcsOptimizedAmazonLinuxAmiContextE] instead.
543-
func GetEcsOptimizedAmazonLinuxAmiE(t testing.TestingT, region string) (string, error) {
544-
return GetEcsOptimizedAmazonLinuxAmiContextE(t, context.Background(), region)
545-
}
546-
547352
// NoImagesFound is an error that occurs if no images were found.
548353
type NoImagesFound struct {
549354
Filters map[string][]string

0 commit comments

Comments
 (0)