Skip to content

Conversation

@agrare
Copy link
Member

@agrare agrare commented Aug 7, 2025

Adds ServiceTemplateTerraformEnterprise changes for creating a RequestTemplate that supports running the TerraformEnterprise::AutomationManager::Provision through workflows.

To create a ServiceTemplate:

source           = ConfigurationScript.find_by(:name => "terraform-test")
provision_asl    = ConfigurationScriptPayload.find_by(:name => "provision.asl")
service_template = ServiceTemplateTerraformEnterprise.create_catalog_item(
  {
    :name                     => "test",
    :prov_type                => "generic_terraform_enterprise",
    :service_template_catalog => ServiceTemplateCatalog.first,
    :display                  => true,
    :zone                     => Zone.default_zone,
    :config_info              => {
      :owner_email              => "[email protected]",
      :source_id                => source.id,
      :service_template_request => true,
      :provision                => {:dialog => Dialog.first, :configuration_script_id => provision_asl.id, :fqname => ""}
    }
  },
  "admin"
)
service_template.order(User.first)

Related:

@agrare agrare force-pushed the miq_provision_based_service branch from 91c90b8 to 1aced59 Compare August 8, 2025 14:33
@kbrock kbrock added enhancement New feature or request wip labels Aug 11, 2025
@agrare agrare force-pushed the miq_provision_based_service branch 2 times, most recently from 0d5046c to ff6d84d Compare August 21, 2025 13:49
@@ -0,0 +1,6 @@
class ManageIQ::Providers::TerraformEnterprise::AutomationManager::ProvisionWorkflow < ManageIQ::Providers::AutomationManager::ProvisionWorkflow
def dialog_name_from_automate(message = 'get_dialog_name', extra_attrs = {})
extra_attrs['platform_category'] ||= 'terraform_enterprise'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be automation...probably need to change the other pr(s) to match

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you search the other models for this key, I see that platform_category is set to a generic category in the base class (e.g. extra_attrs['platform_category'] = "cloud" in the base Cloud::ProvisionWorkflow), and then in the actual providers they have platform set to something specific, e.g. extra_attrs['platform'] = "ibm_cloud"

@agrare agrare force-pushed the miq_provision_based_service branch from 8bce36f to 9001ab2 Compare October 1, 2025 19:51
@agrare agrare force-pushed the miq_provision_based_service branch from 9001ab2 to 043617e Compare October 7, 2025 16:31
@agrare agrare force-pushed the miq_provision_based_service branch from a7f298d to 39a47d7 Compare October 14, 2025 20:01
@agrare agrare force-pushed the miq_provision_based_service branch 2 times, most recently from 1725335 to f3ad057 Compare October 16, 2025 14:42
@agrare agrare force-pushed the miq_provision_based_service branch from 971e22e to 915e6c1 Compare October 16, 2025 21:44
@agrare agrare mentioned this pull request Oct 16, 2025
3 tasks
@agrare agrare force-pushed the miq_provision_based_service branch from 915e6c1 to 2c69852 Compare October 17, 2025 12:51
@agrare agrare force-pushed the miq_provision_based_service branch from 2c69852 to a7c377e Compare October 17, 2025 18:20
@agrare agrare changed the title [WIP] MiqProvisionTask based workspace provision MiqProvisionTask based workspace provision Oct 31, 2025
Comment on lines -8 to -10
def self.default_provisioning_entry_point(_service_type)
'/AutomationManagement/TerraformEnterprise/Service/Provisioning/StateMachines/Provision/CatalogItemInitialization'
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does removing this now prevent the UI from doing automate based provisioning? Or maybe not prevent, but the user would have to know to put this into the field?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does not. Previously there was no way for the user to select anything except the above value. Now the user has the same options as vm provisioning to select automate or workflows.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

@agrare agrare removed the wip label Nov 3, 2025
@agrare agrare closed this Nov 3, 2025
@agrare agrare reopened this Nov 3, 2025
@Fryguy Fryguy reopened this Nov 3, 2025
@Fryguy Fryguy self-assigned this Nov 3, 2025
@Fryguy Fryguy merged commit 71fbcee into ManageIQ:master Nov 3, 2025
6 of 8 checks passed
@agrare agrare deleted the miq_provision_based_service branch November 3, 2025 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants