Skip to content

Commit

Permalink
feat(app): NodeJS (#14)
Browse files Browse the repository at this point in the history
Co-authored-by: miton18 <[email protected]>
  • Loading branch information
miton18 and miton18 authored Apr 28, 2022
1 parent f4f9e52 commit 3086a45
Show file tree
Hide file tree
Showing 22 changed files with 568 additions and 286 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/testacc.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Acceptance Tests

on:
push:
pull_request:
types: [ labeled ]

jobs:
Expand All @@ -17,4 +17,6 @@ jobs:
go-version: 1.18

- name: Acceptance Tests
run: make testacc
run: make testacc
env:
ORGANISATION: ${{ secrets.ORG }}
37 changes: 0 additions & 37 deletions docs/data-sources/coffee.md

This file was deleted.

37 changes: 0 additions & 37 deletions docs/data-sources/ingredient.md

This file was deleted.

45 changes: 0 additions & 45 deletions docs/data-sources/order.md

This file was deleted.

35 changes: 12 additions & 23 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,26 @@
---
page_title: "Provider: HashiCups"
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "clevercloud Provider"
subcategory: ""
description: |-
Terraform provider for interacting with HashiCups API.
CleverCloud provider allow you to interract with CleverCloud platform.
---

# HashiCups Provider
# clevercloud Provider

-> Visit the [Call APIs with Terraform Providers](https://learn.hashicorp.com/collections/terraform/providers?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS) Learn tutorials for an interactive getting started experience.
CleverCloud provider allow you to interract with CleverCloud platform.

The HashiCups provider is used to interact with a fictional coffee-shop application, HashiCups. This provider is meant to serve as an educational tool to show users how:
1. use providers to [create, read, update and delete (CRUD) resources](https://learn.hashicorp.com/tutorials/terraform/provider-use?in=terraform/providers) using Terraform.
1. create a custom Terraform provider.

To learn how to re-create the HashiCups provider, refer to the [Call APIs with Terraform Providers](https://learn.hashicorp.com/collections/terraform/providers?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS) Learn tutorials.

Use the navigation to the left to read about the available resources.

## Example Usage

Do not keep your authentication password in HCL for production environments, use Terraform environment variables.
<!-- schema generated by tfplugindocs -->
## Schema

```terraform
provider "hashicups" {
username = "education"
password = "test123"
}
```
### Required

## Schema
- `organisation` (String, Sensitive) CleverCloud organisation, can be either org_xxx, or user_xxx for personal spaces

### Optional

- **username** (String, Optional) Username to authenticate to HashiCups API
- **password** (String, Optional) Password to authenticate to HashiCups API
- **host** (String, Optional) HashiCups API address (defaults to `localhost:19090`)
- `endpoint` (String) CleverCloud API endpoint, default to https://api.clever-cloud.com
- `secret` (String, Sensitive) CleverCloud OAuth1 secret, can be took from clever-tools after login
- `token` (String) CleverCloud OAuth1 token, can be took from clever-tools after login
51 changes: 51 additions & 0 deletions docs/resources/nodejs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "clevercloud_nodejs Resource - terraform-provider-clevercloud"
subcategory: ""
description: |-
Manage NodeJS https://nodejs.org/ applications.
See NodeJS product https://www.clever-cloud.com/nodejs-hosting/ specification.
---

# clevercloud_nodejs (Resource)

Manage [NodeJS](https://nodejs.org/) applications.

See [NodeJS product](https://www.clever-cloud.com/nodejs-hosting/) specification.



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

### Required

- `biggest_flavor` (String) Biggest intance flavor, if different from smallest, enable autoscaling
- `max_instance_count` (Number) Maximum instance count, if different from min value, enable autoscaling
- `min_instance_count` (Number) Minimum instance count
- `name` (String) Application name
- `region` (String) Geographical region where the app will be deployed
- `smallest_flavor` (String) Smallest instance flavor

### Optional

- `additional_vhosts` (List of String) Add custom hostname in addition to the default one, see [documentation](https://www.clever-cloud.com/doc/administrate/domain-names/)
- `app_folder` (String) Folder in which the application is located (inside the git repository)
- `build_flavor` (String) Use dedicated instance with given flavor for build step
- `commit` (String) Deploy application on the given commit/tag
- `description` (String) Application description
- `dev_dependencies` (Boolean) Install development dependencies specified in package.json
- `package_manager` (String) Either npm, npm-ci, yarn, yarn2 or custom
- `redirect_https` (Boolean) Redirect client from plain to TLS port
- `registry` (String) The host of your private repository, available values: github or the registry host
- `registry_token` (String, Sensitive) Private repository token
- `start_script` (String) Set custom start script, instead of `npm start`
- `sticky_sessions` (Boolean) Enable sticky sessions, use it when your client sessions are instances scoped

### Read-Only

- `deploy_url` (String) Git URL used to push source code
- `id` (String) Unique identifier generated during application creation
- `vhost` (String) Default vhost to access your app


57 changes: 0 additions & 57 deletions docs/resources/order.md

This file was deleted.

37 changes: 37 additions & 0 deletions docs/resources/postgresql.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "clevercloud_postgresql Resource - terraform-provider-clevercloud"
subcategory: ""
description: |-
Manage PostgreSQL https://www.postgresql.org/ product.
See product specification https://www.clever-cloud.com/postgresql-hosting/.
---

# clevercloud_postgresql (Resource)

Manage [PostgreSQL](https://www.postgresql.org/) product.

See [product specification](https://www.clever-cloud.com/postgresql-hosting/).



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

### Required

- `name` (String) Name of the service
- `plan` (String) Database size and spec
- `region` (String) Geographical region where the database will be deployed

### Read-Only

- `creation_date` (Number) Date of database creation
- `database` (String) Database name on the PostgreSQL server
- `host` (String) Database host, used to connect to
- `id` (String) Generated unique identifier
- `password` (String, Sensitive) Login password
- `port` (Number) Database port
- `user` (String) Login username


9 changes: 9 additions & 0 deletions examples/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,15 @@ resource "clevercloud_postgresql" "PG1" {
region = "par"
}

resource "clevercloud_nodejs" "node1" {
name = "myNodeApp"
region = "par"
min_instance_count = 1
max_instance_count = 2
smallest_flavor = "XS"
biggest_flavor = "M"
}

output "host" {
value = clevercloud_postgresql.PG1.host
}
Expand Down
Loading

0 comments on commit 3086a45

Please sign in to comment.