Skip to content

corellium/terraform-provider-corellium

Repository files navigation

Terraform logo

Terraform Corellium Provider

Acceptance Tests CI Terraform Registry release CI Examples QA CI

The Corellium allows Terraform to manage Corellium resources.

  • Examples can be found in the examples directory.
  • Documentation can be found in the docs directory. At the same directory, you can find demo.tf file which contains all a small usage example.

Please note: If you believe you have found a security issue in the Terraform Corellium Provider, please responsibly disclose it by contacting us at terraform-provider-corellium@security.email.ai.moda.

Requirements

  • Terraform 0.13.x or higher

  • Go 1.20.x (to build the provider plugin)

Usage

This is a simple example of creating a project and multiple iOS versions at once.

terraform {
  required_providers {
    corellium = {
      source  = "corellium/corellium"
      version = "0.0.2-alpha"
    }
  }
}

provider "corellium" {
  token = ""
}

resource "corellium_v1project" "backtesting" {
  name = "ios_backtesting"
  settings = {
    version         = 1
    internet_access = false
    dhcp            = false
  }
  quotas = {
    cores = 60
  }
  users = []
  teams = []
  keys = []
}

variable "ios_versions" {
  default = ["16.0", "16.0.2", "16.0.3", "16.1", "16.1.1", "16.1.2", "16.2", "16.3", "16.3.1", "16.4"]
  type    = set(string)
}

resource "corellium_v1instance" "test_instance" {
  for_each = var.ios_versions
  name     = "version_${each.key}"
  flavor   = "iphone8plus"
  project  = corellium_v1project.backtesting.id
  os       = each.key
}

Then, run:

CORELLIUM_API_TOKEN="YOUR.API_KEY_HERE" CORELLIUM_API_HOST="YOURDOMAIN.enterprise.corellium.com" terraform apply

To tear down everything that was created, run:

CORELLIUM_API_TOKEN="YOUR.API_KEY_HERE" CORELLIUM_API_HOST="YOURDOMAIN.enterprise.corellium.com" terraform destroy
ai.moda logo