From 1ee9795077096138515e864cb43d156afe13577e Mon Sep 17 00:00:00 2001 From: Alex Hung Date: Mon, 23 Sep 2024 16:02:23 -0700 Subject: [PATCH 1/3] Add Cocoapods package type to virtual repo list --- .../resources/virtual_cocoapods_repository.md | 38 +++++++++++++++++++ .../repository/default_repo_layout_map.go | 1 + .../resource/repository/virtual/virtual.go | 1 + 3 files changed, 40 insertions(+) create mode 100644 docs/resources/virtual_cocoapods_repository.md diff --git a/docs/resources/virtual_cocoapods_repository.md b/docs/resources/virtual_cocoapods_repository.md new file mode 100644 index 000000000..d688afe32 --- /dev/null +++ b/docs/resources/virtual_cocoapods_repository.md @@ -0,0 +1,38 @@ +--- +subcategory: "Virtual Repositories" +--- +# Artifactory Virtual Cocoapods Repository Resource + +Creates a virtual Cocoapods repository. Official documentation can be found [here](https://jfrog.com/help/r/jfrog-artifactory-documentation/set-up-virtual-cocoapods-repositories). + +## Example Usage + +```hcl +resource "artifactory_virtual_cocoapods_repository" "foo-cocoapods" { + key = "foo-cocoapods" + repositories = [] + description = "A test virtual repo" + notes = "Internal description" + includes_pattern = "com/jfrog/**,cloud/jfrog/**" + excludes_pattern = "com/google/**" +} +``` + +## Argument Reference + +Arguments have a one to one mapping with the [JFrog API](https://www.jfrog.com/confluence/display/RTF/Repository+Configuration+JSON). +The following arguments are supported, along with the [common list of arguments for the virtual repositories](virtual.md): + +* `key` - (Required) A mandatory identifier for the repository that must be unique. It cannot begin with a number or + contain spaces or special characters. +* `repositories` - (Optional) The effective list of actual repositories included in this virtual repository. +* `description` - (Optional) +* `notes` - (Optional) + +## Import + +Virtual repositories can be imported using their name, e.g. + +``` +$ terraform import artifactory_virtual_cocoapods_repository.foo-composer foo-cocoapods +``` diff --git a/pkg/artifactory/resource/repository/default_repo_layout_map.go b/pkg/artifactory/resource/repository/default_repo_layout_map.go index bcd2e1997..1ac7d3ca6 100644 --- a/pkg/artifactory/resource/repository/default_repo_layout_map.go +++ b/pkg/artifactory/resource/repository/default_repo_layout_map.go @@ -60,6 +60,7 @@ var defaultRepoLayoutMap = map[string]SupportedRepoClasses{ SupportedRepoTypes: map[string]bool{ "local": true, "remote": true, + "virtual": true, "federated": true, }, }, diff --git a/pkg/artifactory/resource/repository/virtual/virtual.go b/pkg/artifactory/resource/repository/virtual/virtual.go index c7e5c3520..751e017b0 100644 --- a/pkg/artifactory/resource/repository/virtual/virtual.go +++ b/pkg/artifactory/resource/repository/virtual/virtual.go @@ -39,6 +39,7 @@ func (bp RepositoryBaseParams) Id() string { } var PackageTypesLikeGeneric = []string{ + repository.CocoapodsPackageType, repository.ComposerPackageType, repository.GemsPackageType, repository.GenericPackageType, From e076cb73a1cb220b6a1ae2eab765a959ce433611 Mon Sep 17 00:00:00 2001 From: Alex Hung Date: Wed, 25 Sep 2024 12:35:58 -0700 Subject: [PATCH 2/3] Update CHANGELOG --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 490782d99..830cc2d21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 12.1.0 (September 26, 2024) + +IMPROVEMENTS: + +* **New Resource:** artifactory_virtual_cocoapods_repository, which was missing from the provider. Issue: [#1079](https://github.com/jfrog/terraform-provider-artifactory/issues/1079) PR: [#1084](https://github.com/jfrog/terraform-provider-artifactory/pull/1084) + ## 12.0.0 (September 16, 2024). Tested on Artifactory 7.90.10 with Terraform 1.9.6 and OpenTofu 1.8.2 BREAKING CHANGES: From 2a92c3fcd4ccea5a6c41dc706a2522ebe4167fbb Mon Sep 17 00:00:00 2001 From: JFrog CI Date: Wed, 25 Sep 2024 20:10:08 +0000 Subject: [PATCH 3/3] JFrog Pipelines - Add Artifactory version to CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 830cc2d21..442eee605 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## 12.1.0 (September 26, 2024) +## 12.1.0 (September 26, 2024). Tested on Artifactory 7.90.10 with Terraform 1.9.6 and OpenTofu 1.8.2 IMPROVEMENTS: