gcp.artifactregistry.Repository
Explore with Pulumi AI
A repository for storing artifacts
To get more information about Repository, see:
- API documentation
- How-to Guides
Example Usage
Artifact Registry Repository Basic
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const my_repo = new gcp.artifactregistry.Repository("my-repo", {
location: "us-central1",
repositoryId: "my-repository",
description: "example docker repository",
format: "DOCKER",
});
import pulumi
import pulumi_gcp as gcp
my_repo = gcp.artifactregistry.Repository("my-repo",
location="us-central1",
repository_id="my-repository",
description="example docker repository",
format="DOCKER")
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/artifactregistry"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := artifactregistry.NewRepository(ctx, "my-repo", &artifactregistry.RepositoryArgs{
Location: pulumi.String("us-central1"),
RepositoryId: pulumi.String("my-repository"),
Description: pulumi.String("example docker repository"),
Format: pulumi.String("DOCKER"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var my_repo = new Gcp.ArtifactRegistry.Repository("my-repo", new()
{
Location = "us-central1",
RepositoryId = "my-repository",
Description = "example docker repository",
Format = "DOCKER",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.artifactregistry.Repository;
import com.pulumi.gcp.artifactregistry.RepositoryArgs;
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 my_repo = new Repository("my-repo", RepositoryArgs.builder()
.location("us-central1")
.repositoryId("my-repository")
.description("example docker repository")
.format("DOCKER")
.build());
}
}
resources:
my-repo:
type: gcp:artifactregistry:Repository
properties:
location: us-central1
repositoryId: my-repository
description: example docker repository
format: DOCKER
Artifact Registry Repository Docker
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const my_repo = new gcp.artifactregistry.Repository("my-repo", {
location: "us-central1",
repositoryId: "my-repository",
description: "example docker repository",
format: "DOCKER",
dockerConfig: {
immutableTags: true,
},
});
import pulumi
import pulumi_gcp as gcp
my_repo = gcp.artifactregistry.Repository("my-repo",
location="us-central1",
repository_id="my-repository",
description="example docker repository",
format="DOCKER",
docker_config={
"immutable_tags": True,
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/artifactregistry"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := artifactregistry.NewRepository(ctx, "my-repo", &artifactregistry.RepositoryArgs{
Location: pulumi.String("us-central1"),
RepositoryId: pulumi.String("my-repository"),
Description: pulumi.String("example docker repository"),
Format: pulumi.String("DOCKER"),
DockerConfig: &artifactregistry.RepositoryDockerConfigArgs{
ImmutableTags: pulumi.Bool(true),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var my_repo = new Gcp.ArtifactRegistry.Repository("my-repo", new()
{
Location = "us-central1",
RepositoryId = "my-repository",
Description = "example docker repository",
Format = "DOCKER",
DockerConfig = new Gcp.ArtifactRegistry.Inputs.RepositoryDockerConfigArgs
{
ImmutableTags = true,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.artifactregistry.Repository;
import com.pulumi.gcp.artifactregistry.RepositoryArgs;
import com.pulumi.gcp.artifactregistry.inputs.RepositoryDockerConfigArgs;
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 my_repo = new Repository("my-repo", RepositoryArgs.builder()
.location("us-central1")
.repositoryId("my-repository")
.description("example docker repository")
.format("DOCKER")
.dockerConfig(RepositoryDockerConfigArgs.builder()
.immutableTags(true)
.build())
.build());
}
}
resources:
my-repo:
type: gcp:artifactregistry:Repository
properties:
location: us-central1
repositoryId: my-repository
description: example docker repository
format: DOCKER
dockerConfig:
immutableTags: true
Artifact Registry Repository Cmek
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const project = gcp.organizations.getProject({});
const cryptoKey = new gcp.kms.CryptoKeyIAMMember("crypto_key", {
cryptoKeyId: "kms-key",
role: "roles/cloudkms.cryptoKeyEncrypterDecrypter",
member: project.then(project => `serviceAccount:service-${project.number}@gcp-sa-artifactregistry.iam.gserviceaccount.com`),
});
const my_repo = new gcp.artifactregistry.Repository("my-repo", {
location: "us-central1",
repositoryId: "my-repository",
description: "example docker repository with cmek",
format: "DOCKER",
kmsKeyName: "kms-key",
}, {
dependsOn: [cryptoKey],
});
import pulumi
import pulumi_gcp as gcp
project = gcp.organizations.get_project()
crypto_key = gcp.kms.CryptoKeyIAMMember("crypto_key",
crypto_key_id="kms-key",
role="roles/cloudkms.cryptoKeyEncrypterDecrypter",
member=f"serviceAccount:service-{project.number}@gcp-sa-artifactregistry.iam.gserviceaccount.com")
my_repo = gcp.artifactregistry.Repository("my-repo",
location="us-central1",
repository_id="my-repository",
description="example docker repository with cmek",
format="DOCKER",
kms_key_name="kms-key",
opts = pulumi.ResourceOptions(depends_on=[crypto_key]))
package main
import (
"fmt"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/artifactregistry"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/kms"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/organizations"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
project, err := organizations.LookupProject(ctx, &organizations.LookupProjectArgs{}, nil)
if err != nil {
return err
}
cryptoKey, err := kms.NewCryptoKeyIAMMember(ctx, "crypto_key", &kms.CryptoKeyIAMMemberArgs{
CryptoKeyId: pulumi.String("kms-key"),
Role: pulumi.String("roles/cloudkms.cryptoKeyEncrypterDecrypter"),
Member: pulumi.Sprintf("serviceAccount:service-%v@gcp-sa-artifactregistry.iam.gserviceaccount.com", project.Number),
})
if err != nil {
return err
}
_, err = artifactregistry.NewRepository(ctx, "my-repo", &artifactregistry.RepositoryArgs{
Location: pulumi.String("us-central1"),
RepositoryId: pulumi.String("my-repository"),
Description: pulumi.String("example docker repository with cmek"),
Format: pulumi.String("DOCKER"),
KmsKeyName: pulumi.String("kms-key"),
}, pulumi.DependsOn([]pulumi.Resource{
cryptoKey,
}))
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var project = Gcp.Organizations.GetProject.Invoke();
var cryptoKey = new Gcp.Kms.CryptoKeyIAMMember("crypto_key", new()
{
CryptoKeyId = "kms-key",
Role = "roles/cloudkms.cryptoKeyEncrypterDecrypter",
Member = $"serviceAccount:service-{project.Apply(getProjectResult => getProjectResult.Number)}@gcp-sa-artifactregistry.iam.gserviceaccount.com",
});
var my_repo = new Gcp.ArtifactRegistry.Repository("my-repo", new()
{
Location = "us-central1",
RepositoryId = "my-repository",
Description = "example docker repository with cmek",
Format = "DOCKER",
KmsKeyName = "kms-key",
}, new CustomResourceOptions
{
DependsOn =
{
cryptoKey,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.organizations.OrganizationsFunctions;
import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
import com.pulumi.gcp.kms.CryptoKeyIAMMember;
import com.pulumi.gcp.kms.CryptoKeyIAMMemberArgs;
import com.pulumi.gcp.artifactregistry.Repository;
import com.pulumi.gcp.artifactregistry.RepositoryArgs;
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) {
final var project = OrganizationsFunctions.getProject();
var cryptoKey = new CryptoKeyIAMMember("cryptoKey", CryptoKeyIAMMemberArgs.builder()
.cryptoKeyId("kms-key")
.role("roles/cloudkms.cryptoKeyEncrypterDecrypter")
.member(String.format("serviceAccount:service-%s@gcp-sa-artifactregistry.iam.gserviceaccount.com", project.applyValue(getProjectResult -> getProjectResult.number())))
.build());
var my_repo = new Repository("my-repo", RepositoryArgs.builder()
.location("us-central1")
.repositoryId("my-repository")
.description("example docker repository with cmek")
.format("DOCKER")
.kmsKeyName("kms-key")
.build(), CustomResourceOptions.builder()
.dependsOn(cryptoKey)
.build());
}
}
resources:
my-repo:
type: gcp:artifactregistry:Repository
properties:
location: us-central1
repositoryId: my-repository
description: example docker repository with cmek
format: DOCKER
kmsKeyName: kms-key
options:
dependson:
- ${cryptoKey}
cryptoKey:
type: gcp:kms:CryptoKeyIAMMember
name: crypto_key
properties:
cryptoKeyId: kms-key
role: roles/cloudkms.cryptoKeyEncrypterDecrypter
member: serviceAccount:service-${project.number}@gcp-sa-artifactregistry.iam.gserviceaccount.com
variables:
project:
fn::invoke:
Function: gcp:organizations:getProject
Arguments: {}
Artifact Registry Repository Virtual
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const my_repo_upstream_1 = new gcp.artifactregistry.Repository("my-repo-upstream-1", {
location: "us-central1",
repositoryId: "my-repository-upstream-1",
description: "example docker repository (upstream source) 1",
format: "DOCKER",
});
const my_repo_upstream_2 = new gcp.artifactregistry.Repository("my-repo-upstream-2", {
location: "us-central1",
repositoryId: "my-repository-upstream-2",
description: "example docker repository (upstream source) 2",
format: "DOCKER",
});
const my_repo = new gcp.artifactregistry.Repository("my-repo", {
location: "us-central1",
repositoryId: "my-repository",
description: "example virtual docker repository",
format: "DOCKER",
mode: "VIRTUAL_REPOSITORY",
virtualRepositoryConfig: {
upstreamPolicies: [
{
id: "my-repository-upstream-1",
repository: my_repo_upstream_1.id,
priority: 20,
},
{
id: "my-repository-upstream-2",
repository: my_repo_upstream_2.id,
priority: 10,
},
],
},
});
import pulumi
import pulumi_gcp as gcp
my_repo_upstream_1 = gcp.artifactregistry.Repository("my-repo-upstream-1",
location="us-central1",
repository_id="my-repository-upstream-1",
description="example docker repository (upstream source) 1",
format="DOCKER")
my_repo_upstream_2 = gcp.artifactregistry.Repository("my-repo-upstream-2",
location="us-central1",
repository_id="my-repository-upstream-2",
description="example docker repository (upstream source) 2",
format="DOCKER")
my_repo = gcp.artifactregistry.Repository("my-repo",
location="us-central1",
repository_id="my-repository",
description="example virtual docker repository",
format="DOCKER",
mode="VIRTUAL_REPOSITORY",
virtual_repository_config={
"upstream_policies": [
{
"id": "my-repository-upstream-1",
"repository": my_repo_upstream_1.id,
"priority": 20,
},
{
"id": "my-repository-upstream-2",
"repository": my_repo_upstream_2.id,
"priority": 10,
},
],
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/artifactregistry"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := artifactregistry.NewRepository(ctx, "my-repo-upstream-1", &artifactregistry.RepositoryArgs{
Location: pulumi.String("us-central1"),
RepositoryId: pulumi.String("my-repository-upstream-1"),
Description: pulumi.String("example docker repository (upstream source) 1"),
Format: pulumi.String("DOCKER"),
})
if err != nil {
return err
}
_, err = artifactregistry.NewRepository(ctx, "my-repo-upstream-2", &artifactregistry.RepositoryArgs{
Location: pulumi.String("us-central1"),
RepositoryId: pulumi.String("my-repository-upstream-2"),
Description: pulumi.String("example docker repository (upstream source) 2"),
Format: pulumi.String("DOCKER"),
})
if err != nil {
return err
}
_, err = artifactregistry.NewRepository(ctx, "my-repo", &artifactregistry.RepositoryArgs{
Location: pulumi.String("us-central1"),
RepositoryId: pulumi.String("my-repository"),
Description: pulumi.String("example virtual docker repository"),
Format: pulumi.String("DOCKER"),
Mode: pulumi.String("VIRTUAL_REPOSITORY"),
VirtualRepositoryConfig: &artifactregistry.RepositoryVirtualRepositoryConfigArgs{
UpstreamPolicies: artifactregistry.RepositoryVirtualRepositoryConfigUpstreamPolicyArray{
&artifactregistry.RepositoryVirtualRepositoryConfigUpstreamPolicyArgs{
Id: pulumi.String("my-repository-upstream-1"),
Repository: my_repo_upstream_1.ID(),
Priority: pulumi.Int(20),
},
&artifactregistry.RepositoryVirtualRepositoryConfigUpstreamPolicyArgs{
Id: pulumi.String("my-repository-upstream-2"),
Repository: my_repo_upstream_2.ID(),
Priority: pulumi.Int(10),
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var my_repo_upstream_1 = new Gcp.ArtifactRegistry.Repository("my-repo-upstream-1", new()
{
Location = "us-central1",
RepositoryId = "my-repository-upstream-1",
Description = "example docker repository (upstream source) 1",
Format = "DOCKER",
});
var my_repo_upstream_2 = new Gcp.ArtifactRegistry.Repository("my-repo-upstream-2", new()
{
Location = "us-central1",
RepositoryId = "my-repository-upstream-2",
Description = "example docker repository (upstream source) 2",
Format = "DOCKER",
});
var my_repo = new Gcp.ArtifactRegistry.Repository("my-repo", new()
{
Location = "us-central1",
RepositoryId = "my-repository",
Description = "example virtual docker repository",
Format = "DOCKER",
Mode = "VIRTUAL_REPOSITORY",
VirtualRepositoryConfig = new Gcp.ArtifactRegistry.Inputs.RepositoryVirtualRepositoryConfigArgs
{
UpstreamPolicies = new[]
{
new Gcp.ArtifactRegistry.Inputs.RepositoryVirtualRepositoryConfigUpstreamPolicyArgs
{
Id = "my-repository-upstream-1",
Repository = my_repo_upstream_1.Id,
Priority = 20,
},
new Gcp.ArtifactRegistry.Inputs.RepositoryVirtualRepositoryConfigUpstreamPolicyArgs
{
Id = "my-repository-upstream-2",
Repository = my_repo_upstream_2.Id,
Priority = 10,
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.artifactregistry.Repository;
import com.pulumi.gcp.artifactregistry.RepositoryArgs;
import com.pulumi.gcp.artifactregistry.inputs.RepositoryVirtualRepositoryConfigArgs;
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 my_repo_upstream_1 = new Repository("my-repo-upstream-1", RepositoryArgs.builder()
.location("us-central1")
.repositoryId("my-repository-upstream-1")
.description("example docker repository (upstream source) 1")
.format("DOCKER")
.build());
var my_repo_upstream_2 = new Repository("my-repo-upstream-2", RepositoryArgs.builder()
.location("us-central1")
.repositoryId("my-repository-upstream-2")
.description("example docker repository (upstream source) 2")
.format("DOCKER")
.build());
var my_repo = new Repository("my-repo", RepositoryArgs.builder()
.location("us-central1")
.repositoryId("my-repository")
.description("example virtual docker repository")
.format("DOCKER")
.mode("VIRTUAL_REPOSITORY")
.virtualRepositoryConfig(RepositoryVirtualRepositoryConfigArgs.builder()
.upstreamPolicies(
RepositoryVirtualRepositoryConfigUpstreamPolicyArgs.builder()
.id("my-repository-upstream-1")
.repository(my_repo_upstream_1.id())
.priority(20)
.build(),
RepositoryVirtualRepositoryConfigUpstreamPolicyArgs.builder()
.id("my-repository-upstream-2")
.repository(my_repo_upstream_2.id())
.priority(10)
.build())
.build())
.build());
}
}
resources:
my-repo-upstream-1:
type: gcp:artifactregistry:Repository
properties:
location: us-central1
repositoryId: my-repository-upstream-1
description: example docker repository (upstream source) 1
format: DOCKER
my-repo-upstream-2:
type: gcp:artifactregistry:Repository
properties:
location: us-central1
repositoryId: my-repository-upstream-2
description: example docker repository (upstream source) 2
format: DOCKER
my-repo:
type: gcp:artifactregistry:Repository
properties:
location: us-central1
repositoryId: my-repository
description: example virtual docker repository
format: DOCKER
mode: VIRTUAL_REPOSITORY
virtualRepositoryConfig:
upstreamPolicies:
- id: my-repository-upstream-1
repository: ${["my-repo-upstream-1"].id}
priority: 20
- id: my-repository-upstream-2
repository: ${["my-repo-upstream-2"].id}
priority: 10
Artifact Registry Repository Remote
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const my_repo = new gcp.artifactregistry.Repository("my-repo", {
location: "us-central1",
repositoryId: "my-repository",
description: "example remote docker repository",
format: "DOCKER",
mode: "REMOTE_REPOSITORY",
remoteRepositoryConfig: {
description: "docker hub",
dockerRepository: {
publicRepository: "DOCKER_HUB",
},
},
});
import pulumi
import pulumi_gcp as gcp
my_repo = gcp.artifactregistry.Repository("my-repo",
location="us-central1",
repository_id="my-repository",
description="example remote docker repository",
format="DOCKER",
mode="REMOTE_REPOSITORY",
remote_repository_config={
"description": "docker hub",
"docker_repository": {
"public_repository": "DOCKER_HUB",
},
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/artifactregistry"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := artifactregistry.NewRepository(ctx, "my-repo", &artifactregistry.RepositoryArgs{
Location: pulumi.String("us-central1"),
RepositoryId: pulumi.String("my-repository"),
Description: pulumi.String("example remote docker repository"),
Format: pulumi.String("DOCKER"),
Mode: pulumi.String("REMOTE_REPOSITORY"),
RemoteRepositoryConfig: &artifactregistry.RepositoryRemoteRepositoryConfigArgs{
Description: pulumi.String("docker hub"),
DockerRepository: &artifactregistry.RepositoryRemoteRepositoryConfigDockerRepositoryArgs{
PublicRepository: pulumi.String("DOCKER_HUB"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var my_repo = new Gcp.ArtifactRegistry.Repository("my-repo", new()
{
Location = "us-central1",
RepositoryId = "my-repository",
Description = "example remote docker repository",
Format = "DOCKER",
Mode = "REMOTE_REPOSITORY",
RemoteRepositoryConfig = new Gcp.ArtifactRegistry.Inputs.RepositoryRemoteRepositoryConfigArgs
{
Description = "docker hub",
DockerRepository = new Gcp.ArtifactRegistry.Inputs.RepositoryRemoteRepositoryConfigDockerRepositoryArgs
{
PublicRepository = "DOCKER_HUB",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.artifactregistry.Repository;
import com.pulumi.gcp.artifactregistry.RepositoryArgs;
import com.pulumi.gcp.artifactregistry.inputs.RepositoryRemoteRepositoryConfigArgs;
import com.pulumi.gcp.artifactregistry.inputs.RepositoryRemoteRepositoryConfigDockerRepositoryArgs;
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 my_repo = new Repository("my-repo", RepositoryArgs.builder()
.location("us-central1")
.repositoryId("my-repository")
.description("example remote docker repository")
.format("DOCKER")
.mode("REMOTE_REPOSITORY")
.remoteRepositoryConfig(RepositoryRemoteRepositoryConfigArgs.builder()
.description("docker hub")
.dockerRepository(RepositoryRemoteRepositoryConfigDockerRepositoryArgs.builder()
.publicRepository("DOCKER_HUB")
.build())
.build())
.build());
}
}
resources:
my-repo:
type: gcp:artifactregistry:Repository
properties:
location: us-central1
repositoryId: my-repository
description: example remote docker repository
format: DOCKER
mode: REMOTE_REPOSITORY
remoteRepositoryConfig:
description: docker hub
dockerRepository:
publicRepository: DOCKER_HUB
Artifact Registry Repository Remote Apt
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const my_repo = new gcp.artifactregistry.Repository("my-repo", {
location: "us-central1",
repositoryId: "debian-buster",
description: "example remote apt repository",
format: "APT",
mode: "REMOTE_REPOSITORY",
remoteRepositoryConfig: {
description: "Debian buster remote repository",
aptRepository: {
publicRepository: {
repositoryBase: "DEBIAN",
repositoryPath: "debian/dists/buster",
},
},
},
});
import pulumi
import pulumi_gcp as gcp
my_repo = gcp.artifactregistry.Repository("my-repo",
location="us-central1",
repository_id="debian-buster",
description="example remote apt repository",
format="APT",
mode="REMOTE_REPOSITORY",
remote_repository_config={
"description": "Debian buster remote repository",
"apt_repository": {
"public_repository": {
"repository_base": "DEBIAN",
"repository_path": "debian/dists/buster",
},
},
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/artifactregistry"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := artifactregistry.NewRepository(ctx, "my-repo", &artifactregistry.RepositoryArgs{
Location: pulumi.String("us-central1"),
RepositoryId: pulumi.String("debian-buster"),
Description: pulumi.String("example remote apt repository"),
Format: pulumi.String("APT"),
Mode: pulumi.String("REMOTE_REPOSITORY"),
RemoteRepositoryConfig: &artifactregistry.RepositoryRemoteRepositoryConfigArgs{
Description: pulumi.String("Debian buster remote repository"),
AptRepository: &artifactregistry.RepositoryRemoteRepositoryConfigAptRepositoryArgs{
PublicRepository: &artifactregistry.RepositoryRemoteRepositoryConfigAptRepositoryPublicRepositoryArgs{
RepositoryBase: pulumi.String("DEBIAN"),
RepositoryPath: pulumi.String("debian/dists/buster"),
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var my_repo = new Gcp.ArtifactRegistry.Repository("my-repo", new()
{
Location = "us-central1",
RepositoryId = "debian-buster",
Description = "example remote apt repository",
Format = "APT",
Mode = "REMOTE_REPOSITORY",
RemoteRepositoryConfig = new Gcp.ArtifactRegistry.Inputs.RepositoryRemoteRepositoryConfigArgs
{
Description = "Debian buster remote repository",
AptRepository = new Gcp.ArtifactRegistry.Inputs.RepositoryRemoteRepositoryConfigAptRepositoryArgs
{
PublicRepository = new Gcp.ArtifactRegistry.Inputs.RepositoryRemoteRepositoryConfigAptRepositoryPublicRepositoryArgs
{
RepositoryBase = "DEBIAN",
RepositoryPath = "debian/dists/buster",
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.artifactregistry.Repository;
import com.pulumi.gcp.artifactregistry.RepositoryArgs;
import com.pulumi.gcp.artifactregistry.inputs.RepositoryRemoteRepositoryConfigArgs;
import com.pulumi.gcp.artifactregistry.inputs.RepositoryRemoteRepositoryConfigAptRepositoryArgs;
import com.pulumi.gcp.artifactregistry.inputs.RepositoryRemoteRepositoryConfigAptRepositoryPublicRepositoryArgs;
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 my_repo = new Repository("my-repo", RepositoryArgs.builder()
.location("us-central1")
.repositoryId("debian-buster")
.description("example remote apt repository")
.format("APT")
.mode("REMOTE_REPOSITORY")
.remoteRepositoryConfig(RepositoryRemoteRepositoryConfigArgs.builder()
.description("Debian buster remote repository")
.aptRepository(RepositoryRemoteRepositoryConfigAptRepositoryArgs.builder()
.publicRepository(RepositoryRemoteRepositoryConfigAptRepositoryPublicRepositoryArgs.builder()
.repositoryBase("DEBIAN")
.repositoryPath("debian/dists/buster")
.build())
.build())
.build())
.build());
}
}
resources:
my-repo:
type: gcp:artifactregistry:Repository
properties:
location: us-central1
repositoryId: debian-buster
description: example remote apt repository
format: APT
mode: REMOTE_REPOSITORY
remoteRepositoryConfig:
description: Debian buster remote repository
aptRepository:
publicRepository:
repositoryBase: DEBIAN
repositoryPath: debian/dists/buster
Artifact Registry Repository Remote Yum
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const my_repo = new gcp.artifactregistry.Repository("my-repo", {
location: "us-central1",
repositoryId: "rocky-9",
description: "example remote yum repository",
format: "YUM",
mode: "REMOTE_REPOSITORY",
remoteRepositoryConfig: {
description: "Rocky 9 remote repository",
yumRepository: {
publicRepository: {
repositoryBase: "ROCKY",
repositoryPath: "pub/rocky/9/BaseOS/x86_64/os",
},
},
},
});
import pulumi
import pulumi_gcp as gcp
my_repo = gcp.artifactregistry.Repository("my-repo",
location="us-central1",
repository_id="rocky-9",
description="example remote yum repository",
format="YUM",
mode="REMOTE_REPOSITORY",
remote_repository_config={
"description": "Rocky 9 remote repository",
"yum_repository": {
"public_repository": {
"repository_base": "ROCKY",
"repository_path": "pub/rocky/9/BaseOS/x86_64/os",
},
},
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/artifactregistry"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := artifactregistry.NewRepository(ctx, "my-repo", &artifactregistry.RepositoryArgs{
Location: pulumi.String("us-central1"),
RepositoryId: pulumi.String("rocky-9"),
Description: pulumi.String("example remote yum repository"),
Format: pulumi.String("YUM"),
Mode: pulumi.String("REMOTE_REPOSITORY"),
RemoteRepositoryConfig: &artifactregistry.RepositoryRemoteRepositoryConfigArgs{
Description: pulumi.String("Rocky 9 remote repository"),
YumRepository: &artifactregistry.RepositoryRemoteRepositoryConfigYumRepositoryArgs{
PublicRepository: &artifactregistry.RepositoryRemoteRepositoryConfigYumRepositoryPublicRepositoryArgs{
RepositoryBase: pulumi.String("ROCKY"),
RepositoryPath: pulumi.String("pub/rocky/9/BaseOS/x86_64/os"),
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var my_repo = new Gcp.ArtifactRegistry.Repository("my-repo", new()
{
Location = "us-central1",
RepositoryId = "rocky-9",
Description = "example remote yum repository",
Format = "YUM",
Mode = "REMOTE_REPOSITORY",
RemoteRepositoryConfig = new Gcp.ArtifactRegistry.Inputs.RepositoryRemoteRepositoryConfigArgs
{
Description = "Rocky 9 remote repository",
YumRepository = new Gcp.ArtifactRegistry.Inputs.RepositoryRemoteRepositoryConfigYumRepositoryArgs
{
PublicRepository = new Gcp.ArtifactRegistry.Inputs.RepositoryRemoteRepositoryConfigYumRepositoryPublicRepositoryArgs
{
RepositoryBase = "ROCKY",
RepositoryPath = "pub/rocky/9/BaseOS/x86_64/os",
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.artifactregistry.Repository;
import com.pulumi.gcp.artifactregistry.RepositoryArgs;
import com.pulumi.gcp.artifactregistry.inputs.RepositoryRemoteRepositoryConfigArgs;
import com.pulumi.gcp.artifactregistry.inputs.RepositoryRemoteRepositoryConfigYumRepositoryArgs;
import com.pulumi.gcp.artifactregistry.inputs.RepositoryRemoteRepositoryConfigYumRepositoryPublicRepositoryArgs;
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 my_repo = new Repository("my-repo", RepositoryArgs.builder()
.location("us-central1")
.repositoryId("rocky-9")
.description("example remote yum repository")
.format("YUM")
.mode("REMOTE_REPOSITORY")
.remoteRepositoryConfig(RepositoryRemoteRepositoryConfigArgs.builder()
.description("Rocky 9 remote repository")
.yumRepository(RepositoryRemoteRepositoryConfigYumRepositoryArgs.builder()
.publicRepository(RepositoryRemoteRepositoryConfigYumRepositoryPublicRepositoryArgs.builder()
.repositoryBase("ROCKY")
.repositoryPath("pub/rocky/9/BaseOS/x86_64/os")
.build())
.build())
.build())
.build());
}
}
resources:
my-repo:
type: gcp:artifactregistry:Repository
properties:
location: us-central1
repositoryId: rocky-9
description: example remote yum repository
format: YUM
mode: REMOTE_REPOSITORY
remoteRepositoryConfig:
description: Rocky 9 remote repository
yumRepository:
publicRepository:
repositoryBase: ROCKY
repositoryPath: pub/rocky/9/BaseOS/x86_64/os
Artifact Registry Repository Cleanup
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const my_repo = new gcp.artifactregistry.Repository("my-repo", {
location: "us-central1",
repositoryId: "my-repository",
description: "example docker repository with cleanup policies",
format: "DOCKER",
cleanupPolicyDryRun: false,
cleanupPolicies: [
{
id: "delete-prerelease",
action: "DELETE",
condition: {
tagState: "TAGGED",
tagPrefixes: [
"alpha",
"v0",
],
olderThan: "2592000s",
},
},
{
id: "keep-tagged-release",
action: "KEEP",
condition: {
tagState: "TAGGED",
tagPrefixes: ["release"],
packageNamePrefixes: [
"webapp",
"mobile",
],
},
},
{
id: "keep-minimum-versions",
action: "KEEP",
mostRecentVersions: {
packageNamePrefixes: [
"webapp",
"mobile",
"sandbox",
],
keepCount: 5,
},
},
],
});
import pulumi
import pulumi_gcp as gcp
my_repo = gcp.artifactregistry.Repository("my-repo",
location="us-central1",
repository_id="my-repository",
description="example docker repository with cleanup policies",
format="DOCKER",
cleanup_policy_dry_run=False,
cleanup_policies=[
{
"id": "delete-prerelease",
"action": "DELETE",
"condition": {
"tag_state": "TAGGED",
"tag_prefixes": [
"alpha",
"v0",
],
"older_than": "2592000s",
},
},
{
"id": "keep-tagged-release",
"action": "KEEP",
"condition": {
"tag_state": "TAGGED",
"tag_prefixes": ["release"],
"package_name_prefixes": [
"webapp",
"mobile",
],
},
},
{
"id": "keep-minimum-versions",
"action": "KEEP",
"most_recent_versions": {
"package_name_prefixes": [
"webapp",
"mobile",
"sandbox",
],
"keep_count": 5,
},
},
])
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/artifactregistry"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := artifactregistry.NewRepository(ctx, "my-repo", &artifactregistry.RepositoryArgs{
Location: pulumi.String("us-central1"),
RepositoryId: pulumi.String("my-repository"),
Description: pulumi.String("example docker repository with cleanup policies"),
Format: pulumi.String("DOCKER"),
CleanupPolicyDryRun: pulumi.Bool(false),
CleanupPolicies: artifactregistry.RepositoryCleanupPolicyArray{
&artifactregistry.RepositoryCleanupPolicyArgs{
Id: pulumi.String("delete-prerelease"),
Action: pulumi.String("DELETE"),
Condition: &artifactregistry.RepositoryCleanupPolicyConditionArgs{
TagState: pulumi.String("TAGGED"),
TagPrefixes: pulumi.StringArray{
pulumi.String("alpha"),
pulumi.String("v0"),
},
OlderThan: pulumi.String("2592000s"),
},
},
&artifactregistry.RepositoryCleanupPolicyArgs{
Id: pulumi.String("keep-tagged-release"),
Action: pulumi.String("KEEP"),
Condition: &artifactregistry.RepositoryCleanupPolicyConditionArgs{
TagState: pulumi.String("TAGGED"),
TagPrefixes: pulumi.StringArray{
pulumi.String("release"),
},
PackageNamePrefixes: pulumi.StringArray{
pulumi.String("webapp"),
pulumi.String("mobile"),
},
},
},
&artifactregistry.RepositoryCleanupPolicyArgs{
Id: pulumi.String("keep-minimum-versions"),
Action: pulumi.String("KEEP"),
MostRecentVersions: &artifactregistry.RepositoryCleanupPolicyMostRecentVersionsArgs{
PackageNamePrefixes: pulumi.StringArray{
pulumi.String("webapp"),
pulumi.String("mobile"),
pulumi.String("sandbox"),
},
KeepCount: pulumi.Int(5),
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var my_repo = new Gcp.ArtifactRegistry.Repository("my-repo", new()
{
Location = "us-central1",
RepositoryId = "my-repository",
Description = "example docker repository with cleanup policies",
Format = "DOCKER",
CleanupPolicyDryRun = false,
CleanupPolicies = new[]
{
new Gcp.ArtifactRegistry.Inputs.RepositoryCleanupPolicyArgs
{
Id = "delete-prerelease",
Action = "DELETE",
Condition = new Gcp.ArtifactRegistry.Inputs.RepositoryCleanupPolicyConditionArgs
{
TagState = "TAGGED",
TagPrefixes = new[]
{
"alpha",
"v0",
},
OlderThan = "2592000s",
},
},
new Gcp.ArtifactRegistry.Inputs.RepositoryCleanupPolicyArgs
{
Id = "keep-tagged-release",
Action = "KEEP",
Condition = new Gcp.ArtifactRegistry.Inputs.RepositoryCleanupPolicyConditionArgs
{
TagState = "TAGGED",
TagPrefixes = new[]
{
"release",
},
PackageNamePrefixes = new[]
{
"webapp",
"mobile",
},
},
},
new Gcp.ArtifactRegistry.Inputs.RepositoryCleanupPolicyArgs
{
Id = "keep-minimum-versions",
Action = "KEEP",
MostRecentVersions = new Gcp.ArtifactRegistry.Inputs.RepositoryCleanupPolicyMostRecentVersionsArgs
{
PackageNamePrefixes = new[]
{
"webapp",
"mobile",
"sandbox",
},
KeepCount = 5,
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.artifactregistry.Repository;
import com.pulumi.gcp.artifactregistry.RepositoryArgs;
import com.pulumi.gcp.artifactregistry.inputs.RepositoryCleanupPolicyArgs;
import com.pulumi.gcp.artifactregistry.inputs.RepositoryCleanupPolicyConditionArgs;
import com.pulumi.gcp.artifactregistry.inputs.RepositoryCleanupPolicyMostRecentVersionsArgs;
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 my_repo = new Repository("my-repo", RepositoryArgs.builder()
.location("us-central1")
.repositoryId("my-repository")
.description("example docker repository with cleanup policies")
.format("DOCKER")
.cleanupPolicyDryRun(false)
.cleanupPolicies(
RepositoryCleanupPolicyArgs.builder()
.id("delete-prerelease")
.action("DELETE")
.condition(RepositoryCleanupPolicyConditionArgs.builder()
.tagState("TAGGED")
.tagPrefixes(
"alpha",
"v0")
.olderThan("2592000s")
.build())
.build(),
RepositoryCleanupPolicyArgs.builder()
.id("keep-tagged-release")
.action("KEEP")
.condition(RepositoryCleanupPolicyConditionArgs.builder()
.tagState("TAGGED")
.tagPrefixes("release")
.packageNamePrefixes(
"webapp",
"mobile")
.build())
.build(),
RepositoryCleanupPolicyArgs.builder()
.id("keep-minimum-versions")
.action("KEEP")
.mostRecentVersions(RepositoryCleanupPolicyMostRecentVersionsArgs.builder()
.packageNamePrefixes(
"webapp",
"mobile",
"sandbox")
.keepCount(5)
.build())
.build())
.build());
}
}
resources:
my-repo:
type: gcp:artifactregistry:Repository
properties:
location: us-central1
repositoryId: my-repository
description: example docker repository with cleanup policies
format: DOCKER
cleanupPolicyDryRun: false
cleanupPolicies:
- id: delete-prerelease
action: DELETE
condition:
tagState: TAGGED
tagPrefixes:
- alpha
- v0
olderThan: 2592000s
- id: keep-tagged-release
action: KEEP
condition:
tagState: TAGGED
tagPrefixes:
- release
packageNamePrefixes:
- webapp
- mobile
- id: keep-minimum-versions
action: KEEP
mostRecentVersions:
packageNamePrefixes:
- webapp
- mobile
- sandbox
keepCount: 5
Artifact Registry Repository Remote Dockerhub Auth
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const project = gcp.organizations.getProject({});
const example_remote_secret = new gcp.secretmanager.Secret("example-remote-secret", {
secretId: "example-secret",
replication: {
auto: {},
},
});
const example_remote_secretVersion = new gcp.secretmanager.SecretVersion("example-remote-secret_version", {
secret: example_remote_secret.id,
secretData: "remote-password",
});
const secret_access = new gcp.secretmanager.SecretIamMember("secret-access", {
secretId: example_remote_secret.id,
role: "roles/secretmanager.secretAccessor",
member: project.then(project => `serviceAccount:service-${project.number}@gcp-sa-artifactregistry.iam.gserviceaccount.com`),
});
const my_repo = new gcp.artifactregistry.Repository("my-repo", {
location: "us-central1",
repositoryId: "example-dockerhub-remote",
description: "example remote dockerhub repository with credentials",
format: "DOCKER",
mode: "REMOTE_REPOSITORY",
remoteRepositoryConfig: {
description: "docker hub with custom credentials",
disableUpstreamValidation: true,
dockerRepository: {
publicRepository: "DOCKER_HUB",
},
upstreamCredentials: {
usernamePasswordCredentials: {
username: "remote-username",
passwordSecretVersion: example_remote_secretVersion.name,
},
},
},
});
import pulumi
import pulumi_gcp as gcp
project = gcp.organizations.get_project()
example_remote_secret = gcp.secretmanager.Secret("example-remote-secret",
secret_id="example-secret",
replication={
"auto": {},
})
example_remote_secret_version = gcp.secretmanager.SecretVersion("example-remote-secret_version",
secret=example_remote_secret.id,
secret_data="remote-password")
secret_access = gcp.secretmanager.SecretIamMember("secret-access",
secret_id=example_remote_secret.id,
role="roles/secretmanager.secretAccessor",
member=f"serviceAccount:service-{project.number}@gcp-sa-artifactregistry.iam.gserviceaccount.com")
my_repo = gcp.artifactregistry.Repository("my-repo",
location="us-central1",
repository_id="example-dockerhub-remote",
description="example remote dockerhub repository with credentials",
format="DOCKER",
mode="REMOTE_REPOSITORY",
remote_repository_config={
"description": "docker hub with custom credentials",
"disable_upstream_validation": True,
"docker_repository": {
"public_repository": "DOCKER_HUB",
},
"upstream_credentials": {
"username_password_credentials": {
"username": "remote-username",
"password_secret_version": example_remote_secret_version.name,
},
},
})
package main
import (
"fmt"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/artifactregistry"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/organizations"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/secretmanager"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
project, err := organizations.LookupProject(ctx, &organizations.LookupProjectArgs{}, nil)
if err != nil {
return err
}
_, err = secretmanager.NewSecret(ctx, "example-remote-secret", &secretmanager.SecretArgs{
SecretId: pulumi.String("example-secret"),
Replication: &secretmanager.SecretReplicationArgs{
Auto: &secretmanager.SecretReplicationAutoArgs{},
},
})
if err != nil {
return err
}
_, err = secretmanager.NewSecretVersion(ctx, "example-remote-secret_version", &secretmanager.SecretVersionArgs{
Secret: example_remote_secret.ID(),
SecretData: pulumi.String("remote-password"),
})
if err != nil {
return err
}
_, err = secretmanager.NewSecretIamMember(ctx, "secret-access", &secretmanager.SecretIamMemberArgs{
SecretId: example_remote_secret.ID(),
Role: pulumi.String("roles/secretmanager.secretAccessor"),
Member: pulumi.Sprintf("serviceAccount:service-%v@gcp-sa-artifactregistry.iam.gserviceaccount.com", project.Number),
})
if err != nil {
return err
}
_, err = artifactregistry.NewRepository(ctx, "my-repo", &artifactregistry.RepositoryArgs{
Location: pulumi.String("us-central1"),
RepositoryId: pulumi.String("example-dockerhub-remote"),
Description: pulumi.String("example remote dockerhub repository with credentials"),
Format: pulumi.String("DOCKER"),
Mode: pulumi.String("REMOTE_REPOSITORY"),
RemoteRepositoryConfig: &artifactregistry.RepositoryRemoteRepositoryConfigArgs{
Description: pulumi.String("docker hub with custom credentials"),
DisableUpstreamValidation: pulumi.Bool(true),
DockerRepository: &artifactregistry.RepositoryRemoteRepositoryConfigDockerRepositoryArgs{
PublicRepository: pulumi.String("DOCKER_HUB"),
},
UpstreamCredentials: &artifactregistry.RepositoryRemoteRepositoryConfigUpstreamCredentialsArgs{
UsernamePasswordCredentials: &artifactregistry.RepositoryRemoteRepositoryConfigUpstreamCredentialsUsernamePasswordCredentialsArgs{
Username: pulumi.String("remote-username"),
PasswordSecretVersion: example_remote_secretVersion.Name,
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var project = Gcp.Organizations.GetProject.Invoke();
var example_remote_secret = new Gcp.SecretManager.Secret("example-remote-secret", new()
{
SecretId = "example-secret",
Replication = new Gcp.SecretManager.Inputs.SecretReplicationArgs
{
Auto = null,
},
});
var example_remote_secretVersion = new Gcp.SecretManager.SecretVersion("example-remote-secret_version", new()
{
Secret = example_remote_secret.Id,
SecretData = "remote-password",
});
var secret_access = new Gcp.SecretManager.SecretIamMember("secret-access", new()
{
SecretId = example_remote_secret.Id,
Role = "roles/secretmanager.secretAccessor",
Member = $"serviceAccount:service-{project.Apply(getProjectResult => getProjectResult.Number)}@gcp-sa-artifactregistry.iam.gserviceaccount.com",
});
var my_repo = new Gcp.ArtifactRegistry.Repository("my-repo", new()
{
Location = "us-central1",
RepositoryId = "example-dockerhub-remote",
Description = "example remote dockerhub repository with credentials",
Format = "DOCKER",
Mode = "REMOTE_REPOSITORY",
RemoteRepositoryConfig = new Gcp.ArtifactRegistry.Inputs.RepositoryRemoteRepositoryConfigArgs
{
Description = "docker hub with custom credentials",
DisableUpstreamValidation = true,
DockerRepository = new Gcp.ArtifactRegistry.Inputs.RepositoryRemoteRepositoryConfigDockerRepositoryArgs
{
PublicRepository = "DOCKER_HUB",
},
UpstreamCredentials = new Gcp.ArtifactRegistry.Inputs.RepositoryRemoteRepositoryConfigUpstreamCredentialsArgs
{
UsernamePasswordCredentials = new Gcp.ArtifactRegistry.Inputs.RepositoryRemoteRepositoryConfigUpstreamCredentialsUsernamePasswordCredentialsArgs
{
Username = "remote-username",
PasswordSecretVersion = example_remote_secretVersion.Name,
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.organizations.OrganizationsFunctions;
import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
import com.pulumi.gcp.secretmanager.Secret;
import com.pulumi.gcp.secretmanager.SecretArgs;
import com.pulumi.gcp.secretmanager.inputs.SecretReplicationArgs;
import com.pulumi.gcp.secretmanager.inputs.SecretReplicationAutoArgs;
import com.pulumi.gcp.secretmanager.SecretVersion;
import com.pulumi.gcp.secretmanager.SecretVersionArgs;
import com.pulumi.gcp.secretmanager.SecretIamMember;
import com.pulumi.gcp.secretmanager.SecretIamMemberArgs;
import com.pulumi.gcp.artifactregistry.Repository;
import com.pulumi.gcp.artifactregistry.RepositoryArgs;
import com.pulumi.gcp.artifactregistry.inputs.RepositoryRemoteRepositoryConfigArgs;
import com.pulumi.gcp.artifactregistry.inputs.RepositoryRemoteRepositoryConfigDockerRepositoryArgs;
import com.pulumi.gcp.artifactregistry.inputs.RepositoryRemoteRepositoryConfigUpstreamCredentialsArgs;
import com.pulumi.gcp.artifactregistry.inputs.RepositoryRemoteRepositoryConfigUpstreamCredentialsUsernamePasswordCredentialsArgs;
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) {
final var project = OrganizationsFunctions.getProject();
var example_remote_secret = new Secret("example-remote-secret", SecretArgs.builder()
.secretId("example-secret")
.replication(SecretReplicationArgs.builder()
.auto()
.build())
.build());
var example_remote_secretVersion = new SecretVersion("example-remote-secretVersion", SecretVersionArgs.builder()
.secret(example_remote_secret.id())
.secretData("remote-password")
.build());
var secret_access = new SecretIamMember("secret-access", SecretIamMemberArgs.builder()
.secretId(example_remote_secret.id())
.role("roles/secretmanager.secretAccessor")
.member(String.format("serviceAccount:service-%s@gcp-sa-artifactregistry.iam.gserviceaccount.com", project.applyValue(getProjectResult -> getProjectResult.number())))
.build());
var my_repo = new Repository("my-repo", RepositoryArgs.builder()
.location("us-central1")
.repositoryId("example-dockerhub-remote")
.description("example remote dockerhub repository with credentials")
.format("DOCKER")
.mode("REMOTE_REPOSITORY")
.remoteRepositoryConfig(RepositoryRemoteRepositoryConfigArgs.builder()
.description("docker hub with custom credentials")
.disableUpstreamValidation(true)
.dockerRepository(RepositoryRemoteRepositoryConfigDockerRepositoryArgs.builder()
.publicRepository("DOCKER_HUB")
.build())
.upstreamCredentials(RepositoryRemoteRepositoryConfigUpstreamCredentialsArgs.builder()
.usernamePasswordCredentials(RepositoryRemoteRepositoryConfigUpstreamCredentialsUsernamePasswordCredentialsArgs.builder()
.username("remote-username")
.passwordSecretVersion(example_remote_secretVersion.name())
.build())
.build())
.build())
.build());
}
}
resources:
example-remote-secret:
type: gcp:secretmanager:Secret
properties:
secretId: example-secret
replication:
auto: {}
example-remote-secretVersion:
type: gcp:secretmanager:SecretVersion
name: example-remote-secret_version
properties:
secret: ${["example-remote-secret"].id}
secretData: remote-password
secret-access:
type: gcp:secretmanager:SecretIamMember
properties:
secretId: ${["example-remote-secret"].id}
role: roles/secretmanager.secretAccessor
member: serviceAccount:service-${project.number}@gcp-sa-artifactregistry.iam.gserviceaccount.com
my-repo:
type: gcp:artifactregistry:Repository
properties:
location: us-central1
repositoryId: example-dockerhub-remote
description: example remote dockerhub repository with credentials
format: DOCKER
mode: REMOTE_REPOSITORY
remoteRepositoryConfig:
description: docker hub with custom credentials
disableUpstreamValidation: true
dockerRepository:
publicRepository: DOCKER_HUB
upstreamCredentials:
usernamePasswordCredentials:
username: remote-username
passwordSecretVersion: ${["example-remote-secretVersion"].name}
variables:
project:
fn::invoke:
Function: gcp:organizations:getProject
Arguments: {}
Artifact Registry Repository Remote Docker Custom With Auth
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const project = gcp.organizations.getProject({});
const example_remote_secret = new gcp.secretmanager.Secret("example-remote-secret", {
secretId: "example-secret",
replication: {
auto: {},
},
});
const example_remote_secretVersion = new gcp.secretmanager.SecretVersion("example-remote-secret_version", {
secret: example_remote_secret.id,
secretData: "remote-password",
});
const secret_access = new gcp.secretmanager.SecretIamMember("secret-access", {
secretId: example_remote_secret.id,
role: "roles/secretmanager.secretAccessor",
member: project.then(project => `serviceAccount:service-${project.number}@gcp-sa-artifactregistry.iam.gserviceaccount.com`),
});
const my_repo = new gcp.artifactregistry.Repository("my-repo", {
location: "us-central1",
repositoryId: "example-docker-custom-remote",
description: "example remote custom docker repository with credentials",
format: "DOCKER",
mode: "REMOTE_REPOSITORY",
remoteRepositoryConfig: {
description: "custom docker remote with credentials",
disableUpstreamValidation: true,
dockerRepository: {
customRepository: {
uri: "https://registry-1.docker.io",
},
},
upstreamCredentials: {
usernamePasswordCredentials: {
username: "remote-username",
passwordSecretVersion: example_remote_secretVersion.name,
},
},
},
});
import pulumi
import pulumi_gcp as gcp
project = gcp.organizations.get_project()
example_remote_secret = gcp.secretmanager.Secret("example-remote-secret",
secret_id="example-secret",
replication={
"auto": {},
})
example_remote_secret_version = gcp.secretmanager.SecretVersion("example-remote-secret_version",
secret=example_remote_secret.id,
secret_data="remote-password")
secret_access = gcp.secretmanager.SecretIamMember("secret-access",
secret_id=example_remote_secret.id,
role="roles/secretmanager.secretAccessor",
member=f"serviceAccount:service-{project.number}@gcp-sa-artifactregistry.iam.gserviceaccount.com")
my_repo = gcp.artifactregistry.Repository("my-repo",
location="us-central1",
repository_id="example-docker-custom-remote",
description="example remote custom docker repository with credentials",
format="DOCKER",
mode="REMOTE_REPOSITORY",
remote_repository_config={
"description": "custom docker remote with credentials",
"disable_upstream_validation": True,
"docker_repository": {
"custom_repository": {
"uri": "https://registry-1.docker.io",
},
},
"upstream_credentials": {
"username_password_credentials": {
"username": "remote-username",
"password_secret_version": example_remote_secret_version.name,
},
},
})
package main
import (
"fmt"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/artifactregistry"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/organizations"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/secretmanager"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
project, err := organizations.LookupProject(ctx, &organizations.LookupProjectArgs{}, nil)
if err != nil {
return err
}
_, err = secretmanager.NewSecret(ctx, "example-remote-secret", &secretmanager.SecretArgs{
SecretId: pulumi.String("example-secret"),
Replication: &secretmanager.SecretReplicationArgs{
Auto: &secretmanager.SecretReplicationAutoArgs{},
},
})
if err != nil {
return err
}
_, err = secretmanager.NewSecretVersion(ctx, "example-remote-secret_version", &secretmanager.SecretVersionArgs{
Secret: example_remote_secret.ID(),
SecretData: pulumi.String("remote-password"),
})
if err != nil {
return err
}
_, err = secretmanager.NewSecretIamMember(ctx, "secret-access", &secretmanager.SecretIamMemberArgs{
SecretId: example_remote_secret.ID(),
Role: pulumi.String("roles/secretmanager.secretAccessor"),
Member: pulumi.Sprintf("serviceAccount:service-%v@gcp-sa-artifactregistry.iam.gserviceaccount.com", project.Number),
})
if err != nil {
return err
}
_, err = artifactregistry.NewRepository(ctx, "my-repo", &artifactregistry.RepositoryArgs{
Location: pulumi.String("us-central1"),
RepositoryId: pulumi.String("example-docker-custom-remote"),
Description: pulumi.String("example remote custom docker repository with credentials"),
Format: pulumi.String("DOCKER"),
Mode: pulumi.String("REMOTE_REPOSITORY"),
RemoteRepositoryConfig: &artifactregistry.RepositoryRemoteRepositoryConfigArgs{
Description: pulumi.String("custom docker remote with credentials"),
DisableUpstreamValidation: pulumi.Bool(true),
DockerRepository: &artifactregistry.RepositoryRemoteRepositoryConfigDockerRepositoryArgs{
CustomRepository: &artifactregistry.RepositoryRemoteRepositoryConfigDockerRepositoryCustomRepositoryArgs{
Uri: pulumi.String("https://registry-1.docker.io"),
},
},
UpstreamCredentials: &artifactregistry.RepositoryRemoteRepositoryConfigUpstreamCredentialsArgs{
UsernamePasswordCredentials: &artifactregistry.RepositoryRemoteRepositoryConfigUpstreamCredentialsUsernamePasswordCredentialsArgs{
Username: pulumi.String("remote-username"),
PasswordSecretVersion: example_remote_secretVersion.Name,
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var project = Gcp.Organizations.GetProject.Invoke();
var example_remote_secret = new Gcp.SecretManager.Secret("example-remote-secret", new()
{
SecretId = "example-secret",
Replication = new Gcp.SecretManager.Inputs.SecretReplicationArgs
{
Auto = null,
},
});
var example_remote_secretVersion = new Gcp.SecretManager.SecretVersion("example-remote-secret_version", new()
{
Secret = example_remote_secret.Id,
SecretData = "remote-password",
});
var secret_access = new Gcp.SecretManager.SecretIamMember("secret-access", new()
{
SecretId = example_remote_secret.Id,
Role = "roles/secretmanager.secretAccessor",
Member = $"serviceAccount:service-{project.Apply(getProjectResult => getProjectResult.Number)}@gcp-sa-artifactregistry.iam.gserviceaccount.com",
});
var my_repo = new Gcp.ArtifactRegistry.Repository("my-repo", new()
{
Location = "us-central1",
RepositoryId = "example-docker-custom-remote",
Description = "example remote custom docker repository with credentials",
Format = "DOCKER",
Mode = "REMOTE_REPOSITORY",
RemoteRepositoryConfig = new Gcp.ArtifactRegistry.Inputs.RepositoryRemoteRepositoryConfigArgs
{
Description = "custom docker remote with credentials",
DisableUpstreamValidation = true,
DockerRepository = new Gcp.ArtifactRegistry.Inputs.RepositoryRemoteRepositoryConfigDockerRepositoryArgs
{
CustomRepository = new Gcp.ArtifactRegistry.Inputs.RepositoryRemoteRepositoryConfigDockerRepositoryCustomRepositoryArgs
{
Uri = "https://registry-1.docker.io",
},
},
UpstreamCredentials = new Gcp.ArtifactRegistry.Inputs.RepositoryRemoteRepositoryConfigUpstreamCredentialsArgs
{
UsernamePasswordCredentials = new Gcp.ArtifactRegistry.Inputs.RepositoryRemoteRepositoryConfigUpstreamCredentialsUsernamePasswordCredentialsArgs
{
Username = "remote-username",
PasswordSecretVersion = example_remote_secretVersion.Name,
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.organizations.OrganizationsFunctions;
import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
import com.pulumi.gcp.secretmanager.Secret;
import com.pulumi.gcp.secretmanager.SecretArgs;
import com.pulumi.gcp.secretmanager.inputs.SecretReplicationArgs;
import com.pulumi.gcp.secretmanager.inputs.SecretReplicationAutoArgs;
import com.pulumi.gcp.secretmanager.SecretVersion;
import com.pulumi.gcp.secretmanager.SecretVersionArgs;
import com.pulumi.gcp.secretmanager.SecretIamMember;
import com.pulumi.gcp.secretmanager.SecretIamMemberArgs;
import com.pulumi.gcp.artifactregistry.Repository;
import com.pulumi.gcp.artifactregistry.RepositoryArgs;
import com.pulumi.gcp.artifactregistry.inputs.RepositoryRemoteRepositoryConfigArgs;
import com.pulumi.gcp.artifactregistry.inputs.RepositoryRemoteRepositoryConfigDockerRepositoryArgs;
import com.pulumi.gcp.artifactregistry.inputs.RepositoryRemoteRepositoryConfigDockerRepositoryCustomRepositoryArgs;
import com.pulumi.gcp.artifactregistry.inputs.RepositoryRemoteRepositoryConfigUpstreamCredentialsArgs;
import com.pulumi.gcp.artifactregistry.inputs.RepositoryRemoteRepositoryConfigUpstreamCredentialsUsernamePasswordCredentialsArgs;
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) {
final var project = OrganizationsFunctions.getProject();
var example_remote_secret = new Secret("example-remote-secret", SecretArgs.builder()
.secretId("example-secret")
.replication(SecretReplicationArgs.builder()
.auto()
.build())
.build());
var example_remote_secretVersion = new SecretVersion("example-remote-secretVersion", SecretVersionArgs.builder()
.secret(example_remote_secret.id())
.secretData("remote-password")
.build());
var secret_access = new SecretIamMember("secret-access", SecretIamMemberArgs.builder()
.secretId(example_remote_secret.id())
.role("roles/secretmanager.secretAccessor")
.member(String.format("serviceAccount:service-%s@gcp-sa-artifactregistry.iam.gserviceaccount.com", project.applyValue(getProjectResult -> getProjectResult.number())))
.build());
var my_repo = new Repository("my-repo", RepositoryArgs.builder()
.location("us-central1")
.repositoryId("example-docker-custom-remote")
.description("example remote custom docker repository with credentials")
.format("DOCKER")
.mode("REMOTE_REPOSITORY")
.remoteRepositoryConfig(RepositoryRemoteRepositoryConfigArgs.builder()
.description("custom docker remote with credentials")
.disableUpstreamValidation(true)
.dockerRepository(RepositoryRemoteRepositoryConfigDockerRepositoryArgs.builder()
.customRepository(RepositoryRemoteRepositoryConfigDockerRepositoryCustomRepositoryArgs.builder()
.uri("https://registry-1.docker.io")
.build())
.build())
.upstreamCredentials(RepositoryRemoteRepositoryConfigUpstreamCredentialsArgs.builder()
.usernamePasswordCredentials(RepositoryRemoteRepositoryConfigUpstreamCredentialsUsernamePasswordCredentialsArgs.builder()
.username("remote-username")
.passwordSecretVersion(example_remote_secretVersion.name())
.build())
.build())
.build())
.build());
}
}
resources:
example-remote-secret:
type: gcp:secretmanager:Secret
properties:
secretId: example-secret
replication:
auto: {}
example-remote-secretVersion:
type: gcp:secretmanager:SecretVersion
name: example-remote-secret_version
properties:
secret: ${["example-remote-secret"].id}
secretData: remote-password
secret-access:
type: gcp:secretmanager:SecretIamMember
properties:
secretId: ${["example-remote-secret"].id}
role: roles/secretmanager.secretAccessor
member: serviceAccount:service-${project.number}@gcp-sa-artifactregistry.iam.gserviceaccount.com
my-repo:
type: gcp:artifactregistry:Repository
properties:
location: us-central1
repositoryId: example-docker-custom-remote
description: example remote custom docker repository with credentials
format: DOCKER
mode: REMOTE_REPOSITORY
remoteRepositoryConfig:
description: custom docker remote with credentials
disableUpstreamValidation: true
dockerRepository:
customRepository:
uri: https://registry-1.docker.io
upstreamCredentials:
usernamePasswordCredentials:
username: remote-username
passwordSecretVersion: ${["example-remote-secretVersion"].name}
variables:
project:
fn::invoke:
Function: gcp:organizations:getProject
Arguments: {}
Artifact Registry Repository Remote Maven Custom With Auth
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const project = gcp.organizations.getProject({});
const example_remote_secret = new gcp.secretmanager.Secret("example-remote-secret", {
secretId: "example-secret",
replication: {
auto: {},
},
});
const example_remote_secretVersion = new gcp.secretmanager.SecretVersion("example-remote-secret_version", {
secret: example_remote_secret.id,
secretData: "remote-password",
});
const secret_access = new gcp.secretmanager.SecretIamMember("secret-access", {
secretId: example_remote_secret.id,
role: "roles/secretmanager.secretAccessor",
member: project.then(project => `serviceAccount:service-${project.number}@gcp-sa-artifactregistry.iam.gserviceaccount.com`),
});
const my_repo = new gcp.artifactregistry.Repository("my-repo", {
location: "us-central1",
repositoryId: "example-maven-custom-remote",
description: "example remote custom maven repository with credentials",
format: "MAVEN",
mode: "REMOTE_REPOSITORY",
remoteRepositoryConfig: {
description: "custom maven remote with credentials",
disableUpstreamValidation: true,
mavenRepository: {
customRepository: {
uri: "https://my.maven.registry",
},
},
upstreamCredentials: {
usernamePasswordCredentials: {
username: "remote-username",
passwordSecretVersion: example_remote_secretVersion.name,
},
},
},
});
import pulumi
import pulumi_gcp as gcp
project = gcp.organizations.get_project()
example_remote_secret = gcp.secretmanager.Secret("example-remote-secret",
secret_id="example-secret",
replication={
"auto": {},
})
example_remote_secret_version = gcp.secretmanager.SecretVersion("example-remote-secret_version",
secret=example_remote_secret.id,
secret_data="remote-password")
secret_access = gcp.secretmanager.SecretIamMember("secret-access",
secret_id=example_remote_secret.id,
role="roles/secretmanager.secretAccessor",
member=f"serviceAccount:service-{project.number}@gcp-sa-artifactregistry.iam.gserviceaccount.com")
my_repo = gcp.artifactregistry.Repository("my-repo",
location="us-central1",
repository_id="example-maven-custom-remote",
description="example remote custom maven repository with credentials",
format="MAVEN",
mode="REMOTE_REPOSITORY",
remote_repository_config={
"description": "custom maven remote with credentials",
"disable_upstream_validation": True,
"maven_repository": {
"custom_repository": {
"uri": "https://my.maven.registry",
},
},
"upstream_credentials": {
"username_password_credentials": {
"username": "remote-username",
"password_secret_version": example_remote_secret_version.name,
},
},
})
package main
import (
"fmt"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/artifactregistry"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/organizations"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/secretmanager"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
project, err := organizations.LookupProject(ctx, &organizations.LookupProjectArgs{}, nil)
if err != nil {
return err
}
_, err = secretmanager.NewSecret(ctx, "example-remote-secret", &secretmanager.SecretArgs{
SecretId: pulumi.String("example-secret"),
Replication: &secretmanager.SecretReplicationArgs{
Auto: &secretmanager.SecretReplicationAutoArgs{},
},
})
if err != nil {
return err
}
_, err = secretmanager.NewSecretVersion(ctx, "example-remote-secret_version", &secretmanager.SecretVersionArgs{
Secret: example_remote_secret.ID(),
SecretData: pulumi.String("remote-password"),
})
if err != nil {
return err
}
_, err = secretmanager.NewSecretIamMember(ctx, "secret-access", &secretmanager.SecretIamMemberArgs{
SecretId: example_remote_secret.ID(),
Role: pulumi.String("roles/secretmanager.secretAccessor"),
Member: pulumi.Sprintf("serviceAccount:service-%v@gcp-sa-artifactregistry.iam.gserviceaccount.com", project.Number),
})
if err != nil {
return err
}
_, err = artifactregistry.NewRepository(ctx, "my-repo", &artifactregistry.RepositoryArgs{
Location: pulumi.String("us-central1"),
RepositoryId: pulumi.String("example-maven-custom-remote"),
Description: pulumi.String("example remote custom maven repository with credentials"),
Format: pulumi.String("MAVEN"),
Mode: pulumi.String("REMOTE_REPOSITORY"),
RemoteRepositoryConfig: &artifactregistry.RepositoryRemoteRepositoryConfigArgs{
Description: pulumi.String("custom maven remote with credentials"),
DisableUpstreamValidation: pulumi.Bool(true),
MavenRepository: &artifactregistry.RepositoryRemoteRepositoryConfigMavenRepositoryArgs{
CustomRepository: &artifactregistry.RepositoryRemoteRepositoryConfigMavenRepositoryCustomRepositoryArgs{
Uri: pulumi.String("https://my.maven.registry"),
},
},
UpstreamCredentials: &artifactregistry.RepositoryRemoteRepositoryConfigUpstreamCredentialsArgs{
UsernamePasswordCredentials: &artifactregistry.RepositoryRemoteRepositoryConfigUpstreamCredentialsUsernamePasswordCredentialsArgs{
Username: pulumi.String("remote-username"),
PasswordSecretVersion: example_remote_secretVersion.Name,
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var project = Gcp.Organizations.GetProject.Invoke();
var example_remote_secret = new Gcp.SecretManager.Secret("example-remote-secret", new()
{
SecretId = "example-secret",
Replication = new Gcp.SecretManager.Inputs.SecretReplicationArgs
{
Auto = null,
},
});
var example_remote_secretVersion = new Gcp.SecretManager.SecretVersion("example-remote-secret_version", new()
{
Secret = example_remote_secret.Id,
SecretData = "remote-password",
});
var secret_access = new Gcp.SecretManager.SecretIamMember("secret-access", new()
{
SecretId = example_remote_secret.Id,
Role = "roles/secretmanager.secretAccessor",
Member = $"serviceAccount:service-{project.Apply(getProjectResult => getProjectResult.Number)}@gcp-sa-artifactregistry.iam.gserviceaccount.com",
});
var my_repo = new Gcp.ArtifactRegistry.Repository("my-repo", new()
{
Location = "us-central1",
RepositoryId = "example-maven-custom-remote",
Description = "example remote custom maven repository with credentials",
Format = "MAVEN",
Mode = "REMOTE_REPOSITORY",
RemoteRepositoryConfig = new Gcp.ArtifactRegistry.Inputs.RepositoryRemoteRepositoryConfigArgs
{
Description = "custom maven remote with credentials",
DisableUpstreamValidation = true,
MavenRepository = new Gcp.ArtifactRegistry.Inputs.RepositoryRemoteRepositoryConfigMavenRepositoryArgs
{
CustomRepository = new Gcp.ArtifactRegistry.Inputs.RepositoryRemoteRepositoryConfigMavenRepositoryCustomRepositoryArgs
{
Uri = "https://my.maven.registry",
},
},
UpstreamCredentials = new Gcp.ArtifactRegistry.Inputs.RepositoryRemoteRepositoryConfigUpstreamCredentialsArgs
{
UsernamePasswordCredentials = new Gcp.ArtifactRegistry.Inputs.RepositoryRemoteRepositoryConfigUpstreamCredentialsUsernamePasswordCredentialsArgs
{
Username = "remote-username",
PasswordSecretVersion = example_remote_secretVersion.Name,
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.organizations.OrganizationsFunctions;
import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
import com.pulumi.gcp.secretmanager.Secret;
import com.pulumi.gcp.secretmanager.SecretArgs;
import com.pulumi.gcp.secretmanager.inputs.SecretReplicationArgs;
import com.pulumi.gcp.secretmanager.inputs.SecretReplicationAutoArgs;
import com.pulumi.gcp.secretmanager.SecretVersion;
import com.pulumi.gcp.secretmanager.SecretVersionArgs;
import com.pulumi.gcp.secretmanager.SecretIamMember;
import com.pulumi.gcp.secretmanager.SecretIamMemberArgs;
import com.pulumi.gcp.artifactregistry.Repository;
import com.pulumi.gcp.artifactregistry.RepositoryArgs;
import com.pulumi.gcp.artifactregistry.inputs.RepositoryRemoteRepositoryConfigArgs;
import com.pulumi.gcp.artifactregistry.inputs.RepositoryRemoteRepositoryConfigMavenRepositoryArgs;
import com.pulumi.gcp.artifactregistry.inputs.RepositoryRemoteRepositoryConfigMavenRepositoryCustomRepositoryArgs;
import com.pulumi.gcp.artifactregistry.inputs.RepositoryRemoteRepositoryConfigUpstreamCredentialsArgs;
import com.pulumi.gcp.artifactregistry.inputs.RepositoryRemoteRepositoryConfigUpstreamCredentialsUsernamePasswordCredentialsArgs;
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) {
final var project = OrganizationsFunctions.getProject();
var example_remote_secret = new Secret("example-remote-secret", SecretArgs.builder()
.secretId("example-secret")
.replication(SecretReplicationArgs.builder()
.auto()
.build())
.build());
var example_remote_secretVersion = new SecretVersion("example-remote-secretVersion", SecretVersionArgs.builder()
.secret(example_remote_secret.id())
.secretData("remote-password")
.build());
var secret_access = new SecretIamMember("secret-access", SecretIamMemberArgs.builder()
.secretId(example_remote_secret.id())
.role("roles/secretmanager.secretAccessor")
.member(String.format("serviceAccount:service-%s@gcp-sa-artifactregistry.iam.gserviceaccount.com", project.applyValue(getProjectResult -> getProjectResult.number())))
.build());
var my_repo = new Repository("my-repo", RepositoryArgs.builder()
.location("us-central1")
.repositoryId("example-maven-custom-remote")
.description("example remote custom maven repository with credentials")
.format("MAVEN")
.mode("REMOTE_REPOSITORY")
.remoteRepositoryConfig(RepositoryRemoteRepositoryConfigArgs.builder()
.description("custom maven remote with credentials")
.disableUpstreamValidation(true)
.mavenRepository(RepositoryRemoteRepositoryConfigMavenRepositoryArgs.builder()
.customRepository(RepositoryRemoteRepositoryConfigMavenRepositoryCustomRepositoryArgs.builder()
.uri("https://my.maven.registry")
.build())
.build())
.upstreamCredentials(RepositoryRemoteRepositoryConfigUpstreamCredentialsArgs.builder()
.usernamePasswordCredentials(RepositoryRemoteRepositoryConfigUpstreamCredentialsUsernamePasswordCredentialsArgs.builder()
.username("remote-username")
.passwordSecretVersion(example_remote_secretVersion.name())
.build())
.build())
.build())
.build());
}
}
resources:
example-remote-secret:
type: gcp:secretmanager:Secret
properties:
secretId: example-secret
replication:
auto: {}
example-remote-secretVersion:
type: gcp:secretmanager:SecretVersion
name: example-remote-secret_version
properties:
secret: ${["example-remote-secret"].id}
secretData: remote-password
secret-access:
type: gcp:secretmanager:SecretIamMember
properties:
secretId: ${["example-remote-secret"].id}
role: roles/secretmanager.secretAccessor
member: serviceAccount:service-${project.number}@gcp-sa-artifactregistry.iam.gserviceaccount.com
my-repo:
type: gcp:artifactregistry:Repository
properties:
location: us-central1
repositoryId: example-maven-custom-remote
description: example remote custom maven repository with credentials
format: MAVEN
mode: REMOTE_REPOSITORY
remoteRepositoryConfig:
description: custom maven remote with credentials
disableUpstreamValidation: true
mavenRepository:
customRepository:
uri: https://my.maven.registry
upstreamCredentials:
usernamePasswordCredentials:
username: remote-username
passwordSecretVersion: ${["example-remote-secretVersion"].name}
variables:
project:
fn::invoke:
Function: gcp:organizations:getProject
Arguments: {}
Artifact Registry Repository Remote Npm Custom With Auth
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const project = gcp.organizations.getProject({});
const example_remote_secret = new gcp.secretmanager.Secret("example-remote-secret", {
secretId: "example-secret",
replication: {
auto: {},
},
});
const example_remote_secretVersion = new gcp.secretmanager.SecretVersion("example-remote-secret_version", {
secret: example_remote_secret.id,
secretData: "remote-password",
});
const secret_access = new gcp.secretmanager.SecretIamMember("secret-access", {
secretId: example_remote_secret.id,
role: "roles/secretmanager.secretAccessor",
member: project.then(project => `serviceAccount:service-${project.number}@gcp-sa-artifactregistry.iam.gserviceaccount.com`),
});
const my_repo = new gcp.artifactregistry.Repository("my-repo", {
location: "us-central1",
repositoryId: "example-npm-custom-remote",
description: "example remote custom npm repository with credentials",
format: "NPM",
mode: "REMOTE_REPOSITORY",
remoteRepositoryConfig: {
description: "custom npm with credentials",
disableUpstreamValidation: true,
npmRepository: {
customRepository: {
uri: "https://my.npm.registry",
},
},
upstreamCredentials: {
usernamePasswordCredentials: {
username: "remote-username",
passwordSecretVersion: example_remote_secretVersion.name,
},
},
},
});
import pulumi
import pulumi_gcp as gcp
project = gcp.organizations.get_project()
example_remote_secret = gcp.secretmanager.Secret("example-remote-secret",
secret_id="example-secret",
replication={
"auto": {},
})
example_remote_secret_version = gcp.secretmanager.SecretVersion("example-remote-secret_version",
secret=example_remote_secret.id,
secret_data="remote-password")
secret_access = gcp.secretmanager.SecretIamMember("secret-access",
secret_id=example_remote_secret.id,
role="roles/secretmanager.secretAccessor",
member=f"serviceAccount:service-{project.number}@gcp-sa-artifactregistry.iam.gserviceaccount.com")
my_repo = gcp.artifactregistry.Repository("my-repo",
location="us-central1",
repository_id="example-npm-custom-remote",
description="example remote custom npm repository with credentials",
format="NPM",
mode="REMOTE_REPOSITORY",
remote_repository_config={
"description": "custom npm with credentials",
"disable_upstream_validation": True,
"npm_repository": {
"custom_repository": {
"uri": "https://my.npm.registry",
},
},
"upstream_credentials": {
"username_password_credentials": {
"username": "remote-username",
"password_secret_version": example_remote_secret_version.name,
},
},
})
package main
import (
"fmt"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/artifactregistry"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/organizations"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/secretmanager"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
project, err := organizations.LookupProject(ctx, &organizations.LookupProjectArgs{}, nil)
if err != nil {
return err
}
_, err = secretmanager.NewSecret(ctx, "example-remote-secret", &secretmanager.SecretArgs{
SecretId: pulumi.String("example-secret"),
Replication: &secretmanager.SecretReplicationArgs{
Auto: &secretmanager.SecretReplicationAutoArgs{},
},
})
if err != nil {
return err
}
_, err = secretmanager.NewSecretVersion(ctx, "example-remote-secret_version", &secretmanager.SecretVersionArgs{
Secret: example_remote_secret.ID(),
SecretData: pulumi.String("remote-password"),
})
if err != nil {
return err
}
_, err = secretmanager.NewSecretIamMember(ctx, "secret-access", &secretmanager.SecretIamMemberArgs{
SecretId: example_remote_secret.ID(),
Role: pulumi.String("roles/secretmanager.secretAccessor"),
Member: pulumi.Sprintf("serviceAccount:service-%v@gcp-sa-artifactregistry.iam.gserviceaccount.com", project.Number),
})
if err != nil {
return err
}
_, err = artifactregistry.NewRepository(ctx, "my-repo", &artifactregistry.RepositoryArgs{
Location: pulumi.String("us-central1"),
RepositoryId: pulumi.String("example-npm-custom-remote"),
Description: pulumi.String("example remote custom npm repository with credentials"),
Format: pulumi.String("NPM"),
Mode: pulumi.String("REMOTE_REPOSITORY"),
RemoteRepositoryConfig: &artifactregistry.RepositoryRemoteRepositoryConfigArgs{
Description: pulumi.String("custom npm with credentials"),
DisableUpstreamValidation: pulumi.Bool(true),
NpmRepository: &artifactregistry.RepositoryRemoteRepositoryConfigNpmRepositoryArgs{
CustomRepository: &artifactregistry.RepositoryRemoteRepositoryConfigNpmRepositoryCustomRepositoryArgs{
Uri: pulumi.String("https://my.npm.registry"),
},
},
UpstreamCredentials: &artifactregistry.RepositoryRemoteRepositoryConfigUpstreamCredentialsArgs{
UsernamePasswordCredentials: &artifactregistry.RepositoryRemoteRepositoryConfigUpstreamCredentialsUsernamePasswordCredentialsArgs{
Username: pulumi.String("remote-username"),
PasswordSecretVersion: example_remote_secretVersion.Name,
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var project = Gcp.Organizations.GetProject.Invoke();
var example_remote_secret = new Gcp.SecretManager.Secret("example-remote-secret", new()
{
SecretId = "example-secret",
Replication = new Gcp.SecretManager.Inputs.SecretReplicationArgs
{
Auto = null,
},
});
var example_remote_secretVersion = new Gcp.SecretManager.SecretVersion("example-remote-secret_version", new()
{
Secret = example_remote_secret.Id,
SecretData = "remote-password",
});
var secret_access = new Gcp.SecretManager.SecretIamMember("secret-access", new()
{
SecretId = example_remote_secret.Id,
Role = "roles/secretmanager.secretAccessor",
Member = $"serviceAccount:service-{project.Apply(getProjectResult => getProjectResult.Number)}@gcp-sa-artifactregistry.iam.gserviceaccount.com",
});
var my_repo = new Gcp.ArtifactRegistry.Repository("my-repo", new()
{
Location = "us-central1",
RepositoryId = "example-npm-custom-remote",
Description = "example remote custom npm repository with credentials",
Format = "NPM",
Mode = "REMOTE_REPOSITORY",
RemoteRepositoryConfig = new Gcp.ArtifactRegistry.Inputs.RepositoryRemoteRepositoryConfigArgs
{
Description = "custom npm with credentials",
DisableUpstreamValidation = true,
NpmRepository = new Gcp.ArtifactRegistry.Inputs.RepositoryRemoteRepositoryConfigNpmRepositoryArgs
{
CustomRepository = new Gcp.ArtifactRegistry.Inputs.RepositoryRemoteRepositoryConfigNpmRepositoryCustomRepositoryArgs
{
Uri = "https://my.npm.registry",
},
},
UpstreamCredentials = new Gcp.ArtifactRegistry.Inputs.RepositoryRemoteRepositoryConfigUpstreamCredentialsArgs
{
UsernamePasswordCredentials = new Gcp.ArtifactRegistry.Inputs.RepositoryRemoteRepositoryConfigUpstreamCredentialsUsernamePasswordCredentialsArgs
{
Username = "remote-username",
PasswordSecretVersion = example_remote_secretVersion.Name,
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.organizations.OrganizationsFunctions;
import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
import com.pulumi.gcp.secretmanager.Secret;
import com.pulumi.gcp.secretmanager.SecretArgs;
import com.pulumi.gcp.secretmanager.inputs.SecretReplicationArgs;
import com.pulumi.gcp.secretmanager.inputs.SecretReplicationAutoArgs;
import com.pulumi.gcp.secretmanager.SecretVersion;
import com.pulumi.gcp.secretmanager.SecretVersionArgs;
import com.pulumi.gcp.secretmanager.SecretIamMember;
import com.pulumi.gcp.secretmanager.SecretIamMemberArgs;
import com.pulumi.gcp.artifactregistry.Repository;
import com.pulumi.gcp.artifactregistry.RepositoryArgs;
import com.pulumi.gcp.artifactregistry.inputs.RepositoryRemoteRepositoryConfigArgs;
import com.pulumi.gcp.artifactregistry.inputs.RepositoryRemoteRepositoryConfigNpmRepositoryArgs;
import com.pulumi.gcp.artifactregistry.inputs.RepositoryRemoteRepositoryConfigNpmRepositoryCustomRepositoryArgs;
import com.pulumi.gcp.artifactregistry.inputs.RepositoryRemoteRepositoryConfigUpstreamCredentialsArgs;
import com.pulumi.gcp.artifactregistry.inputs.RepositoryRemoteRepositoryConfigUpstreamCredentialsUsernamePasswordCredentialsArgs;
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) {
final var project = OrganizationsFunctions.getProject();
var example_remote_secret = new Secret("example-remote-secret", SecretArgs.builder()
.secretId("example-secret")
.replication(SecretReplicationArgs.builder()
.auto()
.build())
.build());
var example_remote_secretVersion = new SecretVersion("example-remote-secretVersion", SecretVersionArgs.builder()
.secret(example_remote_secret.id())
.secretData("remote-password")
.build());
var secret_access = new SecretIamMember("secret-access", SecretIamMemberArgs.builder()
.secretId(example_remote_secret.id())
.role("roles/secretmanager.secretAccessor")
.member(String.format("serviceAccount:service-%s@gcp-sa-artifactregistry.iam.gserviceaccount.com", project.applyValue(getProjectResult -> getProjectResult.number())))
.build());
var my_repo = new Repository("my-repo", RepositoryArgs.builder()
.location("us-central1")
.repositoryId("example-npm-custom-remote")
.description("example remote custom npm repository with credentials")
.format("NPM")
.mode("REMOTE_REPOSITORY")
.remoteRepositoryConfig(RepositoryRemoteRepositoryConfigArgs.builder()
.description("custom npm with credentials")
.disableUpstreamValidation(true)
.npmRepository(RepositoryRemoteRepositoryConfigNpmRepositoryArgs.builder()
.customRepository(RepositoryRemoteRepositoryConfigNpmRepositoryCustomRepositoryArgs.builder()
.uri("https://my.npm.registry")
.build())
.build())
.upstreamCredentials(RepositoryRemoteRepositoryConfigUpstreamCredentialsArgs.builder()
.usernamePasswordCredentials(RepositoryRemoteRepositoryConfigUpstreamCredentialsUsernamePasswordCredentialsArgs.builder()
.username("remote-username")
.passwordSecretVersion(example_remote_secretVersion.name())
.build())
.build())
.build())
.build());
}
}
resources:
example-remote-secret:
type: gcp:secretmanager:Secret
properties:
secretId: example-secret
replication:
auto: {}
example-remote-secretVersion:
type: gcp:secretmanager:SecretVersion
name: example-remote-secret_version
properties:
secret: ${["example-remote-secret"].id}
secretData: remote-password
secret-access:
type: gcp:secretmanager:SecretIamMember
properties:
secretId: ${["example-remote-secret"].id}
role: roles/secretmanager.secretAccessor
member: serviceAccount:service-${project.number}@gcp-sa-artifactregistry.iam.gserviceaccount.com
my-repo:
type: gcp:artifactregistry:Repository
properties:
location: us-central1
repositoryId: example-npm-custom-remote
description: example remote custom npm repository with credentials
format: NPM
mode: REMOTE_REPOSITORY
remoteRepositoryConfig:
description: custom npm with credentials
disableUpstreamValidation: true
npmRepository:
customRepository:
uri: https://my.npm.registry
upstreamCredentials:
usernamePasswordCredentials:
username: remote-username
passwordSecretVersion: ${["example-remote-secretVersion"].name}
variables:
project:
fn::invoke:
Function: gcp:organizations:getProject
Arguments: {}
Artifact Registry Repository Remote Python Custom With Auth
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const project = gcp.organizations.getProject({});
const example_remote_secret = new gcp.secretmanager.Secret("example-remote-secret", {
secretId: "example-secret",
replication: {
auto: {},
},
});
const example_remote_secretVersion = new gcp.secretmanager.SecretVersion("example-remote-secret_version", {
secret: example_remote_secret.id,
secretData: "remote-password",
});
const secret_access = new gcp.secretmanager.SecretIamMember("secret-access", {
secretId: example_remote_secret.id,
role: "roles/secretmanager.secretAccessor",
member: project.then(project => `serviceAccount:service-${project.number}@gcp-sa-artifactregistry.iam.gserviceaccount.com`),
});
const my_repo = new gcp.artifactregistry.Repository("my-repo", {
location: "us-central1",
repositoryId: "example-python-custom-remote",
description: "example remote custom python repository with credentials",
format: "PYTHON",
mode: "REMOTE_REPOSITORY",
remoteRepositoryConfig: {
description: "custom npm with credentials",
disableUpstreamValidation: true,
pythonRepository: {
customRepository: {
uri: "https://my.python.registry",
},
},
upstreamCredentials: {
usernamePasswordCredentials: {
username: "remote-username",
passwordSecretVersion: example_remote_secretVersion.name,
},
},
},
});
import pulumi
import pulumi_gcp as gcp
project = gcp.organizations.get_project()
example_remote_secret = gcp.secretmanager.Secret("example-remote-secret",
secret_id="example-secret",
replication={
"auto": {},
})
example_remote_secret_version = gcp.secretmanager.SecretVersion("example-remote-secret_version",
secret=example_remote_secret.id,
secret_data="remote-password")
secret_access = gcp.secretmanager.SecretIamMember("secret-access",
secret_id=example_remote_secret.id,
role="roles/secretmanager.secretAccessor",
member=f"serviceAccount:service-{project.number}@gcp-sa-artifactregistry.iam.gserviceaccount.com")
my_repo = gcp.artifactregistry.Repository("my-repo",
location="us-central1",
repository_id="example-python-custom-remote",
description="example remote custom python repository with credentials",
format="PYTHON",
mode="REMOTE_REPOSITORY",
remote_repository_config={
"description": "custom npm with credentials",
"disable_upstream_validation": True,
"python_repository": {
"custom_repository": {
"uri": "https://my.python.registry",
},
},
"upstream_credentials": {
"username_password_credentials": {
"username": "remote-username",
"password_secret_version": example_remote_secret_version.name,
},
},
})
package main
import (
"fmt"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/artifactregistry"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/organizations"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/secretmanager"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
project, err := organizations.LookupProject(ctx, &organizations.LookupProjectArgs{}, nil)
if err != nil {
return err
}
_, err = secretmanager.NewSecret(ctx, "example-remote-secret", &secretmanager.SecretArgs{
SecretId: pulumi.String("example-secret"),
Replication: &secretmanager.SecretReplicationArgs{
Auto: &secretmanager.SecretReplicationAutoArgs{},
},
})
if err != nil {
return err
}
_, err = secretmanager.NewSecretVersion(ctx, "example-remote-secret_version", &secretmanager.SecretVersionArgs{
Secret: example_remote_secret.ID(),
SecretData: pulumi.String("remote-password"),
})
if err != nil {
return err
}
_, err = secretmanager.NewSecretIamMember(ctx, "secret-access", &secretmanager.SecretIamMemberArgs{
SecretId: example_remote_secret.ID(),
Role: pulumi.String("roles/secretmanager.secretAccessor"),
Member: pulumi.Sprintf("serviceAccount:service-%v@gcp-sa-artifactregistry.iam.gserviceaccount.com", project.Number),
})
if err != nil {
return err
}
_, err = artifactregistry.NewRepository(ctx, "my-repo", &artifactregistry.RepositoryArgs{
Location: pulumi.String("us-central1"),
RepositoryId: pulumi.String("example-python-custom-remote"),
Description: pulumi.String("example remote custom python repository with credentials"),
Format: pulumi.String("PYTHON"),
Mode: pulumi.String("REMOTE_REPOSITORY"),
RemoteRepositoryConfig: &artifactregistry.RepositoryRemoteRepositoryConfigArgs{
Description: pulumi.String("custom npm with credentials"),
DisableUpstreamValidation: pulumi.Bool(true),
PythonRepository: &artifactregistry.RepositoryRemoteRepositoryConfigPythonRepositoryArgs{
CustomRepository: &artifactregistry.RepositoryRemoteRepositoryConfigPythonRepositoryCustomRepositoryArgs{
Uri: pulumi.String("https://my.python.registry"),
},
},
UpstreamCredentials: &artifactregistry.RepositoryRemoteRepositoryConfigUpstreamCredentialsArgs{
UsernamePasswordCredentials: &artifactregistry.RepositoryRemoteRepositoryConfigUpstreamCredentialsUsernamePasswordCredentialsArgs{
Username: pulumi.String("remote-username"),
PasswordSecretVersion: example_remote_secretVersion.Name,
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var project = Gcp.Organizations.GetProject.Invoke();
var example_remote_secret = new Gcp.SecretManager.Secret("example-remote-secret", new()
{
SecretId = "example-secret",
Replication = new Gcp.SecretManager.Inputs.SecretReplicationArgs
{
Auto = null,
},
});
var example_remote_secretVersion = new Gcp.SecretManager.SecretVersion("example-remote-secret_version", new()
{
Secret = example_remote_secret.Id,
SecretData = "remote-password",
});
var secret_access = new Gcp.SecretManager.SecretIamMember("secret-access", new()
{
SecretId = example_remote_secret.Id,
Role = "roles/secretmanager.secretAccessor",
Member = $"serviceAccount:service-{project.Apply(getProjectResult => getProjectResult.Number)}@gcp-sa-artifactregistry.iam.gserviceaccount.com",
});
var my_repo = new Gcp.ArtifactRegistry.Repository("my-repo", new()
{
Location = "us-central1",
RepositoryId = "example-python-custom-remote",
Description = "example remote custom python repository with credentials",
Format = "PYTHON",
Mode = "REMOTE_REPOSITORY",
RemoteRepositoryConfig = new Gcp.ArtifactRegistry.Inputs.RepositoryRemoteRepositoryConfigArgs
{
Description = "custom npm with credentials",
DisableUpstreamValidation = true,
PythonRepository = new Gcp.ArtifactRegistry.Inputs.RepositoryRemoteRepositoryConfigPythonRepositoryArgs
{
CustomRepository = new Gcp.ArtifactRegistry.Inputs.RepositoryRemoteRepositoryConfigPythonRepositoryCustomRepositoryArgs
{
Uri = "https://my.python.registry",
},
},
UpstreamCredentials = new Gcp.ArtifactRegistry.Inputs.RepositoryRemoteRepositoryConfigUpstreamCredentialsArgs
{
UsernamePasswordCredentials = new Gcp.ArtifactRegistry.Inputs.RepositoryRemoteRepositoryConfigUpstreamCredentialsUsernamePasswordCredentialsArgs
{
Username = "remote-username",
PasswordSecretVersion = example_remote_secretVersion.Name,
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.organizations.OrganizationsFunctions;
import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
import com.pulumi.gcp.secretmanager.Secret;
import com.pulumi.gcp.secretmanager.SecretArgs;
import com.pulumi.gcp.secretmanager.inputs.SecretReplicationArgs;
import com.pulumi.gcp.secretmanager.inputs.SecretReplicationAutoArgs;
import com.pulumi.gcp.secretmanager.SecretVersion;
import com.pulumi.gcp.secretmanager.SecretVersionArgs;
import com.pulumi.gcp.secretmanager.SecretIamMember;
import com.pulumi.gcp.secretmanager.SecretIamMemberArgs;
import com.pulumi.gcp.artifactregistry.Repository;
import com.pulumi.gcp.artifactregistry.RepositoryArgs;
import com.pulumi.gcp.artifactregistry.inputs.RepositoryRemoteRepositoryConfigArgs;
import com.pulumi.gcp.artifactregistry.inputs.RepositoryRemoteRepositoryConfigPythonRepositoryArgs;
import com.pulumi.gcp.artifactregistry.inputs.RepositoryRemoteRepositoryConfigPythonRepositoryCustomRepositoryArgs;
import com.pulumi.gcp.artifactregistry.inputs.RepositoryRemoteRepositoryConfigUpstreamCredentialsArgs;
import com.pulumi.gcp.artifactregistry.inputs.RepositoryRemoteRepositoryConfigUpstreamCredentialsUsernamePasswordCredentialsArgs;
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) {
final var project = OrganizationsFunctions.getProject();
var example_remote_secret = new Secret("example-remote-secret", SecretArgs.builder()
.secretId("example-secret")
.replication(SecretReplicationArgs.builder()
.auto()
.build())
.build());
var example_remote_secretVersion = new SecretVersion("example-remote-secretVersion", SecretVersionArgs.builder()
.secret(example_remote_secret.id())
.secretData("remote-password")
.build());
var secret_access = new SecretIamMember("secret-access", SecretIamMemberArgs.builder()
.secretId(example_remote_secret.id())
.role("roles/secretmanager.secretAccessor")
.member(String.format("serviceAccount:service-%s@gcp-sa-artifactregistry.iam.gserviceaccount.com", project.applyValue(getProjectResult -> getProjectResult.number())))
.build());
var my_repo = new Repository("my-repo", RepositoryArgs.builder()
.location("us-central1")
.repositoryId("example-python-custom-remote")
.description("example remote custom python repository with credentials")
.format("PYTHON")
.mode("REMOTE_REPOSITORY")
.remoteRepositoryConfig(RepositoryRemoteRepositoryConfigArgs.builder()
.description("custom npm with credentials")
.disableUpstreamValidation(true)
.pythonRepository(RepositoryRemoteRepositoryConfigPythonRepositoryArgs.builder()
.customRepository(RepositoryRemoteRepositoryConfigPythonRepositoryCustomRepositoryArgs.builder()
.uri("https://my.python.registry")
.build())
.build())
.upstreamCredentials(RepositoryRemoteRepositoryConfigUpstreamCredentialsArgs.builder()
.usernamePasswordCredentials(RepositoryRemoteRepositoryConfigUpstreamCredentialsUsernamePasswordCredentialsArgs.builder()
.username("remote-username")
.passwordSecretVersion(example_remote_secretVersion.name())
.build())
.build())
.build())
.build());
}
}
resources:
example-remote-secret:
type: gcp:secretmanager:Secret
properties:
secretId: example-secret
replication:
auto: {}
example-remote-secretVersion:
type: gcp:secretmanager:SecretVersion
name: example-remote-secret_version
properties:
secret: ${["example-remote-secret"].id}
secretData: remote-password
secret-access:
type: gcp:secretmanager:SecretIamMember
properties:
secretId: ${["example-remote-secret"].id}
role: roles/secretmanager.secretAccessor
member: serviceAccount:service-${project.number}@gcp-sa-artifactregistry.iam.gserviceaccount.com
my-repo:
type: gcp:artifactregistry:Repository
properties:
location: us-central1
repositoryId: example-python-custom-remote
description: example remote custom python repository with credentials
format: PYTHON
mode: REMOTE_REPOSITORY
remoteRepositoryConfig:
description: custom npm with credentials
disableUpstreamValidation: true
pythonRepository:
customRepository:
uri: https://my.python.registry
upstreamCredentials:
usernamePasswordCredentials:
username: remote-username
passwordSecretVersion: ${["example-remote-secretVersion"].name}
variables:
project:
fn::invoke:
Function: gcp:organizations:getProject
Arguments: {}
Create Repository Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Repository(name: string, args: RepositoryArgs, opts?: CustomResourceOptions);
@overload
def Repository(resource_name: str,
args: RepositoryArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Repository(resource_name: str,
opts: Optional[ResourceOptions] = None,
format: Optional[str] = None,
repository_id: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
docker_config: Optional[RepositoryDockerConfigArgs] = None,
description: Optional[str] = None,
kms_key_name: Optional[str] = None,
cleanup_policies: Optional[Sequence[RepositoryCleanupPolicyArgs]] = None,
location: Optional[str] = None,
maven_config: Optional[RepositoryMavenConfigArgs] = None,
mode: Optional[str] = None,
project: Optional[str] = None,
remote_repository_config: Optional[RepositoryRemoteRepositoryConfigArgs] = None,
cleanup_policy_dry_run: Optional[bool] = None,
virtual_repository_config: Optional[RepositoryVirtualRepositoryConfigArgs] = None)
func NewRepository(ctx *Context, name string, args RepositoryArgs, opts ...ResourceOption) (*Repository, error)
public Repository(string name, RepositoryArgs args, CustomResourceOptions? opts = null)
public Repository(String name, RepositoryArgs args)
public Repository(String name, RepositoryArgs args, CustomResourceOptions options)
type: gcp:artifactregistry:Repository
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args RepositoryArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args RepositoryArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args RepositoryArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RepositoryArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RepositoryArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var repositoryResource = new Gcp.ArtifactRegistry.Repository("repositoryResource", new()
{
Format = "string",
RepositoryId = "string",
Labels =
{
{ "string", "string" },
},
DockerConfig = new Gcp.ArtifactRegistry.Inputs.RepositoryDockerConfigArgs
{
ImmutableTags = false,
},
Description = "string",
KmsKeyName = "string",
CleanupPolicies = new[]
{
new Gcp.ArtifactRegistry.Inputs.RepositoryCleanupPolicyArgs
{
Id = "string",
Action = "string",
Condition = new Gcp.ArtifactRegistry.Inputs.RepositoryCleanupPolicyConditionArgs
{
NewerThan = "string",
OlderThan = "string",
PackageNamePrefixes = new[]
{
"string",
},
TagPrefixes = new[]
{
"string",
},
TagState = "string",
VersionNamePrefixes = new[]
{
"string",
},
},
MostRecentVersions = new Gcp.ArtifactRegistry.Inputs.RepositoryCleanupPolicyMostRecentVersionsArgs
{
KeepCount = 0,
PackageNamePrefixes = new[]
{
"string",
},
},
},
},
Location = "string",
MavenConfig = new Gcp.ArtifactRegistry.Inputs.RepositoryMavenConfigArgs
{
AllowSnapshotOverwrites = false,
VersionPolicy = "string",
},
Mode = "string",
Project = "string",
RemoteRepositoryConfig = new Gcp.ArtifactRegistry.Inputs.RepositoryRemoteRepositoryConfigArgs
{
AptRepository = new Gcp.ArtifactRegistry.Inputs.RepositoryRemoteRepositoryConfigAptRepositoryArgs
{
PublicRepository = new Gcp.ArtifactRegistry.Inputs.RepositoryRemoteRepositoryConfigAptRepositoryPublicRepositoryArgs
{
RepositoryBase = "string",
RepositoryPath = "string",
},
},
Description = "string",
DisableUpstreamValidation = false,
DockerRepository = new Gcp.ArtifactRegistry.Inputs.RepositoryRemoteRepositoryConfigDockerRepositoryArgs
{
CustomRepository = new Gcp.ArtifactRegistry.Inputs.RepositoryRemoteRepositoryConfigDockerRepositoryCustomRepositoryArgs
{
Uri = "string",
},
PublicRepository = "string",
},
MavenRepository = new Gcp.ArtifactRegistry.Inputs.RepositoryRemoteRepositoryConfigMavenRepositoryArgs
{
CustomRepository = new Gcp.ArtifactRegistry.Inputs.RepositoryRemoteRepositoryConfigMavenRepositoryCustomRepositoryArgs
{
Uri = "string",
},
PublicRepository = "string",
},
NpmRepository = new Gcp.ArtifactRegistry.Inputs.RepositoryRemoteRepositoryConfigNpmRepositoryArgs
{
CustomRepository = new Gcp.ArtifactRegistry.Inputs.RepositoryRemoteRepositoryConfigNpmRepositoryCustomRepositoryArgs
{
Uri = "string",
},
PublicRepository = "string",
},
PythonRepository = new Gcp.ArtifactRegistry.Inputs.RepositoryRemoteRepositoryConfigPythonRepositoryArgs
{
CustomRepository = new Gcp.ArtifactRegistry.Inputs.RepositoryRemoteRepositoryConfigPythonRepositoryCustomRepositoryArgs
{
Uri = "string",
},
PublicRepository = "string",
},
UpstreamCredentials = new Gcp.ArtifactRegistry.Inputs.RepositoryRemoteRepositoryConfigUpstreamCredentialsArgs
{
UsernamePasswordCredentials = new Gcp.ArtifactRegistry.Inputs.RepositoryRemoteRepositoryConfigUpstreamCredentialsUsernamePasswordCredentialsArgs
{
PasswordSecretVersion = "string",
Username = "string",
},
},
YumRepository = new Gcp.ArtifactRegistry.Inputs.RepositoryRemoteRepositoryConfigYumRepositoryArgs
{
PublicRepository = new Gcp.ArtifactRegistry.Inputs.RepositoryRemoteRepositoryConfigYumRepositoryPublicRepositoryArgs
{
RepositoryBase = "string",
RepositoryPath = "string",
},
},
},
CleanupPolicyDryRun = false,
VirtualRepositoryConfig = new Gcp.ArtifactRegistry.Inputs.RepositoryVirtualRepositoryConfigArgs
{
UpstreamPolicies = new[]
{
new Gcp.ArtifactRegistry.Inputs.RepositoryVirtualRepositoryConfigUpstreamPolicyArgs
{
Id = "string",
Priority = 0,
Repository = "string",
},
},
},
});
example, err := artifactregistry.NewRepository(ctx, "repositoryResource", &artifactregistry.RepositoryArgs{
Format: pulumi.String("string"),
RepositoryId: pulumi.String("string"),
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
DockerConfig: &artifactregistry.RepositoryDockerConfigArgs{
ImmutableTags: pulumi.Bool(false),
},
Description: pulumi.String("string"),
KmsKeyName: pulumi.String("string"),
CleanupPolicies: artifactregistry.RepositoryCleanupPolicyArray{
&artifactregistry.RepositoryCleanupPolicyArgs{
Id: pulumi.String("string"),
Action: pulumi.String("string"),
Condition: &artifactregistry.RepositoryCleanupPolicyConditionArgs{
NewerThan: pulumi.String("string"),
OlderThan: pulumi.String("string"),
PackageNamePrefixes: pulumi.StringArray{
pulumi.String("string"),
},
TagPrefixes: pulumi.StringArray{
pulumi.String("string"),
},
TagState: pulumi.String("string"),
VersionNamePrefixes: pulumi.StringArray{
pulumi.String("string"),
},
},
MostRecentVersions: &artifactregistry.RepositoryCleanupPolicyMostRecentVersionsArgs{
KeepCount: pulumi.Int(0),
PackageNamePrefixes: pulumi.StringArray{
pulumi.String("string"),
},
},
},
},
Location: pulumi.String("string"),
MavenConfig: &artifactregistry.RepositoryMavenConfigArgs{
AllowSnapshotOverwrites: pulumi.Bool(false),
VersionPolicy: pulumi.String("string"),
},
Mode: pulumi.String("string"),
Project: pulumi.String("string"),
RemoteRepositoryConfig: &artifactregistry.RepositoryRemoteRepositoryConfigArgs{
AptRepository: &artifactregistry.RepositoryRemoteRepositoryConfigAptRepositoryArgs{
PublicRepository: &artifactregistry.RepositoryRemoteRepositoryConfigAptRepositoryPublicRepositoryArgs{
RepositoryBase: pulumi.String("string"),
RepositoryPath: pulumi.String("string"),
},
},
Description: pulumi.String("string"),
DisableUpstreamValidation: pulumi.Bool(false),
DockerRepository: &artifactregistry.RepositoryRemoteRepositoryConfigDockerRepositoryArgs{
CustomRepository: &artifactregistry.RepositoryRemoteRepositoryConfigDockerRepositoryCustomRepositoryArgs{
Uri: pulumi.String("string"),
},
PublicRepository: pulumi.String("string"),
},
MavenRepository: &artifactregistry.RepositoryRemoteRepositoryConfigMavenRepositoryArgs{
CustomRepository: &artifactregistry.RepositoryRemoteRepositoryConfigMavenRepositoryCustomRepositoryArgs{
Uri: pulumi.String("string"),
},
PublicRepository: pulumi.String("string"),
},
NpmRepository: &artifactregistry.RepositoryRemoteRepositoryConfigNpmRepositoryArgs{
CustomRepository: &artifactregistry.RepositoryRemoteRepositoryConfigNpmRepositoryCustomRepositoryArgs{
Uri: pulumi.String("string"),
},
PublicRepository: pulumi.String("string"),
},
PythonRepository: &artifactregistry.RepositoryRemoteRepositoryConfigPythonRepositoryArgs{
CustomRepository: &artifactregistry.RepositoryRemoteRepositoryConfigPythonRepositoryCustomRepositoryArgs{
Uri: pulumi.String("string"),
},
PublicRepository: pulumi.String("string"),
},
UpstreamCredentials: &artifactregistry.RepositoryRemoteRepositoryConfigUpstreamCredentialsArgs{
UsernamePasswordCredentials: &artifactregistry.RepositoryRemoteRepositoryConfigUpstreamCredentialsUsernamePasswordCredentialsArgs{
PasswordSecretVersion: pulumi.String("string"),
Username: pulumi.String("string"),
},
},
YumRepository: &artifactregistry.RepositoryRemoteRepositoryConfigYumRepositoryArgs{
PublicRepository: &artifactregistry.RepositoryRemoteRepositoryConfigYumRepositoryPublicRepositoryArgs{
RepositoryBase: pulumi.String("string"),
RepositoryPath: pulumi.String("string"),
},
},
},
CleanupPolicyDryRun: pulumi.Bool(false),
VirtualRepositoryConfig: &artifactregistry.RepositoryVirtualRepositoryConfigArgs{
UpstreamPolicies: artifactregistry.RepositoryVirtualRepositoryConfigUpstreamPolicyArray{
&artifactregistry.RepositoryVirtualRepositoryConfigUpstreamPolicyArgs{
Id: pulumi.String("string"),
Priority: pulumi.Int(0),
Repository: pulumi.String("string"),
},
},
},
})
var repositoryResource = new Repository("repositoryResource", RepositoryArgs.builder()
.format("string")
.repositoryId("string")
.labels(Map.of("string", "string"))
.dockerConfig(RepositoryDockerConfigArgs.builder()
.immutableTags(false)
.build())
.description("string")
.kmsKeyName("string")
.cleanupPolicies(RepositoryCleanupPolicyArgs.builder()
.id("string")
.action("string")
.condition(RepositoryCleanupPolicyConditionArgs.builder()
.newerThan("string")
.olderThan("string")
.packageNamePrefixes("string")
.tagPrefixes("string")
.tagState("string")
.versionNamePrefixes("string")
.build())
.mostRecentVersions(RepositoryCleanupPolicyMostRecentVersionsArgs.builder()
.keepCount(0)
.packageNamePrefixes("string")
.build())
.build())
.location("string")
.mavenConfig(RepositoryMavenConfigArgs.builder()
.allowSnapshotOverwrites(false)
.versionPolicy("string")
.build())
.mode("string")
.project("string")
.remoteRepositoryConfig(RepositoryRemoteRepositoryConfigArgs.builder()
.aptRepository(RepositoryRemoteRepositoryConfigAptRepositoryArgs.builder()
.publicRepository(RepositoryRemoteRepositoryConfigAptRepositoryPublicRepositoryArgs.builder()
.repositoryBase("string")
.repositoryPath("string")
.build())
.build())
.description("string")
.disableUpstreamValidation(false)
.dockerRepository(RepositoryRemoteRepositoryConfigDockerRepositoryArgs.builder()
.customRepository(RepositoryRemoteRepositoryConfigDockerRepositoryCustomRepositoryArgs.builder()
.uri("string")
.build())
.publicRepository("string")
.build())
.mavenRepository(RepositoryRemoteRepositoryConfigMavenRepositoryArgs.builder()
.customRepository(RepositoryRemoteRepositoryConfigMavenRepositoryCustomRepositoryArgs.builder()
.uri("string")
.build())
.publicRepository("string")
.build())
.npmRepository(RepositoryRemoteRepositoryConfigNpmRepositoryArgs.builder()
.customRepository(RepositoryRemoteRepositoryConfigNpmRepositoryCustomRepositoryArgs.builder()
.uri("string")
.build())
.publicRepository("string")
.build())
.pythonRepository(RepositoryRemoteRepositoryConfigPythonRepositoryArgs.builder()
.customRepository(RepositoryRemoteRepositoryConfigPythonRepositoryCustomRepositoryArgs.builder()
.uri("string")
.build())
.publicRepository("string")
.build())
.upstreamCredentials(RepositoryRemoteRepositoryConfigUpstreamCredentialsArgs.builder()
.usernamePasswordCredentials(RepositoryRemoteRepositoryConfigUpstreamCredentialsUsernamePasswordCredentialsArgs.builder()
.passwordSecretVersion("string")
.username("string")
.build())
.build())
.yumRepository(RepositoryRemoteRepositoryConfigYumRepositoryArgs.builder()
.publicRepository(RepositoryRemoteRepositoryConfigYumRepositoryPublicRepositoryArgs.builder()
.repositoryBase("string")
.repositoryPath("string")
.build())
.build())
.build())
.cleanupPolicyDryRun(false)
.virtualRepositoryConfig(RepositoryVirtualRepositoryConfigArgs.builder()
.upstreamPolicies(RepositoryVirtualRepositoryConfigUpstreamPolicyArgs.builder()
.id("string")
.priority(0)
.repository("string")
.build())
.build())
.build());
repository_resource = gcp.artifactregistry.Repository("repositoryResource",
format="string",
repository_id="string",
labels={
"string": "string",
},
docker_config={
"immutable_tags": False,
},
description="string",
kms_key_name="string",
cleanup_policies=[{
"id": "string",
"action": "string",
"condition": {
"newer_than": "string",
"older_than": "string",
"package_name_prefixes": ["string"],
"tag_prefixes": ["string"],
"tag_state": "string",
"version_name_prefixes": ["string"],
},
"most_recent_versions": {
"keep_count": 0,
"package_name_prefixes": ["string"],
},
}],
location="string",
maven_config={
"allow_snapshot_overwrites": False,
"version_policy": "string",
},
mode="string",
project="string",
remote_repository_config={
"apt_repository": {
"public_repository": {
"repository_base": "string",
"repository_path": "string",
},
},
"description": "string",
"disable_upstream_validation": False,
"docker_repository": {
"custom_repository": {
"uri": "string",
},
"public_repository": "string",
},
"maven_repository": {
"custom_repository": {
"uri": "string",
},
"public_repository": "string",
},
"npm_repository": {
"custom_repository": {
"uri": "string",
},
"public_repository": "string",
},
"python_repository": {
"custom_repository": {
"uri": "string",
},
"public_repository": "string",
},
"upstream_credentials": {
"username_password_credentials": {
"password_secret_version": "string",
"username": "string",
},
},
"yum_repository": {
"public_repository": {
"repository_base": "string",
"repository_path": "string",
},
},
},
cleanup_policy_dry_run=False,
virtual_repository_config={
"upstream_policies": [{
"id": "string",
"priority": 0,
"repository": "string",
}],
})
const repositoryResource = new gcp.artifactregistry.Repository("repositoryResource", {
format: "string",
repositoryId: "string",
labels: {
string: "string",
},
dockerConfig: {
immutableTags: false,
},
description: "string",
kmsKeyName: "string",
cleanupPolicies: [{
id: "string",
action: "string",
condition: {
newerThan: "string",
olderThan: "string",
packageNamePrefixes: ["string"],
tagPrefixes: ["string"],
tagState: "string",
versionNamePrefixes: ["string"],
},
mostRecentVersions: {
keepCount: 0,
packageNamePrefixes: ["string"],
},
}],
location: "string",
mavenConfig: {
allowSnapshotOverwrites: false,
versionPolicy: "string",
},
mode: "string",
project: "string",
remoteRepositoryConfig: {
aptRepository: {
publicRepository: {
repositoryBase: "string",
repositoryPath: "string",
},
},
description: "string",
disableUpstreamValidation: false,
dockerRepository: {
customRepository: {
uri: "string",
},
publicRepository: "string",
},
mavenRepository: {
customRepository: {
uri: "string",
},
publicRepository: "string",
},
npmRepository: {
customRepository: {
uri: "string",
},
publicRepository: "string",
},
pythonRepository: {
customRepository: {
uri: "string",
},
publicRepository: "string",
},
upstreamCredentials: {
usernamePasswordCredentials: {
passwordSecretVersion: "string",
username: "string",
},
},
yumRepository: {
publicRepository: {
repositoryBase: "string",
repositoryPath: "string",
},
},
},
cleanupPolicyDryRun: false,
virtualRepositoryConfig: {
upstreamPolicies: [{
id: "string",
priority: 0,
repository: "string",
}],
},
});
type: gcp:artifactregistry:Repository
properties:
cleanupPolicies:
- action: string
condition:
newerThan: string
olderThan: string
packageNamePrefixes:
- string
tagPrefixes:
- string
tagState: string
versionNamePrefixes:
- string
id: string
mostRecentVersions:
keepCount: 0
packageNamePrefixes:
- string
cleanupPolicyDryRun: false
description: string
dockerConfig:
immutableTags: false
format: string
kmsKeyName: string
labels:
string: string
location: string
mavenConfig:
allowSnapshotOverwrites: false
versionPolicy: string
mode: string
project: string
remoteRepositoryConfig:
aptRepository:
publicRepository:
repositoryBase: string
repositoryPath: string
description: string
disableUpstreamValidation: false
dockerRepository:
customRepository:
uri: string
publicRepository: string
mavenRepository:
customRepository:
uri: string
publicRepository: string
npmRepository:
customRepository:
uri: string
publicRepository: string
pythonRepository:
customRepository:
uri: string
publicRepository: string
upstreamCredentials:
usernamePasswordCredentials:
passwordSecretVersion: string
username: string
yumRepository:
publicRepository:
repositoryBase: string
repositoryPath: string
repositoryId: string
virtualRepositoryConfig:
upstreamPolicies:
- id: string
priority: 0
repository: string
Repository Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Repository resource accepts the following input properties:
- Format string
- The format of packages that are stored in the repository. Supported formats
can be found here.
You can only create alpha formats if you are a member of the
alpha user group.
- Repository
Id string - The last part of the repository name, for example: "repo1"
- Cleanup
Policies List<RepositoryCleanup Policy> - Cleanup policies for this repository. Cleanup policies indicate when certain package versions can be automatically deleted. Map keys are policy IDs supplied by users during policy creation. They must unique within a repository and be under 128 characters in length. Structure is documented below.
- Cleanup
Policy boolDry Run - If true, the cleanup pipeline is prevented from deleting versions in this repository.
- Description string
- The user-provided description of the repository.
- Docker
Config RepositoryDocker Config - Docker repository config contains repository level configuration for the repositories of docker type. Structure is documented below.
- Kms
Key stringName - The Cloud KMS resource name of the customer managed encryption key that’s
used to encrypt the contents of the Repository. Has the form:
projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key
. This value may not be changed after the Repository has been created. - Labels Dictionary<string, string>
Labels with user-defined metadata. This field may contain up to 64 entries. Label keys and values may be no longer than 63 characters. Label keys must begin with a lowercase letter and may only contain lowercase letters, numeric characters, underscores, and dashes.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effective_labels
for all of the labels present on the resource.- Location string
- The name of the location this repository is located in.
- Maven
Config RepositoryMaven Config - MavenRepositoryConfig is maven related repository details. Provides additional configuration details for repositories of the maven format type. Structure is documented below.
- Mode string
- The mode configures the repository to serve artifacts from different sources.
Default value is
STANDARD_REPOSITORY
. Possible values are:STANDARD_REPOSITORY
,VIRTUAL_REPOSITORY
,REMOTE_REPOSITORY
. - Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Remote
Repository RepositoryConfig Remote Repository Config - Configuration specific for a Remote Repository. Structure is documented below.
- Virtual
Repository RepositoryConfig Virtual Repository Config - Configuration specific for a Virtual Repository. Structure is documented below.
- Format string
- The format of packages that are stored in the repository. Supported formats
can be found here.
You can only create alpha formats if you are a member of the
alpha user group.
- Repository
Id string - The last part of the repository name, for example: "repo1"
- Cleanup
Policies []RepositoryCleanup Policy Args - Cleanup policies for this repository. Cleanup policies indicate when certain package versions can be automatically deleted. Map keys are policy IDs supplied by users during policy creation. They must unique within a repository and be under 128 characters in length. Structure is documented below.
- Cleanup
Policy boolDry Run - If true, the cleanup pipeline is prevented from deleting versions in this repository.
- Description string
- The user-provided description of the repository.
- Docker
Config RepositoryDocker Config Args - Docker repository config contains repository level configuration for the repositories of docker type. Structure is documented below.
- Kms
Key stringName - The Cloud KMS resource name of the customer managed encryption key that’s
used to encrypt the contents of the Repository. Has the form:
projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key
. This value may not be changed after the Repository has been created. - Labels map[string]string
Labels with user-defined metadata. This field may contain up to 64 entries. Label keys and values may be no longer than 63 characters. Label keys must begin with a lowercase letter and may only contain lowercase letters, numeric characters, underscores, and dashes.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effective_labels
for all of the labels present on the resource.- Location string
- The name of the location this repository is located in.
- Maven
Config RepositoryMaven Config Args - MavenRepositoryConfig is maven related repository details. Provides additional configuration details for repositories of the maven format type. Structure is documented below.
- Mode string
- The mode configures the repository to serve artifacts from different sources.
Default value is
STANDARD_REPOSITORY
. Possible values are:STANDARD_REPOSITORY
,VIRTUAL_REPOSITORY
,REMOTE_REPOSITORY
. - Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Remote
Repository RepositoryConfig Remote Repository Config Args - Configuration specific for a Remote Repository. Structure is documented below.
- Virtual
Repository RepositoryConfig Virtual Repository Config Args - Configuration specific for a Virtual Repository. Structure is documented below.
- format String
- The format of packages that are stored in the repository. Supported formats
can be found here.
You can only create alpha formats if you are a member of the
alpha user group.
- repository
Id String - The last part of the repository name, for example: "repo1"
- cleanup
Policies List<RepositoryCleanup Policy> - Cleanup policies for this repository. Cleanup policies indicate when certain package versions can be automatically deleted. Map keys are policy IDs supplied by users during policy creation. They must unique within a repository and be under 128 characters in length. Structure is documented below.
- cleanup
Policy BooleanDry Run - If true, the cleanup pipeline is prevented from deleting versions in this repository.
- description String
- The user-provided description of the repository.
- docker
Config RepositoryDocker Config - Docker repository config contains repository level configuration for the repositories of docker type. Structure is documented below.
- kms
Key StringName - The Cloud KMS resource name of the customer managed encryption key that’s
used to encrypt the contents of the Repository. Has the form:
projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key
. This value may not be changed after the Repository has been created. - labels Map<String,String>
Labels with user-defined metadata. This field may contain up to 64 entries. Label keys and values may be no longer than 63 characters. Label keys must begin with a lowercase letter and may only contain lowercase letters, numeric characters, underscores, and dashes.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effective_labels
for all of the labels present on the resource.- location String
- The name of the location this repository is located in.
- maven
Config RepositoryMaven Config - MavenRepositoryConfig is maven related repository details. Provides additional configuration details for repositories of the maven format type. Structure is documented below.
- mode String
- The mode configures the repository to serve artifacts from different sources.
Default value is
STANDARD_REPOSITORY
. Possible values are:STANDARD_REPOSITORY
,VIRTUAL_REPOSITORY
,REMOTE_REPOSITORY
. - project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- remote
Repository RepositoryConfig Remote Repository Config - Configuration specific for a Remote Repository. Structure is documented below.
- virtual
Repository RepositoryConfig Virtual Repository Config - Configuration specific for a Virtual Repository. Structure is documented below.
- format string
- The format of packages that are stored in the repository. Supported formats
can be found here.
You can only create alpha formats if you are a member of the
alpha user group.
- repository
Id string - The last part of the repository name, for example: "repo1"
- cleanup
Policies RepositoryCleanup Policy[] - Cleanup policies for this repository. Cleanup policies indicate when certain package versions can be automatically deleted. Map keys are policy IDs supplied by users during policy creation. They must unique within a repository and be under 128 characters in length. Structure is documented below.
- cleanup
Policy booleanDry Run - If true, the cleanup pipeline is prevented from deleting versions in this repository.
- description string
- The user-provided description of the repository.
- docker
Config RepositoryDocker Config - Docker repository config contains repository level configuration for the repositories of docker type. Structure is documented below.
- kms
Key stringName - The Cloud KMS resource name of the customer managed encryption key that’s
used to encrypt the contents of the Repository. Has the form:
projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key
. This value may not be changed after the Repository has been created. - labels {[key: string]: string}
Labels with user-defined metadata. This field may contain up to 64 entries. Label keys and values may be no longer than 63 characters. Label keys must begin with a lowercase letter and may only contain lowercase letters, numeric characters, underscores, and dashes.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effective_labels
for all of the labels present on the resource.- location string
- The name of the location this repository is located in.
- maven
Config RepositoryMaven Config - MavenRepositoryConfig is maven related repository details. Provides additional configuration details for repositories of the maven format type. Structure is documented below.
- mode string
- The mode configures the repository to serve artifacts from different sources.
Default value is
STANDARD_REPOSITORY
. Possible values are:STANDARD_REPOSITORY
,VIRTUAL_REPOSITORY
,REMOTE_REPOSITORY
. - project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- remote
Repository RepositoryConfig Remote Repository Config - Configuration specific for a Remote Repository. Structure is documented below.
- virtual
Repository RepositoryConfig Virtual Repository Config - Configuration specific for a Virtual Repository. Structure is documented below.
- format str
- The format of packages that are stored in the repository. Supported formats
can be found here.
You can only create alpha formats if you are a member of the
alpha user group.
- repository_
id str - The last part of the repository name, for example: "repo1"
- cleanup_
policies Sequence[RepositoryCleanup Policy Args] - Cleanup policies for this repository. Cleanup policies indicate when certain package versions can be automatically deleted. Map keys are policy IDs supplied by users during policy creation. They must unique within a repository and be under 128 characters in length. Structure is documented below.
- cleanup_
policy_ booldry_ run - If true, the cleanup pipeline is prevented from deleting versions in this repository.
- description str
- The user-provided description of the repository.
- docker_
config RepositoryDocker Config Args - Docker repository config contains repository level configuration for the repositories of docker type. Structure is documented below.
- kms_
key_ strname - The Cloud KMS resource name of the customer managed encryption key that’s
used to encrypt the contents of the Repository. Has the form:
projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key
. This value may not be changed after the Repository has been created. - labels Mapping[str, str]
Labels with user-defined metadata. This field may contain up to 64 entries. Label keys and values may be no longer than 63 characters. Label keys must begin with a lowercase letter and may only contain lowercase letters, numeric characters, underscores, and dashes.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effective_labels
for all of the labels present on the resource.- location str
- The name of the location this repository is located in.
- maven_
config RepositoryMaven Config Args - MavenRepositoryConfig is maven related repository details. Provides additional configuration details for repositories of the maven format type. Structure is documented below.
- mode str
- The mode configures the repository to serve artifacts from different sources.
Default value is
STANDARD_REPOSITORY
. Possible values are:STANDARD_REPOSITORY
,VIRTUAL_REPOSITORY
,REMOTE_REPOSITORY
. - project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- remote_
repository_ Repositoryconfig Remote Repository Config Args - Configuration specific for a Remote Repository. Structure is documented below.
- virtual_
repository_ Repositoryconfig Virtual Repository Config Args - Configuration specific for a Virtual Repository. Structure is documented below.
- format String
- The format of packages that are stored in the repository. Supported formats
can be found here.
You can only create alpha formats if you are a member of the
alpha user group.
- repository
Id String - The last part of the repository name, for example: "repo1"
- cleanup
Policies List<Property Map> - Cleanup policies for this repository. Cleanup policies indicate when certain package versions can be automatically deleted. Map keys are policy IDs supplied by users during policy creation. They must unique within a repository and be under 128 characters in length. Structure is documented below.
- cleanup
Policy BooleanDry Run - If true, the cleanup pipeline is prevented from deleting versions in this repository.
- description String
- The user-provided description of the repository.
- docker
Config Property Map - Docker repository config contains repository level configuration for the repositories of docker type. Structure is documented below.
- kms
Key StringName - The Cloud KMS resource name of the customer managed encryption key that’s
used to encrypt the contents of the Repository. Has the form:
projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key
. This value may not be changed after the Repository has been created. - labels Map<String>
Labels with user-defined metadata. This field may contain up to 64 entries. Label keys and values may be no longer than 63 characters. Label keys must begin with a lowercase letter and may only contain lowercase letters, numeric characters, underscores, and dashes.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effective_labels
for all of the labels present on the resource.- location String
- The name of the location this repository is located in.
- maven
Config Property Map - MavenRepositoryConfig is maven related repository details. Provides additional configuration details for repositories of the maven format type. Structure is documented below.
- mode String
- The mode configures the repository to serve artifacts from different sources.
Default value is
STANDARD_REPOSITORY
. Possible values are:STANDARD_REPOSITORY
,VIRTUAL_REPOSITORY
,REMOTE_REPOSITORY
. - project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- remote
Repository Property MapConfig - Configuration specific for a Remote Repository. Structure is documented below.
- virtual
Repository Property MapConfig - Configuration specific for a Virtual Repository. Structure is documented below.
Outputs
All input properties are implicitly available as output properties. Additionally, the Repository resource produces the following output properties:
- Create
Time string - The time when the repository was created.
- Effective
Labels Dictionary<string, string> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The name of the repository, for example: "repo1"
- Pulumi
Labels Dictionary<string, string> - The combination of labels configured directly on the resource and default labels configured on the provider.
- Update
Time string - The time when the repository was last updated.
- Create
Time string - The time when the repository was created.
- Effective
Labels map[string]string - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The name of the repository, for example: "repo1"
- Pulumi
Labels map[string]string - The combination of labels configured directly on the resource and default labels configured on the provider.
- Update
Time string - The time when the repository was last updated.
- create
Time String - The time when the repository was created.
- effective
Labels Map<String,String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The name of the repository, for example: "repo1"
- pulumi
Labels Map<String,String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- update
Time String - The time when the repository was last updated.
- create
Time string - The time when the repository was created.
- effective
Labels {[key: string]: string} - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- The name of the repository, for example: "repo1"
- pulumi
Labels {[key: string]: string} - The combination of labels configured directly on the resource and default labels configured on the provider.
- update
Time string - The time when the repository was last updated.
- create_
time str - The time when the repository was created.
- effective_
labels Mapping[str, str] - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- The name of the repository, for example: "repo1"
- pulumi_
labels Mapping[str, str] - The combination of labels configured directly on the resource and default labels configured on the provider.
- update_
time str - The time when the repository was last updated.
- create
Time String - The time when the repository was created.
- effective
Labels Map<String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The name of the repository, for example: "repo1"
- pulumi
Labels Map<String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- update
Time String - The time when the repository was last updated.
Look up Existing Repository Resource
Get an existing Repository resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: RepositoryState, opts?: CustomResourceOptions): Repository
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cleanup_policies: Optional[Sequence[RepositoryCleanupPolicyArgs]] = None,
cleanup_policy_dry_run: Optional[bool] = None,
create_time: Optional[str] = None,
description: Optional[str] = None,
docker_config: Optional[RepositoryDockerConfigArgs] = None,
effective_labels: Optional[Mapping[str, str]] = None,
format: Optional[str] = None,
kms_key_name: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
location: Optional[str] = None,
maven_config: Optional[RepositoryMavenConfigArgs] = None,
mode: Optional[str] = None,
name: Optional[str] = None,
project: Optional[str] = None,
pulumi_labels: Optional[Mapping[str, str]] = None,
remote_repository_config: Optional[RepositoryRemoteRepositoryConfigArgs] = None,
repository_id: Optional[str] = None,
update_time: Optional[str] = None,
virtual_repository_config: Optional[RepositoryVirtualRepositoryConfigArgs] = None) -> Repository
func GetRepository(ctx *Context, name string, id IDInput, state *RepositoryState, opts ...ResourceOption) (*Repository, error)
public static Repository Get(string name, Input<string> id, RepositoryState? state, CustomResourceOptions? opts = null)
public static Repository get(String name, Output<String> id, RepositoryState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Cleanup
Policies List<RepositoryCleanup Policy> - Cleanup policies for this repository. Cleanup policies indicate when certain package versions can be automatically deleted. Map keys are policy IDs supplied by users during policy creation. They must unique within a repository and be under 128 characters in length. Structure is documented below.
- Cleanup
Policy boolDry Run - If true, the cleanup pipeline is prevented from deleting versions in this repository.
- Create
Time string - The time when the repository was created.
- Description string
- The user-provided description of the repository.
- Docker
Config RepositoryDocker Config - Docker repository config contains repository level configuration for the repositories of docker type. Structure is documented below.
- Effective
Labels Dictionary<string, string> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Format string
- The format of packages that are stored in the repository. Supported formats
can be found here.
You can only create alpha formats if you are a member of the
alpha user group.
- Kms
Key stringName - The Cloud KMS resource name of the customer managed encryption key that’s
used to encrypt the contents of the Repository. Has the form:
projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key
. This value may not be changed after the Repository has been created. - Labels Dictionary<string, string>
Labels with user-defined metadata. This field may contain up to 64 entries. Label keys and values may be no longer than 63 characters. Label keys must begin with a lowercase letter and may only contain lowercase letters, numeric characters, underscores, and dashes.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effective_labels
for all of the labels present on the resource.- Location string
- The name of the location this repository is located in.
- Maven
Config RepositoryMaven Config - MavenRepositoryConfig is maven related repository details. Provides additional configuration details for repositories of the maven format type. Structure is documented below.
- Mode string
- The mode configures the repository to serve artifacts from different sources.
Default value is
STANDARD_REPOSITORY
. Possible values are:STANDARD_REPOSITORY
,VIRTUAL_REPOSITORY
,REMOTE_REPOSITORY
. - Name string
- The name of the repository, for example: "repo1"
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Pulumi
Labels Dictionary<string, string> - The combination of labels configured directly on the resource and default labels configured on the provider.
- Remote
Repository RepositoryConfig Remote Repository Config - Configuration specific for a Remote Repository. Structure is documented below.
- Repository
Id string - The last part of the repository name, for example: "repo1"
- Update
Time string - The time when the repository was last updated.
- Virtual
Repository RepositoryConfig Virtual Repository Config - Configuration specific for a Virtual Repository. Structure is documented below.
- Cleanup
Policies []RepositoryCleanup Policy Args - Cleanup policies for this repository. Cleanup policies indicate when certain package versions can be automatically deleted. Map keys are policy IDs supplied by users during policy creation. They must unique within a repository and be under 128 characters in length. Structure is documented below.
- Cleanup
Policy boolDry Run - If true, the cleanup pipeline is prevented from deleting versions in this repository.
- Create
Time string - The time when the repository was created.
- Description string
- The user-provided description of the repository.
- Docker
Config RepositoryDocker Config Args - Docker repository config contains repository level configuration for the repositories of docker type. Structure is documented below.
- Effective
Labels map[string]string - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Format string
- The format of packages that are stored in the repository. Supported formats
can be found here.
You can only create alpha formats if you are a member of the
alpha user group.
- Kms
Key stringName - The Cloud KMS resource name of the customer managed encryption key that’s
used to encrypt the contents of the Repository. Has the form:
projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key
. This value may not be changed after the Repository has been created. - Labels map[string]string
Labels with user-defined metadata. This field may contain up to 64 entries. Label keys and values may be no longer than 63 characters. Label keys must begin with a lowercase letter and may only contain lowercase letters, numeric characters, underscores, and dashes.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effective_labels
for all of the labels present on the resource.- Location string
- The name of the location this repository is located in.
- Maven
Config RepositoryMaven Config Args - MavenRepositoryConfig is maven related repository details. Provides additional configuration details for repositories of the maven format type. Structure is documented below.
- Mode string
- The mode configures the repository to serve artifacts from different sources.
Default value is
STANDARD_REPOSITORY
. Possible values are:STANDARD_REPOSITORY
,VIRTUAL_REPOSITORY
,REMOTE_REPOSITORY
. - Name string
- The name of the repository, for example: "repo1"
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Pulumi
Labels map[string]string - The combination of labels configured directly on the resource and default labels configured on the provider.
- Remote
Repository RepositoryConfig Remote Repository Config Args - Configuration specific for a Remote Repository. Structure is documented below.
- Repository
Id string - The last part of the repository name, for example: "repo1"
- Update
Time string - The time when the repository was last updated.
- Virtual
Repository RepositoryConfig Virtual Repository Config Args - Configuration specific for a Virtual Repository. Structure is documented below.
- cleanup
Policies List<RepositoryCleanup Policy> - Cleanup policies for this repository. Cleanup policies indicate when certain package versions can be automatically deleted. Map keys are policy IDs supplied by users during policy creation. They must unique within a repository and be under 128 characters in length. Structure is documented below.
- cleanup
Policy BooleanDry Run - If true, the cleanup pipeline is prevented from deleting versions in this repository.
- create
Time String - The time when the repository was created.
- description String
- The user-provided description of the repository.
- docker
Config RepositoryDocker Config - Docker repository config contains repository level configuration for the repositories of docker type. Structure is documented below.
- effective
Labels Map<String,String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- format String
- The format of packages that are stored in the repository. Supported formats
can be found here.
You can only create alpha formats if you are a member of the
alpha user group.
- kms
Key StringName - The Cloud KMS resource name of the customer managed encryption key that’s
used to encrypt the contents of the Repository. Has the form:
projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key
. This value may not be changed after the Repository has been created. - labels Map<String,String>
Labels with user-defined metadata. This field may contain up to 64 entries. Label keys and values may be no longer than 63 characters. Label keys must begin with a lowercase letter and may only contain lowercase letters, numeric characters, underscores, and dashes.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effective_labels
for all of the labels present on the resource.- location String
- The name of the location this repository is located in.
- maven
Config RepositoryMaven Config - MavenRepositoryConfig is maven related repository details. Provides additional configuration details for repositories of the maven format type. Structure is documented below.
- mode String
- The mode configures the repository to serve artifacts from different sources.
Default value is
STANDARD_REPOSITORY
. Possible values are:STANDARD_REPOSITORY
,VIRTUAL_REPOSITORY
,REMOTE_REPOSITORY
. - name String
- The name of the repository, for example: "repo1"
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi
Labels Map<String,String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- remote
Repository RepositoryConfig Remote Repository Config - Configuration specific for a Remote Repository. Structure is documented below.
- repository
Id String - The last part of the repository name, for example: "repo1"
- update
Time String - The time when the repository was last updated.
- virtual
Repository RepositoryConfig Virtual Repository Config - Configuration specific for a Virtual Repository. Structure is documented below.
- cleanup
Policies RepositoryCleanup Policy[] - Cleanup policies for this repository. Cleanup policies indicate when certain package versions can be automatically deleted. Map keys are policy IDs supplied by users during policy creation. They must unique within a repository and be under 128 characters in length. Structure is documented below.
- cleanup
Policy booleanDry Run - If true, the cleanup pipeline is prevented from deleting versions in this repository.
- create
Time string - The time when the repository was created.
- description string
- The user-provided description of the repository.
- docker
Config RepositoryDocker Config - Docker repository config contains repository level configuration for the repositories of docker type. Structure is documented below.
- effective
Labels {[key: string]: string} - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- format string
- The format of packages that are stored in the repository. Supported formats
can be found here.
You can only create alpha formats if you are a member of the
alpha user group.
- kms
Key stringName - The Cloud KMS resource name of the customer managed encryption key that’s
used to encrypt the contents of the Repository. Has the form:
projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key
. This value may not be changed after the Repository has been created. - labels {[key: string]: string}
Labels with user-defined metadata. This field may contain up to 64 entries. Label keys and values may be no longer than 63 characters. Label keys must begin with a lowercase letter and may only contain lowercase letters, numeric characters, underscores, and dashes.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effective_labels
for all of the labels present on the resource.- location string
- The name of the location this repository is located in.
- maven
Config RepositoryMaven Config - MavenRepositoryConfig is maven related repository details. Provides additional configuration details for repositories of the maven format type. Structure is documented below.
- mode string
- The mode configures the repository to serve artifacts from different sources.
Default value is
STANDARD_REPOSITORY
. Possible values are:STANDARD_REPOSITORY
,VIRTUAL_REPOSITORY
,REMOTE_REPOSITORY
. - name string
- The name of the repository, for example: "repo1"
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi
Labels {[key: string]: string} - The combination of labels configured directly on the resource and default labels configured on the provider.
- remote
Repository RepositoryConfig Remote Repository Config - Configuration specific for a Remote Repository. Structure is documented below.
- repository
Id string - The last part of the repository name, for example: "repo1"
- update
Time string - The time when the repository was last updated.
- virtual
Repository RepositoryConfig Virtual Repository Config - Configuration specific for a Virtual Repository. Structure is documented below.
- cleanup_
policies Sequence[RepositoryCleanup Policy Args] - Cleanup policies for this repository. Cleanup policies indicate when certain package versions can be automatically deleted. Map keys are policy IDs supplied by users during policy creation. They must unique within a repository and be under 128 characters in length. Structure is documented below.
- cleanup_
policy_ booldry_ run - If true, the cleanup pipeline is prevented from deleting versions in this repository.
- create_
time str - The time when the repository was created.
- description str
- The user-provided description of the repository.
- docker_
config RepositoryDocker Config Args - Docker repository config contains repository level configuration for the repositories of docker type. Structure is documented below.
- effective_
labels Mapping[str, str] - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- format str
- The format of packages that are stored in the repository. Supported formats
can be found here.
You can only create alpha formats if you are a member of the
alpha user group.
- kms_
key_ strname - The Cloud KMS resource name of the customer managed encryption key that’s
used to encrypt the contents of the Repository. Has the form:
projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key
. This value may not be changed after the Repository has been created. - labels Mapping[str, str]
Labels with user-defined metadata. This field may contain up to 64 entries. Label keys and values may be no longer than 63 characters. Label keys must begin with a lowercase letter and may only contain lowercase letters, numeric characters, underscores, and dashes.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effective_labels
for all of the labels present on the resource.- location str
- The name of the location this repository is located in.
- maven_
config RepositoryMaven Config Args - MavenRepositoryConfig is maven related repository details. Provides additional configuration details for repositories of the maven format type. Structure is documented below.
- mode str
- The mode configures the repository to serve artifacts from different sources.
Default value is
STANDARD_REPOSITORY
. Possible values are:STANDARD_REPOSITORY
,VIRTUAL_REPOSITORY
,REMOTE_REPOSITORY
. - name str
- The name of the repository, for example: "repo1"
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi_
labels Mapping[str, str] - The combination of labels configured directly on the resource and default labels configured on the provider.
- remote_
repository_ Repositoryconfig Remote Repository Config Args - Configuration specific for a Remote Repository. Structure is documented below.
- repository_
id str - The last part of the repository name, for example: "repo1"
- update_
time str - The time when the repository was last updated.
- virtual_
repository_ Repositoryconfig Virtual Repository Config Args - Configuration specific for a Virtual Repository. Structure is documented below.
- cleanup
Policies List<Property Map> - Cleanup policies for this repository. Cleanup policies indicate when certain package versions can be automatically deleted. Map keys are policy IDs supplied by users during policy creation. They must unique within a repository and be under 128 characters in length. Structure is documented below.
- cleanup
Policy BooleanDry Run - If true, the cleanup pipeline is prevented from deleting versions in this repository.
- create
Time String - The time when the repository was created.
- description String
- The user-provided description of the repository.
- docker
Config Property Map - Docker repository config contains repository level configuration for the repositories of docker type. Structure is documented below.
- effective
Labels Map<String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- format String
- The format of packages that are stored in the repository. Supported formats
can be found here.
You can only create alpha formats if you are a member of the
alpha user group.
- kms
Key StringName - The Cloud KMS resource name of the customer managed encryption key that’s
used to encrypt the contents of the Repository. Has the form:
projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key
. This value may not be changed after the Repository has been created. - labels Map<String>
Labels with user-defined metadata. This field may contain up to 64 entries. Label keys and values may be no longer than 63 characters. Label keys must begin with a lowercase letter and may only contain lowercase letters, numeric characters, underscores, and dashes.
Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field
effective_labels
for all of the labels present on the resource.- location String
- The name of the location this repository is located in.
- maven
Config Property Map - MavenRepositoryConfig is maven related repository details. Provides additional configuration details for repositories of the maven format type. Structure is documented below.
- mode String
- The mode configures the repository to serve artifacts from different sources.
Default value is
STANDARD_REPOSITORY
. Possible values are:STANDARD_REPOSITORY
,VIRTUAL_REPOSITORY
,REMOTE_REPOSITORY
. - name String
- The name of the repository, for example: "repo1"
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi
Labels Map<String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- remote
Repository Property MapConfig - Configuration specific for a Remote Repository. Structure is documented below.
- repository
Id String - The last part of the repository name, for example: "repo1"
- update
Time String - The time when the repository was last updated.
- virtual
Repository Property MapConfig - Configuration specific for a Virtual Repository. Structure is documented below.
Supporting Types
RepositoryCleanupPolicy, RepositoryCleanupPolicyArgs
- Id string
- The identifier for this object. Format specified above.
- Action string
- Policy action.
Possible values are:
DELETE
,KEEP
. - Condition
Repository
Cleanup Policy Condition - Policy condition for matching versions. Structure is documented below.
- Most
Recent RepositoryVersions Cleanup Policy Most Recent Versions - Policy condition for retaining a minimum number of versions. May only be specified with a Keep action. Structure is documented below.
- Id string
- The identifier for this object. Format specified above.
- Action string
- Policy action.
Possible values are:
DELETE
,KEEP
. - Condition
Repository
Cleanup Policy Condition - Policy condition for matching versions. Structure is documented below.
- Most
Recent RepositoryVersions Cleanup Policy Most Recent Versions - Policy condition for retaining a minimum number of versions. May only be specified with a Keep action. Structure is documented below.
- id String
- The identifier for this object. Format specified above.
- action String
- Policy action.
Possible values are:
DELETE
,KEEP
. - condition
Repository
Cleanup Policy Condition - Policy condition for matching versions. Structure is documented below.
- most
Recent RepositoryVersions Cleanup Policy Most Recent Versions - Policy condition for retaining a minimum number of versions. May only be specified with a Keep action. Structure is documented below.
- id string
- The identifier for this object. Format specified above.
- action string
- Policy action.
Possible values are:
DELETE
,KEEP
. - condition
Repository
Cleanup Policy Condition - Policy condition for matching versions. Structure is documented below.
- most
Recent RepositoryVersions Cleanup Policy Most Recent Versions - Policy condition for retaining a minimum number of versions. May only be specified with a Keep action. Structure is documented below.
- id str
- The identifier for this object. Format specified above.
- action str
- Policy action.
Possible values are:
DELETE
,KEEP
. - condition
Repository
Cleanup Policy Condition - Policy condition for matching versions. Structure is documented below.
- most_
recent_ Repositoryversions Cleanup Policy Most Recent Versions - Policy condition for retaining a minimum number of versions. May only be specified with a Keep action. Structure is documented below.
- id String
- The identifier for this object. Format specified above.
- action String
- Policy action.
Possible values are:
DELETE
,KEEP
. - condition Property Map
- Policy condition for matching versions. Structure is documented below.
- most
Recent Property MapVersions - Policy condition for retaining a minimum number of versions. May only be specified with a Keep action. Structure is documented below.
RepositoryCleanupPolicyCondition, RepositoryCleanupPolicyConditionArgs
- Newer
Than string - Match versions newer than a duration.
- Older
Than string - Match versions older than a duration.
- Package
Name List<string>Prefixes - Match versions by package prefix. Applied on any prefix match.
- Tag
Prefixes List<string> - Match versions by tag prefix. Applied on any prefix match.
- string
- Match versions by tag status.
Default value is
ANY
. Possible values are:TAGGED
,UNTAGGED
,ANY
. - Version
Name List<string>Prefixes - Match versions by version name prefix. Applied on any prefix match.
- Newer
Than string - Match versions newer than a duration.
- Older
Than string - Match versions older than a duration.
- Package
Name []stringPrefixes - Match versions by package prefix. Applied on any prefix match.
- Tag
Prefixes []string - Match versions by tag prefix. Applied on any prefix match.
- string
- Match versions by tag status.
Default value is
ANY
. Possible values are:TAGGED
,UNTAGGED
,ANY
. - Version
Name []stringPrefixes - Match versions by version name prefix. Applied on any prefix match.
- newer
Than String - Match versions newer than a duration.
- older
Than String - Match versions older than a duration.
- package
Name List<String>Prefixes - Match versions by package prefix. Applied on any prefix match.
- tag
Prefixes List<String> - Match versions by tag prefix. Applied on any prefix match.
- String
- Match versions by tag status.
Default value is
ANY
. Possible values are:TAGGED
,UNTAGGED
,ANY
. - version
Name List<String>Prefixes - Match versions by version name prefix. Applied on any prefix match.
- newer
Than string - Match versions newer than a duration.
- older
Than string - Match versions older than a duration.
- package
Name string[]Prefixes - Match versions by package prefix. Applied on any prefix match.
- tag
Prefixes string[] - Match versions by tag prefix. Applied on any prefix match.
- string
- Match versions by tag status.
Default value is
ANY
. Possible values are:TAGGED
,UNTAGGED
,ANY
. - version
Name string[]Prefixes - Match versions by version name prefix. Applied on any prefix match.
- newer_
than str - Match versions newer than a duration.
- older_
than str - Match versions older than a duration.
- package_
name_ Sequence[str]prefixes - Match versions by package prefix. Applied on any prefix match.
- tag_
prefixes Sequence[str] - Match versions by tag prefix. Applied on any prefix match.
- tag_
state str - Match versions by tag status.
Default value is
ANY
. Possible values are:TAGGED
,UNTAGGED
,ANY
. - version_
name_ Sequence[str]prefixes - Match versions by version name prefix. Applied on any prefix match.
- newer
Than String - Match versions newer than a duration.
- older
Than String - Match versions older than a duration.
- package
Name List<String>Prefixes - Match versions by package prefix. Applied on any prefix match.
- tag
Prefixes List<String> - Match versions by tag prefix. Applied on any prefix match.
- String
- Match versions by tag status.
Default value is
ANY
. Possible values are:TAGGED
,UNTAGGED
,ANY
. - version
Name List<String>Prefixes - Match versions by version name prefix. Applied on any prefix match.
RepositoryCleanupPolicyMostRecentVersions, RepositoryCleanupPolicyMostRecentVersionsArgs
- Keep
Count int - Minimum number of versions to keep.
- Package
Name List<string>Prefixes - Match versions by package prefix. Applied on any prefix match.
- Keep
Count int - Minimum number of versions to keep.
- Package
Name []stringPrefixes - Match versions by package prefix. Applied on any prefix match.
- keep
Count Integer - Minimum number of versions to keep.
- package
Name List<String>Prefixes - Match versions by package prefix. Applied on any prefix match.
- keep
Count number - Minimum number of versions to keep.
- package
Name string[]Prefixes - Match versions by package prefix. Applied on any prefix match.
- keep_
count int - Minimum number of versions to keep.
- package_
name_ Sequence[str]prefixes - Match versions by package prefix. Applied on any prefix match.
- keep
Count Number - Minimum number of versions to keep.
- package
Name List<String>Prefixes - Match versions by package prefix. Applied on any prefix match.
RepositoryDockerConfig, RepositoryDockerConfigArgs
- bool
- The repository which enabled this flag prevents all tags from being modified, moved or deleted. This does not prevent tags from being created.
- bool
- The repository which enabled this flag prevents all tags from being modified, moved or deleted. This does not prevent tags from being created.
- Boolean
- The repository which enabled this flag prevents all tags from being modified, moved or deleted. This does not prevent tags from being created.
- boolean
- The repository which enabled this flag prevents all tags from being modified, moved or deleted. This does not prevent tags from being created.
- bool
- The repository which enabled this flag prevents all tags from being modified, moved or deleted. This does not prevent tags from being created.
- Boolean
- The repository which enabled this flag prevents all tags from being modified, moved or deleted. This does not prevent tags from being created.
RepositoryMavenConfig, RepositoryMavenConfigArgs
- Allow
Snapshot boolOverwrites - The repository with this flag will allow publishing the same snapshot versions.
- Version
Policy string - Version policy defines the versions that the registry will accept.
Default value is
VERSION_POLICY_UNSPECIFIED
. Possible values are:VERSION_POLICY_UNSPECIFIED
,RELEASE
,SNAPSHOT
.
- Allow
Snapshot boolOverwrites - The repository with this flag will allow publishing the same snapshot versions.
- Version
Policy string - Version policy defines the versions that the registry will accept.
Default value is
VERSION_POLICY_UNSPECIFIED
. Possible values are:VERSION_POLICY_UNSPECIFIED
,RELEASE
,SNAPSHOT
.
- allow
Snapshot BooleanOverwrites - The repository with this flag will allow publishing the same snapshot versions.
- version
Policy String - Version policy defines the versions that the registry will accept.
Default value is
VERSION_POLICY_UNSPECIFIED
. Possible values are:VERSION_POLICY_UNSPECIFIED
,RELEASE
,SNAPSHOT
.
- allow
Snapshot booleanOverwrites - The repository with this flag will allow publishing the same snapshot versions.
- version
Policy string - Version policy defines the versions that the registry will accept.
Default value is
VERSION_POLICY_UNSPECIFIED
. Possible values are:VERSION_POLICY_UNSPECIFIED
,RELEASE
,SNAPSHOT
.
- allow_
snapshot_ booloverwrites - The repository with this flag will allow publishing the same snapshot versions.
- version_
policy str - Version policy defines the versions that the registry will accept.
Default value is
VERSION_POLICY_UNSPECIFIED
. Possible values are:VERSION_POLICY_UNSPECIFIED
,RELEASE
,SNAPSHOT
.
- allow
Snapshot BooleanOverwrites - The repository with this flag will allow publishing the same snapshot versions.
- version
Policy String - Version policy defines the versions that the registry will accept.
Default value is
VERSION_POLICY_UNSPECIFIED
. Possible values are:VERSION_POLICY_UNSPECIFIED
,RELEASE
,SNAPSHOT
.
RepositoryRemoteRepositoryConfig, RepositoryRemoteRepositoryConfigArgs
- Apt
Repository RepositoryRemote Repository Config Apt Repository - Specific settings for an Apt remote repository. Structure is documented below.
- Description string
- The description of the remote source.
- Disable
Upstream boolValidation - If true, the remote repository upstream and upstream credentials will not be validated.
- Docker
Repository RepositoryRemote Repository Config Docker Repository - Specific settings for a Docker remote repository. Structure is documented below.
- Maven
Repository RepositoryRemote Repository Config Maven Repository - Specific settings for a Maven remote repository. Structure is documented below.
- Npm
Repository RepositoryRemote Repository Config Npm Repository - Specific settings for an Npm remote repository. Structure is documented below.
- Python
Repository RepositoryRemote Repository Config Python Repository - Specific settings for a Python remote repository. Structure is documented below.
- Upstream
Credentials RepositoryRemote Repository Config Upstream Credentials - The credentials used to access the remote repository. Structure is documented below.
- Yum
Repository RepositoryRemote Repository Config Yum Repository - Specific settings for an Yum remote repository. Structure is documented below.
- Apt
Repository RepositoryRemote Repository Config Apt Repository - Specific settings for an Apt remote repository. Structure is documented below.
- Description string
- The description of the remote source.
- Disable
Upstream boolValidation - If true, the remote repository upstream and upstream credentials will not be validated.
- Docker
Repository RepositoryRemote Repository Config Docker Repository - Specific settings for a Docker remote repository. Structure is documented below.
- Maven
Repository RepositoryRemote Repository Config Maven Repository - Specific settings for a Maven remote repository. Structure is documented below.
- Npm
Repository RepositoryRemote Repository Config Npm Repository - Specific settings for an Npm remote repository. Structure is documented below.
- Python
Repository RepositoryRemote Repository Config Python Repository - Specific settings for a Python remote repository. Structure is documented below.
- Upstream
Credentials RepositoryRemote Repository Config Upstream Credentials - The credentials used to access the remote repository. Structure is documented below.
- Yum
Repository RepositoryRemote Repository Config Yum Repository - Specific settings for an Yum remote repository. Structure is documented below.
- apt
Repository RepositoryRemote Repository Config Apt Repository - Specific settings for an Apt remote repository. Structure is documented below.
- description String
- The description of the remote source.
- disable
Upstream BooleanValidation - If true, the remote repository upstream and upstream credentials will not be validated.
- docker
Repository RepositoryRemote Repository Config Docker Repository - Specific settings for a Docker remote repository. Structure is documented below.
- maven
Repository RepositoryRemote Repository Config Maven Repository - Specific settings for a Maven remote repository. Structure is documented below.
- npm
Repository RepositoryRemote Repository Config Npm Repository - Specific settings for an Npm remote repository. Structure is documented below.
- python
Repository RepositoryRemote Repository Config Python Repository - Specific settings for a Python remote repository. Structure is documented below.
- upstream
Credentials RepositoryRemote Repository Config Upstream Credentials - The credentials used to access the remote repository. Structure is documented below.
- yum
Repository RepositoryRemote Repository Config Yum Repository - Specific settings for an Yum remote repository. Structure is documented below.
- apt
Repository RepositoryRemote Repository Config Apt Repository - Specific settings for an Apt remote repository. Structure is documented below.
- description string
- The description of the remote source.
- disable
Upstream booleanValidation - If true, the remote repository upstream and upstream credentials will not be validated.
- docker
Repository RepositoryRemote Repository Config Docker Repository - Specific settings for a Docker remote repository. Structure is documented below.
- maven
Repository RepositoryRemote Repository Config Maven Repository - Specific settings for a Maven remote repository. Structure is documented below.
- npm
Repository RepositoryRemote Repository Config Npm Repository - Specific settings for an Npm remote repository. Structure is documented below.
- python
Repository RepositoryRemote Repository Config Python Repository - Specific settings for a Python remote repository. Structure is documented below.
- upstream
Credentials RepositoryRemote Repository Config Upstream Credentials - The credentials used to access the remote repository. Structure is documented below.
- yum
Repository RepositoryRemote Repository Config Yum Repository - Specific settings for an Yum remote repository. Structure is documented below.
- apt_
repository RepositoryRemote Repository Config Apt Repository - Specific settings for an Apt remote repository. Structure is documented below.
- description str
- The description of the remote source.
- disable_
upstream_ boolvalidation - If true, the remote repository upstream and upstream credentials will not be validated.
- docker_
repository RepositoryRemote Repository Config Docker Repository - Specific settings for a Docker remote repository. Structure is documented below.
- maven_
repository RepositoryRemote Repository Config Maven Repository - Specific settings for a Maven remote repository. Structure is documented below.
- npm_
repository RepositoryRemote Repository Config Npm Repository - Specific settings for an Npm remote repository. Structure is documented below.
- python_
repository RepositoryRemote Repository Config Python Repository - Specific settings for a Python remote repository. Structure is documented below.
- upstream_
credentials RepositoryRemote Repository Config Upstream Credentials - The credentials used to access the remote repository. Structure is documented below.
- yum_
repository RepositoryRemote Repository Config Yum Repository - Specific settings for an Yum remote repository. Structure is documented below.
- apt
Repository Property Map - Specific settings for an Apt remote repository. Structure is documented below.
- description String
- The description of the remote source.
- disable
Upstream BooleanValidation - If true, the remote repository upstream and upstream credentials will not be validated.
- docker
Repository Property Map - Specific settings for a Docker remote repository. Structure is documented below.
- maven
Repository Property Map - Specific settings for a Maven remote repository. Structure is documented below.
- npm
Repository Property Map - Specific settings for an Npm remote repository. Structure is documented below.
- python
Repository Property Map - Specific settings for a Python remote repository. Structure is documented below.
- upstream
Credentials Property Map - The credentials used to access the remote repository. Structure is documented below.
- yum
Repository Property Map - Specific settings for an Yum remote repository. Structure is documented below.
RepositoryRemoteRepositoryConfigAptRepository, RepositoryRemoteRepositoryConfigAptRepositoryArgs
- Public
Repository RepositoryRemote Repository Config Apt Repository Public Repository - One of the publicly available Apt repositories supported by Artifact Registry. Structure is documented below.
- Public
Repository RepositoryRemote Repository Config Apt Repository Public Repository - One of the publicly available Apt repositories supported by Artifact Registry. Structure is documented below.
- public
Repository RepositoryRemote Repository Config Apt Repository Public Repository - One of the publicly available Apt repositories supported by Artifact Registry. Structure is documented below.
- public
Repository RepositoryRemote Repository Config Apt Repository Public Repository - One of the publicly available Apt repositories supported by Artifact Registry. Structure is documented below.
- public_
repository RepositoryRemote Repository Config Apt Repository Public Repository - One of the publicly available Apt repositories supported by Artifact Registry. Structure is documented below.
- public
Repository Property Map - One of the publicly available Apt repositories supported by Artifact Registry. Structure is documented below.
RepositoryRemoteRepositoryConfigAptRepositoryPublicRepository, RepositoryRemoteRepositoryConfigAptRepositoryPublicRepositoryArgs
- Repository
Base string - A common public repository base for Yum.
Possible values are:
CENTOS
,CENTOS_DEBUG
,CENTOS_VAULT
,CENTOS_STREAM
,ROCKY
,EPEL
. - Repository
Path string - Specific repository from the base, e.g.
"pub/rocky/9/BaseOS/x86_64/os"
- Repository
Base string - A common public repository base for Yum.
Possible values are:
CENTOS
,CENTOS_DEBUG
,CENTOS_VAULT
,CENTOS_STREAM
,ROCKY
,EPEL
. - Repository
Path string - Specific repository from the base, e.g.
"pub/rocky/9/BaseOS/x86_64/os"
- repository
Base String - A common public repository base for Yum.
Possible values are:
CENTOS
,CENTOS_DEBUG
,CENTOS_VAULT
,CENTOS_STREAM
,ROCKY
,EPEL
. - repository
Path String - Specific repository from the base, e.g.
"pub/rocky/9/BaseOS/x86_64/os"
- repository
Base string - A common public repository base for Yum.
Possible values are:
CENTOS
,CENTOS_DEBUG
,CENTOS_VAULT
,CENTOS_STREAM
,ROCKY
,EPEL
. - repository
Path string - Specific repository from the base, e.g.
"pub/rocky/9/BaseOS/x86_64/os"
- repository_
base str - A common public repository base for Yum.
Possible values are:
CENTOS
,CENTOS_DEBUG
,CENTOS_VAULT
,CENTOS_STREAM
,ROCKY
,EPEL
. - repository_
path str - Specific repository from the base, e.g.
"pub/rocky/9/BaseOS/x86_64/os"
- repository
Base String - A common public repository base for Yum.
Possible values are:
CENTOS
,CENTOS_DEBUG
,CENTOS_VAULT
,CENTOS_STREAM
,ROCKY
,EPEL
. - repository
Path String - Specific repository from the base, e.g.
"pub/rocky/9/BaseOS/x86_64/os"
RepositoryRemoteRepositoryConfigDockerRepository, RepositoryRemoteRepositoryConfigDockerRepositoryArgs
- Custom
Repository RepositoryRemote Repository Config Docker Repository Custom Repository - Settings for a remote repository with a custom uri. Structure is documented below.
- Public
Repository string - Address of the remote repository.
Default value is
DOCKER_HUB
. Possible values are:DOCKER_HUB
.
- Custom
Repository RepositoryRemote Repository Config Docker Repository Custom Repository - Settings for a remote repository with a custom uri. Structure is documented below.
- Public
Repository string - Address of the remote repository.
Default value is
DOCKER_HUB
. Possible values are:DOCKER_HUB
.
- custom
Repository RepositoryRemote Repository Config Docker Repository Custom Repository - Settings for a remote repository with a custom uri. Structure is documented below.
- public
Repository String - Address of the remote repository.
Default value is
DOCKER_HUB
. Possible values are:DOCKER_HUB
.
- custom
Repository RepositoryRemote Repository Config Docker Repository Custom Repository - Settings for a remote repository with a custom uri. Structure is documented below.
- public
Repository string - Address of the remote repository.
Default value is
DOCKER_HUB
. Possible values are:DOCKER_HUB
.
- custom_
repository RepositoryRemote Repository Config Docker Repository Custom Repository - Settings for a remote repository with a custom uri. Structure is documented below.
- public_
repository str - Address of the remote repository.
Default value is
DOCKER_HUB
. Possible values are:DOCKER_HUB
.
- custom
Repository Property Map - Settings for a remote repository with a custom uri. Structure is documented below.
- public
Repository String - Address of the remote repository.
Default value is
DOCKER_HUB
. Possible values are:DOCKER_HUB
.
RepositoryRemoteRepositoryConfigDockerRepositoryCustomRepository, RepositoryRemoteRepositoryConfigDockerRepositoryCustomRepositoryArgs
- Uri string
- Specific uri to the registry, e.g.
"https://pypi.io"
- Uri string
- Specific uri to the registry, e.g.
"https://pypi.io"
- uri String
- Specific uri to the registry, e.g.
"https://pypi.io"
- uri string
- Specific uri to the registry, e.g.
"https://pypi.io"
- uri str
- Specific uri to the registry, e.g.
"https://pypi.io"
- uri String
- Specific uri to the registry, e.g.
"https://pypi.io"
RepositoryRemoteRepositoryConfigMavenRepository, RepositoryRemoteRepositoryConfigMavenRepositoryArgs
- Custom
Repository RepositoryRemote Repository Config Maven Repository Custom Repository - Settings for a remote repository with a custom uri. Structure is documented below.
- Public
Repository string - Address of the remote repository.
Default value is
MAVEN_CENTRAL
. Possible values are:MAVEN_CENTRAL
.
- Custom
Repository RepositoryRemote Repository Config Maven Repository Custom Repository - Settings for a remote repository with a custom uri. Structure is documented below.
- Public
Repository string - Address of the remote repository.
Default value is
MAVEN_CENTRAL
. Possible values are:MAVEN_CENTRAL
.
- custom
Repository RepositoryRemote Repository Config Maven Repository Custom Repository - Settings for a remote repository with a custom uri. Structure is documented below.
- public
Repository String - Address of the remote repository.
Default value is
MAVEN_CENTRAL
. Possible values are:MAVEN_CENTRAL
.
- custom
Repository RepositoryRemote Repository Config Maven Repository Custom Repository - Settings for a remote repository with a custom uri. Structure is documented below.
- public
Repository string - Address of the remote repository.
Default value is
MAVEN_CENTRAL
. Possible values are:MAVEN_CENTRAL
.
- custom_
repository RepositoryRemote Repository Config Maven Repository Custom Repository - Settings for a remote repository with a custom uri. Structure is documented below.
- public_
repository str - Address of the remote repository.
Default value is
MAVEN_CENTRAL
. Possible values are:MAVEN_CENTRAL
.
- custom
Repository Property Map - Settings for a remote repository with a custom uri. Structure is documented below.
- public
Repository String - Address of the remote repository.
Default value is
MAVEN_CENTRAL
. Possible values are:MAVEN_CENTRAL
.
RepositoryRemoteRepositoryConfigMavenRepositoryCustomRepository, RepositoryRemoteRepositoryConfigMavenRepositoryCustomRepositoryArgs
- Uri string
- Specific uri to the registry, e.g.
"https://pypi.io"
- Uri string
- Specific uri to the registry, e.g.
"https://pypi.io"
- uri String
- Specific uri to the registry, e.g.
"https://pypi.io"
- uri string
- Specific uri to the registry, e.g.
"https://pypi.io"
- uri str
- Specific uri to the registry, e.g.
"https://pypi.io"
- uri String
- Specific uri to the registry, e.g.
"https://pypi.io"
RepositoryRemoteRepositoryConfigNpmRepository, RepositoryRemoteRepositoryConfigNpmRepositoryArgs
- Custom
Repository RepositoryRemote Repository Config Npm Repository Custom Repository - Settings for a remote repository with a custom uri. Structure is documented below.
- Public
Repository string - Address of the remote repository.
Default value is
NPMJS
. Possible values are:NPMJS
.
- Custom
Repository RepositoryRemote Repository Config Npm Repository Custom Repository - Settings for a remote repository with a custom uri. Structure is documented below.
- Public
Repository string - Address of the remote repository.
Default value is
NPMJS
. Possible values are:NPMJS
.
- custom
Repository RepositoryRemote Repository Config Npm Repository Custom Repository - Settings for a remote repository with a custom uri. Structure is documented below.
- public
Repository String - Address of the remote repository.
Default value is
NPMJS
. Possible values are:NPMJS
.
- custom
Repository RepositoryRemote Repository Config Npm Repository Custom Repository - Settings for a remote repository with a custom uri. Structure is documented below.
- public
Repository string - Address of the remote repository.
Default value is
NPMJS
. Possible values are:NPMJS
.
- custom_
repository RepositoryRemote Repository Config Npm Repository Custom Repository - Settings for a remote repository with a custom uri. Structure is documented below.
- public_
repository str - Address of the remote repository.
Default value is
NPMJS
. Possible values are:NPMJS
.
- custom
Repository Property Map - Settings for a remote repository with a custom uri. Structure is documented below.
- public
Repository String - Address of the remote repository.
Default value is
NPMJS
. Possible values are:NPMJS
.
RepositoryRemoteRepositoryConfigNpmRepositoryCustomRepository, RepositoryRemoteRepositoryConfigNpmRepositoryCustomRepositoryArgs
- Uri string
- Specific uri to the registry, e.g.
"https://pypi.io"
- Uri string
- Specific uri to the registry, e.g.
"https://pypi.io"
- uri String
- Specific uri to the registry, e.g.
"https://pypi.io"
- uri string
- Specific uri to the registry, e.g.
"https://pypi.io"
- uri str
- Specific uri to the registry, e.g.
"https://pypi.io"
- uri String
- Specific uri to the registry, e.g.
"https://pypi.io"
RepositoryRemoteRepositoryConfigPythonRepository, RepositoryRemoteRepositoryConfigPythonRepositoryArgs
- Custom
Repository RepositoryRemote Repository Config Python Repository Custom Repository - Settings for a remote repository with a custom uri. Structure is documented below.
- Public
Repository string - Address of the remote repository.
Default value is
PYPI
. Possible values are:PYPI
.
- Custom
Repository RepositoryRemote Repository Config Python Repository Custom Repository - Settings for a remote repository with a custom uri. Structure is documented below.
- Public
Repository string - Address of the remote repository.
Default value is
PYPI
. Possible values are:PYPI
.
- custom
Repository RepositoryRemote Repository Config Python Repository Custom Repository - Settings for a remote repository with a custom uri. Structure is documented below.
- public
Repository String - Address of the remote repository.
Default value is
PYPI
. Possible values are:PYPI
.
- custom
Repository RepositoryRemote Repository Config Python Repository Custom Repository - Settings for a remote repository with a custom uri. Structure is documented below.
- public
Repository string - Address of the remote repository.
Default value is
PYPI
. Possible values are:PYPI
.
- custom_
repository RepositoryRemote Repository Config Python Repository Custom Repository - Settings for a remote repository with a custom uri. Structure is documented below.
- public_
repository str - Address of the remote repository.
Default value is
PYPI
. Possible values are:PYPI
.
- custom
Repository Property Map - Settings for a remote repository with a custom uri. Structure is documented below.
- public
Repository String - Address of the remote repository.
Default value is
PYPI
. Possible values are:PYPI
.
RepositoryRemoteRepositoryConfigPythonRepositoryCustomRepository, RepositoryRemoteRepositoryConfigPythonRepositoryCustomRepositoryArgs
- Uri string
- Specific uri to the registry, e.g.
"https://pypi.io"
- Uri string
- Specific uri to the registry, e.g.
"https://pypi.io"
- uri String
- Specific uri to the registry, e.g.
"https://pypi.io"
- uri string
- Specific uri to the registry, e.g.
"https://pypi.io"
- uri str
- Specific uri to the registry, e.g.
"https://pypi.io"
- uri String
- Specific uri to the registry, e.g.
"https://pypi.io"
RepositoryRemoteRepositoryConfigUpstreamCredentials, RepositoryRemoteRepositoryConfigUpstreamCredentialsArgs
- Username
Password RepositoryCredentials Remote Repository Config Upstream Credentials Username Password Credentials - Use username and password to access the remote repository. Structure is documented below.
- Username
Password RepositoryCredentials Remote Repository Config Upstream Credentials Username Password Credentials - Use username and password to access the remote repository. Structure is documented below.
- username
Password RepositoryCredentials Remote Repository Config Upstream Credentials Username Password Credentials - Use username and password to access the remote repository. Structure is documented below.
- username
Password RepositoryCredentials Remote Repository Config Upstream Credentials Username Password Credentials - Use username and password to access the remote repository. Structure is documented below.
- username_
password_ Repositorycredentials Remote Repository Config Upstream Credentials Username Password Credentials - Use username and password to access the remote repository. Structure is documented below.
- username
Password Property MapCredentials - Use username and password to access the remote repository. Structure is documented below.
RepositoryRemoteRepositoryConfigUpstreamCredentialsUsernamePasswordCredentials, RepositoryRemoteRepositoryConfigUpstreamCredentialsUsernamePasswordCredentialsArgs
- Password
Secret stringVersion - The Secret Manager key version that holds the password to access the
remote repository. Must be in the format of
projects/{project}/secrets/{secret}/versions/{version}
. - Username string
- The username to access the remote repository.
- Password
Secret stringVersion - The Secret Manager key version that holds the password to access the
remote repository. Must be in the format of
projects/{project}/secrets/{secret}/versions/{version}
. - Username string
- The username to access the remote repository.
- password
Secret StringVersion - The Secret Manager key version that holds the password to access the
remote repository. Must be in the format of
projects/{project}/secrets/{secret}/versions/{version}
. - username String
- The username to access the remote repository.
- password
Secret stringVersion - The Secret Manager key version that holds the password to access the
remote repository. Must be in the format of
projects/{project}/secrets/{secret}/versions/{version}
. - username string
- The username to access the remote repository.
- password_
secret_ strversion - The Secret Manager key version that holds the password to access the
remote repository. Must be in the format of
projects/{project}/secrets/{secret}/versions/{version}
. - username str
- The username to access the remote repository.
- password
Secret StringVersion - The Secret Manager key version that holds the password to access the
remote repository. Must be in the format of
projects/{project}/secrets/{secret}/versions/{version}
. - username String
- The username to access the remote repository.
RepositoryRemoteRepositoryConfigYumRepository, RepositoryRemoteRepositoryConfigYumRepositoryArgs
- Public
Repository RepositoryRemote Repository Config Yum Repository Public Repository - One of the publicly available Yum repositories supported by Artifact Registry. Structure is documented below.
- Public
Repository RepositoryRemote Repository Config Yum Repository Public Repository - One of the publicly available Yum repositories supported by Artifact Registry. Structure is documented below.
- public
Repository RepositoryRemote Repository Config Yum Repository Public Repository - One of the publicly available Yum repositories supported by Artifact Registry. Structure is documented below.
- public
Repository RepositoryRemote Repository Config Yum Repository Public Repository - One of the publicly available Yum repositories supported by Artifact Registry. Structure is documented below.
- public_
repository RepositoryRemote Repository Config Yum Repository Public Repository - One of the publicly available Yum repositories supported by Artifact Registry. Structure is documented below.
- public
Repository Property Map - One of the publicly available Yum repositories supported by Artifact Registry. Structure is documented below.
RepositoryRemoteRepositoryConfigYumRepositoryPublicRepository, RepositoryRemoteRepositoryConfigYumRepositoryPublicRepositoryArgs
- Repository
Base string - A common public repository base for Yum.
Possible values are:
CENTOS
,CENTOS_DEBUG
,CENTOS_VAULT
,CENTOS_STREAM
,ROCKY
,EPEL
. - Repository
Path string - Specific repository from the base, e.g.
"pub/rocky/9/BaseOS/x86_64/os"
- Repository
Base string - A common public repository base for Yum.
Possible values are:
CENTOS
,CENTOS_DEBUG
,CENTOS_VAULT
,CENTOS_STREAM
,ROCKY
,EPEL
. - Repository
Path string - Specific repository from the base, e.g.
"pub/rocky/9/BaseOS/x86_64/os"
- repository
Base String - A common public repository base for Yum.
Possible values are:
CENTOS
,CENTOS_DEBUG
,CENTOS_VAULT
,CENTOS_STREAM
,ROCKY
,EPEL
. - repository
Path String - Specific repository from the base, e.g.
"pub/rocky/9/BaseOS/x86_64/os"
- repository
Base string - A common public repository base for Yum.
Possible values are:
CENTOS
,CENTOS_DEBUG
,CENTOS_VAULT
,CENTOS_STREAM
,ROCKY
,EPEL
. - repository
Path string - Specific repository from the base, e.g.
"pub/rocky/9/BaseOS/x86_64/os"
- repository_
base str - A common public repository base for Yum.
Possible values are:
CENTOS
,CENTOS_DEBUG
,CENTOS_VAULT
,CENTOS_STREAM
,ROCKY
,EPEL
. - repository_
path str - Specific repository from the base, e.g.
"pub/rocky/9/BaseOS/x86_64/os"
- repository
Base String - A common public repository base for Yum.
Possible values are:
CENTOS
,CENTOS_DEBUG
,CENTOS_VAULT
,CENTOS_STREAM
,ROCKY
,EPEL
. - repository
Path String - Specific repository from the base, e.g.
"pub/rocky/9/BaseOS/x86_64/os"
RepositoryVirtualRepositoryConfig, RepositoryVirtualRepositoryConfigArgs
- Upstream
Policies List<RepositoryVirtual Repository Config Upstream Policy> - Policies that configure the upstream artifacts distributed by the Virtual Repository. Upstream policies cannot be set on a standard repository. Structure is documented below.
- Upstream
Policies []RepositoryVirtual Repository Config Upstream Policy - Policies that configure the upstream artifacts distributed by the Virtual Repository. Upstream policies cannot be set on a standard repository. Structure is documented below.
- upstream
Policies List<RepositoryVirtual Repository Config Upstream Policy> - Policies that configure the upstream artifacts distributed by the Virtual Repository. Upstream policies cannot be set on a standard repository. Structure is documented below.
- upstream
Policies RepositoryVirtual Repository Config Upstream Policy[] - Policies that configure the upstream artifacts distributed by the Virtual Repository. Upstream policies cannot be set on a standard repository. Structure is documented below.
- upstream_
policies Sequence[RepositoryVirtual Repository Config Upstream Policy] - Policies that configure the upstream artifacts distributed by the Virtual Repository. Upstream policies cannot be set on a standard repository. Structure is documented below.
- upstream
Policies List<Property Map> - Policies that configure the upstream artifacts distributed by the Virtual Repository. Upstream policies cannot be set on a standard repository. Structure is documented below.
RepositoryVirtualRepositoryConfigUpstreamPolicy, RepositoryVirtualRepositoryConfigUpstreamPolicyArgs
- Id string
- The user-provided ID of the upstream policy.
- Priority int
- Entries with a greater priority value take precedence in the pull order.
- Repository string
- A reference to the repository resource, for example: "projects/p1/locations/us-central1/repository/repo1".
- Id string
- The user-provided ID of the upstream policy.
- Priority int
- Entries with a greater priority value take precedence in the pull order.
- Repository string
- A reference to the repository resource, for example: "projects/p1/locations/us-central1/repository/repo1".
- id String
- The user-provided ID of the upstream policy.
- priority Integer
- Entries with a greater priority value take precedence in the pull order.
- repository String
- A reference to the repository resource, for example: "projects/p1/locations/us-central1/repository/repo1".
- id string
- The user-provided ID of the upstream policy.
- priority number
- Entries with a greater priority value take precedence in the pull order.
- repository string
- A reference to the repository resource, for example: "projects/p1/locations/us-central1/repository/repo1".
- id str
- The user-provided ID of the upstream policy.
- priority int
- Entries with a greater priority value take precedence in the pull order.
- repository str
- A reference to the repository resource, for example: "projects/p1/locations/us-central1/repository/repo1".
- id String
- The user-provided ID of the upstream policy.
- priority Number
- Entries with a greater priority value take precedence in the pull order.
- repository String
- A reference to the repository resource, for example: "projects/p1/locations/us-central1/repository/repo1".
Import
Repository can be imported using any of these accepted formats:
projects/{{project}}/locations/{{location}}/repositories/{{repository_id}}
{{project}}/{{location}}/{{repository_id}}
{{location}}/{{repository_id}}
{{repository_id}}
When using the pulumi import
command, Repository can be imported using one of the formats above. For example:
$ pulumi import gcp:artifactregistry/repository:Repository default projects/{{project}}/locations/{{location}}/repositories/{{repository_id}}
$ pulumi import gcp:artifactregistry/repository:Repository default {{project}}/{{location}}/{{repository_id}}
$ pulumi import gcp:artifactregistry/repository:Repository default {{location}}/{{repository_id}}
$ pulumi import gcp:artifactregistry/repository:Repository default {{repository_id}}
To learn more about importing existing cloud resources, see Importing resources.
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.