// Find the nodes in the given Vault Instance Group and return them in a VaultCluster struct
Find the nodes in the given Vault Instance Group and return them in a VaultCluster struct
// Find the nodes in the given Vault Instance Group and return them in a VaultCluster struct
func findVaultClusterNodes(t *testing.T, projectId string, region string, instanceGroupName string, sshUserName string, sshKeyPair *ssh.KeyPair, bastionHost *ssh.Host) *VaultCluster {
	vaultInstanceGroup := gcp.FetchRegionalInstanceGroup(t, projectId, region, instanceGroupName)
	hostnames := getClusterHostnames(t, projectId, vaultInstanceGroup, bastionHost)
	return &VaultCluster{
		Leader: ssh.Host{
			Hostname:    hostnames[0],
			SshUserName: sshUserName,
			SshKeyPair:  sshKeyPair,
		},
		Standby1: ssh.Host{
			Hostname:    hostnames[1],
			SshUserName: sshUserName,
			SshKeyPair:  sshKeyPair,
		},
		Standby2: ssh.Host{
			Hostname:    hostnames[2],
			SshUserName: sshUserName,
			SshKeyPair:  sshKeyPair,
		},
	}
}
func findVaultClusterNodes ( t * testing . T , projectId string , region string , instanceGroupName string , sshUserName string , sshKeyPair * ssh . KeyPair , bastionHost * ssh . Host ) * VaultCluster { vaultInstanceGroup := gcp . FetchRegionalInstanceGroup ( t , projectId , region , instanceGroupName ) hostnames := getClusterHostnames ( t , projectId , vaultInstanceGroup , bastionHost ) return & VaultCluster { Leader : ssh . Host { Hostname : hostnames [ 0 ] , SshUserName : sshUserName , SshKeyPair : sshKeyPair , } , Standby1 : ssh . Host { Hostname : hostnames [ 1 ] , SshUserName : sshUserName , SshKeyPair : sshKeyPair , } , Standby2 : ssh . Host { Hostname : hostnames [ 2 ] , SshUserName : sshUserName , SshKeyPair : sshKeyPair , } , } }
Find the nodes in the given Vault Instance Group and return them in a VaultCluster struct
Find the nodes in the given Vault Instance Group and return them in a VaultCluster struct