GoogleCloudPlatform / terraform-google-artifact-registry

Create and manage Artifact Registry repositories
https://registry.terraform.io/modules/GoogleCloudPlatform/artifact-registry/google
Apache License 2.0
11 stars 10 forks source link

fix: virtual repository multiple upstream_policies #13

Closed romancin closed 8 months ago

romancin commented 9 months ago

With current module, defining multiple upstream_policies in the virtual_repository_config variable doesn't work, only the last one is applied.

This PR changes this variable type so upstream_configs is a list. As an example of a working calling to this module using the changes included in this PR:

module "my_repo_3" {
  ...
  mode          = "VIRTUAL_REPOSITORY"
  virtual_repository_config = {
    upstream_policies = [
      {
        id         = module.my_repo_1.artifact_name
        repository = module.my_repo_1.artifact_id
        priority   = 20
      },
      {
        id         = module.my_repo_2.artifact_name
        repository = module.my_repo_2.artifact_id
        priority   = 10
      }
    ]
  }
}

This PR fixes https://github.com/GoogleCloudPlatform/terraform-google-artifact-registry/issues/11

g-awmalik commented 8 months ago

/gcbrun

g-awmalik commented 8 months ago

@romancin - thanks for the PR. Can you please rebase this with master?

romancin commented 8 months ago

@romancin - thanks for the PR. Can you please rebase this with master?

Of course! Done!

prabhu34 commented 8 months ago

/gcbrun

prabhu34 commented 8 months ago

@romancin - thanks for the PR. Can you please rebase this with master?

Of course! Done!

@romancin I have pushed another change to main. Can you do rebase again?

romancin commented 8 months ago

@romancin - thanks for the PR. Can you please rebase this with master?

Of course! Done!

@romancin I have pushed another change to main. Can you do rebase again?

Of course! Done!

prabhu34 commented 8 months ago

/gcbrun