@@ -56,6 +56,12 @@ type InstanceGroup interface {
5656 // GetInstanceIDsContextE gets the IDs of Instances in the given Instance Group.
5757 // The ctx parameter supports cancellation and timeouts.
5858 GetInstanceIDsContextE (t testing.TestingT , ctx context.Context ) ([]string , error )
59+
60+ // Deprecated: Use [InstanceGroup.GetInstanceIDs] instead.
61+ GetInstanceIds (t testing.TestingT ) []string //nolint:staticcheck,revive // preserving deprecated method name
62+
63+ // Deprecated: Use [InstanceGroup.GetInstanceIDsE] instead.
64+ GetInstanceIdsE (t testing.TestingT ) ([]string , error ) //nolint:staticcheck,revive // preserving deprecated method name
5965}
6066
6167// FetchInstance queries GCP to return an instance of the Compute Instance type.
@@ -271,6 +277,21 @@ func (i *Instance) GetPublicIPE(t testing.TestingT) (string, error) {
271277 return i .GetPublicIPContextE (t , context .Background ())
272278}
273279
280+ // GetPublicIp gets the public IP address of the given Compute Instance.
281+ // This will fail the test if there is an error.
282+ //
283+ // Deprecated: Use [Instance.GetPublicIP] instead.
284+ func (i * Instance ) GetPublicIp (t testing.TestingT ) string { //nolint:staticcheck,revive // preserving deprecated method name
285+ return i .GetPublicIP (t )
286+ }
287+
288+ // GetPublicIpE gets the public IP address of the given Compute Instance.
289+ //
290+ // Deprecated: Use [Instance.GetPublicIPE] instead.
291+ func (i * Instance ) GetPublicIpE (t testing.TestingT ) (string , error ) { //nolint:staticcheck,revive // preserving deprecated method name
292+ return i .GetPublicIPE (t )
293+ }
294+
274295// GetPublicIPContextE gets the public IP address of the given Compute Instance.
275296// The ctx parameter supports cancellation and timeouts.
276297func (i * Instance ) GetPublicIPContextE (t testing.TestingT , ctx context.Context ) (string , error ) {
@@ -514,6 +535,21 @@ func (i *Instance) AddSSHKeyE(t testing.TestingT, username string, publicKey str
514535 return i .AddSSHKeyContextE (t , context .Background (), username , publicKey )
515536}
516537
538+ // AddSshKey adds the given public SSH key to the Compute Instance. Users can SSH in with the given username.
539+ // This will fail the test if there is an error.
540+ //
541+ // Deprecated: Use [Instance.AddSSHKey] instead.
542+ func (i * Instance ) AddSshKey (t testing.TestingT , username string , publicKey string ) { //nolint:staticcheck,revive // preserving deprecated method name
543+ i .AddSSHKey (t , username , publicKey )
544+ }
545+
546+ // AddSshKeyE adds the given public SSH key to the Compute Instance. Users can SSH in with the given username.
547+ //
548+ // Deprecated: Use [Instance.AddSSHKeyE] instead.
549+ func (i * Instance ) AddSshKeyE (t testing.TestingT , username string , publicKey string ) error { //nolint:staticcheck,revive // preserving deprecated method name
550+ return i .AddSSHKeyE (t , username , publicKey )
551+ }
552+
517553// AddSSHKeyContextE adds the given public SSH key to the Compute Instance. Users can SSH in with the given username.
518554// The ctx parameter supports cancellation and timeouts.
519555func (i * Instance ) AddSSHKeyContextE (t testing.TestingT , ctx context.Context , username string , publicKey string ) error {
@@ -600,6 +636,21 @@ func (ig *ZonalInstanceGroup) GetInstanceIDsE(t testing.TestingT) ([]string, err
600636 return ig .GetInstanceIDsContextE (t , context .Background ())
601637}
602638
639+ // GetInstanceIds gets the IDs of Instances in the given Zonal Instance Group.
640+ // This will fail the test if there is an error.
641+ //
642+ // Deprecated: Use [ZonalInstanceGroup.GetInstanceIDs] instead.
643+ func (ig * ZonalInstanceGroup ) GetInstanceIds (t testing.TestingT ) []string { //nolint:staticcheck,revive // preserving deprecated method name
644+ return ig .GetInstanceIDs (t )
645+ }
646+
647+ // GetInstanceIdsE gets the IDs of Instances in the given Zonal Instance Group.
648+ //
649+ // Deprecated: Use [ZonalInstanceGroup.GetInstanceIDsE] instead.
650+ func (ig * ZonalInstanceGroup ) GetInstanceIdsE (t testing.TestingT ) ([]string , error ) { //nolint:staticcheck,revive // preserving deprecated method name
651+ return ig .GetInstanceIDsE (t )
652+ }
653+
603654// GetInstanceIDsContextE gets the IDs of Instances in the given Zonal Instance Group.
604655// The ctx parameter supports cancellation and timeouts.
605656func (ig * ZonalInstanceGroup ) GetInstanceIDsContextE (t testing.TestingT , ctx context.Context ) ([]string , error ) { //nolint:dupl // zonal and regional implementations differ in API types
@@ -661,6 +712,21 @@ func (ig *RegionalInstanceGroup) GetInstanceIDsE(t testing.TestingT) ([]string,
661712 return ig .GetInstanceIDsContextE (t , context .Background ())
662713}
663714
715+ // GetInstanceIds gets the IDs of Instances in the given Regional Instance Group.
716+ // This will fail the test if there is an error.
717+ //
718+ // Deprecated: Use [RegionalInstanceGroup.GetInstanceIDs] instead.
719+ func (ig * RegionalInstanceGroup ) GetInstanceIds (t testing.TestingT ) []string { //nolint:staticcheck,revive // preserving deprecated method name
720+ return ig .GetInstanceIDs (t )
721+ }
722+
723+ // GetInstanceIdsE gets the IDs of Instances in the given Regional Instance Group.
724+ //
725+ // Deprecated: Use [RegionalInstanceGroup.GetInstanceIDsE] instead.
726+ func (ig * RegionalInstanceGroup ) GetInstanceIdsE (t testing.TestingT ) ([]string , error ) { //nolint:staticcheck,revive // preserving deprecated method name
727+ return ig .GetInstanceIDsE (t )
728+ }
729+
664730// GetInstanceIDsContextE gets the IDs of Instances in the given Regional Instance Group.
665731// The ctx parameter supports cancellation and timeouts.
666732func (ig * RegionalInstanceGroup ) GetInstanceIDsContextE (t testing.TestingT , ctx context.Context ) ([]string , error ) { //nolint:dupl // zonal and regional implementations differ in API types
@@ -805,6 +871,21 @@ func (ig *ZonalInstanceGroup) GetPublicIPsE(t testing.TestingT, projectID string
805871 return ig .GetPublicIPsContextE (t , context .Background (), projectID )
806872}
807873
874+ // GetPublicIps returns a slice of the public IPs from the given Zonal Instance Group.
875+ // This will fail the test if there is an error.
876+ //
877+ // Deprecated: Use [ZonalInstanceGroup.GetPublicIPs] instead.
878+ func (ig * ZonalInstanceGroup ) GetPublicIps (t testing.TestingT , projectID string ) []string { //nolint:staticcheck,revive // preserving deprecated method name
879+ return ig .GetPublicIPs (t , projectID )
880+ }
881+
882+ // GetPublicIpsE returns a slice of the public IPs from the given Zonal Instance Group.
883+ //
884+ // Deprecated: Use [ZonalInstanceGroup.GetPublicIPsE] instead.
885+ func (ig * ZonalInstanceGroup ) GetPublicIpsE (t testing.TestingT , projectID string ) ([]string , error ) { //nolint:staticcheck,revive // preserving deprecated method name
886+ return ig .GetPublicIPsE (t , projectID )
887+ }
888+
808889// GetPublicIPsContextE returns a slice of the public IPs from the given Zonal Instance Group.
809890// The ctx parameter supports cancellation and timeouts.
810891func (ig * ZonalInstanceGroup ) GetPublicIPsContextE (t testing.TestingT , ctx context.Context , projectID string ) ([]string , error ) {
@@ -836,6 +917,21 @@ func (ig *RegionalInstanceGroup) GetPublicIPsE(t testing.TestingT, projectID str
836917 return ig .GetPublicIPsContextE (t , context .Background (), projectID )
837918}
838919
920+ // GetPublicIps returns a slice of the public IPs from the given Regional Instance Group.
921+ // This will fail the test if there is an error.
922+ //
923+ // Deprecated: Use [RegionalInstanceGroup.GetPublicIPs] instead.
924+ func (ig * RegionalInstanceGroup ) GetPublicIps (t testing.TestingT , projectID string ) []string { //nolint:staticcheck,revive // preserving deprecated method name
925+ return ig .GetPublicIPs (t , projectID )
926+ }
927+
928+ // GetPublicIpsE returns a slice of the public IPs from the given Regional Instance Group.
929+ //
930+ // Deprecated: Use [RegionalInstanceGroup.GetPublicIPsE] instead.
931+ func (ig * RegionalInstanceGroup ) GetPublicIpsE (t testing.TestingT , projectID string ) ([]string , error ) { //nolint:staticcheck,revive // preserving deprecated method name
932+ return ig .GetPublicIPsE (t , projectID )
933+ }
934+
839935// GetPublicIPsContextE returns a slice of the public IPs from the given Regional Instance Group.
840936// The ctx parameter supports cancellation and timeouts.
841937func (ig * RegionalInstanceGroup ) GetPublicIPsContextE (t testing.TestingT , ctx context.Context , projectID string ) ([]string , error ) {
@@ -1054,3 +1150,10 @@ func RandomValidGCPName() string {
10541150
10551151 return "terratest-" + id
10561152}
1153+
1154+ // RandomValidGcpName returns a random, valid name for GCP resources. Many resources in GCP require lowercase letters only.
1155+ //
1156+ // Deprecated: Use [RandomValidGCPName] instead.
1157+ func RandomValidGcpName () string { //nolint:staticcheck,revive // preserving deprecated function name
1158+ return RandomValidGCPName ()
1159+ }
0 commit comments