-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…ry-properties Add resource for repository properties
- Loading branch information
Showing
11 changed files
with
748 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "artifactory_item_properties Resource - terraform-provider-artifactory" | ||
subcategory: "Artifact" | ||
description: |- | ||
Provides a resource for managaing item (file, folder, or repository) properties. When a folder is used property attachment is recursive by default. See JFrog documentation https://jfrog.com/help/r/jfrog-artifactory-documentation/working-with-jfrog-properties for more details. | ||
--- | ||
|
||
# artifactory_item_properties (Resource) | ||
|
||
Provides a resource for managaing item (file, folder, or repository) properties. When a folder is used property attachment is recursive by default. See [JFrog documentation](https://jfrog.com/help/r/jfrog-artifactory-documentation/working-with-jfrog-properties) for more details. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "artifactory_item_properties" "my-repo-properties" { | ||
repo_key = "my-generic-local" | ||
properties = { | ||
"key1": ["value1"], | ||
"key2": ["value2", "value3"] | ||
} | ||
is_recursive = true | ||
} | ||
resource "artifactory_item_properties" "my-folder-properties" { | ||
repo_key = "my-generic-local" | ||
item_path = "folder/subfolder" | ||
properties = { | ||
"key1": ["value1"], | ||
"key2": ["value2", "value3"] | ||
} | ||
is_recursive = true | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `properties` (Map of Set of String) Map of key and list of values. | ||
|
||
~>Keys are limited up to 255 characters and values are limited up to 2,400 characters. Using properties with values over this limit might cause backend issues. | ||
|
||
~>The following special characters are forbidden in the key field: `)(}{][*+^$/~``!@#%&<>;=,±§` and the space character. | ||
- `repo_key` (String) Respository key. | ||
|
||
### Optional | ||
|
||
- `is_recursive` (Boolean) Add this property to the selected folder and to all of artifacts and folders under this folder. Default to `false` | ||
- `item_path` (String) The relative path of the item (file/folder/repository). Leave unset for repository. | ||
|
||
## Import | ||
|
||
Import is supported using the following syntax: | ||
|
||
```shell | ||
terraform import artifactory_item_properties.my-repo-properties repo_key | ||
|
||
terraform import artifactory_item_properties.my-folder-properties repo_key:folder/subfolder | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
terraform import artifactory_item_properties.my-repo-properties repo_key | ||
|
||
terraform import artifactory_item_properties.my-folder-properties repo_key:folder/subfolder |
18 changes: 18 additions & 0 deletions
18
examples/resources/artifactory_item_properties/resource.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
resource "artifactory_item_properties" "my-repo-properties" { | ||
repo_key = "my-generic-local" | ||
properties = { | ||
"key1": ["value1"], | ||
"key2": ["value2", "value3"] | ||
} | ||
is_recursive = true | ||
} | ||
|
||
resource "artifactory_item_properties" "my-folder-properties" { | ||
repo_key = "my-generic-local" | ||
item_path = "folder/subfolder" | ||
properties = { | ||
"key1": ["value1"], | ||
"key2": ["value2", "value3"] | ||
} | ||
is_recursive = true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...resource/resource_artifactory_artifact.go → ...artifact/resource_artifactory_artifact.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package resource | ||
package artifact | ||
|
||
import ( | ||
"context" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.