Skip to content

TFE/TFC integration

Environment Manager offers seamless 'out of box' integration with Terraform Enterprise/Cloud. This allows platform teams to leverage their existing investments in Terraform IaC and Terraform Enterprise/Cloud deployments while enabling a "self service" experience for internal users to provision operating environments for their applications.

With this integration, Platform team can:

  • Define Templates (Resource Templates/Environments Templates) that are necessary to bring up full stack operating environments within Rafay. The templates can also include the required guardrails/policies
  • Expose a self-service service interface for downstream users (e.g. developers) to consume the environment templates through Rafay
  • Manage versioning of resource/environment templates and necessary environment updates (Day 2 Ops) through Rafay
  • Configure integration with Terraform Cloud/Enterprise so that infrastructure provisioning (based on the environment template) is handled by Terraform Cloud/Enterprise and state is also stored within TFC/TFE

Downstream users (e.g. Developers, SREs, Data Scientists) can provision environments (as necessary) for their applications with the required overrides (e.g. region or instance type) that are allowed by the platform team.

Platform Team

    actor P as Platform Team
    participant R as Rafay
    participant T as TFE/TFC
    Note over P,T: Configure integration
    T->>P: Retrieve credentials
    P->>R: Configure TFE/TFC details (Credentials, Project, Workspace)
    P->>R: Publish Environment Template

Downstream Users

    actor D as Developer/SRE/Data Scientist
    participant R as Rafay
    participant T as TFE/TFC
    participant C as Cloud Provider
    D->>R: Provision Environment <br> (Select Env Template, Provide Overrides)
    Note over T: Project/Workspace
    R->>T: IaC
    T->>C: Provision Infrastructure <br> (Using Agent Pool)
    T->>T: Store Terraform State
    T->>R: Infrastructure Ready
    R->>D: Environment provisioned

Configuring TFE/TFC integration

To leverage Terraform Enterprise/Cloud to provision infrastructure and as a state store, follow the steps outlined below:

  • Select State Store configuration as Terraform Cloud/Enterprise

State Store

  • Configure credentials through environment variables

  • Add the Cloud block to your Terraform integration. You can define its arguments in the configuration file or supply them as environment variables


  • Pre and post hook operations for TF plan step is not supported
  • Interactive approval of plan before TF apply is not supported