Parameter | Description | Allowed values | Type | Required? |
---|---|---|---|---|
providerCode | This is the provider code referenced by the Catalog to refer to the provider onboarded to Enterprise Marketplace for importing the catalogs. This parameter is set by Enterprise Marketplace when you export the catalogs. | ibmcloud, azure, aws, alicloud, gcp | string | Yes |
sourcePath | The path to the folder that contains the raw templates relative to the location of the icb_catalog_metadata.json file.Attempting to import catalogs without an empty string for the sourcePath will result in a "sourcePath cannot be empty" error. Attempting to import catalogs without adding a valid sourcePath will result in an "Error occurred while extracting zip. Please check supplied sourcePath is correct." error. You can use "/" as the sourcePath if the icb_catalog_metadata.json file is located in the same folder as the templates for the catalog. In this case the name of the catalogs will be generated from the names of the template files. This technique is not applicable for Google because it needs the templates to be grouped in a folder. This technique is applicable for providers using Terraform templates only when the catalog is created from a single Terraform (.tf ) file. | string | Yes |
{ "icbCatalogRepository": [ { "providerCode": "azure", "sourcePath": "Azure_Templates" } ] }
{ "icbCatalogRepository": [ { "providerCode": "azure", "sourcePath": "Azure_Templates" }, { "providerCode": "aws", "sourcePath": "AWS_Templates" } ] }
Provider | Name generation technique |
---|---|
Azure | Every JSON is considered as an individual catalog. The name of the catalog is based on the full path of the individual templates in the content package. All "/" characters in the path will be replaced with "_". |
AWS, Alibaba | The names of the catalogs resulting from the import correspond to the individual filenames of the JSON/YAML files included in the content package. |
GCP | Each folder is considered as an individual catalog. The names of the catalogs resulting from the import correspond to the folder names that contain the YAML/PY/JINJA files included in the content package. You must always create a Zip/Git folder structure for your YAML/PY/JINJA files related to the catalog. |
IBM Cloud, Terraform templates for any provider | If you use single .tf files (with no separate state/variables files), you can include these .tf templates in the directory of your Zip/Git structure where your icb_catalog_metadata.json file is located. In this case, the names of the imported catalogs correspond to the filename (without extension) of your .tf files.If you use multiple .tf files for a single catalog, you must locate them inside their own folder structure. In this case, the names of the imported catalogs correspond to the folder name of the folder structure where your .tf files are located. You can create Zip/Git folder structures with a mix of individual .tf files that are each for an individual catalog in the root folder of your Zip/Git folder structure.If sourcepath = "/" in icb_catalog_metadata.json , then the names of the catalogs correspond to the parent folder name for each template. |
{ "icbCatalogRepository": [ { "providerCode": "azure", "sourcePath": "Azure_Templates" } ] }
{ "icbCatalogRepository": [ { "providerCode": "azure", "sourcePath": "Azure_Templates" }, { "providerCode": "aws", "sourcePath": "AWS_Templates" } ] }
icb_catalog_metadata.json Template DNS/dns.json
icb_catalog_metadata.json Template SEC_GROUP/sec.tf
{ "icbCatalogRepository": [ { "providerCode": "alicloud", "providerName": "alibaba", "providerOfferingTypes": ["iaas"], "sourcePath": "/Templates", "serviceOfferings": [] } ] }
Templates icb_catalog_metadata.json ECS/ecs.tf SEC_GROUP/sec.tf
{ "icbCatalogRepository": [ { "providerCode": "alicloud", "providerName": "alibaba", "providerOfferingTypes": ["iaas"], "sourcePath": "/Templates", "serviceOfferings": [] } ] }
Templates icb_catalog_metadata.json DNS/dns.json ECS/scs.json
{ "icbCatalogRepository": [ { "providerCode": "alicloud", "providerName": "alibaba", "providerOfferingTypes": ["iaas"], "sourcePath": "/Templates", "serviceOfferings": [] } ] }
{ "icbCatalogRepository": [ { "providerCode": "aws", "providerName": "Amazon", "sourcePath": "/AWS_Service_Offerings" }, ] }
{ "icbCatalogRepository": [ { "providerCode": "aws", "providerName": "Amazon", "sourcePath": "/AWS_Service_Offerings" }, ] }
├── my_source_dir | └── my_service │ └────file_name.yaml │ └────file_name_1.py... │ └────file_name_n.jinja
{ "icbCatalogRepository": [ { "providerCode": "azure", "sourcePath": "Azure_Templates" }, ] }
{ "icbCatalogRepository": [ { "providerCode": "azure", "sourcePath": "Azure_Templates" }, ] }
content_import-9403-folder-level2 icb_catalog_metadata.json templates bluemix bluemix.tf VM1 variables.tf main.tf cloudamqp.tf
content_import-9403-folder-level2 icb_catalog_metadata.json templates bluemix bluemix.tf VM1 variables.tf main.tf cloudamqpsvc cloudamqp.tf