Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
virjaina committed Oct 27, 2023
1 parent ab66c50 commit 9932d99
Show file tree
Hide file tree
Showing 11 changed files with 228 additions and 94 deletions.
20 changes: 12 additions & 8 deletions acloud/data_source_cloud_account.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,24 @@ func dataSourceCloudAccount() *schema.Resource {
Computed: true,
},
"display_name": {
Type: schema.TypeString,
Required: true,
Type: schema.TypeString,
Required: true,
Description: "Name of the Cloud Account",
},
"organisation": {
Type: schema.TypeString,
Required: true,
Type: schema.TypeString,
Required: true,
Description: "Slug of the Organisation",
},
"cloud_provider": {
Type: schema.TypeString,
Required: true,
Type: schema.TypeString,
Required: true,
Description: "Slug of the Cloud Provider of the Cloud Account",
},
"enabled": {
Type: schema.TypeBool,
Computed: true,
Type: schema.TypeBool,
Computed: true,
Description: "Returns if the Cloud Account is enabled",
},
},
}
Expand Down
54 changes: 32 additions & 22 deletions acloud/resource_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,24 @@ func resourceCluster() *schema.Resource {
Computed: true,
},
"name": {
Type: schema.TypeString,
Required: true,
Type: schema.TypeString,
Required: true,
Description: "Name of the Cluster",
},
"organisation_slug": {
Type: schema.TypeString,
Required: true,
Type: schema.TypeString,
Required: true,
Description: "Slug of the Organisation of the Cluster",
},
"environment_slug": {
Type: schema.TypeString,
Required: true,
Type: schema.TypeString,
Required: true,
Description: "Slug of the Environment of the Cluster",
},
"description": {
Type: schema.TypeString,
Optional: true,
Type: schema.TypeString,
Optional: true,
Description: "Description of the Cluster",
},
"slug": {
Type: schema.TypeString,
Expand All @@ -54,34 +58,40 @@ func resourceCluster() *schema.Resource {
Computed: true,
},
"region": {
Type: schema.TypeString,
Required: true,
Type: schema.TypeString,
Required: true,
Description: "Region of the Cloud Provider to deploy the Cluster in",
},
"version": {
Type: schema.TypeString,
Required: true,
Type: schema.TypeString,
Required: true,
Description: "Avisi Cloud Kubernetes version of the Cluster",
},
"cloud_account_identity": {
Type: schema.TypeString,
Required: true,
Type: schema.TypeString,
Required: true,
Description: "Identity of the Cloud Account used to deploy the Cluster",
},
"update_channel": {
Type: schema.TypeString,
Optional: true,
Type: schema.TypeString,
Optional: true,
Description: "Avisi Cloud Kubernetes Update Channel that the Cluster follows",
},
"status": {
Type: schema.TypeString,
Computed: true,
},
"stopped": {
Type: schema.TypeBool,
Optional: true,
Default: false,
Type: schema.TypeBool,
Optional: true,
Default: false,
Description: "Stops the Cluster if set to true. False by default",
},
"cluster_state_wait_seconds": {
Type: schema.TypeInt,
Optional: true,
Default: 600,
Type: schema.TypeInt,
Optional: true,
Default: 600,
Description: "Time-out for waiting until the cluster reaches the desired state",
},
},
Importer: &schema.ResourceImporter{
Expand Down
25 changes: 15 additions & 10 deletions acloud/resource_environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,33 @@ func resourceEnvironment() *schema.Resource {
Computed: true,
},
"organisation": {
Type: schema.TypeString,
Required: true,
Type: schema.TypeString,
Required: true,
Description: "Slug of the Organisation",
},
"name": {
Type: schema.TypeString,
Required: true,
Type: schema.TypeString,
Required: true,
Description: "Name of the Environment",
},
"slug": {
Type: schema.TypeString,
Computed: true,
},
"purpose": {
Type: schema.TypeString,
Optional: true,
Type: schema.TypeString,
Optional: true,
Description: "Purpose of the Environment",
},
"type": {
Type: schema.TypeString,
Required: true,
Type: schema.TypeString,
Required: true,
Description: "Type of the Environment. Available options: production, staging, development, demo, other",
},
"description": {
Type: schema.TypeString,
Optional: true,
Type: schema.TypeString,
Optional: true,
Description: "A human readable description about the environment",
},
},
Importer: &schema.ResourceImporter{
Expand Down
55 changes: 33 additions & 22 deletions acloud/resource_nodepool.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,54 +24,65 @@ func resourceNodepool() *schema.Resource {
Computed: true,
},
"organisation_slug": {
Type: schema.TypeString,
Required: true,
Type: schema.TypeString,
Required: true,
Description: "Slug of the Organisation",
},
"environment_slug": {
Type: schema.TypeString,
Required: true,
Type: schema.TypeString,
Required: true,
Description: "Slug of the Environment",
},
"cluster_slug": {
Type: schema.TypeString,
Required: true,
Type: schema.TypeString,
Required: true,
Description: "Slug of the Cluster",
},
"name": {
Type: schema.TypeString,
Required: true,
Type: schema.TypeString,
Required: true,
Description: "Name of the Node Pool",
},
"node_size": {
Type: schema.TypeString,
Required: true,
Type: schema.TypeString,
Required: true,
Description: "Type of machines in the Node Pool",
},
"auto_scaling": {
Type: schema.TypeBool,
Optional: true,
Type: schema.TypeBool,
Optional: true,
Description: "Enables auto scaling of the Node Pool when set to true",
},
"min_size": {
Type: schema.TypeInt,
Required: true,
Type: schema.TypeInt,
Required: true,
Description: "Minimum amount of nodes in the Node Pool",
},
"max_size": {
Type: schema.TypeInt,
Required: true,
Type: schema.TypeInt,
Required: true,
Description: "Maximum amount of nodes in the Node Pool",
},
"annotations": {
Type: schema.TypeMap,
Optional: true,
Type: schema.TypeMap,
Optional: true,
Description: "Annotations to put on the nodes in the Node Pool",
Elem: &schema.Schema{
Type: schema.TypeString,
},
},
"labels": {
Type: schema.TypeMap,
Optional: true,
Type: schema.TypeMap,
Optional: true,
Description: "Labels to put on the nodes in the Node Pool",
Elem: &schema.Schema{
Type: schema.TypeString,
},
},
"taints": {
Type: schema.TypeList,
Optional: true,
Type: schema.TypeList,
Optional: true,
Description: "Taints to put on the nodes in the Node Pool",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"key": {
Expand Down
8 changes: 4 additions & 4 deletions docs/data-sources/cloud_account.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ description: |-

### Required

- `cloud_provider` (String)
- `display_name` (String)
- `organisation` (String)
- `cloud_provider` (String) Slug of the Cloud Provider of the Cloud Account
- `display_name` (String) Name of the Cloud Account
- `organisation` (String) Slug of the Organisation

### Read-Only

- `enabled` (Boolean)
- `enabled` (Boolean) Returns if the Cloud Account is enabled
- `id` (String) The ID of this resource.
- `identity` (String)
5 changes: 1 addition & 4 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ description: |-
<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `token` (String, Sensitive)

### Optional

- `acloud_api` (String, Sensitive)
- `token` (String, Sensitive)
19 changes: 11 additions & 8 deletions docs/resources/cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,23 @@ description: |-

### Required

- `cloud_account_identity` (String)
- `environment_slug` (String)
- `name` (String)
- `organisation_slug` (String)
- `region` (String)
- `version` (String)
- `cloud_account_identity` (String) Identity of the Cloud Account used to deploy the Cluster
- `environment_slug` (String) Slug of the Environment of the Cluster
- `name` (String) Name of the Cluster
- `organisation_slug` (String) Slug of the Organisation of the Cluster
- `region` (String) Region of the Cloud Provider to deploy the Cluster in
- `version` (String) Avisi Cloud Kubernetes version of the Cluster

### Optional

- `description` (String)
- `update_channel` (String)
- `cluster_state_wait_seconds` (Number) Time-out for waiting until the cluster reaches the desired state
- `description` (String) Description of the Cluster
- `stopped` (Boolean) Stops the Cluster if set to true. False by default
- `update_channel` (String) Avisi Cloud Kubernetes Update Channel that the Cluster follows

### Read-Only

- `cloud_provider` (String)
- `id` (String) The ID of this resource.
- `slug` (String)
- `status` (String)
10 changes: 5 additions & 5 deletions docs/resources/environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ description: |-

### Required

- `name` (String)
- `organisation` (String)
- `type` (String)
- `name` (String) Name of the Environment
- `organisation` (String) Slug of the Organisation
- `type` (String) Type of the Environment. Available options: production, staging, development, demo, other

### Optional

- `description` (String)
- `purpose` (String)
- `description` (String) A human readable description about the environment
- `purpose` (String) Purpose of the Environment

### Read-Only

Expand Down
22 changes: 11 additions & 11 deletions docs/resources/nodepool.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ description: |-

### Required

- `cluster_slug` (String)
- `environment_slug` (String)
- `max_size` (Number)
- `min_size` (Number)
- `name` (String)
- `node_size` (String)
- `organisation_slug` (String)
- `cluster_slug` (String) Slug of the Cluster
- `environment_slug` (String) Slug of the Environment
- `max_size` (Number) Maximum amount of nodes in the Node Pool
- `min_size` (Number) Minimum amount of nodes in the Node Pool
- `name` (String) Name of the Node Pool
- `node_size` (String) Type of machines in the Node Pool
- `organisation_slug` (String) Slug of the Organisation

### Optional

- `annotations` (Map of String)
- `auto_scaling` (Boolean)
- `labels` (Map of String)
- `taints` (Block List) (see [below for nested schema](#nestedblock--taints))
- `annotations` (Map of String) Annotations to put on the nodes in the Node Pool
- `auto_scaling` (Boolean) Enables auto scaling of the Node Pool when set to true
- `labels` (Map of String) Labels to put on the nodes in the Node Pool
- `taints` (Block List) Taints to put on the nodes in the Node Pool (see [below for nested schema](#nestedblock--taints))

### Read-Only

Expand Down
Loading

0 comments on commit 9932d99

Please sign in to comment.