Terraform OVH Project
This Terraform project sets up an OVH cloud project with IAM policies for different user roles. It also configures AWS as the backend for Terraform state.
Prerequisites
- Terraform installed on your machine.
- AWS and OVH credentials configured.
Usage
- Clone the repository.
- Initialize Terraform:
terraform init1 - Apply the Terraform configuration:
terraform apply1
Backend Configuration
The Terraform state is stored in an S3 bucket. The backend configuration is defined in
versions.tf
terraform {
backend "s3" {
bucket = "yourbucket"
key = "terraform/ovh-project"
region = "eu-central-1"
}
}
1
2
3
4
5
6
7
2
3
4
5
6
7
Providers
The required providers are defined in
versions.tf
terraform {
required_providers {
ovh = {
source = "ovh/ovh"
version = "1.5.0"
}
aws = {
source = "hashicorp/aws"
version = "5.65.0"
}
}
}
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
Requirements
| Name | Version |
|---|---|
| aws | 5.65.0 |
| ovh | 1.5.0 |
Modules
No modules.
Resources
| Name | Type |
|---|---|
| ovh_cloud_project.cloud_project | resource |
| ovh_iam_policy.admin | resource |
| ovh_iam_policy.editor | resource |
| ovh_iam_policy.reader | resource |
| ovh_me.myaccount | data source |
| ovh_me_identity_user.user | data source |
| ovh_me_identity_users.users | data source |
| ovh_order_cart.mycart | data source |
| ovh_order_cart_product_plan.cloud | data source |
Inputs
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| aws_account_id | this is for the tfstates Backend. in our case AWS. | string | n/a | yes |
| project_id | Projects last block in name | string | n/a | yes |
| users | Users and their roles provided by meshStack (Note that users must exist in stackit) | list(object( | n/a | yes |
| workspace_id | Projects first block in name | string | n/a | yes |
Outputs
| Name | Description |
|---|---|
| ovh_login_link | n/a |
| tenant_id | n/a |
Source code & Installation
The source code of this kit module can be found here
Run the following command to install the kit module:
collie kit import ovh/buildingblocks/projects/buildingblock
1
