Skip to content

[WIP] Allow passing configuration script by ref - #140

Open
agrare wants to merge 3 commits into
ManageIQ:masterfrom
agrare:allow_configuration_script_by_ref
Open

agrare wants to merge 3 commits into
ManageIQ:masterfrom
agrare:allow_configuration_script_by_ref

Conversation

@agrare

@agrare agrare commented Oct 9, 2026

Copy link
Copy Markdown
Member

Allow for the source configuration_script to be passed by ref not id.

This should allow for simpler migration from another system where the ID isn't immediately known.

The other option is to do a 2-stage import where templates are first created, IDs mapped, then asl files created.

Depends on:

Example provision_task state using :src_ems_type and configuration_script_ref.

"Provision": {
      "Type": "Task",
      "Resource": "manageiq://provision_task",
      "Parameters": {
        "request_type": "provision_via_automation_manager",
        "configuration_script_ref": {"scm_branch": "main", "scm_url": "https://github.com/dbpradeep/TerraformSamples.git", "name": "./HelloWorld"},
        "options": {
          "src_ems_type": "embedded_terraform",
          "verbosity": [0, "Normal"],
          "log_output": ["on_error", "On Error"],
          "credential_id": [170, "aws"],
          "dialog": {
            "vm_name.$": "$.dialog.dialog_instance_name"
          }
        }
      },
      "Next": "PostProvision"
    }

agrare added 3 commits October 8, 2026 11:32
Most of these methods are only called by ServiceTerraformTemplate, and
stack_opts is no longer called from the Service
Allow for the source configuration_script to be passed by ref not id.
This should allow for simpler migration from another system where the ID
isn't immediately known.
@miq-bot miq-bot added the wip label Oct 9, 2026
@miq-bot

miq-bot commented Oct 9, 2026

Copy link
Copy Markdown
Member

Checked commits agrare/manageiq-providers-embedded_terraform@80dd6a8~...cc5af2f with ruby 3.3.12, rubocop 1.91.0, haml-lint 0.78.0, and yamllint 1.37.1
6 files checked, 2 offenses detected

app/models/manageiq/providers/embedded_terraform/automation_manager/provision.rb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants