page_title | subcategory | description |
---|---|---|
morpheus_terraform_spec_template Resource - terraform-provider-morpheus |
Provides a Morpheus terraform spec template resource |
Provides a Morpheus terraform spec template resource
Creating the terraform spec template with local content:
resource "morpheus_terraform_spec_template" "tfexample_terraform_spec_template_local" {
name = "tf-terraform-spec-example-local"
source_type = "local"
spec_content = <<EOF
resource "aws_instance" "instance_1" {
ami = "ami-0b91a410940e82c54"
instance_type = "t2.micro"
}
EOF
}
Creating the terraform spec template with the template fetched from a url:
resource "morpheus_terraform_spec_template" "tfexample_terraform_spec_template_url" {
name = "tf-terraform-spec-example-url"
source_type = "url"
spec_path = "http://example.com/spec.tf"
}
Creating the terraform spec template with the template fetched via git:
resource "morpheus_terraform_spec_template" "tfexample_terraform_spec_template_git" {
name = "tf-terraform-spec-example-git"
source_type = "repository"
repository_id = 2
version_ref = "main"
spec_path = "Instance Types/Terraform/CloudResource/aws/vpc.tf"
}
name
(String) The name of the terraform spec templatesource_type
(String) The source of the terraform spec template (local, url or repository)
repository_id
(Number) The ID of the git repository integrationspec_content
(String) The content of the terraform spec template. Used when the local source type is specifiedspec_path
(String) The path of the terraform spec template, either the url or the path in the repositoryversion_ref
(String) The git reference of the repository to pull (main, master, etc.)
id
(String) The ID of the terraform spec template
Import is supported using the following syntax:
terraform import morpheus_terraform_spec_template.tfexample_terraform_spec_template 1