### Build and Install Local OVH Terraform Provider Source: https://registry.terraform.io/providers/ovh/ovh/latest/docs/index Instructions to build the OVH Terraform provider locally and install it into the plugin repository for testing. This involves setting the environment, building the provider, and copying the binary to the correct plugin directory. ```bash # Set your target environment (OS_architecture): linux_amd64, darwin_amd64... $ export ENV="linux_amd64" $ make build ... $ mkdir -p ~/.terraform.d/plugins/terraform.local/local/ovh/0.0.1/$ENV $ cp $GOPATH/bin/terraform-provider-ovh ~/.terraform.d/plugins/terraform.local/local/ovh/0.0.1/$ENV/terraform-provider-ovh_v0.0.1 ``` -------------------------------- ### OVH Configuration File (.ovh.conf) Source: https://registry.terraform.io/providers/ovh/ovh/latest/docs/index Example of an OVH configuration file used to store endpoint and credential information. The provider searches for this file in the current directory, user's home directory, or system-wide. ```ini [default] ; general configuration: default endpoint endpoint=ovh-eu [ovh-eu] ; configuration specific to 'ovh-eu' endpoint client_id=my_client_id client_secret=my_client_secret ``` -------------------------------- ### OVHcloud Managed Kubernetes Cluster and Node Pool Source: https://registry.terraform.io/providers/ovh/ovh/latest/docs/index Example Terraform code for creating an OVHcloud Managed Kubernetes cluster and a corresponding node pool. It demonstrates resource creation with specific configurations like service name, region, version, flavor, and node counts. ```terraform variable "service_name" { default = "wwwwwww" } # Create an OVHcloud Managed Kubernetes cluster resource "ovh_cloud_project_kube" "my_kube_cluster" { service_name = var.service_name name = "my-super-kube-cluster" region = "GRA5" version = "1.22" } # Create a Node Pool for our Kubernetes clusterx resource "ovh_cloud_project_kube_nodepool" "node_pool" { service_name = var.service_name kube_id = ovh_cloud_project_kube.my_kube_cluster.id name = "my-pool" //Warning: "_" char is not allowed! flavor_name = "b2-7" desired_nodes = 3 max_nodes = 3 min_nodes = 3 } ``` -------------------------------- ### Environment Variables for OVH Provider Source: https://registry.terraform.io/providers/ovh/ovh/latest/docs/index Demonstrates setting OVH provider configuration parameters using environment variables. The provider prioritizes direct parameters, then environment variables, and finally configuration files. ```bash export OVH_ENDPOINT=ovh-eu export OVH_CLIENT_ID=my_client_id export OVH_CLIENT_SECRET=my_client_secret export OVH_ACCESS_TOKEN=my_access_token ``` -------------------------------- ### OVH Cloud Project Test Variables Source: https://registry.terraform.io/providers/ovh/ovh/latest/docs/index Variables for testing OVH Cloud Project resources, including instance, flavor, image, region, and Kubernetes configurations. ```terraform OVH_CLOUD_PROJECT_FAILOVER_IP_ROUTED_TO_1_TEST: The GUID of an instance to which failover IP addresses can be attached. OVH_CLOUD_PROJECT_FAILOVER_IP_ROUTED_TO_2_TEST: The GUID of a secondary instance to which failover IP addresses can be attached. There must be 2 as associations can only be updated not removed. To test effectively, the failover ip address must be moved between instances. OVH_CLOUD_PROJECT_FLAVOR_ID_TEST: The ID of the Flavor to test OVH_CLOUD_PROJECT_IMAGE_ID_TEST: The ID of the image to test OVH_CLOUD_PROJECT_INSTANCE_ID_TEST: The ID of the instance to test OVH_CLOUD_PROJECT_INSTANCE_NAME_TEST: The Name of the instance to test OVH_CLOUD_PROJECT_KUBE_REGION_TEST: The region of your public cloud kubernetes project. OVH_CLOUD_PROJECT_KUBE_VERSION_TEST: The version of your public cloud kubernetes project. OVH_CLOUD_PROJECT_KUBE_PREV_VERSION_TEST: The previous version of your public cloud kubernetes project. This is used to test upgrade. OVH_CLOUD_PROJECT_REGION_TEST: The Name of the region to test OVH_CLOUD_PROJECT_SSH_NAME_TEST: The Name of the SSH Key to test ``` -------------------------------- ### OVH Provider Testing Environment Variables Source: https://registry.terraform.io/providers/ovh/ovh/latest/docs/index This section lists and describes the environment variables required for setting up testing and development for the OVH Terraform provider. These variables configure access to various OVH services and specify test parameters. ```APIDOC OVH_ENDPOINT: - Possible values: `ovh-eu`, `ovh-ca`, `ovh-us`, `soyoustart-eu`, `soyoustart-ca`, `kimsufi-ca`, `kimsufi-eu`, `runabove-ca` - Description: Specifies the OVH API endpoint to use. OVH_IPLB_SERVICE_TEST: - Type: String - Description: The ID of the IP Load Balancer service to use for testing. OVH_IPLB_IPFO_TEST: - Type: Array of Strings - Description: An array of FailOver IPs (Additional IPs) to associate with the IPLB Service for testing. OVH_VRACK_SERVICE_TEST: - Type: String - Description: The ID of the vRack service to use for testing. OVH_CLOUD_LOADBALANCER_ID_TEST: - Type: String - Description: The ID of the Cloud LoadBalancer to use for testing. OVH_CLOUD_PROJECT_SERVICE_TEST: - Type: String - Description: The ID of your public cloud project. OVH_CLOUD_PROJECT_CONTAINERREGISTRY_OIDC_ENDPOINT_TEST: - Type: String - Description: The OIDC endpoint of the container registry to test. OVH_CLOUD_PROJECT_CONTAINERREGISTRY_REGION_TEST: - Type: String - Description: The region of the container registry to test. OVH_CLOUD_PROJECT_DATABASE_ENGINE_TEST: - Type: String - Description: The name of the database engine to test. OVH_CLOUD_PROJECT_DATABASE_VERSION_TEST: - Type: String - Description: The version of the database engine to test. OVH_CLOUD_PROJECT_DATABASE_KAFKA_VERSION_TEST: - Type: String - Description: The version of Kafka to test. If not set, `OVH_CLOUD_PROJECT_DATABASE_VERSION_TEST` is used. OVH_CLOUD_PROJECT_DATABASE_M3DB_VERSION_TEST: - Type: String - Description: The version of M3DB to test. If not set, `OVH_CLOUD_PROJECT_DATABASE_VERSION_TEST` is used. OVH_CLOUD_PROJECT_DATABASE_MONGODB_VERSION_TEST: - Type: String - Description: The version of MongoDB to test. If not set, `OVH_CLOUD_PROJECT_DATABASE_VERSION_TEST` is used. OVH_CLOUD_PROJECT_DATABASE_OPENSEARCH_VERSION_TEST: - Type: String - Description: The version of OpenSearch to test. If not set, `OVH_CLOUD_PROJECT_DATABASE_VERSION_TEST` is used. OVH_CLOUD_PROJECT_DATABASE_POSTGRESQL_VERSION_TEST: - Type: String - Description: The version of PostgreSQL to test. If not set, `OVH_CLOUD_PROJECT_DATABASE_VERSION_TEST` is used. OVH_CLOUD_PROJECT_DATABASE_REDIS_VERSION_TEST: - Type: String - Description: The version of Redis to test. If not set, `OVH_CLOUD_PROJECT_DATABASE_VERSION_TEST` is used. OVH_CLOUD_PROJECT_DATABASE_VALKEY_VERSION_TEST: - Type: String - Description: The version of Valkey to test. If not set, `OVH_CLOUD_PROJECT_DATABASE_VERSION_TEST` is used. OVH_CLOUD_PROJECT_DATABASE_REGION_TEST: - Type: String - Description: The region of the database service to test. OVH_CLOUD_PROJECT_DATABASE_FLAVOR_TEST: - Type: String - Description: The node flavor of the database service to test. OVH_CLOUD_PROJECT_DATABASE_IP_RESTRICTION_IP_TEST: - Type: String - Description: The IP restriction to test for database services. OVH_CLOUD_PROJECT_FAILOVER_IP_TEST: - Type: String - Description: The IP address of your public cloud FailOver IP. ``` -------------------------------- ### OVH Hosting Private Database Test Variables Source: https://registry.terraform.io/providers/ovh/ovh/latest/docs/index Variables for testing OVH Hosting Private Database resources, including service name, database name, username, and password. ```terraform OVH_HOSTING_PRIVATEDATABASE_SERVICE_TEST: Set a Webhosting database service name to test OVH_HOSTING_PRIVATEDATABASE_NAME_TEST: The database name created of your service name OVH_HOSTING_PRIVATEDATABASE_USER_TEST: The username of your private database to test OVH_HOSTING_PRIVATEDATABASE_PASSWORD_TEST: The password of your private database's user to test ``` -------------------------------- ### OVH Logging and Ordering Test Variables Source: https://registry.terraform.io/providers/ovh/ovh/latest/docs/index Variables for testing OVH DbaaS Logs and resource ordering, including Logstash versions and ordering flags for vRacks, cloud projects, and domains. ```terraform OVH_DBAAS_LOGS_SERVICE_TEST: The name of your Dbaas logs service. OVH_DBAAS_LOGS_LOGSTASH_VERSION_TEST: The name of your Dbaas logs Logstash version. OVH_TESTACC_ORDER_VRACK: set this variable to "yes" will order vracks. OVH_TESTACC_ORDER_CLOUDPROJECT: set this variable to "yes" will order cloud projects. OVH_TESTACC_ORDER_DOMAIN: set this variable to "mydomain.ovh" to run tests for domain zones. ``` -------------------------------- ### Terraform Provider Configuration (Access Token) Source: https://registry.terraform.io/providers/ovh/ovh/latest/docs/index Configures the OVH Terraform provider using an access token. The access token can be provided via the `access_token` argument or the `OVH_ACCESS_TOKEN` environment variable. The endpoint must also be configured. ```terraform provider "ovh" { endpoint = "ovh-eu" access_token = "your_access_token" } ``` -------------------------------- ### OVH Configuration File Format Source: https://registry.terraform.io/providers/ovh/ovh/latest/docs/index Defines the structure for an OVH configuration file, used for storing provider credentials and endpoint settings. This allows for managing configurations separately from the main Terraform code. ```ini [default] ; general configuration: default endpoint endpoint=ovh-eu [ovh-eu] ; configuration specific to 'ovh-eu' endpoint application_key=my_app_key application_secret=my_application_secret consumer_key=my_consumer_key ``` -------------------------------- ### OVH Provider Configuration Source: https://registry.terraform.io/providers/ovh/ovh/latest/docs/index Configures the OVH Terraform provider with various authentication and operational parameters. Supports environment variables for sensitive information. ```APIDOC provider "ovh" { endpoint = "ovh-eu" application_key = "your_application_key" application_secret = "your_application_secret" consumer_key = "your_consumer_key" client_id = "your_client_id" client_secret = "your_client_secret" access_token = "your_access_token" user_agent_extra = "my_app v1.0" api_rate_limit = 10 } # Arguments supported: # endpoint (Optional): Specify which API endpoint to use. e.g. `ovh-eu` or `ovh-ca`. # application_key (Optional): The API Application Key. # application_secret (Optional): The API Application Secret. # consumer_key (Optional): The API Consumer key. # client_id (Optional): The OAuth2 client ID. # client_secret (Optional): The OAuth2 client secret. # access_token (Optional): The OVH API Access Token. # user_agent_extra (Optional): Extra information to append at the end of the user-agent used when making API calls. # api_rate_limit (Optional): Specify the API request rate limit, X operations by seconds. If omitted, unlimited. ``` -------------------------------- ### OVH Provider Configuration Source: https://registry.terraform.io/providers/ovh/ovh/latest/docs/index Configures the OVH provider with necessary credentials for interacting with OVHcloud APIs. Supports OAuth2, short-lived access tokens, and application keys/secrets. ```terraform provider "ovh" { # Configuration options for OVH provider # Example: endpoint = "ovh-eu" # Example: application_key = "YOUR_APPLICATION_KEY" # Example: application_secret = "YOUR_APPLICATION_SECRET" # Example: consumer_key = "YOUR_CONSUMER_KEY" } ``` -------------------------------- ### OVHcloud API Authentication Methods Source: https://registry.terraform.io/providers/ovh/ovh/latest/docs/index Details the authentication methods supported by the OVH provider for accessing OVHcloud APIs, including OAuth2, short-lived access tokens, and application keys. ```APIDOC OVH Provider Authentication: 1. OAuth2: - Uses scoped service accounts. - Compatible with OVHcloud IAM. - Recommended for secure and granular access. 2. Short-lived Access Token: - Obtained from OVH API. - Can be used with tools like HashiCorp Vault's OAuth2 secret engine. - Suitable for time-bound access. 3. Application Key & Secret & Consumer Key: - Traditional authentication method. - Requires generating keys through the OVHcloud control panel. - Ensure secure storage of these credentials. ``` -------------------------------- ### OVH Networking and Service Test Variables Source: https://registry.terraform.io/providers/ovh/ovh/latest/docs/index Variables for testing OVH networking and service-related resources, including dedicated servers, NAS HA, IP addresses, and domain zones. ```terraform OVH_DEDICATED_SERVER: The name of the dedicated server to test dedicated_server_networking resource. OVH_NASHA_SERVICE_TEST: The name of your HA-NAS service. OVH_ZONE_TEST: The domain you own to test the domain_zone resource. OVH_IP_TEST, OVH_IP_BLOCK_TEST, OVH_IP_REVERSE_TEST: The values you have to set for testing ip reverse resources. OVH_IP_MOVE_SERVICE_NAME_TEST: The value you have to set for testing ip move resources. ``` -------------------------------- ### Terraform Provider Configuration (OAuth2) Source: https://registry.terraform.io/providers/ovh/ovh/latest/docs/index Configures the OVH Terraform provider with OAuth2 credentials directly within the provider block. Requires Terraform 0.13 or later. ```terraform terraform { required_providers { ovh = { source = "ovh/ovh" } } } provider "ovh" { endpoint = "ovh-eu" client_id = "xxxxxxxxx" client_secret = "yyyyyyyyy" } ``` -------------------------------- ### Terraform Configuration for Local OVH Provider Source: https://registry.terraform.io/providers/ovh/ovh/latest/docs/index A Terraform configuration block to specify the use of a locally built OVH provider. It defines the provider source and version, allowing Terraform to use the custom build. ```hcl terraform { required_providers { ovh = { source = "terraform.local/local/ovh" version = "0.0.1" } } } data "ovh_me" "me" {} output "me" { value = data.ovh_me.me } ``` -------------------------------- ### Terraform State Storage with OVHcloud Object Storage Source: https://registry.terraform.io/providers/ovh/ovh/latest/docs/index Configures Terraform to store its state files in an OVHcloud Object Storage bucket, leveraging S3 compatibility for backend storage. ```Terraform terraform { backend "s3" { # Add your OVHcloud Object Storage backend configuration here # Refer to the OVHcloud documentation for specific details. # Example: # bucket = "your-ovh-bucket-name" # key = "path/to/your/terraform.tfstate" # region = "your-ovh-region" # endpoint = "your-ovh-s3-endpoint" # access_key = "your-ovh-object-storage-access-key" # secret_key = "your-ovh-object-storage-secret-key" } } ``` -------------------------------- ### Terraform Provider Configuration Source: https://registry.terraform.io/providers/ovh/ovh/latest/docs/index Configures the OVH Terraform provider with essential credentials and endpoint. This block is required for authenticating with OVHcloud APIs. ```terraform terraform { required_providers { ovh = { source = "ovh/ovh" } } } provider "ovh" { endpoint = "ovh-eu" application_key = "xxxxxxxxx" application_secret = "yyyyyyyyy" consumer_key = "zzzzzzzzzzzzzz" } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.