Google Cloud v9.3.0 published on Tuesday, Oct 7, 2025 by Pulumi
gcp.artifactregistry.getMavenArtifact
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:
- Artifact
Id 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. - Group
Id string - Group ID for the artifact. Example:
com.google.guava
- Location string
- The location of the Artifact Registry repository.
- Repository
Id 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 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. - Group
Id string - Group ID for the artifact. Example:
com.google.guava
- Location string
- The location of the Artifact Registry repository.
- Repository
Id 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 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. - group
Id String - Group ID for the artifact. Example:
com.google.guava
- location String
- The location of the Artifact Registry repository.
- repository
Id 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 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. - group
Id string - Group ID for the artifact. Example:
com.google.guava
- location string
- The location of the Artifact Registry repository.
- repository
Id 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.
- artifact
Id 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. - group
Id String - Group ID for the artifact. Example:
com.google.guava
- location String
- The location of the Artifact Registry repository.
- repository
Id 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:
- Artifact
Id string - Create
Time string - The time the artifact was created.
- Group
Id 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}}
- Pom
Uri 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
- Repository
Id string - Update
Time string - The time the artifact was last updated.
- Version string
- The version of the Maven artifact.
- Project string
- Artifact
Id string - Create
Time string - The time the artifact was created.
- Group
Id 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}}
- Pom
Uri 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
- Repository
Id string - Update
Time string - The time the artifact was last updated.
- Version string
- The version of the Maven artifact.
- Project string
- artifact
Id String - create
Time String - The time the artifact was created.
- group
Id 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}}
- pom
Uri 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
- repository
Id String - update
Time String - The time the artifact was last updated.
- version String
- The version of the Maven artifact.
- project String
- artifact
Id string - create
Time string - The time the artifact was created.
- group
Id 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}}
- pom
Uri 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
- repository
Id string - update
Time 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
- artifact
Id String - create
Time String - The time the artifact was created.
- group
Id 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}}
- pom
Uri 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
- repository
Id String - update
Time 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.