-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #299 from datadrivers/feat/go
feat(repository): Add resources and data sources for go repositories
- Loading branch information
Showing
20 changed files
with
1,218 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
page_title: "Data Source nexus_repository_go_group" | ||
subcategory: "Repository" | ||
description: |- | ||
Use this data source to get an existing go group repository. | ||
--- | ||
# Data Source nexus_repository_go_group | ||
Use this data source to get an existing go group repository. | ||
## Example Usage | ||
```terraform | ||
data "nexus_repository_go_group" "go_public" { | ||
name = "go-public" | ||
} | ||
``` | ||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `name` (String) A unique identifier for this repository | ||
|
||
### Read-Only | ||
|
||
- `group` (List of Object) Configuration for repository group (see [below for nested schema](#nestedatt--group)) | ||
- `id` (String) Used to identify data source at nexus | ||
- `online` (Boolean) Whether this repository accepts incoming requests | ||
- `storage` (List of Object) The storage configuration of the repository (see [below for nested schema](#nestedatt--storage)) | ||
|
||
<a id="nestedatt--group"></a> | ||
### Nested Schema for `group` | ||
|
||
Read-Only: | ||
|
||
- `member_names` (Set of String) | ||
|
||
|
||
<a id="nestedatt--storage"></a> | ||
### Nested Schema for `storage` | ||
|
||
Read-Only: | ||
|
||
- `blob_store_name` (String) | ||
- `strict_content_type_validation` (Boolean) |
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,103 @@ | ||
--- | ||
page_title: "Data Source nexus_repository_go_proxy" | ||
subcategory: "Repository" | ||
description: |- | ||
Use this data source to get an existing go proxy repository. | ||
--- | ||
# Data Source nexus_repository_go_proxy | ||
Use this data source to get an existing go proxy repository. | ||
## Example Usage | ||
```terraform | ||
data "nexus_repository_go_proxy" "golang_org" { | ||
name = "golang-org" | ||
} | ||
``` | ||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `name` (String) A unique identifier for this repository | ||
|
||
### Read-Only | ||
|
||
- `cleanup` (List of Object) Cleanup policies (see [below for nested schema](#nestedatt--cleanup)) | ||
- `http_client` (List of Object) HTTP Client configuration for proxy repositories (see [below for nested schema](#nestedatt--http_client)) | ||
- `id` (String) Used to identify data source at nexus | ||
- `negative_cache` (List of Object) Configuration of the negative cache handling (see [below for nested schema](#nestedatt--negative_cache)) | ||
- `online` (Boolean) Whether this repository accepts incoming requests | ||
- `proxy` (List of Object) Configuration for the proxy repository (see [below for nested schema](#nestedatt--proxy)) | ||
- `routing_rule` (String) The name of the routing rule assigned to this repository | ||
- `storage` (List of Object) The storage configuration of the repository (see [below for nested schema](#nestedatt--storage)) | ||
|
||
<a id="nestedatt--cleanup"></a> | ||
### Nested Schema for `cleanup` | ||
|
||
Read-Only: | ||
|
||
- `policy_names` (Set of String) | ||
|
||
|
||
<a id="nestedatt--http_client"></a> | ||
### Nested Schema for `http_client` | ||
|
||
Read-Only: | ||
|
||
- `authentication` (List of Object) (see [below for nested schema](#nestedobjatt--http_client--authentication)) | ||
- `auto_block` (Boolean) | ||
- `blocked` (Boolean) | ||
- `connection` (List of Object) (see [below for nested schema](#nestedobjatt--http_client--connection)) | ||
|
||
<a id="nestedobjatt--http_client--authentication"></a> | ||
### Nested Schema for `http_client.authentication` | ||
|
||
Read-Only: | ||
|
||
- `ntlm_domain` (String) | ||
- `ntlm_host` (String) | ||
- `password` (String) | ||
- `preemptive` (Boolean) | ||
- `type` (String) | ||
- `username` (String) | ||
|
||
|
||
<a id="nestedobjatt--http_client--connection"></a> | ||
### Nested Schema for `http_client.connection` | ||
|
||
Read-Only: | ||
|
||
- `enable_circular_redirects` (Boolean) | ||
- `enable_cookies` (Boolean) | ||
- `retries` (Number) | ||
- `timeout` (Number) | ||
- `use_trust_store` (Boolean) | ||
- `user_agent_suffix` (String) | ||
|
||
|
||
|
||
<a id="nestedatt--negative_cache"></a> | ||
### Nested Schema for `negative_cache` | ||
|
||
Read-Only: | ||
|
||
- `enabled` (Boolean) | ||
- `ttl` (Number) | ||
|
||
|
||
<a id="nestedatt--proxy"></a> | ||
### Nested Schema for `proxy` | ||
|
||
Read-Only: | ||
|
||
- `content_max_age` (Number) | ||
- `metadata_max_age` (Number) | ||
- `remote_url` (String) | ||
|
||
|
||
<a id="nestedatt--storage"></a> | ||
### Nested Schema for `storage` | ||
|
||
Read-Only: | ||
|
||
- `blob_store_name` (String) | ||
- `strict_content_type_validation` (Boolean) |
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,94 @@ | ||
--- | ||
page_title: "Resource nexus_repository_go_group" | ||
subcategory: "Repository" | ||
description: |- | ||
Use this resource to create a group go repository. | ||
--- | ||
# Resource nexus_repository_go_group | ||
Use this resource to create a group go repository. | ||
## Example Usage | ||
```terraform | ||
resource "nexus_repository_go_proxy" "golang_org" { | ||
name = "golang-org" | ||
online = true | ||
storage { | ||
blob_store_name = "default" | ||
strict_content_type_validation = true | ||
} | ||
proxy { | ||
remote_url = "https://proxy.golang.org/" | ||
content_max_age = 1440 | ||
metadata_max_age = 1440 | ||
} | ||
negative_cache { | ||
enabled = true | ||
time_to_live = 1440 | ||
} | ||
http_client { | ||
blocked = false | ||
auto_block = true | ||
} | ||
} | ||
resource "nexus_repository_go_group" "group" { | ||
name = "go-group" | ||
online = true | ||
group { | ||
member_names = [ | ||
nexus_repository_go_hosted.internal.name, | ||
] | ||
} | ||
storage { | ||
blob_store_name = "default" | ||
strict_content_type_validation = true | ||
} | ||
} | ||
``` | ||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `group` (Block List, Min: 1, Max: 1) Configuration for repository group (see [below for nested schema](#nestedblock--group)) | ||
- `name` (String) A unique identifier for this repository | ||
- `storage` (Block List, Min: 1, Max: 1) The storage configuration of the repository (see [below for nested schema](#nestedblock--storage)) | ||
|
||
### Optional | ||
|
||
- `online` (Boolean) Whether this repository accepts incoming requests | ||
|
||
### Read-Only | ||
|
||
- `id` (String) Used to identify resource at nexus | ||
|
||
<a id="nestedblock--group"></a> | ||
### Nested Schema for `group` | ||
|
||
Required: | ||
|
||
- `member_names` (Set of String) Member repositories names | ||
|
||
|
||
<a id="nestedblock--storage"></a> | ||
### Nested Schema for `storage` | ||
|
||
Required: | ||
|
||
- `blob_store_name` (String) Blob store used to store repository contents | ||
|
||
Optional: | ||
|
||
- `strict_content_type_validation` (Boolean) Whether to validate uploaded content's MIME type appropriate for the repository format | ||
## Import | ||
Import is supported using the following syntax: | ||
```shell | ||
# import using the name of repository | ||
terraform import nexus_repository_go_group.group go-group | ||
``` |
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,146 @@ | ||
--- | ||
page_title: "Resource nexus_repository_go_proxy" | ||
subcategory: "Repository" | ||
description: |- | ||
Use this resource to create a go proxy repository. | ||
--- | ||
# Resource nexus_repository_go_proxy | ||
Use this resource to create a go proxy repository. | ||
## Example Usage | ||
```terraform | ||
resource "nexus_repository_go_proxy" "golang_org" { | ||
name = "golang-org" | ||
online = true | ||
storage { | ||
blob_store_name = "default" | ||
strict_content_type_validation = true | ||
} | ||
proxy { | ||
remote_url = "https://proxy.golang.org/" | ||
content_max_age = 1440 | ||
metadata_max_age = 1440 | ||
} | ||
negative_cache { | ||
enabled = true | ||
time_to_live = 1440 | ||
} | ||
http_client { | ||
blocked = false | ||
auto_block = true | ||
} | ||
} | ||
``` | ||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `http_client` (Block List, Min: 1, Max: 1) HTTP Client configuration for proxy repositories (see [below for nested schema](#nestedblock--http_client)) | ||
- `name` (String) A unique identifier for this repository | ||
- `proxy` (Block List, Min: 1, Max: 1) Configuration for the proxy repository (see [below for nested schema](#nestedblock--proxy)) | ||
- `storage` (Block List, Min: 1, Max: 1) The storage configuration of the repository (see [below for nested schema](#nestedblock--storage)) | ||
|
||
### Optional | ||
|
||
- `cleanup` (Block List) Cleanup policies (see [below for nested schema](#nestedblock--cleanup)) | ||
- `negative_cache` (Block List, Max: 1) Configuration of the negative cache handling (see [below for nested schema](#nestedblock--negative_cache)) | ||
- `online` (Boolean) Whether this repository accepts incoming requests | ||
- `routing_rule` (String) The name of the routing rule assigned to this repository | ||
|
||
### Read-Only | ||
|
||
- `id` (String) Used to identify resource at nexus | ||
|
||
<a id="nestedblock--http_client"></a> | ||
### Nested Schema for `http_client` | ||
|
||
Required: | ||
|
||
- `auto_block` (Boolean) Whether to auto-block outbound connections if remote peer is detected as unreachable/unresponsive | ||
- `blocked` (Boolean) Whether to block outbound connections on the repository | ||
|
||
Optional: | ||
|
||
- `authentication` (Block List, Max: 1) Authentication configuration of the HTTP client (see [below for nested schema](#nestedblock--http_client--authentication)) | ||
- `connection` (Block List, Max: 1) Connection configuration of the HTTP client (see [below for nested schema](#nestedblock--http_client--connection)) | ||
|
||
<a id="nestedblock--http_client--authentication"></a> | ||
### Nested Schema for `http_client.authentication` | ||
|
||
Required: | ||
|
||
- `type` (String) Authentication type. Possible values: `ntlm` or `username` | ||
|
||
Optional: | ||
|
||
- `ntlm_domain` (String) The ntlm domain to connect | ||
- `ntlm_host` (String) The ntlm host to connect | ||
- `password` (String, Sensitive) The password used by the proxy repository | ||
- `preemptive` (Boolean) Whether to use pre-emptive authentication. Use with caution. Defaults to false. | ||
- `username` (String) The username used by the proxy repository | ||
|
||
|
||
<a id="nestedblock--http_client--connection"></a> | ||
### Nested Schema for `http_client.connection` | ||
|
||
Optional: | ||
|
||
- `enable_circular_redirects` (Boolean) Whether to enable redirects to the same location (may be required by some servers) | ||
- `enable_cookies` (Boolean) Whether to allow cookies to be stored and used | ||
- `retries` (Number) Total retries if the initial connection attempt suffers a timeout | ||
- `timeout` (Number) Seconds to wait for activity before stopping and retrying the connection | ||
- `use_trust_store` (Boolean) Use certificates stored in the Nexus Repository Manager truststore to connect to external systems | ||
- `user_agent_suffix` (String) Custom fragment to append to User-Agent header in HTTP requests | ||
|
||
|
||
|
||
<a id="nestedblock--proxy"></a> | ||
### Nested Schema for `proxy` | ||
|
||
Required: | ||
|
||
- `remote_url` (String) Location of the remote repository being proxied | ||
|
||
Optional: | ||
|
||
- `content_max_age` (Number) How long (in minutes) to cache artifacts before rechecking the remote repository | ||
- `metadata_max_age` (Number) How long (in minutes) to cache metadata before rechecking the remote repository. | ||
|
||
|
||
<a id="nestedblock--storage"></a> | ||
### Nested Schema for `storage` | ||
|
||
Required: | ||
|
||
- `blob_store_name` (String) Blob store used to store repository contents | ||
|
||
Optional: | ||
|
||
- `strict_content_type_validation` (Boolean) Whether to validate uploaded content's MIME type appropriate for the repository format | ||
|
||
|
||
<a id="nestedblock--cleanup"></a> | ||
### Nested Schema for `cleanup` | ||
|
||
Optional: | ||
|
||
- `policy_names` (Set of String) List of policy names | ||
|
||
|
||
<a id="nestedblock--negative_cache"></a> | ||
### Nested Schema for `negative_cache` | ||
|
||
Optional: | ||
|
||
- `enabled` (Boolean) Whether to cache responses for content not present in the proxied repository | ||
- `ttl` (Number) How long to cache the fact that a file was not found in the repository (in minutes) | ||
## Import | ||
Import is supported using the following syntax: | ||
```shell | ||
# import using the name of repository | ||
terraform import nexus_repository_go_proxy.golang_org golang-org | ||
``` |
3 changes: 3 additions & 0 deletions
3
examples/data-sources/nexus_repository_go_group/data-source.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,3 @@ | ||
data "nexus_repository_go_group" "go_public" { | ||
name = "go-public" | ||
} |
3 changes: 3 additions & 0 deletions
3
examples/data-sources/nexus_repository_go_proxy/data-source.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,3 @@ | ||
data "nexus_repository_go_proxy" "golang_org" { | ||
name = "golang-org" | ||
} |
Oops, something went wrong.