commonfields: id: HashicorpTerraform version: -1 sectionorder: - Connect - Collect configuration: - display: Server URL name: server_url required: true type: 0 defaultvalue: https://app.terraform.io/api/v2 section: Connect - displaypassword: API Token additionalinfo: The API Key to use for connection. name: credentials required: true hiddenusername: true type: 9 section: Connect - display: Default Organization Name name: default_organization_name type: 0 required: false section: Connect additionalinfo: There is an option to override with a command input parameter. If not provided, policy commands should require the organization name. - display: Default Workspace ID name: default_workspace_id type: 0 required: false section: Connect additionalinfo: There is an option to override with an input parameter. If not provided, some commands should require the workspace ID. - display: Trust any certificate (not secure) name: insecure type: 8 required: false section: Connect advanced: true - display: Use system proxy settings name: proxy type: 8 required: false section: Connect advanced: true - display: Fetch events name: isFetchEvents type: 8 required: false section: Collect hidden: - xsoar supportedModules: - xsiam - display: Events Fetch Interval name: eventFetchInterval type: 19 required: false defaultvalue: '1' advanced: true section: Collect hidden: - xsoar supportedModules: - xsiam - display: Maximum Number of Audit Events Per Fetch name: max_fetch # for fetch-events on XSIAM defaultvalue: 10000 type: 0 section: Collect hidden: - xsoar supportedModules: - xsiam name: HashicorpTerraform display: HashiCorp Terraform category: IT Services provider: IBM description: Hashicorp Terraform provide infrastructure automation to provision and manage resources in any cloud or data center with Terraform. script: commands: - name: terraform-runs-list description: List runs in a workspace. arguments: - name: workspace_id description: The workspace ID to list runs for. - name: run_id description: The run ID to get a specific run. - name: filter_status description: The run status to filter by. auto: PREDEFINED predefined: - pending - fetching - fetching_completed - pre_plan_running - pre_plan_completed - queuing - plan_queued - planning - planned - cost_estimating - cost_estimated - policy_checking - policy_override - policy_soft_failed - policy_checked - confirmed - post_plan_running - post_plan_completed - planned_and_finished - planned_and_saved - apply_queued - applying - applied - discarded - errored - canceled - force_canceled - name: page_number description: The page number of the results to return. Default is 1. - name: page_size description: The number of results to return per page. Default is 20, maximum is 100. outputs: - contextPath: Terraform.Run.data.id type: String description: The run ID. - contextPath: Terraform.Run.data.attributes.status type: String description: The run status. - contextPath: Terraform.Run.data.relationships.plan.data.id type: String description: The plan ID. - contextPath: Terraform.Run.data.attributes.status-timestamps.planned-at type: Date description: The datetime the plan was planned. - contextPath: Terraform.Run.data.type description: THe run type. type: String - contextPath: Terraform.Run.data.attributes.actions.is-cancelable description: Flag indicating whether the Terraform run can be canceled. type: Boolean - contextPath: Terraform.Run.data.attributes.actions.is-confirmable description: Flag indicating whether the Terraform run can be confirmed. type: Boolean - contextPath: Terraform.Run.data.attributes.actions.is-discardable description: Flag indicating whether the Terraform run can be discarded. type: Boolean - contextPath: Terraform.Run.data.attributes.actions.is-force-cancelable description: Flag indicating whether the Terraform run can be force-canceled. type: Boolean - contextPath: Terraform.Run.data.attributes.canceled-at description: Timestamp indicating when the Terraform run was canceled. type: Unknown - contextPath: Terraform.Run.data.attributes.created-at description: Timestamp indicating when the Terraform run was created. type: Date - contextPath: Terraform.Run.data.attributes.has-changes description: Flag indicating whether there are changes in the Terraform run. type: Boolean - contextPath: Terraform.Run.data.attributes.auto-apply description: Flag indicating whether auto-apply is enabled for the Terraform run. type: Boolean - contextPath: Terraform.Run.data.attributes.allow-empty-apply description: Flag indicating whether empty apply is allowed for the Terraform run. type: Boolean - contextPath: Terraform.Run.data.attributes.allow-config-generation description: Flag indicating whether configuration generation is allowed for the Terraform run. type: Boolean - contextPath: Terraform.Run.data.attributes.is-destroy description: Flag indicating whether the Terraform run is a destroy operation. type: Boolean - contextPath: Terraform.Run.data.attributes.message description: Text message associated with the Terraform run. type: String - contextPath: Terraform.Run.data.attributes.plan-only description: Flag indicating whether the Terraform run is for planning only. type: Boolean - contextPath: Terraform.Run.data.attributes.source description: Source of the Terraform run. type: String - contextPath: Terraform.Run.data.attributes.status-timestamps.plan-queueable-at description: Timestamp indicating when the Terraform run is queueable in the plan stage. type: Date - contextPath: Terraform.Run.data.attributes.trigger-reason description: Reason for triggering the Terraform run. type: String - contextPath: Terraform.Run.data.attributes.target-addrs description: Target addresses associated with the Terraform run. type: Unknown - contextPath: Terraform.Run.data.attributes.permissions.can-apply description: Flag indicating whether the user has permission to apply changes. type: Boolean - contextPath: Terraform.Run.data.attributes.permissions.can-cancel description: Flag indicating whether the user has permission to cancel the Terraform run. type: Boolean - contextPath: Terraform.Run.data.attributes.permissions.can-comment description: Flag indicating whether the user has permission to add comments. type: Boolean - contextPath: Terraform.Run.data.attributes.permissions.can-discard description: Flag indicating whether the user has permission to discard the Terraform run. type: Boolean - contextPath: Terraform.Run.data.attributes.permissions.can-force-execute description: Flag indicating whether the user has permission to force execute the Terraform run. type: Boolean - contextPath: Terraform.Run.data.attributes.permissions.can-force-cancel description: Flag indicating whether the user has permission to force cancel the Terraform run. type: Boolean - contextPath: Terraform.Run.data.attributes.permissions.can-override-policy-check description: Flag indicating whether the user has permission to override policy checks. type: Boolean - contextPath: Terraform.Run.data.attributes.refresh description: Flag indicating whether the Terraform run should perform a refresh. type: Boolean - contextPath: Terraform.Run.data.attributes.refresh-only description: Flag indicating whether the Terraform run is for refresh only. type: Boolean - contextPath: Terraform.Run.data.attributes.replace-addrs description: Replacement addresses associated with the Terraform run. type: Unknown - contextPath: Terraform.Run.data.attributes.save-plan description: Flag indicating whether the Terraform run plan should be saved. type: Boolean - contextPath: Terraform.Run.data.attributes.variables description: Variables associated with the Terraform run. type: Unknown - contextPath: Terraform.Run.data.relationships.apply.data.id description: The apply ID of the run. type: String - contextPath: Terraform.Run.data.relationships.comments description: Relationship information for comments associated with the Terraform run. type: String - contextPath: Terraform.Run.data.relationships.configuration-version description: Relationship information for the Terraform configuration version associated with the run. type: String - contextPath: Terraform.Run.data.relationships.cost-estimate description: Relationship information for cost estimates associated with the Terraform run. type: String - contextPath: Terraform.Run.data.relationships.created-by description: Relationship information for the user who created the Terraform run. type: String - contextPath: Terraform.Run.data.relationships.input-state-version description: Relationship information for the input state version associated with the Terraform run. type: String - contextPath: Terraform.Run.data.relationships.run-events description: Relationship information for events associated with the Terraform run. type: String - contextPath: Terraform.Run.data.relationships.policy-checks description: Relationship information for policy checks associated with the Terraform run. type: String - contextPath: Terraform.Run.data.relationships.workspace description: Relationship information for the Terraform workspace associated with the run. type: String - contextPath: Terraform.Run.data.relationships.workspace-run-alerts description: Relationship information for alerts associated with the Terraform workspace run. type: String - contextPath: Terraform.Run.data.links.self description: Link to the Terraform run data. type: String - name: terraform-get-events description: Retrieves Terraform audit trail events. This command is supported in Cortex XSIAM only and is intended for development and debugging purposes, as it may produce duplicate events. arguments: - name: from_date description: The start date for the audit trails as a relative time expression (e.g., '3 days ago') or an absolute time in ISO 8601 format (e.g., '2025-09-01T00:00:00Z'). defaultValue: "1 hour ago" - name: limit description: The maximum number of events to retrieve. defaultValue: "10" - name: should_push_events description: If true, the command will push the events to the Cortex XSIAM dataset; otherwise, it will only display them. auto: PREDEFINED predefined: - "true" - "false" defaultValue: "false" outputs: [] - name: terraform-run-action arguments: - name: run_id required: true description: The Terraform run ID to execute the action on. - name: action auto: PREDEFINED required: true predefined: - apply - cancel - discard - force-cancel - force-execute description: The action to execute on the Terraform run. - name: comment description: An optional comment to associate with the action. Not available for the action "force-execute". description: 'Perform an action on a Terraform run. The available actions are: apply, cancel, discard, force-cancel, force-execute.' - name: terraform-plan-get arguments: - name: plan_id required: true description: The ID of the Terraform plan to retrieve. - name: json_output description: Whether to return the plan as a JSON fileResult. auto: PREDEFINED predefined: - "true" - "false" defaultValue: "false" outputs: - contextPath: Terraform.Plan.id type: String description: The plan ID. - contextPath: Terraform.Plan.attributes.status type: String description: The plan status. - contextPath: Terraform.Plan.type description: Type of the Terraform plan data. type: String - contextPath: Terraform.Plan.attributes.has-changes description: Flag indicating whether the Terraform plan has changes. type: Boolean - contextPath: Terraform.Plan.attributes.status-timestamps.started-at description: Timestamp indicating when the Terraform plan started. type: Date - contextPath: Terraform.Plan.attributes.status-timestamps.finished-at description: Timestamp indicating when the Terraform plan finished. type: Date - contextPath: Terraform.Plan.attributes.status-timestamps.agent-queued-at description: Timestamp indicating when the Terraform plan was queued for an agent. type: Date - contextPath: Terraform.Plan.attributes.log-read-url description: URL for reading the Terraform plan log. type: String - contextPath: Terraform.Plan.attributes.resource-additions description: Number of resource additions in the Terraform plan. type: Number - contextPath: Terraform.Plan.attributes.resource-changes description: Number of resource changes in the Terraform plan. type: Number - contextPath: Terraform.Plan.attributes.resource-destructions description: Number of resource destructions in the Terraform plan. type: Number - contextPath: Terraform.Plan.attributes.resource-imports description: Number of resource imports in the Terraform plan. type: Number - contextPath: Terraform.Plan.attributes.structured-run-output-enabled description: Flag indicating whether structured run output is enabled in the Terraform plan. type: Boolean - contextPath: Terraform.Plan.attributes.generated-configuration description: Flag indicating whether the Terraform plan has generated configuration. type: Boolean - contextPath: Terraform.Plan.attributes.actions.is-exportable description: Flag indicating whether the Terraform plan is exportable. type: Boolean - contextPath: Terraform.Plan.attributes.execution-details.mode description: Execution mode details for the Terraform plan. type: String - contextPath: Terraform.Plan.attributes.permissions.can-export description: Flag indicating whether the user has permission to export the Terraform plan. type: Boolean - contextPath: Terraform.Plan.relationships.state-versions.data description: Relationship information for state versions associated with the Terraform plan. type: Unknown - contextPath: Terraform.Plan.relationships.exports.data description: Relationship information for exports associated with the Terraform plan. type: Unknown - contextPath: Terraform.Plan.links.self description: Link to the Terraform plan data. type: String - contextPath: Terraform.Plan.links.json-output description: Link to the JSON output of the Terraform plan. type: String - contextPath: Terraform.Plan.links.json-output-redacted description: Link to the redacted JSON output of the Terraform plan. type: String - contextPath: Terraform.Plan.links.json-schema description: Link to the JSON schema of the Terraform plan. type: String description: Get the plan JSON file or the plan meta data. - name: terraform-policies-list description: List the policies for an organization or get a specific policy. arguments: - name: organization_name description: The name of the organization. - name: policy_kind description: If specified, restricts results to those with the matching policy kind value. auto: PREDEFINED predefined: - sentinel - opa - name: policy_name description: If specified, search the organization's policies by name. - name: policy_id description: If specified, get the specific policy. outputs: - contextPath: Terraform.Policy.id description: The policy ID. type: String - contextPath: Terraform.Policy.type description: The policy type. type: String - contextPath: Terraform.Policy.attributes.name description: Name of the Terraform policy. type: String - contextPath: Terraform.Policy.attributes.description description: Description of the Terraform policy. type: Unknown - contextPath: Terraform.Policy.attributes.enforce.path description: Path for enforcing the Terraform policy. type: String - contextPath: Terraform.Policy.attributes.enforce.mode description: Enforcement mode for the Terraform policy. type: String - contextPath: Terraform.Policy.attributes.policy-set-count description: Count of policy sets associated with the Terraform policy. type: Number - contextPath: Terraform.Policy.attributes.updated-at description: Timestamp indicating when the Terraform policy was last updated. type: Date - contextPath: Terraform.Policy.attributes.kind description: Kind of the Terraform policy. type: String - contextPath: Terraform.Policy.attributes.enforcement-level description: Enforcement level for the Terraform policy. type: String - contextPath: Terraform.Policy.relationships.organization.data.id description: Unique identifier for the organization associated with the Terraform policy. type: String - contextPath: Terraform.Policy.relationships.organization.data.type description: Type of the organization associated with the Terraform policy. type: String - contextPath: Terraform.Policy.relationships.policy-sets.data.id description: The IDs of the policy sets that contain this policy. type: String - contextPath: Terraform.Policy.relationships.policy-sets.data.type description: Type of the policy sets associated with the Terraform policy. type: String - contextPath: Terraform.Policy.links.self description: Link to the Terraform policy data. type: String - contextPath: Terraform.Policy.links.upload description: Link for uploading the Terraform policy. type: String - contextPath: Terraform.Policy.links.download description: Link for downloading the Terraform policy. type: String - contextPath: Terraform.Policy.links.self description: Link to the Terraform policy. type: String - contextPath: Terraform.Policy.links.first description: Link to the first page of Terraform policies. type: String - contextPath: Terraform.Policy.links.prev description: Link to the previous page of Terraform policies. type: Unknown - contextPath: Terraform.Policy.links.next description: Link to the next page of Terraform policies. type: Unknown - contextPath: Terraform.Policy.links.last description: Link to the last page of Terraform policies. type: String - contextPath: Terraform.Policy.meta.pagination.current-page description: Current page number in the pagination of Terraform policies. type: Number - contextPath: Terraform.Policy.meta.pagination.page-size description: Number of policies displayed per page in pagination. type: Number - contextPath: Terraform.Policy.meta.pagination.prev-page description: Previous page number in the pagination of Terraform policies. type: Unknown - contextPath: Terraform.Policy.meta.pagination.next-page description: Next page number in the pagination of Terraform policies. type: Unknown - contextPath: Terraform.Policy.meta.pagination.total-pages description: Total number of pages in the pagination of Terraform policies. type: Number - contextPath: Terraform.Policy.meta.pagination.total-count description: Total count of Terraform policies. type: Number - name: terraform-policy-set-list description: List the policy sets for an organization or get a specific policy set. arguments: - name: organization_name required: false description: The name of the organization. - name: policy_set_id description: If specified, get the specific policy set. - name: versioned description: Allows filtering policy sets based on whether they are versioned, or use individual policy relationships. A true value returns versioned sets, and a false value returns sets with individual policy relationships. If omitted, all policy sets are returned. auto: PREDEFINED predefined: - "true" - "false" - name: policy_set_kind description: If specified, restricts results to those with the matching policy kind value. auto: PREDEFINED predefined: - sentinel - opa - name: include description: Enables you to include related resource data. Value must be a comma-separated list containing one or more projects, workspaces, workspace-exclusions, policies, newest_version, or current_version. - name: policy_set_name description: Allows searching the organization's policy sets by name. - name: page_number description: The page number of the results to return. Default is 1. - name: page_size description: The number of results to return per page. Default is 20, maximum is 100. outputs: - contextPath: Terraform.PolicySet.id description: The policy set ID. type: String - contextPath: Terraform.PolicySet.type description: The policy set type. type: String - contextPath: Terraform.PolicySet.attributes.name description: Name of the Terraform policy set. type: String - contextPath: Terraform.PolicySet.attributes.description description: Description of the Terraform policy set. type: Unknown - contextPath: Terraform.PolicySet.attributes.global description: Flag indicating whether the Terraform policy set is global. type: Boolean - contextPath: Terraform.PolicySet.attributes.workspace-count description: Number of workspaces associated with the Terraform policy set. type: Number - contextPath: Terraform.PolicySet.attributes.project-count description: Number of projects associated with the Terraform policy set. type: Number - contextPath: Terraform.PolicySet.attributes.created-at description: Timestamp indicating when the Terraform policy set was created. type: Date - contextPath: Terraform.PolicySet.attributes.updated-at description: Timestamp indicating when the Terraform policy set was last updated. type: Date - contextPath: Terraform.PolicySet.attributes.kind description: Kind of the Terraform policy set. type: String - contextPath: Terraform.PolicySet.attributes.agent-enabled description: Flag indicating whether the Terraform policy set has agents enabled. type: Boolean - contextPath: Terraform.PolicySet.attributes.policy-count description: Number of policies associated with the Terraform policy set. type: Number - contextPath: Terraform.PolicySet.attributes.versioned description: Flag indicating whether the Terraform policy set is versioned. type: Boolean - contextPath: Terraform.PolicySet.relationships.organization.data.id description: ID of the organization associated with the Terraform policy set. type: String - contextPath: Terraform.PolicySet.relationships.organization.data.type description: Type of the organization associated with the Terraform policy set. type: String - contextPath: Terraform.PolicySet.relationships.policies.data.id description: ID of the policies associated with the Terraform policy set. type: String - contextPath: Terraform.PolicySet.relationships.policies.data.type description: Type of the policies associated with the Terraform policy set. type: String - contextPath: Terraform.PolicySet.relationships.workspaces.data.id description: ID of the workspaces associated with the Terraform policy set. type: String - contextPath: Terraform.PolicySet.relationships.workspaces.data.type description: Type of the workspaces associated with the Terraform policy set. type: String - contextPath: Terraform.PolicySet.relationships.projects.data.id description: Relationship information for projects associated with the Terraform policy set. type: String - contextPath: Terraform.PolicySet.relationships.workspace-exclusions.data description: Relationship information for workspace exclusions associated with the Terraform policy set. type: Unknown - contextPath: Terraform.PolicySet.links.self description: Link to the Terraform policy set data. type: String - contextPath: Terraform.PolicySet.links.self description: Link to the Terraform policy set. type: String - contextPath: Terraform.PolicySet.links.first description: Link to the first page of Terraform policy sets. type: String - contextPath: Terraform.PolicySet.links.prev description: Link to the previous page of Terraform policy sets. type: Unknown - contextPath: Terraform.PolicySet.links.next description: Link to the next page of Terraform policy sets. type: Unknown - contextPath: Terraform.PolicySet.links.last description: Link to the last page of Terraform policy sets. type: String - contextPath: Terraform.PolicySet.meta.pagination.current-page description: Current page number in the pagination of Terraform policy sets. type: Number - contextPath: Terraform.PolicySet.meta.pagination.page-size description: Number of items per page in the pagination of Terraform policy sets. type: Number - contextPath: Terraform.PolicySet.meta.pagination.prev-page description: Link to the previous page in the pagination of Terraform policy sets. type: Unknown - contextPath: Terraform.PolicySet.meta.pagination.next-page description: Link to the next page in the pagination of Terraform policy sets. type: Unknown - contextPath: Terraform.PolicySet.meta.pagination.total-pages description: Total number of pages in the pagination of Terraform policy sets. type: Number - contextPath: Terraform.PolicySet.meta.pagination.total-count description: Total number of Terraform policy sets. type: Number - name: terraform-policies-checks-list description: List the policy checks for a Terraform run. arguments: - name: run_id description: The run ID to list results for. - name: policy_check_id description: The policy check ID to retrieve details for. - name: page_number description: The page number of the results to return. Default is 1. - name: page_size description: The number of results to return per page. Default is 20, maximum is 100. outputs: - contextPath: Terraform.PolicyCheck.id description: The policy check ID. type: String - contextPath: Terraform.PolicyCheck.type description: Type of the Terraform policy check data. type: String - contextPath: Terraform.PolicyCheck.attributes.result.result description: Overall result of the Terraform policy check. type: Boolean - contextPath: Terraform.PolicyCheck.attributes.result.passed description: Number of policy checks that passed. type: Number - contextPath: Terraform.PolicyCheck.attributes.result.total-failed description: Total number of policy checks that failed. type: Number - contextPath: Terraform.PolicyCheck.attributes.result.hard-failed description: Number of policy checks that resulted in hard failures. type: Number - contextPath: Terraform.PolicyCheck.attributes.result.soft-failed description: Number of policy checks that resulted in soft failures. type: Number - contextPath: Terraform.PolicyCheck.attributes.result.advisory-failed description: Number of policy checks that resulted in advisory failures. type: Number - contextPath: Terraform.PolicyCheck.attributes.result.duration-ms description: Duration of the policy check execution in milliseconds. type: Number - contextPath: Terraform.PolicyCheck.attributes.result.sentinel description: Sentinel-specific result of the policy check. type: Unknown - contextPath: Terraform.PolicyCheck.attributes.scope description: Scope or context of the Terraform policy check. type: String - contextPath: Terraform.PolicyCheck.attributes.status description: Status of the Terraform policy check. type: String - contextPath: Terraform.PolicyCheck.attributes.status-timestamps.queued-at description: Timestamp indicating when the Terraform policy check was queued. type: Date - contextPath: Terraform.PolicyCheck.attributes.status-timestamps.soft-failed-at description: Timestamp indicating when the Terraform policy check encountered a soft failure. type: Date - contextPath: Terraform.PolicyCheck.attributes.actions.is-overridable description: Flag indicating whether the Terraform policy check is overridable. type: Boolean - contextPath: Terraform.PolicyCheck.attributes.permissions.can-override description: Flag indicating whether the user has permission to override the Terraform policy check. type: Boolean - contextPath: Terraform.PolicyCheck.relationships.run.data.id description: Unique identifier for the Terraform run associated with the policy check. type: String - contextPath: Terraform.PolicyCheck.relationships.run.data.type description: Type of the Terraform run associated with the policy check. type: String - contextPath: Terraform.PolicyCheck.links.output description: Link to the output of the Terraform policy check. type: String runonce: false script: '-' type: python subtype: python3 dockerimage: demisto/auth-utils:1.0.0.10133006 # Fetch events (XSIAM only) isfetchevents: true isfetchevents:xsoar: false fromversion: 6.10.0 tests: - No tests (auto formatted)