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

fix!: Don't provide defaults for public repositories #34

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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. | <pre>object({<br> description = optional(string)<br> disable_upstream_validation = optional(bool, true)<br> upstream_credentials = optional(object({<br> username = string<br> password_secret_version = string<br> }), null)<br> apt_repository = optional(object({<br> public_repository = optional(object({<br> repository_base = string<br> repository_path = string<br> }), null)<br> }), null)<br> docker_repository = optional(object({<br> public_repository = optional(string, "DOCKER_HUB")<br> custom_repository = optional(object({<br> uri = string<br> }), null)<br> }), null)<br> maven_repository = optional(object({<br> public_repository = optional(string, "MAVEN_CENTRAL")<br> custom_repository = optional(object({<br> uri = string<br> }), null)<br> }), null)<br> npm_repository = optional(object({<br> public_repository = optional(string, "NPMJS")<br> custom_repository = optional(object({<br> uri = string<br> }), null)<br> }), null)<br> python_repository = optional(object({<br> public_repository = optional(string, "PYPI")<br> custom_repository = optional(object({<br> uri = string<br> }), null)<br> }), null)<br> yum_repository = optional(object({<br> public_repository = optional(object({<br> repository_base = string<br> repository_path = string<br> }), null)<br> }), null)<br> })</pre> | `null` | no |
| remote\_repository\_config | Configuration specific for a Remote Repository. | <pre>object({<br> description = optional(string)<br> disable_upstream_validation = optional(bool, true)<br> upstream_credentials = optional(object({<br> username = string<br> password_secret_version = string<br> }), null)<br> apt_repository = optional(object({<br> public_repository = optional(object({<br> repository_base = string<br> repository_path = string<br> }), null)<br> }), null)<br> docker_repository = optional(object({<br> public_repository = optional(string)<br> custom_repository = optional(object({<br> uri = string<br> }), null)<br> }), null)<br> maven_repository = optional(object({<br> public_repository = optional(string)<br> custom_repository = optional(object({<br> uri = string<br> }), null)<br> }), null)<br> npm_repository = optional(object({<br> public_repository = optional(string)<br> custom_repository = optional(object({<br> uri = string<br> }), null)<br> }), null)<br> python_repository = optional(object({<br> public_repository = optional(string)<br> custom_repository = optional(object({<br> uri = string<br> }), null)<br> }), null)<br> yum_repository = optional(object({<br> public_repository = optional(object({<br> repository_base = string<br> repository_path = string<br> }), null)<br> }), null)<br> })</pre> | `null` | no |
| repository\_id | The repository name | `string` | n/a | yes |
| virtual\_repository\_config | Configuration specific for a Virtual Repository. | <pre>object({<br> upstream_policies = optional(list(object({<br> id = string<br> repository = string<br> priority = number<br> })), null)<br> })</pre> | `null` | no |
| vpcsc\_policy | The VPC SC policy for project and location. Possible values are: DENY, ALLOW | `string` | `"ALLOW"` | no |
Expand Down
31 changes: 31 additions & 0 deletions docs/upgrading_to_v0.3.0.md
Original file line number Diff line number Diff line change
@@ -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.
8 changes: 4 additions & 4 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down