diff --git a/datasource/metadata/cloudsigma/server_context.go b/datasource/metadata/cloudsigma/server_context.go index b618e45..d1a5015 100644 --- a/datasource/metadata/cloudsigma/server_context.go +++ b/datasource/metadata/cloudsigma/server_context.go @@ -108,7 +108,7 @@ func (scs *serverContextService) FetchMetadata() (metadata datasource.Metadata, } metadata.SSHPublicKeys = map[string]string{} - if key, ok := inputMetadata.Meta["ssh_public_key"]; ok { + if key, _ := inputMetadata.Meta["ssh_public_key"]; len(key) > 0 { splitted := strings.Split(key, " ") metadata.SSHPublicKeys[splitted[len(splitted)-1]] = key }