conveyor_project (Resource)
Provides a Conveyor project.
After creating a project with the terraform provider you can generate the .datafy/project.yaml file with the command:
conveyor project generate-config --name YOUR_PROJECT_NAME
Example Usage
resource "conveyor_project" "my_project" {
  name = "my_project"
}
# A project where you configure the default IDE config in Terraform
resource "conveyor_project" "my_project_with_ide_config" {
  name = "my_project_with_ide_config"
  default_ide_config {
    vscode_config {
      extensions = ["extension1", "extension2"]
    }
    build_steps {
      name = "simple command"
      cmd  = "echo step1"
    }
    build_steps {
      name = "multiple commands"
      cmd  = <<-EOT
        sudo apt update
        sudo apt install -y unzip
        curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
        unzip awscliv2.zip
        sudo ./aws/install
        EOT
    }
  }
}
# A project where you do not want to manage the default IDE config from Terraform and let users use the UI or CLI instead.
resource "conveyor_project" "my_project_no_ide_config" {
  name = "my_project_no_ide_config"
  lifecycle {
    ignore_changes = [default_ide_config]
  }
}
Schema
Required
- name(String) The name of the project.
Optional
- default_iam_identity(String) The default IAM role of the project, can be templated.
- default_ide_base_image_id(String) The ID of the base image that will be set as default when starting a new IDE for this project.
- default_ide_config(Block List, Max: 1) Allows you to configure the default IDE configuration. (see below for nested schema)
- default_ide_environment_id(String) The ID of the environment that will be set as default when starting a new IDE for this project.
- description(String) The description of the project, you can input markdown here.
- git_repo(String) The link to the git repo for this project.
- git_sub_folder(String) Configures that the project is using a sub folder of your git repo, this makes the IDE open that sub folder automatically.
Read-Only
- id(String) The id of the project.
Nested Schema for default_ide_config
Optional:
- build_steps(Block List) Additional commands that customize the IDE environment. (see below for nested schema)
- vscode_config(Block List, Max: 1) VS Code configuration of the ide. (see below for nested schema)
Nested Schema for default_ide_config.build_steps
Required:
- cmd(String) The command that needs to be executed. Can contain multiple commands, separated by newlines.
- name(String) The name of the buildstep.
Nested Schema for default_ide_config.vscode_config
Required:
- extensions(List of String) Enable user specific extensions.
Import
Import is supported using the following syntax:
export PROJECT_ID=$(conveyor project get --name my_project -ojson | jq -r ".id")
terraform import conveyor_project.my_project "$PROJECT_ID"