1515from _nebari .provider .cloud import amazon_web_services , azure_cloud , google_cloud
1616from _nebari .stages .base import NebariTerraformStage
1717from _nebari .stages .kubernetes_services import SharedFsEnum
18+ from _nebari .stages .tf_objects import NebariOpentofuRequiredProvider
1819from _nebari .utils import (
1920 AZURE_NODE_RESOURCE_GROUP_SUFFIX ,
2021 construct_azure_resource_group_name ,
@@ -702,7 +703,7 @@ def tf_objects(self) -> List[Dict]:
702703 if self .config .provider == schema .ProviderEnum .gcp :
703704 return [
704705 * resources ,
705- opentofu . RequiredProvider ( ** constants . REQUIRED_PROVIDERS [ "google" ] ),
706+ NebariOpentofuRequiredProvider ( "google" , self . config ),
706707 opentofu .Provider (
707708 "google" ,
708709 project = self .config .google_cloud_platform .project ,
@@ -712,20 +713,20 @@ def tf_objects(self) -> List[Dict]:
712713 elif self .config .provider == schema .ProviderEnum .azure :
713714 return [
714715 * resources ,
715- opentofu . RequiredProvider ( ** constants . REQUIRED_PROVIDERS [ "azure" ] ),
716+ NebariOpentofuRequiredProvider ( "azurerm" , self . config ),
716717 ]
717718 elif self .config .provider == schema .ProviderEnum .aws :
718719 return [
719720 * resources ,
720- opentofu . RequiredProvider ( ** constants . REQUIRED_PROVIDERS [ "aws" ] ),
721+ NebariOpentofuRequiredProvider ( "aws" , self . config ),
721722 opentofu .Provider ("aws" , region = self .config .amazon_web_services .region ),
722723 ]
723724 elif self .config .provider == schema .ProviderEnum .local :
724725 return [
725726 * resource ,
726- opentofu . RequiredProvider ( ** constants . REQUIRED_PROVIDERS [ "kind" ] ),
727- opentofu . RequiredProvider ( ** constants . REQUIRED_PROVIDERS [ "docker" ] ),
728- opentofu . RequiredProvider ( ** constants . REQUIRED_PROVIDERS [ "kubectl" ] ),
727+ NebariOpentofuRequiredProvider ( "kind" , self . config ),
728+ NebariOpentofuRequiredProvider ( "docker" , self . config ),
729+ NebariOpentofuRequiredProvider ( "kubectl" , self . config ),
729730 ]
730731 else :
731732 return resources
0 commit comments