Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Code Engine binding module

You can use this submodule to provision IBM Code Engine Build.

Usage

provider "ibm" {
  ibmcloud_api_key = "XXXXXXXXXX" # pragma: allowlist secret
  region           = "us-south"
}

module "build" {
  source        = "terraform-ibm-modules/code-engine/ibm//modules/build"
  version       = "latest" # Replace "latest" with a release version to lock into a specific release
  project_id    = "project_id"
  name          = "BUILD_NAME"
  output_secret = "my-secret" # pragma: allowlist secret
  source_url    = "https://github.com/IBM/project"
  strategy_type = "dockerfile"
}

Required IAM access policies

You need the following permissions to run this module.

  • IAM Services
    • Code Engine service
      • Editor platform access
      • Writer service access

Requirements

Name Version
terraform >= 1.3.0
ibm >= 1.63.0, <2.0.0

Modules

No modules.

Resources

Name Type
ibm_code_engine_build.ce_build resource

Inputs

Name Description Type Default Required
name The name of the build. string n/a yes
output_image The name of the image. string n/a yes
output_secret The secret that is required to access the image registry. string n/a yes
project_id The ID of the project where build will be created. string n/a yes
source_context_dir The directory in the repository that contains the buildpacks file or the Dockerfile. string null no
source_revision Commit, tag, or branch in the source repository to pull. string null no
source_secret The name of the secret that is used access the repository source. If the var.source_type value is local, this field must be omitted. string null no
source_type Specifies the type of source to determine if your build source is in a repository or based on local source code. string null no
source_url The URL of the code repository. string n/a yes
strategy_size The size for the build, which determines the amount of resources used. string null no
strategy_spec_file The path to the specification file that is used for build strategies for building an image. string null no
strategy_type The strategy to use for building the image. string n/a yes
timeout The maximum amount of time, in seconds, that can pass before the build must succeed or fail. number 600 no

Outputs

Name Description
build_id The ID of the created code engine build.
id The unique identifier of the created code engine build.
name The name of the created code engine build.