Resourcely Documentation
LoginSign Up
  • Get Started
    • 🎱What is Resourcely?
    • 👋Why Resourcely
    • 🏃Quickstart
      • Terraform policies integrated into CI
      • Remediate policy violations in existing infrastructure
      • Templates for generating Terraform
      • Glossary
  • Concepts
    • Foundry
      • Create Blueprints with Foundry
      • Creating Guardrails with Foundry
      • lmport Terraform Modules
    • Guardrails
      • Writing your own Guardrails
      • Editing Guardrails
      • Releasing Guardrails
      • Enabling Inactive Guardrails
      • Guardrails in Action
        • 🐱GitHub Actions
        • 🦊GitLab Pipelines
    • Campaigns
      • Get started with Campaigns
      • Creating Campaigns
      • Remediate Resources
      • Campaign Agent
        • State File Support
          • Amazon Simple Storage Service (S3)
          • Google Cloud Storage (GCS)
          • HCP Terraform
          • Spacelift
        • Running Campaigns with GitHub Actions and a Repo-Hosted State File
        • Running Campaigns Locally
    • Blueprints
      • Authoring Your Own Blueprints
      • Using Built-in Resourcely Blueprints
      • Configuring Global Contexts
      • Deep Linking
    • Resources
      • Provisioning Infrastructure
      • Editing Infrastructure
      • Shopping Cart
      • Config Roots and Environments
    • Other Features and Settings
      • Global Values
      • Global Context
      • Metrics
      • Resourcely-cli
      • Resourcely.yaml
      • VCS Proxy
      • Settings
        • User management
        • Company Information
        • Notification Settings
        • Change Management
          • 🐱Connect to GitHub
          • 🦊Connect to Gitlab
        • Generate API Token
    • ✨Production Setup
      • Single Sign-On (SSO)
        • Auth0
        • AWS Single Sign-On
        • Azure AD
        • Google Workspace
        • JumpCloud
        • Okta
        • Omnissa Workspace ONE (formerly VMware)
        • OneLogin
        • Ping Identity
        • Other SAML / OIDC Providers
      • Source Code Management
        • Page
        • 🐱GitHub
        • 🦊GitLab
        • Atlassian Bitbucket
        • Azure Repos
  • Tutorials and guides
    • Remediation Use Cases
      • Apply tags to resources for automating backups
      • Implement centralized logging
    • Blueprints Use Cases
      • Automate Data Pipeline Creation
      • Encryption for GCP
      • AWS Account Factory
      • Streamline and govern AI
      • IAM Factory
      • Cost optimization for FinOps
      • Guardrails for Terraform Modules
    • Using the Resourcely Terraform Provider
      • Setup Resourcely Provider
      • Blueprints
      • Guardrails
      • Global Context
  • Integrate
    • CI/CD & Terraform Runners
      • Atlantis
      • 🐟AWS CodeBuild
      • Azure Pipelines
      • Buildkite
      • CircleCI
      • CloudBees CI
      • Codefresh
      • Digger
      • Env0
      • 🎏GitHub Actions
        • 🐱Local Plan
          • 🐹AWS with OpenID Connect
        • 🐶Terraform Cloud Integration
      • 🦊GitLab Pipelines
      • Harness
      • 🗻HashiCorp Cloud Platform (formerly Terraform Cloud)
      • Jenkins
      • Octopus Deploy
      • Scalr
      • 🌌Spacelift
      • Terramate
      • 🌎Terrateam
    • Cloud Providers
      • 🌨️Amazon Web Services (AWS)
      • 🤓Google Cloud Platform (GCP)
        • Guardrail Gaunlet at Google Cloud Next 2025
      • 💾Microsoft Azure
      • Alibaba Cloud
      • Huawei Cloud
      • IBM Cloud
      • Oracle Cloud Infrastructure (OCI)
      • Tencent Cloud
      • VMware vSphere
    • Developer Portals
      • Atlassian Compass
      • Backstage
      • Cortex
      • Harness IDP
      • Home grown internal developer portals
      • OpsLevel
      • Port
      • Roadie
    • ITSM
      • Atlassian Jira
      • FreshWorks
      • ServiceNow ITSM
      • ZenDesk
    • CSPM
      • Wiz
    • More Terraform Provider Integrations
      • 🚂ConductorOne Provider
      • Databricks Provider
      • Kubernetes Provider
      • 🐕Datadog Provider
      • ❄️Snowflake Provider
Powered by GitBook
On this page
  • Create your first Blueprint
  • Adding variables
  • Customizing variables with tags
  • Publishing
  • Next steps
  1. Get Started
  2. Quickstart

Templates for generating Terraform

Creating and publishing your first Blueprint

This guide assumes you have integrated Resourcely with your version control, so that Resourcely can submit change requests on your behalf.

Blueprints are powerful guided experiences for configuring and deploying cloud infrastructure. They are created and managed by central teams (Platform, SRE, DevOps, Infrastructure, etc), and used by developers.

With Blueprints:

  1. Customize Blueprint code and preview the form developers will see based on the Blueprint

  2. Developers can discover Blueprints and use Blueprint forms to configure infrastructure

  3. Terraform is generated and change requests automatically created, based on Blueprint forms

Create your first Blueprint

We'll create our first Blueprint based on an AWS RDS instance example.

Note that this Blueprint is for demonstration purposes only, and you should not use this in production. Resourcely has a variety of integrated Blueprints with embedded best practices around security, access, networking, cost, and more.

Consider the following example of Terraform for an AWS RDS Instance

Terraform
/// This is one of the basic examples from the AWS Terraform provider
/// https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance

resource "aws_db_instance" "default" {
  allocated_storage    = 10
  db_name              = "mydb"
  engine               = "mysql"
  engine_version       = "8.0"
  instance_class       = "db.t3.micro"
  username             = "foo"
  password             = "foobarbaz"
  parameter_group_name = "default.mysql8.0"
  skip_final_snapshot  = true
}

Blueprint code

We have replaced 4 parameter inputs with {{ inline-variables }}, and added a frontmatter with a __name constant.

---
constants:
  
---

resource "aws_db_instance" "{{ __name }}"  {
  allocated_storage    = {{ allocated_storage }}
  db_name              = "mydb"
 
  engine_version       = {{ engine_version }}
  instance_class       = {{ instance_class }}
  username             = "foo"
  password             = "foobarbaz"
  parameter_group_name = "default.mysql8.0"
  skip_final_snapshot  = true
}

/// This is a basic Blueprint with some variables and a best practices naming convention

Check out the Developer Experience and Terraform tabs in Resourcely. Notice that the variables we inserted are represented in the form, with field options automatically populated.

Adding variables

Let's further customize our Blueprint form by changing the Blueprint code.

Adding variables

Replace the rest of the hard-coded values in your Blueprint code with {{ inline-variables}}. It should look something like this:

Blueprint code: all parameters have variables
---
constants:
  __name: "{{ db_name }}_{{ __guid }}"
---

resource "aws_db_instance" "{{__name}}" {
  allocated_storage    = {{ allocated_storage }}
  db_name              = {{ db_name }}
  engine               = {{ engine_name }}
  engine_version       = {{ engine_version }}
  instance_class       = {{ instance_class }}
  username             = {{ username }}
  password             = {{ password }}
  parameter_group_name = {{ parameter_group_name }}
  skip_final_snapshot  = {{ skip_final_snapshot }}
}

// In this Blueprint, all parameters are associated with variables

Check out the Developer Experience tab to see how adding variables has changed your form

Variables can also be defined in frontmatter - we cover this in detail in Authoring Your Own Blueprints

Customizing variables with tags

Inline variables can be customized with a variety of tags. These tags impact the form developers will use to configure resources. Check out Authoring Your Own Blueprintsfor a detailed listing of tags.

We'll start by adding a description, a default value, and setting some as required:

Blueprint code: adding variable tags
---
constants:
  __name: "{{ db_name }}_{{ __guid }}"
---

resource "aws_db_instance" "{{__name}}" {
  allocated_storage    = {{ allocated_storage | default: 50 }}
  db_name              = {{ db_name | desc: "Your database name" }}
  engine               = {{ engine_name | default: "postgres" | desc: "Database flavor to use. We recommend Postgres version 16.4" }}
  engine_version       = {{ engine_version | default: "16.4" }}
  instance_class       = {{ instance_class | desc: "Instance size, this should be Medium or smaller" }}
  username             = {{ username }}
  password             = {{ password }}
  parameter_group_name = {{ parameter_group_name | required: false }}
  skip_final_snapshot  = {{ skip_final_snapshot | required: false }}
}

// In this Blueprint, we have added several tags.

Add variable tags to your Blueprint, or copy the above code into the Foundry Blueprint content window, and observe how it changes the form in the Developer Experience tab.

Publishing

Publish your new Blueprint by adding a name, description, provider, and categories in the Define Metadata tab. Once you have done that, the Blueprint is ready for developers to interact with it.

Next steps

Blueprints are powerful: you can collect context questions, creating highly opinionated templates, or provide developers with modular linkable building blocks for creating Terraform.

From here, you can use other parts of Resourcely. Enforce rules by creating Terraform policies integrated into CI, or Remediate policy violations in existing infrastructure.

PreviousRemediate policy violations in existing infrastructureNextGlossary

Last updated 1 month ago

In Resourcely navigate to the , copy the Blueprint code from above, and paste it into the Blueprint Content.

🏃
Foundry