diff --git a/app/helpers/application_helper/button/embedded_terraform.rb b/app/helpers/application_helper/button/embedded_terraform.rb index bb97df62..903d0a06 100644 --- a/app/helpers/application_helper/button/embedded_terraform.rb +++ b/app/helpers/application_helper/button/embedded_terraform.rb @@ -1,7 +1,10 @@ class ApplicationHelper::Button::EmbeddedTerraform < ApplicationHelper::Button::Basic def disabled? - if Rbac.filtered(ManageIQ::Providers::EmbeddedTerraform::AutomationManager.all).empty? + if !MiqRegion.my_region.role_active?('embedded_terraform') + @error_message = _("Embedded Terraform Role is not enabled.") + elsif Rbac.filtered(ManageIQ::Providers::EmbeddedTerraform::AutomationManager.all).empty? @error_message = _("User isn't allowed to use the Embedded Terraform provider.") end + @error_message.present? end end