This repo contains the most basic provisioning of IBM Cloud resources to standup a Code Engine service instance (called a "project") and build a custom image from a Code Engine (ce) Build Configuration. This can absolutely be done using DevOps pipelines, but for showcasing basic ce functionality, the image build pipeline has been omitted. Pipelines should absolutely be used for enterprise-grade image builds.
There are a few IBM Cloud resources that have to exist prior to running this Terraform. Issuing a terraform destroy will NOT tear down the resources listed below.
Example: name-rg An existing Resource Group where all provisioned resources will belong.
Example: "devel" You can substitute or name an existing Namespace, but one has to exist prior to running this Terraform. This is where your build-image (output) will be pushed.
Example: "icr-devel-image-push-service-id" An IAM Service ID should be created with an API Key (be sure to save the API Key password in a secret/password manager). The Terraform will place this Service ID (and it's associated API Key) in an IAM Access Group with the proper policies.
- Ensure pre-requisites are in place
- Run Terraform
- Execute Code Engine build-run by Running a build configuration
The outcome should be an image pushed to your IBM Container Registry namespace.