page_title | subcategory | description |
---|---|---|
morpheus_terraform_app_blueprint Resource - terraform-provider-morpheus |
Provides a Morpheus terraform app blueprint resource |
Provides a Morpheus terraform app blueprint resource
Creating the terraform app blueprint with local content in hcl format:
resource "morpheus_terraform_app_blueprint" "tfapp_blueprint" {
name = "tfappbluedemo"
description = "testing terraform"
category = "terraformdemo"
source_type = "hcl"
blueprint_content = <<EOF
variable "master_username" {
type = string
}
variable "master_password" {
type = string
sensitive = true
}
variable "engine_version" {
type = string
}
variable "instance_class" {
type = string
}
resource "local_file" "foo" {
content = "foo!"
filename = "${path.module}/foo.bar"
}
EOF
terraform_version = "1.1.1"
terraform_options = "-var 'foo=bar'"
tfvar_secret = "tfvars/rdsdemo-secrets"
}
Creating the terraform app blueprint with local content in json format:
resource "morpheus_terraform_app_blueprint" "tfapp_blueprint_json" {
name = "tfappbluedemojson"
description = "testing terraform"
category = "terraformdemo"
source_type = "json"
blueprint_content = <<EOF
{"test":"demo123"}
EOF
terraform_version = "1.1.1"
terraform_options = "-var 'foo=bar'"
tfvar_secret = "tfvars/rdsdemo-secrets"
visibility = "public"
}
Creating the terraform app blueprint with Terraform spec templates:
resource "morpheus_terraform_app_blueprint" "tfapp_blueprint_specs" {
name = "tfappbluedemospecs"
description = "testing terraform"
category = "terraformdemo"
source_type = "spec"
spec_template_ids = [81]
terraform_version = "1.1.1"
terraform_options = "-var 'foo=bar'"
tfvar_secret = "tfvars/rdsdemo-secrets"
}
Creating the terraform app blueprint with the blueprint fetched via git:
resource "morpheus_terraform_app_blueprint" "tfapp_blueprint_git" {
name = "tfappbluedemogit"
description = "testing terraform"
category = "terraformdemo"
source_type = "repository"
working_path = "./test"
integration_id = 3
repository_id = 1
version_ref = "main"
terraform_version = "1.1.1"
terraform_options = "-var 'foo=bar'"
tfvar_secret = "tfvars/rdsdemo-secrets"
}
name
(String) The name of the terraform app blueprintsource_type
(String) The source of the terraform app blueprint (hcl, json, spec or repository)
blueprint_content
(String) The content of the terraform app blueprint. Used when the hcl or json source types are specifiedcategory
(String) The category of the terraform app blueprintdescription
(String) The description of the terraform app blueprintintegration_id
(Number) The ID of the git integrationrepository_id
(Number) The ID of the git repositoryspec_template_ids
(List of Number) A list of terraform spec template ids associated with the app blueprintterraform_options
(String) The additional terraform options to add to the app blueprintterraform_version
(String) The terraform version associated with the app blueprinttfvar_secret
(String) The name of the tfvar cypher secret to associate with the app blueprintversion_ref
(String) The git reference of the repository to pull (main, master, etc.)working_path
(String) The path of the terraform code in the git repository
id
(String) The ID of the terraform app blueprint
Import is supported using the following syntax:
terraform import morpheus_terraform_app_blueprint.tfexample_terraform_app_blueprint 1