page_title | subcategory | description |
---|---|---|
morpheus_cloud_formation_spec_template Resource - terraform-provider-morpheus |
Provides a Morpheus cloud formation spec template resource |
Provides a Morpheus cloud formation spec template resource
Creating the cloud formation spec template with local content:
resource "morpheus_cloud_formation_spec_template" "tfexample_cloud_formation_spec_template_local" {
name = "tf_cloud_formation_spec_example_local"
source_type = "local"
spec_content = <<TFEOF
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "AWS CloudFormation Sample Template S3_Website_Bucket_With_Retain_On_Delete: Sample template showing how to create a publicly accessible S3 bucket configured for website access with a deletion policy of retain on delete. **WARNING** This template creates an S3 bucket that will NOT be deleted when the stack is deleted. You will be billed for the AWS resources used if you create a stack from this template.",
"Resources" : {
"S3Bucket" : {
"Type" : "AWS::S3::Bucket",
"Properties" : {
"AccessControl" : "PublicRead",
"WebsiteConfiguration" : {
"IndexDocument" : "index.html",
"ErrorDocument" : "error.html"
}
},
"DeletionPolicy" : "Retain"
}
},
"Outputs" : {
"WebsiteURL" : {
"Value" : { "Fn::GetAtt" : [ "S3Bucket", "WebsiteURL" ] },
"Description" : "URL for website hosted on S3"
},
"S3BucketSecureURL" : {
"Value" : { "Fn::Join" : [ "", [ "https://", { "Fn::GetAtt" : [ "S3Bucket", "DomainName" ] } ] ] },
"Description" : "Name of S3 bucket to hold website content"
}
}
}
TFEOF
capability_iam = true
capability_named_iam = true
capability_auto_expand = true
}
Creating the cloud formation spec template with the template fetched from a url:
resource "morpheus_cloud_formation_spec_template" "tfexample_cloud_formation_spec_template_url" {
name = "tf_cloud_formation_spec_example_url"
source_type = "url"
spec_path = "http://example.com/spec.yaml"
capability_iam = true
capability_named_iam = true
capability_auto_expand = true
}
Creating the cloud formation spec template with the template fetched via git:
resource "morpheus_cloud_formation_spec_template" "tfexample_cloud_formation_spec_template_git" {
name = "tf-cloud-formation-spec-example-git"
source_type = "repository"
repository_id = 2
version_ref = "main"
spec_path = "./spec.yaml"
capability_iam = true
capability_named_iam = true
capability_auto_expand = true
}
name
(String) The name of the cloud formation spec templatesource_type
(String) The source of the cloud formation spec template (local, url or repository)
capability_auto_expand
(Boolean) Whether the auto expand capability is added to the cloud formationcapability_iam
(Boolean) Whether the iam capability is added to the cloud formationcapability_named_iam
(Boolean) Whether the named iam capability is added to the cloud formationrepository_id
(Number) The ID of the git repository integrationspec_content
(String) The content of the cloud formation spec template. Used when the local source type is specifiedspec_path
(String) The path of the cloud formation 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 cloud formation spec template
Import is supported using the following syntax:
terraform import morpheus_cloud_formation_spec_template.tf_example_cloud_formation_spec_template 1