Provisioning No-Code Infrastructure
No-code provisioning lets you deploy infrastructure resources in a new HCP Terraform workspace without writing any Terraform configuration. You can create a no-code workspace from any module version labeled No-code Ready in your organization's private registry.
Note: No-code provisioning is available in HCP Terraform Plus Edition. Refer to HCP Terraform pricing for details.
Hands On: Try the Create and Use No-Code Ready Modules tutorial.
Permissions
To use no-code provisioning, you must be a member of a team with manage all projects permissions, manage all workspaces permissions, or admin permissions for a project. When using custom project permissions, your team must be able to create workspaces, write variables, and apply runs in a project.
Provider Credentials
Terraform automatically starts a new run to provision no-code infrastructure upon workspace creation. No-code modules contain provider blocks in their configuration, but still require provider credentials for successful deployment. Organization administrators determine how new workspaces should access provider credentials, which may require specific module design.
Creating a Workspace and Deploying Resources
The no-code provisioning workflow creates a new HCP Terraform workspace to deploy and manage the no-code ready module's resources. HCP Terraform automatically starts a run to provision the module's resources in the new workspace. Depending on the workspace's settings, Terraform either automatically applies the plan or prompts you for approval to provision the infrastructure.
To launch the no-code workflow:
Click Registry in the main HCP Terraform navigation to access your organization's private registry.
Click Modules to view the list of available modules in the private registry. You can filter for no-code ready modules in your registry. No-code enabled modules have a No-code Ready badge next to their names.
Select the no-code ready module to view its details, then click Provision workspace. The Configure module inputs page appears.
HCP Terraform scans the module configuration for input variables and prompts for values for any variables without defaults or undefined in an existing global variable set. Terraform requires values for these variables to successfully complete runs in the workspace. HCP Terraform performs type validation for the variable values if the module configuration specifies a type.
(Optional) Set values for the input variables. If your organization has defined options for a variable's values, these options appear in a dropdown menu. You can skip this step and configure the variables later in your workspace. However, HCP Terraform does not prompt you for these values again, and your Terraform runs may fail.
Click Next: Workspace settings.
Enter a Workspace Name. The name must be unique within the organization and can include letters, numbers, dashes (-), and underscores (_). Refer to the workspace naming recommendations for more guidance.
Choose a Project for the workspace. Teams with access to the specified project can view the workspace automatically. Refer to Organizing Workspaces with Projects for more details. If the specified project contains any project-scoped variable sets, HCP Terraform automatically applies those sets to the workspace.
Add an optional Description for the workspace.
Select an apply method for the workspace. Auto apply automatically applies any successful runs in the workspace, including the initial run on workspace creation. Manual apply prompts operators to review and confirm the changes in a run. Auto apply is the default option for a no-code workspace.
Click Create workspace. HCP Terraform creates a new workspace and starts a run. Depending on the apply method, it automatically applies your infrastructure or prompts you for approval to create the no-code module's resources.
Operations in No-Code Workspaces
No-code workspaces have a limited feature set because you cannot access the resource configuration. However, you can edit workspace variables and settings, including notifications, permissions, and run triggers. You can use run triggers to connect the workspace to one or more source workspaces, start new runs when you change workspace variables, or queue destroy runs.
Updating Variables
To change a variable's options after provisioning, go to the Variables section in your workspace to see your workspace's variables listed. To edit a variable:
- Click the ellipses next to the variable you want to edit and select Edit.
- Enter your desired value and click Save variable.
Start a new run in your workspace to update your existing infrastructure with your new variable value.
Module Version Updates
When you update the module version designated for no-code provisioning, every workspace provisioned from the module is notified that an updated version is available on the workspace overview page. HCP Terraform does not automatically update workspaces. A workspace admin must respond to the update notification to upgrade the workspace, and HCP Terraform prompts for values for any new input variables.
To change the version of the module that users can deploy:
Navigate to the module in your organization's registry.
Click Configure Settings.
Click Edit version and variable options.
Choose the desired module version from the Module version dropdown.
Click Save.