Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resources Documentation #145

Merged
merged 3 commits into from
Oct 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions docs/resources/emailalias.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
page_title: "glesys_emailalias Resource - terraform-provider-glesys"
subcategory: ""
description: |-
Create a GleSYS Email alias.
---
# glesys_emailalias (Resource)
Create a GleSYS Email alias.
## Example Usage
```terraform
# Setup an email alias

resource "glesys_emailalias" "alice" {
emailalias = "[email protected]"
goto = "[email protected],[email protected]"
}
```
<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `emailalias` (String) Email alias name.
- `goto` (String) Email alias goto. Comma separated list of email destinations.

### Read-Only

- `id` (String) The ID of this resource.
## Import
Import is supported using the following syntax:
```shell
# Email alias import.
$ terraform import glesys_emailalias.info [email protected]
```
42 changes: 42 additions & 0 deletions docs/resources/ip.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
page_title: "glesys_ip Resource - terraform-provider-glesys"
subcategory: ""
description: |-
IP resource for a project.
---
# glesys_ip (Resource)
IP resource for a project.

<!-- schema generated by tfplugindocs -->
## Schema

### Optional

- `address` (String) IP Address.
- `datacenter` (String) IP Datacenter association.
- `platform` (String) IP Associated platform.
- `ptr` (String) IP PTR.
- `version` (Number) IP version 4/6.

### Read-Only

- `broadcast` (String) IP Broadcast Address.
- `cost` (List of Object) IP Cost. (see [below for nested schema](#nestedatt--cost))
- `gateway` (String) IP Gateway Address.
- `id` (String) The ID of this resource.
- `locked_to_account` (String)
- `name_servers` (List of String) List of nameservers.
- `netmask` (String) IP Netmask, IPv4: NN.NN.NN.NN, IPv6: /nn
- `platforms` (List of String) IP Platforms list
- `reserved` (String) IP Reserved to account flag.
- `server_id` (String) ID of server the IP is assigned to.

<a id="nestedatt--cost"></a>
### Nested Schema for `cost`

Read-Only:

- `amount` (Number)
- `currency` (String)
- `time_period` (String)

27 changes: 27 additions & 0 deletions docs/resources/objectstorage_credential.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
page_title: "glesys_objectstorage_credential Resource - terraform-provider-glesys"
subcategory: ""
description: |-
ObjectStorage Credentials.
---
# glesys_objectstorage_credential (Resource)
ObjectStorage Credentials.

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `instanceid` (String) Associated ObjectStorage instance.

### Optional

- `description` (String) ObjectStorage credential description.

### Read-Only

- `accesskey` (String) ObjectStorage credential access key.
- `created` (String) ObjectStorage credential created timestamp.
- `id` (String) The ID of this resource.
- `secretkey` (String) ObjectStorage credential secret key.

27 changes: 27 additions & 0 deletions docs/resources/objectstorage_instance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
page_title: "glesys_objectstorage_instance Resource - terraform-provider-glesys"
subcategory: ""
description: |-
ObjectStorage Instance Resource.
---
# glesys_objectstorage_instance (Resource)
ObjectStorage Instance Resource.

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `datacenter` (String) ObjectStorage location.

### Optional

- `description` (String) ObjectStorage Description.

### Read-Only

- `accesskey` (String) ObjectStorage default access key.
- `created` (String) ObjectStorage created timestamp.
- `id` (String) The ID of this resource.
- `secretkey` (String) ObjectStorage default secret key.

89 changes: 52 additions & 37 deletions glesys/resource_glesys_ip.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,30 @@ func resourceGlesysIP() *schema.Resource {
Importer: &schema.ResourceImporter{
StateContext: schema.ImportStatePassthroughContext,
},
Description: "IP resource for a project.",

Schema: map[string]*schema.Schema{
"address": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ForceNew: true,
Description: "IP Address.",
Type: schema.TypeString,
Optional: true,
Computed: true,
ForceNew: true,
},
"broadcast": {
Type: schema.TypeString,
Computed: true,
Description: "IP Broadcast Address.",
Type: schema.TypeString,
Computed: true,
},
"gateway": {
Type: schema.TypeString,
Computed: true,
Description: "IP Gateway Address.",
Type: schema.TypeString,
Computed: true,
},
"cost": {
Type: schema.TypeList,
Computed: true,
Description: "IP Cost.",
Type: schema.TypeList,
Computed: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"amount": {
Expand All @@ -55,53 +60,63 @@ func resourceGlesysIP() *schema.Resource {
},
},
"datacenter": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ForceNew: true,
Description: "IP Datacenter association.",
Type: schema.TypeString,
Optional: true,
Computed: true,
ForceNew: true,
},
"locked_to_account": {
Type: schema.TypeString,
Computed: true,
},
"name_servers": {
Type: schema.TypeList,
Elem: &schema.Schema{Type: schema.TypeString},
Computed: true,
Description: "List of nameservers.",
Type: schema.TypeList,
Elem: &schema.Schema{Type: schema.TypeString},
Computed: true,
},
"netmask": {
Type: schema.TypeString,
Computed: true,
Description: "IP Netmask, IPv4: NN.NN.NN.NN, IPv6: /nn",
Type: schema.TypeString,
Computed: true,
},
"platforms": {
Type: schema.TypeList,
Elem: &schema.Schema{Type: schema.TypeString},
Computed: true,
Description: "IP Platforms list",
Type: schema.TypeList,
Elem: &schema.Schema{Type: schema.TypeString},
Computed: true,
},
"platform": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ForceNew: true,
Description: "IP Associated platform.",
Type: schema.TypeString,
Optional: true,
Computed: true,
ForceNew: true,
},
"ptr": {
Type: schema.TypeString,
Optional: true,
Computed: true,

Description: "IP PTR.",
Type: schema.TypeString,
Optional: true,
Computed: true,
},
"reserved": {
Type: schema.TypeString,
Computed: true,
Description: "IP Reserved to account flag.",
Type: schema.TypeString,
Computed: true,
},
"server_id": {
Type: schema.TypeString,
Computed: true,
Description: "ID of server the IP is assigned to.",
Type: schema.TypeString,
Computed: true,
},
"version": {
Type: schema.TypeInt,
Optional: true,
Computed: true,
ForceNew: true,
Description: "IP version 4/6.",
Type: schema.TypeInt,
Optional: true,
Computed: true,
ForceNew: true,
},
},
}
Expand Down
30 changes: 18 additions & 12 deletions glesys/resource_glesys_objectstorage_credential.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,34 @@ func resourceGlesysObjectStorageCredential() *schema.Resource {
ReadContext: resourceGlesysObjectStorageCredentialRead,
DeleteContext: resourceGlesysObjectStorageCredentialDelete,

Description: "ObjectStorage Credentials.",
Schema: map[string]*schema.Schema{
"instanceid": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
Description: "Associated ObjectStorage instance.",
Type: schema.TypeString,
Required: true,
ForceNew: true,
},
"accesskey": {
Type: schema.TypeString,
Computed: true,
Description: "ObjectStorage credential access key.",
Type: schema.TypeString,
Computed: true,
},
"secretkey": {
Type: schema.TypeString,
Computed: true,
Description: "ObjectStorage credential secret key.",
Type: schema.TypeString,
Computed: true,
},
"created": {
Type: schema.TypeString,
Computed: true,
Description: "ObjectStorage credential created timestamp.",
Type: schema.TypeString,
Computed: true,
},
"description": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Description: "ObjectStorage credential description.",
Type: schema.TypeString,
Optional: true,
ForceNew: true,
},
},
}
Expand Down
26 changes: 16 additions & 10 deletions glesys/resource_glesys_objectstorage_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,32 @@ func resourceGlesysObjectStorageInstance() *schema.Resource {
StateContext: schema.ImportStatePassthroughContext,
},

Description: "ObjectStorage Instance Resource.",
Schema: map[string]*schema.Schema{
"datacenter": {
Type: schema.TypeString,
Required: true,
Description: "ObjectStorage location.",
Type: schema.TypeString,
Required: true,
},
"description": {
Type: schema.TypeString,
Optional: true,
Description: "ObjectStorage Description.",
Type: schema.TypeString,
Optional: true,
},
"created": {
Type: schema.TypeString,
Computed: true,
Description: "ObjectStorage created timestamp.",
Type: schema.TypeString,
Computed: true,
},
"accesskey": {
Type: schema.TypeString,
Computed: true,
Description: "ObjectStorage default access key.",
Type: schema.TypeString,
Computed: true,
},
"secretkey": {
Type: schema.TypeString,
Computed: true,
Description: "ObjectStorage default secret key.",
Type: schema.TypeString,
Computed: true,
},
},
}
Expand Down