diff --git a/google-cloud-clients/google-cloud-core/src/main/java/com/google/cloud/MetadataConfig.java b/google-cloud-clients/google-cloud-core/src/main/java/com/google/cloud/MetadataConfig.java index a285462165a5..9b1ee3ffc635 100644 --- a/google-cloud-clients/google-cloud-core/src/main/java/com/google/cloud/MetadataConfig.java +++ b/google-cloud-clients/google-cloud-core/src/main/java/com/google/cloud/MetadataConfig.java @@ -57,7 +57,7 @@ public static String getClusterName() { return getAttribute("instance/attributes/cluster-name"); } - private static String getAttribute(String attributeName) { + public static String getAttribute(String attributeName) { try { URL url = new URL(METADATA_URL + attributeName); HttpURLConnection connection = (HttpURLConnection) url.openConnection();