Terraform OVH platform users

This Terraform module sets up and manages OVH platform users and integrates with AWS for backend state management.

Prerequisites

  • Terraform v1.0.0 or higher
  • AWS account with appropriate permissions
  • OVH account with appropriate permissions

Usage

To use this module, include it in your Terraform configuration as follows:

module "ovh_users" {
  source = "./buildingblock"

  aws_account_id = "your-aws-account-id"
  users = [
    {
      meshIdentifier = "identifier0"
      username       = "user0@example.com"
      firstName      = "First"
      lastName       = "Last"
      email          = "user0@example.com"
      euid           = "user0@example.com"
      roles          = ["reader"]
    }
 ]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

Providers

The module requires the following providers, as specified in versions.tf:

  • ovh: Manages OVH resources.
  • aws: Manages AWS resources.
  • random: Generates random values.

Backend Configuration

The module uses AWS S3 as the backend for storing Terraform state. This is configured in versions.tf:

terraform {
  backend "s3" {
    bucket = "yourbucket"
    key    = "terraform/ovh-project-users"
    region = "eu-central-1"
  }
}
1
2
3
4
5
6
7

Requirements

NameVersion
aws5.65.0
ovh1.5.0
random3.6.0

Modules

No modules.

Resources

NameType
ovh_me_identity_user.platform_usersopen in new windowresource
random_password.user_passwordsopen in new windowresource
ovh_me.myaccountopen in new windowdata source
ovh_me_identity_users.usersopen in new windowdata source
ovh_order_cart.mycartopen in new windowdata source
ovh_order_cart_product_plan.cloudopen in new windowdata source

Inputs

NameDescriptionTypeDefaultRequired
aws_account_idthis is for the tfstates Backend. in our case AWS.stringn/ayes
usersUsers and their roles provided by meshStack (Note that users must exist in stackit)
list(object(
{
meshIdentifier = string
username = string
firstName = string
lastName = string
email = string
euid = string
roles = list(string)
}
))
n/ayes

Outputs

No outputs.

Source code & Installation

The source code of this kit module can be found hereopen in new window

Run the following command to install the kit module:

collie kit import ovh/buildingblocks/projects_users/buildingblock
1