Skip to content

Commit

Permalink
artifactregistry: add docker tag immutability config (GoogleCloudPlat…
Browse files Browse the repository at this point in the history
  • Loading branch information
DrFaust92 authored and Madhura Phadnis committed Apr 12, 2023
1 parent aefbac8 commit 3762b8a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
15 changes: 15 additions & 0 deletions mmv1/products/artifactregistry/Repository.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@
vars:
repository_id: "my-repository"
description: "example docker repository"
- !ruby/object:Provider::Terraform::Examples
name: "artifact_registry_repository_docker"
primary_resource_id: "my-repo"
vars:
repository_id: "my-repository"
description: "example docker repository"
- !ruby/object:Provider::Terraform::Examples
name: "artifact_registry_repository_cmek"
primary_resource_id: "my-repo"
Expand Down Expand Up @@ -133,6 +139,15 @@
name: updateTime
description: The time when the repository was last updated.
output: true
- !ruby/object:Api::Type::NestedObject
name: 'dockerConfig'
description: |-
Docker repository config contains repository level configuration for the repositories of docker type.
properties:
- !ruby/object:Api::Type::Boolean
name: 'immutableTags'
description: |-
The repository which enabled this flag prevents all tags from being modified, moved or deleted. This does not prevent tags from being created.
- !ruby/object:Api::Type::NestedObject
name: 'mavenConfig'
description: |-
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
resource "google_artifact_registry_repository" "<%= ctx[:primary_resource_id] %>" {
location = "us-central1"
repository_id = "<%= ctx[:vars]['repository_id'] %>"
description = "<%= ctx[:vars]['description'] %>"
format = "DOCKER"

docker_config {
immutable_tags = true
}
}

0 comments on commit 3762b8a

Please sign in to comment.