Skip to content

Files

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Latest commit

703424c · Sep 8, 2023

History

History
36 lines (25 loc) · 1.66 KB

File metadata and controls

36 lines (25 loc) · 1.66 KB
page_title subcategory description
coder_script Resource - terraform-provider-coder
Use this resource to run a script from an agent.

coder_script (Resource)

Use this resource to run a script from an agent.

Schema

Required

  • agent_id (String) The "id" property of a "coder_agent" resource to associate with.
  • display_name (String) The display name of the script to display logs in the dashboard.
  • script (String) The script to run.

Optional

  • cron (String) The cron schedule to run the script on. This is a cron expression.
  • icon (String) A URL to an icon that will display in the dashboard. View built-in icons here: https://github.com/coder/coder/tree/main/site/static/icon. Use a built-in icon with data.coder_workspace.me.access_url + "/icon/<path>".
  • log_path (String) The path of a file to write the logs to. If relative, it will be appended to tmp.
  • run_on_start (Boolean) This option defines whether or not the script should run when the agent starts.
  • run_on_stop (Boolean) This option defines whether or not the script should run when the agent stops.
  • start_blocks_login (Boolean) This option defines whether or not the user can (by default) login to the workspace before this script completes running on start. When enabled, users may see an incomplete workspace when logging in.
  • timeout (Number) Time in seconds until the agent lifecycle status is marked as timed out, this happens when the script has not completed (exited) in the given time.

Read-Only

  • id (String) The ID of this resource.