1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. artifactregistry
  5. getMavenArtifact
Google Cloud v9.3.0 published on Tuesday, Oct 7, 2025 by Pulumi

gcp.artifactregistry.getMavenArtifact

Deploy with Pulumi
gcp logo
Google Cloud v9.3.0 published on Tuesday, Oct 7, 2025 by Pulumi

    This data source fetches information from a provided Artifact Registry repository, based on a the latest version of the artifact and optional version.

    Example Usage

    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    
    resources:
      mavenRepo:
        type: gcp:artifactregistry:Repository
        name: maven_repo
        properties:
          location: us-central1
          repositoryId: my-maven-repo
          format: MAVEN
    variables:
      latest:
        fn::invoke:
          function: gcp:artifactregistry:getMavenArtifact
          arguments:
            location: ${mavenRepo.location}
            repositoryId: ${mavenRepo.repositoryId}
            groupId: com.example
            artifactId: my-artifact
      withVersion:
        fn::invoke:
          function: gcp:artifactregistry:getMavenArtifact
          arguments:
            location: ${mavenRepo.location}
            repositoryId: ${mavenRepo.repositoryId}
            artifactName: my-artifact:1.0.0
    

    Using getMavenArtifact

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getMavenArtifact(args: GetMavenArtifactArgs, opts?: InvokeOptions): Promise<GetMavenArtifactResult>
    function getMavenArtifactOutput(args: GetMavenArtifactOutputArgs, opts?: InvokeOptions): Output<GetMavenArtifactResult>
    def get_maven_artifact(artifact_id: Optional[str] = None,
                           group_id: Optional[str] = None,
                           location: Optional[str] = None,
                           project: Optional[str] = None,
                           repository_id: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetMavenArtifactResult
    def get_maven_artifact_output(artifact_id: Optional[pulumi.Input[str]] = None,
                           group_id: Optional[pulumi.Input[str]] = None,
                           location: Optional[pulumi.Input[str]] = None,
                           project: Optional[pulumi.Input[str]] = None,
                           repository_id: Optional[pulumi.Input[str]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetMavenArtifactResult]
    func GetMavenArtifact(ctx *Context, args *GetMavenArtifactArgs, opts ...InvokeOption) (*GetMavenArtifactResult, error)
    func GetMavenArtifactOutput(ctx *Context, args *GetMavenArtifactOutputArgs, opts ...InvokeOption) GetMavenArtifactResultOutput

    > Note: This function is named GetMavenArtifact in the Go SDK.

    public static class GetMavenArtifact 
    {
        public static Task<GetMavenArtifactResult> InvokeAsync(GetMavenArtifactArgs args, InvokeOptions? opts = null)
        public static Output<GetMavenArtifactResult> Invoke(GetMavenArtifactInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetMavenArtifactResult> getMavenArtifact(GetMavenArtifactArgs args, InvokeOptions options)
    public static Output<GetMavenArtifactResult> getMavenArtifact(GetMavenArtifactArgs args, InvokeOptions options)
    
    fn::invoke:
      function: gcp:artifactregistry/getMavenArtifact:getMavenArtifact
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ArtifactId string
    The name of the artifact to fetch. Can optionally include a specific version (e.g., my_artifact:1.2.3). If no version is provided, the latest version is used.
    GroupId string
    Group ID for the artifact. Example: com.google.guava
    Location string
    The location of the Artifact Registry repository.
    RepositoryId string
    The ID of the repository containing the Maven artifact.
    Project string
    The ID of the project that owns the repository. If not provided, the provider-level project is used.
    ArtifactId string
    The name of the artifact to fetch. Can optionally include a specific version (e.g., my_artifact:1.2.3). If no version is provided, the latest version is used.
    GroupId string
    Group ID for the artifact. Example: com.google.guava
    Location string
    The location of the Artifact Registry repository.
    RepositoryId string
    The ID of the repository containing the Maven artifact.
    Project string
    The ID of the project that owns the repository. If not provided, the provider-level project is used.
    artifactId String
    The name of the artifact to fetch. Can optionally include a specific version (e.g., my_artifact:1.2.3). If no version is provided, the latest version is used.
    groupId String
    Group ID for the artifact. Example: com.google.guava
    location String
    The location of the Artifact Registry repository.
    repositoryId String
    The ID of the repository containing the Maven artifact.
    project String
    The ID of the project that owns the repository. If not provided, the provider-level project is used.
    artifactId string
    The name of the artifact to fetch. Can optionally include a specific version (e.g., my_artifact:1.2.3). If no version is provided, the latest version is used.
    groupId string
    Group ID for the artifact. Example: com.google.guava
    location string
    The location of the Artifact Registry repository.
    repositoryId string
    The ID of the repository containing the Maven artifact.
    project string
    The ID of the project that owns the repository. If not provided, the provider-level project is used.
    artifact_id str
    The name of the artifact to fetch. Can optionally include a specific version (e.g., my_artifact:1.2.3). If no version is provided, the latest version is used.
    group_id str
    Group ID for the artifact. Example: com.google.guava
    location str
    The location of the Artifact Registry repository.
    repository_id str
    The ID of the repository containing the Maven artifact.
    project str
    The ID of the project that owns the repository. If not provided, the provider-level project is used.
    artifactId String
    The name of the artifact to fetch. Can optionally include a specific version (e.g., my_artifact:1.2.3). If no version is provided, the latest version is used.
    groupId String
    Group ID for the artifact. Example: com.google.guava
    location String
    The location of the Artifact Registry repository.
    repositoryId String
    The ID of the repository containing the Maven artifact.
    project String
    The ID of the project that owns the repository. If not provided, the provider-level project is used.

    getMavenArtifact Result

    The following output properties are available:

    ArtifactId string
    CreateTime string
    The time the artifact was created.
    GroupId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    Name string
    The fully qualified name of the fetched artifact. Format:

    projects/{{project}}/locations/{{location}}/repositories/{{repository_id}}/mavenArtifacts/{{group_id}}:{{artifact_id}}:{{version}}
    
    PomUri string
    URL to access the pom file of the artifact. Example: us-west4-maven.pkg.dev/test-project/test-repo/com/google/guava/guava/31.0/guava-31.0.pom
    RepositoryId string
    UpdateTime string
    The time the artifact was last updated.
    Version string
    The version of the Maven artifact.
    Project string
    ArtifactId string
    CreateTime string
    The time the artifact was created.
    GroupId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Location string
    Name string
    The fully qualified name of the fetched artifact. Format:

    projects/{{project}}/locations/{{location}}/repositories/{{repository_id}}/mavenArtifacts/{{group_id}}:{{artifact_id}}:{{version}}
    
    PomUri string
    URL to access the pom file of the artifact. Example: us-west4-maven.pkg.dev/test-project/test-repo/com/google/guava/guava/31.0/guava-31.0.pom
    RepositoryId string
    UpdateTime string
    The time the artifact was last updated.
    Version string
    The version of the Maven artifact.
    Project string
    artifactId String
    createTime String
    The time the artifact was created.
    groupId String
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    name String
    The fully qualified name of the fetched artifact. Format:

    projects/{{project}}/locations/{{location}}/repositories/{{repository_id}}/mavenArtifacts/{{group_id}}:{{artifact_id}}:{{version}}
    
    pomUri String
    URL to access the pom file of the artifact. Example: us-west4-maven.pkg.dev/test-project/test-repo/com/google/guava/guava/31.0/guava-31.0.pom
    repositoryId String
    updateTime String
    The time the artifact was last updated.
    version String
    The version of the Maven artifact.
    project String
    artifactId string
    createTime string
    The time the artifact was created.
    groupId string
    id string
    The provider-assigned unique ID for this managed resource.
    location string
    name string
    The fully qualified name of the fetched artifact. Format:

    projects/{{project}}/locations/{{location}}/repositories/{{repository_id}}/mavenArtifacts/{{group_id}}:{{artifact_id}}:{{version}}
    
    pomUri string
    URL to access the pom file of the artifact. Example: us-west4-maven.pkg.dev/test-project/test-repo/com/google/guava/guava/31.0/guava-31.0.pom
    repositoryId string
    updateTime string
    The time the artifact was last updated.
    version string
    The version of the Maven artifact.
    project string
    artifact_id str
    create_time str
    The time the artifact was created.
    group_id str
    id str
    The provider-assigned unique ID for this managed resource.
    location str
    name str
    The fully qualified name of the fetched artifact. Format:

    projects/{{project}}/locations/{{location}}/repositories/{{repository_id}}/mavenArtifacts/{{group_id}}:{{artifact_id}}:{{version}}
    
    pom_uri str
    URL to access the pom file of the artifact. Example: us-west4-maven.pkg.dev/test-project/test-repo/com/google/guava/guava/31.0/guava-31.0.pom
    repository_id str
    update_time str
    The time the artifact was last updated.
    version str
    The version of the Maven artifact.
    project str
    artifactId String
    createTime String
    The time the artifact was created.
    groupId String
    id String
    The provider-assigned unique ID for this managed resource.
    location String
    name String
    The fully qualified name of the fetched artifact. Format:

    projects/{{project}}/locations/{{location}}/repositories/{{repository_id}}/mavenArtifacts/{{group_id}}:{{artifact_id}}:{{version}}
    
    pomUri String
    URL to access the pom file of the artifact. Example: us-west4-maven.pkg.dev/test-project/test-repo/com/google/guava/guava/31.0/guava-31.0.pom
    repositoryId String
    updateTime String
    The time the artifact was last updated.
    version String
    The version of the Maven artifact.
    project String

    Package Details

    Repository
    Google Cloud (GCP) Classic pulumi/pulumi-gcp
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the google-beta Terraform Provider.
    gcp logo
    Google Cloud v9.3.0 published on Tuesday, Oct 7, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate