diff --git a/modules/cloud_service_providers/aws_cloud/src/Form/Ec2/NetworkInterfaceCreateForm.php b/modules/cloud_service_providers/aws_cloud/src/Form/Ec2/NetworkInterfaceCreateForm.php
index 153e8709..48e77d6a 100644
--- a/modules/cloud_service_providers/aws_cloud/src/Form/Ec2/NetworkInterfaceCreateForm.php
+++ b/modules/cloud_service_providers/aws_cloud/src/Form/Ec2/NetworkInterfaceCreateForm.php
@@ -63,10 +63,11 @@ class NetworkInterfaceCreateForm extends AwsCloudContentForm {
       '#required'      => FALSE,
     ];
 
+    $method = "{$this->getModuleName($entity)}_get_subnet_options_by_vpc_id";
     $form['network_interface']['subnet_id'] = [
       '#type'          => 'select',
       '#title'         => $this->t('Subnet'),
-      '#options'       => aws_cloud_get_subnet_options_by_vpc_id(NULL, $entity),
+      '#options'       => $method(NULL, $entity),
       '#ajax' => [
         'callback' => '::subnetAjaxCallback',
         'wrapper'  => 'security-groups-wrapper',
diff --git a/modules/cloud_service_providers/openstack/src/Form/OpenStackNetworkInterfaceCreateForm.php b/modules/cloud_service_providers/openstack/src/Form/OpenStackNetworkInterfaceCreateForm.php
index 7ca75f6d..37680629 100644
--- a/modules/cloud_service_providers/openstack/src/Form/OpenStackNetworkInterfaceCreateForm.php
+++ b/modules/cloud_service_providers/openstack/src/Form/OpenStackNetworkInterfaceCreateForm.php
@@ -3,7 +3,6 @@
 namespace Drupal\openstack\Form;
 
 use Drupal\aws_cloud\Form\Ec2\NetworkInterfaceCreateForm;
-use Drupal\Core\Form\FormStateInterface;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 
 /**
@@ -35,39 +34,4 @@ class OpenStackNetworkInterfaceCreateForm extends NetworkInterfaceCreateForm {
     );
   }
 
-  /**
-   * Overrides Drupal\Core\Entity\EntityFormController::buildForm().
-   *
-   * @param array $form
-   *   Array of form object.
-   * @param \Drupal\Core\Form\FormStateInterface $form_state
-   *   The current form state.
-   * @param string $cloud_context
-   *   A cloud_context string value from URL "path".
-   *
-   * @return array
-   *   Array of form object.
-   */
-  public function buildForm(array $form, FormStateInterface $form_state, $cloud_context = '') {
-
-    $form = parent::buildForm($form, $form_state, $cloud_context);
-
-    $this->ec2Service->setCloudContext($cloud_context);
-
-    $entity = $this->entity;
-
-    $form['network_interface']['subnet_id'] = [
-      '#type'          => 'select',
-      '#title'         => $this->t('Subnet'),
-      '#options'       => openstack_get_subnet_options_by_vpc_id(NULL, $entity),
-      '#ajax' => [
-        'callback' => '::subnetAjaxCallback',
-        'wrapper'  => 'security-groups-wrapper',
-      ],
-      '#required'      => TRUE,
-    ];
-
-    return $form;
-  }
-
 }
diff --git a/src/Traits/CloudContentEntityTrait.php b/src/Traits/CloudContentEntityTrait.php
index bdd10167..913fe7ca 100644
--- a/src/Traits/CloudContentEntityTrait.php
+++ b/src/Traits/CloudContentEntityTrait.php
@@ -3,6 +3,7 @@
 namespace Drupal\cloud\Traits;
 
 use Drupal\cloud\Entity\CloudContentEntityBase;
+use Drupal\Core\Entity\ContentEntityBase;
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\StringTranslation\TranslatableMarkup;
 
@@ -158,6 +159,19 @@ trait CloudContentEntityTrait {
     return $label;
   }
 
+  /**
+   * Get a module name of the entity.
+   *
+   * @param \Drupal\cloud\Entity\CloudContentEntityBase $entity
+   *   The entity.
+   *
+   * @return string
+   *   The module name.
+   */
+  protected function getModuleName(CloudContentEntityBase $entity): string {
+    return $entity->getEntityType()->getProvider();
+  }
+
   /**
    * Add an underscore to the provider string.
    *
