MetastoreFederation

class MetastoreFederation : KotlinCustomResource

Example Usage

Dataproc Metastore Federation Basic

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.dataproc.MetastoreService;
import com.pulumi.gcp.dataproc.MetastoreServiceArgs;
import com.pulumi.gcp.dataproc.inputs.MetastoreServiceHiveMetastoreConfigArgs;
import com.pulumi.gcp.dataproc.MetastoreFederation;
import com.pulumi.gcp.dataproc.MetastoreFederationArgs;
import com.pulumi.gcp.dataproc.inputs.MetastoreFederationBackendMetastoreArgs;
import com.pulumi.resources.CustomResourceOptions;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var defaultMetastoreService = new MetastoreService("defaultMetastoreService", MetastoreServiceArgs.builder()
.serviceId("")
.location("us-central1")
.tier("DEVELOPER")
.hiveMetastoreConfig(MetastoreServiceHiveMetastoreConfigArgs.builder()
.version("3.1.2")
.endpointProtocol("GRPC")
.build())
.build(), CustomResourceOptions.builder()
.provider(google_beta)
.build());
var defaultMetastoreFederation = new MetastoreFederation("defaultMetastoreFederation", MetastoreFederationArgs.builder()
.location("us-central1")
.federationId("")
.version("3.1.2")
.backendMetastores(MetastoreFederationBackendMetastoreArgs.builder()
.rank("1")
.name(defaultMetastoreService.id())
.metastoreType("DATAPROC_METASTORE")
.build())
.build(), CustomResourceOptions.builder()
.provider(google_beta)
.build());
}
}

Dataproc Metastore Federation Bigquery

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.dataproc.MetastoreService;
import com.pulumi.gcp.dataproc.MetastoreServiceArgs;
import com.pulumi.gcp.dataproc.inputs.MetastoreServiceHiveMetastoreConfigArgs;
import com.pulumi.gcp.organizations.OrganizationsFunctions;
import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
import com.pulumi.gcp.dataproc.MetastoreFederation;
import com.pulumi.gcp.dataproc.MetastoreFederationArgs;
import com.pulumi.gcp.dataproc.inputs.MetastoreFederationBackendMetastoreArgs;
import com.pulumi.resources.CustomResourceOptions;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var defaultMetastoreService = new MetastoreService("defaultMetastoreService", MetastoreServiceArgs.builder()
.serviceId("")
.location("us-central1")
.tier("DEVELOPER")
.hiveMetastoreConfig(MetastoreServiceHiveMetastoreConfigArgs.builder()
.version("3.1.2")
.endpointProtocol("GRPC")
.build())
.build(), CustomResourceOptions.builder()
.provider(google_beta)
.build());
final var project = OrganizationsFunctions.getProject();
var defaultMetastoreFederation = new MetastoreFederation("defaultMetastoreFederation", MetastoreFederationArgs.builder()
.location("us-central1")
.federationId("")
.version("3.1.2")
.backendMetastores(
MetastoreFederationBackendMetastoreArgs.builder()
.rank("2")
.name(project.applyValue(getProjectResult -> getProjectResult.id()))
.metastoreType("BIGQUERY")
.build(),
MetastoreFederationBackendMetastoreArgs.builder()
.rank("1")
.name(defaultMetastoreService.id())
.metastoreType("DATAPROC_METASTORE")
.build())
.build(), CustomResourceOptions.builder()
.provider(google_beta)
.build());
}
}

Import

Federation can be imported using any of these accepted formats

$ pulumi import gcp:dataproc/metastoreFederation:MetastoreFederation default projects/{{project}}/locations/{{location}}/federations/{{federation_id}}
$ pulumi import gcp:dataproc/metastoreFederation:MetastoreFederation default {{project}}/{{location}}/{{federation_id}}
$ pulumi import gcp:dataproc/metastoreFederation:MetastoreFederation default {{location}}/{{federation_id}}

Properties

Link copied to clipboard

A map from BackendMetastore rank to BackendMetastores from which the federation service serves metadata at query time. The map key represents the order in which BackendMetastores should be evaluated to resolve database names at query time and should be greater than or equal to zero. A BackendMetastore with a lower number will be evaluated before a BackendMetastore with a higher number. Structure is documented below.

Link copied to clipboard
val endpointUri: Output<String>

The URI of the endpoint used to access the metastore federation.

Link copied to clipboard
val federationId: Output<String>

The ID of the metastore federation. The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). Cannot begin or end with underscore or hyphen. Must consist of between 3 and 63 characters.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val labels: Output<Map<String, String>>?

User-defined labels for the metastore federation.

Link copied to clipboard
val location: Output<String>?

The location where the metastore federation should reside.

Link copied to clipboard
val name: Output<String>

The relative resource name of the metastore that is being federated. The formats of the relative resource names for the currently supported metastores are listed below: Dataplex: projects/{projectId}/locations/{location}/lakes/{lake_id} BigQuery: projects/{projectId} Dataproc Metastore: projects/{projectId}/locations/{location}/services/{serviceId}

Link copied to clipboard
val project: Output<String>

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val state: Output<String>

The current state of the metastore federation.

Link copied to clipboard
val stateMessage: Output<String>

Additional information about the current state of the metastore federation, if available.

Link copied to clipboard
val uid: Output<String>

The globally unique resource identifier of the metastore federation.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val version: Output<String>

The Apache Hive metastore version of the federation. All backend metastore versions must be compatible with the federation version.