@@ -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.
@@ -297,6 +303,21 @@ func (i *Instance) GetPublicIPE(t testing.TestingT) (string, error) {
297303 return i .GetPublicIPContextE (t , context .Background ())
298304}
299305
306+ // GetPublicIp gets the public IP address of the given Compute Instance.
307+ // This will fail the test if there is an error.
308+ //
309+ // Deprecated: Use [Instance.GetPublicIP] instead.
310+ func (i * Instance ) GetPublicIp (t testing.TestingT ) string { //nolint:staticcheck,revive // preserving deprecated method name
311+ return i .GetPublicIP (t )
312+ }
313+
314+ // GetPublicIpE gets the public IP address of the given Compute Instance.
315+ //
316+ // Deprecated: Use [Instance.GetPublicIPE] instead.
317+ func (i * Instance ) GetPublicIpE (t testing.TestingT ) (string , error ) { //nolint:staticcheck,revive // preserving deprecated method name
318+ return i .GetPublicIPE (t )
319+ }
320+
300321// GetPublicIPContextE gets the public IP address of the given Compute Instance.
301322// The ctx parameter supports cancellation and timeouts.
302323// Returns an error (rather than panicking) when the instance has no network interfaces
@@ -555,6 +576,21 @@ func (i *Instance) AddSSHKeyE(t testing.TestingT, username string, publicKey str
555576 return i .AddSSHKeyContextE (t , context .Background (), username , publicKey )
556577}
557578
579+ // AddSshKey adds the given public SSH key to the Compute Instance. Users can SSH in with the given username.
580+ // This will fail the test if there is an error.
581+ //
582+ // Deprecated: Use [Instance.AddSSHKey] instead.
583+ func (i * Instance ) AddSshKey (t testing.TestingT , username string , publicKey string ) { //nolint:staticcheck,revive // preserving deprecated method name
584+ i .AddSSHKey (t , username , publicKey )
585+ }
586+
587+ // AddSshKeyE adds the given public SSH key to the Compute Instance. Users can SSH in with the given username.
588+ //
589+ // Deprecated: Use [Instance.AddSSHKeyE] instead.
590+ func (i * Instance ) AddSshKeyE (t testing.TestingT , username string , publicKey string ) error { //nolint:staticcheck,revive // preserving deprecated method name
591+ return i .AddSSHKeyE (t , username , publicKey )
592+ }
593+
558594// AddSSHKeyContextE adds the given public SSH key to the Compute Instance. Users can SSH in with the given username.
559595// The ctx parameter supports cancellation and timeouts.
560596func (i * Instance ) AddSSHKeyContextE (t testing.TestingT , ctx context.Context , username string , publicKey string ) error {
@@ -661,6 +697,21 @@ func (ig *ZonalInstanceGroup) GetInstanceIDsE(t testing.TestingT) ([]string, err
661697 return ig .GetInstanceIDsContextE (t , context .Background ())
662698}
663699
700+ // GetInstanceIds gets the IDs of Instances in the given Zonal Instance Group.
701+ // This will fail the test if there is an error.
702+ //
703+ // Deprecated: Use [ZonalInstanceGroup.GetInstanceIDs] instead.
704+ func (ig * ZonalInstanceGroup ) GetInstanceIds (t testing.TestingT ) []string { //nolint:staticcheck,revive // preserving deprecated method name
705+ return ig .GetInstanceIDs (t )
706+ }
707+
708+ // GetInstanceIdsE gets the IDs of Instances in the given Zonal Instance Group.
709+ //
710+ // Deprecated: Use [ZonalInstanceGroup.GetInstanceIDsE] instead.
711+ func (ig * ZonalInstanceGroup ) GetInstanceIdsE (t testing.TestingT ) ([]string , error ) { //nolint:staticcheck,revive // preserving deprecated method name
712+ return ig .GetInstanceIDsE (t )
713+ }
714+
664715// GetInstanceIDsContextE gets the IDs of Instances in the given Zonal Instance Group.
665716// The ctx parameter supports cancellation and timeouts.
666717func (ig * ZonalInstanceGroup ) GetInstanceIDsContextE (t testing.TestingT , ctx context.Context ) ([]string , error ) {
@@ -730,6 +781,21 @@ func (ig *RegionalInstanceGroup) GetInstanceIDsE(t testing.TestingT) ([]string,
730781 return ig .GetInstanceIDsContextE (t , context .Background ())
731782}
732783
784+ // GetInstanceIds gets the IDs of Instances in the given Regional Instance Group.
785+ // This will fail the test if there is an error.
786+ //
787+ // Deprecated: Use [RegionalInstanceGroup.GetInstanceIDs] instead.
788+ func (ig * RegionalInstanceGroup ) GetInstanceIds (t testing.TestingT ) []string { //nolint:staticcheck,revive // preserving deprecated method name
789+ return ig .GetInstanceIDs (t )
790+ }
791+
792+ // GetInstanceIdsE gets the IDs of Instances in the given Regional Instance Group.
793+ //
794+ // Deprecated: Use [RegionalInstanceGroup.GetInstanceIDsE] instead.
795+ func (ig * RegionalInstanceGroup ) GetInstanceIdsE (t testing.TestingT ) ([]string , error ) { //nolint:staticcheck,revive // preserving deprecated method name
796+ return ig .GetInstanceIDsE (t )
797+ }
798+
733799// GetInstanceIDsContextE gets the IDs of Instances in the given Regional Instance Group.
734800// The ctx parameter supports cancellation and timeouts.
735801func (ig * RegionalInstanceGroup ) GetInstanceIDsContextE (t testing.TestingT , ctx context.Context ) ([]string , error ) {
@@ -882,6 +948,21 @@ func (ig *ZonalInstanceGroup) GetPublicIPsE(t testing.TestingT, projectID string
882948 return ig .GetPublicIPsContextE (t , context .Background (), projectID )
883949}
884950
951+ // GetPublicIps returns a slice of the public IPs from the given Zonal Instance Group.
952+ // This will fail the test if there is an error.
953+ //
954+ // Deprecated: Use [ZonalInstanceGroup.GetPublicIPs] instead.
955+ func (ig * ZonalInstanceGroup ) GetPublicIps (t testing.TestingT , projectID string ) []string { //nolint:staticcheck,revive // preserving deprecated method name
956+ return ig .GetPublicIPs (t , projectID )
957+ }
958+
959+ // GetPublicIpsE returns a slice of the public IPs from the given Zonal Instance Group.
960+ //
961+ // Deprecated: Use [ZonalInstanceGroup.GetPublicIPsE] instead.
962+ func (ig * ZonalInstanceGroup ) GetPublicIpsE (t testing.TestingT , projectID string ) ([]string , error ) { //nolint:staticcheck,revive // preserving deprecated method name
963+ return ig .GetPublicIPsE (t , projectID )
964+ }
965+
885966// GetPublicIPsContextE returns a slice of the public IPs from the given Zonal Instance Group.
886967// The ctx parameter supports cancellation and timeouts.
887968func (ig * ZonalInstanceGroup ) GetPublicIPsContextE (t testing.TestingT , ctx context.Context , projectID string ) ([]string , error ) {
@@ -913,6 +994,21 @@ func (ig *RegionalInstanceGroup) GetPublicIPsE(t testing.TestingT, projectID str
913994 return ig .GetPublicIPsContextE (t , context .Background (), projectID )
914995}
915996
997+ // GetPublicIps returns a slice of the public IPs from the given Regional Instance Group.
998+ // This will fail the test if there is an error.
999+ //
1000+ // Deprecated: Use [RegionalInstanceGroup.GetPublicIPs] instead.
1001+ func (ig * RegionalInstanceGroup ) GetPublicIps (t testing.TestingT , projectID string ) []string { //nolint:staticcheck,revive // preserving deprecated method name
1002+ return ig .GetPublicIPs (t , projectID )
1003+ }
1004+
1005+ // GetPublicIpsE returns a slice of the public IPs from the given Regional Instance Group.
1006+ //
1007+ // Deprecated: Use [RegionalInstanceGroup.GetPublicIPsE] instead.
1008+ func (ig * RegionalInstanceGroup ) GetPublicIpsE (t testing.TestingT , projectID string ) ([]string , error ) { //nolint:staticcheck,revive // preserving deprecated method name
1009+ return ig .GetPublicIPsE (t , projectID )
1010+ }
1011+
9161012// GetPublicIPsContextE returns a slice of the public IPs from the given Regional Instance Group.
9171013// The ctx parameter supports cancellation and timeouts.
9181014func (ig * RegionalInstanceGroup ) GetPublicIPsContextE (t testing.TestingT , ctx context.Context , projectID string ) ([]string , error ) {
@@ -1131,3 +1227,10 @@ func RandomValidGCPName() string {
11311227
11321228 return "terratest-" + id
11331229}
1230+
1231+ // RandomValidGcpName returns a random, valid name for GCP resources. Many resources in GCP require lowercase letters only.
1232+ //
1233+ // Deprecated: Use [RandomValidGCPName] instead.
1234+ func RandomValidGcpName () string { //nolint:staticcheck,revive // preserving deprecated function name
1235+ return RandomValidGCPName ()
1236+ }
0 commit comments