Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

IBM Container Registry plan

You can use this submodule to upgrade the IBM Container Registry plan.

The submodule can used without the root module upgrade the plan without creating any additional namespaces or retention polcies.

Usage

API_DATA_IS_SENSITIVE=true

For more information, see the provider documentation for generic REST APIs.

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

# Data source to retrieve token details
data "ibm_iam_auth_token" "token_data" {
}

# Data source to account settings
data "ibm_iam_account_settings" "iam_account_settings" {
}

provider "restapi" {
  uri                   = "https:"
  write_returns_object  = false
  create_returns_object = false
  debug                 = false # set to true to show detailed logs, but use carefully as it might print sensitive values.
  headers = {
    Account       = data.ibm_iam_account_settings.iam_account_settings.account_id
    Authorization = data.ibm_iam_auth_token.token_data.iam_access_token
    Content-Type  = "application/json"
  }
}

# Upgrade plan:
module "upgrade-plan" {
  source  = "terraform-ibm-modules/container-registry/ibm//modules/plan"
  version = "X.X.X" # Replace "X.X.X" with a release version to lock into a specific release
  container_registry_endpoint = "us.icr.io"
}

Required IAM access policies

You need the following permissions to run this module.

  • Account Management
    • IBM Cloud Container Registry service
      • Manager service access

Access roles for using Container Registry

Requirements

Name Version
terraform >= 1.0.0
ibm >= 1.49.0, < 2.0.0
restapi >= 1.20.0, <2.0.0

Modules

No modules.

Resources

Name Type
restapi_object.container_registry_plan_upgrade resource

Inputs

Name Description Type Default Required
container_registry_endpoint The endpoint of the ICR region, eg. us.icr.io or de.icr.io, to change to standard plan string "us.icr.io" no

Outputs

No outputs.