Skip to content

Commit

Permalink
#14: finish off docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Dillon Giacoppo committed Dec 4, 2018
1 parent f702594 commit 7a6189c
Show file tree
Hide file tree
Showing 9 changed files with 248 additions and 28 deletions.
8 changes: 4 additions & 4 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ with the proper credentials before it can be used.
* [Groups](r/group.md)
* [Users](r/user.md)
* [Permission Targets](r/permission_target.md)
* Local Repositories
* Remote Repositories
* Replication Configurations
* Virtual Repositories
* [Local Repositories](r/local_repository.md)
* [Remote Repositories](r/remote_repository.md)
* [Replication Configurations](r/replication_config.md)
* [Virtual Repositories](r/virtual_repository.md)


## Example Usage
Expand Down
6 changes: 3 additions & 3 deletions docs/r/group.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ Provides an Artifactory group resource. This can be used to create and manage Ar
```hcl
# Create a new Artifactory group called terraform
resource "artifactory_group" "test-group" {
name = "terraform"
description = "test group"
admin_privileges = false
name = "terraform"
description = "test group"
admin_privileges = false
}
```

Expand Down
48 changes: 48 additions & 0 deletions docs/r/local_repository.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# artifactory_local_repository

Provides an Artifactory local repository resource. This can be used to create and manage Artifactory local repositories.

## Example Usage

```hcl
# Create a new Artifactory local repository called my-local
resource "artifactory_local_repository" "my-local" {
key = "my-local"
package_type = "npm"
}
```

## 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:

* `key` - (Required)
* `package_type` - (Required)
* `description` - (Optional)
* `notes` - (Optional)
* `includes_pattern` - (Optional)
* `excludes_pattern` - (Optional)
* `repo_layout_ref` - (Optional)
* `handle_releases` - (Optional)
* `handle_snapshots` - (Optional)
* `max_unique_snapshots` - (Optional)
* `debian_trivial_layout` - (Optional)
* `checksum_policy_type` - (Optional)
* `max_unique_tags` - (Optional)
* `snapshot_version_behavior` - (Optional)
* `suppress_pom_consistency_checks` - (Optional)
* `blacked_out` - (Optional)
* `property_sets` - (Optional)
* `archive_browsing_enabled` - (Optional)
* `calculate_yum_metadata` - (Optional)
* `yum_root_depth` - (Optional)
* `docker_api_version` - (Optional)
* `enable_file_lists_indexing` - (Optional)

## Import

Local repositories can be imported using their name, e.g.

```
$ terraform import artifactory_local_repository.my-local my-local
```
32 changes: 14 additions & 18 deletions docs/r/permission_target.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,20 @@ Provides an Artifactory permission target resource. This can be used to create a
```hcl
# Create a new Artifactory permission target called testpermission
resource "artifactory_permission_targets" "terraform-test-permission" {
name = "testpermission"
repositories = ["myrepo"]
users = [
{
name = "test_user"
permissions = [
"r",
"w"
]
}
]
groups = [
{
name = "readers"
permissions = ["r"]
}
]
name = "testpermission"
repositories = ["myrepo"]
users = [
{
name = "test_user"
permissions = ["r", "w"]
}
]
groups = [
{
name = "readers"
permissions = ["r"]
}
]
}
```

Expand Down
65 changes: 65 additions & 0 deletions docs/r/remote_repository.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# artifactory_remote_repository

Provides an Artifactory remote repository resource. This can be used to create and manage Artifactory remote repositories.

## Example Usage

```hcl
# Create a new Artifactory remote repository called my-remote
resource "artifactory_remote_repository" "my-remote" {
key = "my-remote"
package_type = "npm"
url = "https://registry.npmjs.org/"
repo_layout_ref = "npm-default"
}
```

## 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:

* `key` - (Required)
* `package_type` - (Required)
* `url` - (Required)
* `description` - (Optional)
* `notes` - (Optional)
* `includes_pattern` - (Optional)
* `excludes_pattern` - (Optional)
* `repo_layout_ref` - (Optional)
* `handle_releases` - (Optional)
* `handle_snapshots` - (Optional)
* `max_unique_snapshots` - (Optional)
* `suppress_pom_consistency_checks` - (Optional)
* `username` - (Optional)
* `password` - (Optional)
* `proxy` - (Optional)
* `hard_fail` - (Optional)
* `offline` - (Optional)
* `blacked_out` - (Optional)
* `store_artifacts_locally` - (Optional)
* `socket_timeout_millis` - (Optional)
* `local_address` - (Optional)
* `retrieval_cache_period_seconds` - (Optional)
* `missed_cache_period_seconds` - (Optional)
* `unused_artifacts_cleanup_period_hours` - (Optional)
* `fetch_jars_eagerly` - (Optional)
* `fetch_sources_eagerly` - (Optional)
* `share_configuration` - (Optional)
* `synchronize_properties` - (Optional)
* `block_mismatching_mime_types` - (Optional)
* `property_sets` - (Optional)
* `allow_any_host_auth` - (Optional)
* `enable_cookie_management` - (Optional)
* `client_tls_certificate` - (Optional)
* `pypi_registry_url` - (Optional)
* `bypass_head_requests` - (Optional)
* `enable_token_authentication` - (Optional)


## Import

Remote repositories can be imported using their name, e.g.

```
$ terraform import artifactory_remote_repository.my-remote my-remote
```
58 changes: 58 additions & 0 deletions docs/r/replication_config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# artifactory_replication_config

Provides an Artifactory replication config resource. This can be used to create and manage Artifactory replications.

## Example Usage

```hcl
# Create a replication between two artifactory local repositories
resource "artifactory_local_repository" "provider_test_source" {
key = "provider_test_source"
package_type = "maven"
}
resource "artifactory_local_repository" "provider_test_dest" {
key = "provider_test_dest"
package_type = "maven"
}
resource "artifactory_replication_config" "foo-rep" {
repo_key = "${artifactory_local_repository.provider_test_source.key}"
cron_exp = "0 0 * * * ?"
enable_event_replication = true
replications = [
{
url = "$var.artifactory_url"
username = "$var.artifactory_username"
password = "$var.artifactory_password"
}
]
}
```

## Argument Reference

The following arguments are supported:

* `repo_key` - (Required)
* `cron_exp` - (Required)
* `enable_event_replication` - (Optional)
* `replications` - (Optional)
* `url` - (Required)
* `socket_timeout_millis` - (Optional)
* `username` - (Optional)
* `password` - (Optional)
* `enabled` - (Optional)
* `sync_deletes` - (Optional)
* `sync_properties` - (Optional)
* `sync_statistics` - (Optional)
* `path_prefix` - (Optional)

## Import

Replication configs can be imported using their repo key, e.g.

```
$ terraform import artifactory_replication_config.foo-rep provider_test_source
```
6 changes: 3 additions & 3 deletions docs/r/user.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ Provides an Artifactory user resource. This can be used to create and manage Art
```hcl
# Create a new Artifactory user called terraform
resource "artifactory_user" "test-user" {
name = "terraform"
email = "test-user@artifactory-terraform.com"
groups = ["logged-in-users", "readers"]
name = "terraform"
email = "test-user@artifactory-terraform.com"
groups = ["logged-in-users", "readers"]
}
```

Expand Down
51 changes: 51 additions & 0 deletions docs/r/virtual_repository.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# artifactory_virtual_repository

Provides an Artifactory virtual repository resource. This can be used to create and manage Artifactory virtual repositories.

## Example Usage

```hcl
resource "artifactory_local_repository" "bar" {
key = "bar"
package_type = "maven"
}
resource "artifactory_local_repository" "baz" {
key = "baz"
package_type = "maven"
}
resource "artifactory_virtual_repository" "foo" {
key = "foo"
package_type = "maven"
repositories = [
"${artifactory_local_repository.bar.key}",
"${artifactory_local_repository.baz.key}"
]
}
```

## 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:

* `key` - (Optional)
* `package_type` - (Optional)
* `repositories` - (Optional)
* `description` - (Optional)
* `notes` - (Optional)
* `includes_pattern` - (Optional)
* `excludes_pattern` - (Optional)
* `debian_trivial_layout` - (Optional)
* `artifactory_requests_can_retrieve_remote_artifacts` - (Optional)
* `key_pair` - (Optional)
* `pom_repository_references_cleanup_policy` - (Optional)
* `default_deployment_repo` - (Optional)

## Import

Virtual repositories can be imported using their name, e.g.

```
$ terraform import artifactory_virtual_repository.foo foo
```
2 changes: 2 additions & 0 deletions pkg/artifactory/resource_artifactory_permission_target.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ func resourceArtifactoryPermissionTargets() *schema.Resource {
"name": {
Type: schema.TypeString,
Required: true,
// Required as it is impossible to remove a principal as the absence of one does not
// count as a deletion
ForceNew: true,
},
"permissions": {
Expand Down

0 comments on commit 7a6189c

Please sign in to comment.