Skip to content

Commit

Permalink
add some additional examples
Browse files Browse the repository at this point in the history
  • Loading branch information
dmpe committed Nov 14, 2024
1 parent 89a768f commit cb9401c
Show file tree
Hide file tree
Showing 6 changed files with 99 additions and 6 deletions.
1 change: 1 addition & 0 deletions .copywrite.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ project {
copyright_year = 2024
header_ignore = [
".github/**",
"examples/**",
".goreleaser.yml",
]
}
48 changes: 44 additions & 4 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,54 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "storagegrid Provider"
subcategory: ""
description: |-
NetApp StorageGrid provider for working with S3 REST API.
---

# storagegrid Provider
# NetApp storagegrid Provider

This unofficial NetApp provider can be used to interact with [StorageGrid](https://www.netapp.com/data-storage/storagegrid/) system.
Such system, be it a hardware or virtual appliance, supports Amazon S3 protocol.

It is import to note that this provider only supports "TENANT" REST API - not the administrative "GRID" REST API.

See also provider's documentation on GitHub, and on [NetApp](https://docs.netapp.com/us-en/storagegrid-family/).

## Example Provider Usage

```terraform
terraform {
required_providers {
storagegrid = {
source = "dmpe/storagegrid"
version = "" # My strong advice - always pin this provider's version!
}
}
}
provider "storagegrid" {
address = "https://grid.firm.com:9443/api/v3"
username = "grid"
password = "change_me"
tenant = "<int>" # Tenant ID
insecure = false
}
```

### Using environmental variables

```terraform
terraform {
required_providers {
storagegrid = {
source = "dmpe/storagegrid"
version = "" # My strong advice - always pin this provider's version!
}
}
}
provider "storagegrid" {
}
```


<!-- schema generated by tfplugindocs -->
Expand All @@ -27,3 +66,4 @@ Must be without `/` at the end and without `api/v3` suffix which is added automa

- `enable_trace_context` (Boolean) Enable trace context. If `true` a `Traceparent` header will be added to the request. Default: `false`
- `insecure` (Boolean) Use insecure HTTP connection. Setting this to true will ignore certificates when calling REST API. Default: `false`

16 changes: 16 additions & 0 deletions examples/provider/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
terraform {
required_providers {
storagegrid = {
source = "dmpe/storagegrid"
version = "" # My strong advice - always pin this provider's version!
}
}
}

provider "storagegrid" {
address = "https://grid.firm.com:9443/api/v3"
username = "grid"
password = "change_me"
tenant = "<int>" # Tenant ID
insecure = false
}
11 changes: 11 additions & 0 deletions examples/provider/main_env.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
terraform {
required_providers {
storagegrid = {
source = "dmpe/storagegrid"
version = "" # My strong advice - always pin this provider's version!
}
}
}

provider "storagegrid" {
}
3 changes: 1 addition & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ Configuring [required providers](https://www.terraform.io/docs/language/provider

```terraform
terraform {
required_version = ">= 1.0.0"
required_providers {
elasticstack = {
storagegrid = {
source = "dmpe/storagegrid"
version = "" # My strong advice - always pin this provider's version!
}
Expand Down
26 changes: 26 additions & 0 deletions templates/index.md.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
page_title: "{{ .ProviderShortName }} Provider"
description: |-
NetApp StorageGrid provider for working with S3 REST API.
---

# NetApp {{ .ProviderShortName }} Provider

This unofficial NetApp provider can be used to interact with [StorageGrid](https://www.netapp.com/data-storage/storagegrid/) system.
Such system, be it a hardware or virtual appliance, supports Amazon S3 protocol.

It is import to note that this provider only supports "TENANT" REST API - not the administrative "GRID" REST API.

See also provider's documentation on GitHub, and on [NetApp](https://docs.netapp.com/us-en/storagegrid-family/).

## Example Provider Usage

{{ tffile "examples/provider/main.tf" }}

### Using environmental variables

{{ tffile "examples/provider/main_env.tf" }}


{{ .SchemaMarkdown | trimspace }}

0 comments on commit cb9401c

Please sign in to comment.