diff --git a/README.md b/README.md index fbbb371..f2548e9 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ Functional examples are included in the | members | Artifact Registry Reader and Writer roles for Users/SAs. Key names must be readers and/or writers | `map(list(string))` | `{}` | no | | mode | 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 | `string` | `"STANDARD_REPOSITORY"` | no | | project\_id | The project ID to create the repository | `string` | n/a | yes | -| remote\_repository\_config | Configuration specific for a Remote Repository. |
object({| `null` | no | +| remote\_repository\_config | Configuration specific for a Remote Repository. |
description = optional(string)
disable_upstream_validation = optional(bool, true)
upstream_credentials = optional(object({
username = string
password_secret_version = string
}), null)
apt_repository = optional(object({
public_repository = optional(object({
repository_base = string
repository_path = string
}), null)
}), null)
docker_repository = optional(object({
public_repository = optional(string, "DOCKER_HUB")
custom_repository = optional(object({
uri = string
}), null)
}), null)
maven_repository = optional(object({
public_repository = optional(string, "MAVEN_CENTRAL")
custom_repository = optional(object({
uri = string
}), null)
}), null)
npm_repository = optional(object({
public_repository = optional(string, "NPMJS")
custom_repository = optional(object({
uri = string
}), null)
}), null)
python_repository = optional(object({
public_repository = optional(string, "PYPI")
custom_repository = optional(object({
uri = string
}), null)
}), null)
yum_repository = optional(object({
public_repository = optional(object({
repository_base = string
repository_path = string
}), null)
}), null)
})
object({| `null` | no | | repository\_id | The repository name | `string` | n/a | yes | | virtual\_repository\_config | Configuration specific for a Virtual Repository. |
description = optional(string)
disable_upstream_validation = optional(bool, true)
upstream_credentials = optional(object({
username = string
password_secret_version = string
}), null)
apt_repository = optional(object({
public_repository = optional(object({
repository_base = string
repository_path = string
}), null)
}), null)
docker_repository = optional(object({
public_repository = optional(string)
custom_repository = optional(object({
uri = string
}), null)
}), null)
maven_repository = optional(object({
public_repository = optional(string)
custom_repository = optional(object({
uri = string
}), null)
}), null)
npm_repository = optional(object({
public_repository = optional(string)
custom_repository = optional(object({
uri = string
}), null)
}), null)
python_repository = optional(object({
public_repository = optional(string)
custom_repository = optional(object({
uri = string
}), null)
}), null)
yum_repository = optional(object({
public_repository = optional(object({
repository_base = string
repository_path = string
}), null)
}), null)
})
object({| `null` | no | | vpcsc\_policy | The VPC SC policy for project and location. Possible values are: DENY, ALLOW | `string` | `"ALLOW"` | no | diff --git a/docs/upgrading_to_v0.3.0.md b/docs/upgrading_to_v0.3.0.md new file mode 100644 index 0000000..a1cbcbf --- /dev/null +++ b/docs/upgrading_to_v0.3.0.md @@ -0,0 +1,31 @@ +# Upgrading to v0.3.0 + +The v0.3.0 release of **terraform-google-artifact-registry** is a backwards +incompatible release. + +### Defaults for Public Repositories + +Previously, this module provided defaults that pointed at well-known public +repositories. Previously, for example, you could specify remote repository +configuration for Docker Hub like so: + +``` +remote_repository_config = { + docker_repository = {} +} +``` + +And you would get a remote repository configuration that would point to Docker +Hub. Now, you have to explicitly specify that you want Docker Hub like so: + +``` +remote_repository_config = { + docker_repository = { + public_repository = "DOCKER_HUB" + } +} +``` + +This change was made because the previous behavior of defaulting these to +well-known values turned out to be incompatible with specifying custom +repository options via the `custom_repository` argument. diff --git a/variables.tf b/variables.tf index e464151..2213f9c 100644 --- a/variables.tf +++ b/variables.tf @@ -102,25 +102,25 @@ variable "remote_repository_config" { }), null) }), null) docker_repository = optional(object({ - public_repository = optional(string, "DOCKER_HUB") + public_repository = optional(string) custom_repository = optional(object({ uri = string }), null) }), null) maven_repository = optional(object({ - public_repository = optional(string, "MAVEN_CENTRAL") + public_repository = optional(string) custom_repository = optional(object({ uri = string }), null) }), null) npm_repository = optional(object({ - public_repository = optional(string, "NPMJS") + public_repository = optional(string) custom_repository = optional(object({ uri = string }), null) }), null) python_repository = optional(object({ - public_repository = optional(string, "PYPI") + public_repository = optional(string) custom_repository = optional(object({ uri = string }), null)
upstream_policies = optional(list(object({
id = string
repository = string
priority = number
})), null)
})