Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

artifactregistry: add docker tag immutability config #7609

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -135,6 +141,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
}
}