Skip to content

Example Terraform Prompts

Matthew Casperson edited this page Dec 6, 2024 · 9 revisions

These are example prompts used to generate Terraform modules.

Create environments, lifecycle, project group, project, runbook

Create a terraform module with 3 environments called "Development", "Test", and "Production". 
Include a lifecycle with the 3 environments as optional deployment targets called "Application". 
Include a project group called "Acme". 
Add a project called "Acme web app".
Add a runbook called "Restart web app" to the project.
Include the provider configuration.

Create environments, lifecycles, project group, project, channels

Create a terraform module with 3 environments called "Development", "Test", and "Production". 
Include a lifecycle with the 3 environments as optional deployment targets called "Application". 
Include a lifecycle with only the "Production" environment as an optional deployment target called "HotFix". 
Include the provider configuration. 
Include a project group called "Acme". 
Add a project called "Acme web app".
Add a channel called "MainLine" that uses the "Application" lifecycle. 
Add a channel called "HotFix" that uses the "HotFix" lifecycle.

Create environments, lifecycle, project group, projects, tenants, and tenant tags

Create a terraform module with 10 tenants that have fictional company names linked to a project called "Acme web app". 
Include 3 environments called "Development", "Test", and "Production".
Include the provider configuration. 
Include a lifecycle with the three environments. 
Include a project group called "Acme". 
Create a tenant tagset called "Release Ring". 
Create three tenant tags called "Fast", "Slow", "Beta", and assign them to the tenant tag group. 
Assign one of the tenant tags "Release Ring/Fast", "Release Ring/Slow", or "Release Ring/Beta" to each tenant using a modulo of the tenant count. 
Ensure the tenants depend on the tenant tags.