How to Integrate
Last updated on
12 August 2021
1. Project:
- Create your own project for a contributed module at d.o.
2. Module:
- In your project, implement a module, which can be a sub-module as a cloud service provider of
cloudmodule. You can learn about how you implement a sub-module from the following modules:cloud/modules/cloud_service_providers/aws_cloudcloud/modules/cloud_service_providers/k8scloud/modules/cloud_service_providers/openstackcloud/modules/cloud_service_providers/terraformcloud/modules/cloud_service_providers/vmware
3. CloudConfigPlugin:
- In your sub-module, you need to add
<ModuleName>ConfigPluginwhich implementsCloudConfigPluginManagerInterface, that is responsible for loading credentials. - You can learn about
CloudConfigPluginfrom the following implementations:cloud/modules/cloud_service_providers/aws_cloud/src/Plugin/cloud/config/AwsCloudConfigPlugin.phpcloud/modules/cloud_service_providers/k8s/src/Plugin/cloud/config/K8sConfigPlugin.phpcloud/modules/cloud_service_providers/openstack/src/Plugin/cloud/config/OpenStackCloudConfigPlugin.phpcloud/modules/cloud_service_providers/terraform/src/Plugin/cloud/config/TerraformCloudConfigPlugin.phpcloud/modules/cloud_service_providers/vmware/src/Plugin/cloud/config/VmwareCloudConfigPlugin.php
4. Service:
- Add
<ModuleName>ServiceInterfaceand implement<ModuleName>Serviceto access to your cloud service (or the third-party cloud service) API.
5. Entity:
- Add some Drupal's entities which are corresponding to your cloud entities.
6. View:
- Add list views for your cloud service from Drupal UI. Export YAML configuration from Drupal site and import them to
config/installdirectory in the your (sub-) module.
7. Form:
- Add CRUD forms for your module. Each form should call
<ModuleName>Serviceto interact with the your cloud service API.
8. PHP Composer:
- Create
composer.json;it should includedrupal/cloudfor your module.
Help improve this page
Page status: No known problems
You can:
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion