Skip to content

Latest commit

 

History

History
117 lines (88 loc) · 5.05 KB

File metadata and controls

117 lines (88 loc) · 5.05 KB
page_title clevercloud Provider
description CleverCloud provider allow you to interact with CleverCloud platform. Dedicated OAuth consumer If you want to use a dedicated OAuth consumer and the acording user tokens, be sure the next rights are granted # EN Access my personal information Access my organizations Manage my organizations Manage my organizations's applications Manage my organizations's add-ons # FR Accéder à mes informations personnelles Accéder à mes organisations Gérer mes organisations Gérer les applications de mes organisations Gérer les add-ons de mes organisations Applications: private repository deployment To deploy from a private GitHub repository, you need to generate a Personal Access Token (PAT) that will be used for authentication. Creating a GitHub Personal Access Token Navigate to GitHub Settings → Developer settings → Personal access tokens https://github.com/settings/tokensCreate a fine-grained token https://github.com/settings/personal-access-tokens/new with read access to repository contentsBest practice: Limit the token to only the specific repositories you want to deploy (use "Only select repositories" instead of "All repositories") For detailed instructions, refer to GitHub's documentation on creating a fine-grained personal access token https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token Using the Token in Terraform Once the token is generated, add the authentication_basic attribute to the deployment block of your application resource: resource "clevercloud_nodejs" "my_app" { # ... other configuration ... deployment { repository = "https://github.com/OWNER/REPO.git" authentication_basic = "USER:PAT_TOKEN" } } Where: USER is the GitHub username of the person who created the tokenPAT_TOKEN is the Personal Access Token generated in the previous step

clevercloud Provider

CleverCloud provider allow you to interact with CleverCloud platform.

Dedicated OAuth consumer

If you want to use a dedicated OAuth consumer and the acording user tokens, be sure the next rights are granted

# EN
Access my personal information
Access my organizations
Manage my organizations
Manage my organizations's applications
Manage my organizations's add-ons

# FR
Accéder à mes informations personnelles
Accéder à mes organisations
Gérer mes organisations
Gérer les applications de mes organisations
Gérer les add-ons de mes organisations

Applications: private repository deployment

To deploy from a private GitHub repository, you need to generate a Personal Access Token (PAT) that will be used for authentication.

Creating a GitHub Personal Access Token

  1. Navigate to GitHub Settings → Developer settings → Personal access tokens
  2. Create a fine-grained token with read access to repository contents
  3. Best practice: Limit the token to only the specific repositories you want to deploy (use "Only select repositories" instead of "All repositories")

Example PAT configuration

For detailed instructions, refer to GitHub's documentation on creating a fine-grained personal access token

Using the Token in Terraform

Once the token is generated, add the authentication_basic attribute to the deployment block of your application resource:

resource "clevercloud_nodejs" "my_app" {
  # ... other configuration ...

  deployment {
    repository = "https://github.com/OWNER/REPO.git"
    authentication_basic = "USER:PAT_TOKEN"
  }
}

Where:

  • USER is the GitHub username of the person who created the token
  • PAT_TOKEN is the Personal Access Token generated in the previous step

Schema

Optional

  • consumer_key (String) Clever Cloud OAuth1 consumer key. Allows using a dedicated OAuth consumer.
  • consumer_secret (String, Sensitive) CleverCloud OAuth1 consumer secret. Allows using a dedicated OAuth consumer.
  • disable_networkgroups (Boolean) Disable netorkgroups features
  • endpoint (String) Clever Cloud API endpoint, default to https://api.clever-cloud.com
  • organisation (String, Sensitive) Clever Cloud organisation, can be either orga_xxx, or user_xxx for personal spaces. This parameter can also be provided via CC_ORGANISATION environment variable.
  • secret (String, Sensitive) Clever Cloud OAuth1 secret, can be took from clever-tools after login. This parameter can also be provided via CC_OAUTH_SECRET environment variable.
  • token (String, Sensitive) Clever Cloud OAuth1 token, can be took from clever-tools after login. This parameter can also be provided via CC_OAUTH_TOKEN environment variable.