page_title | subcategory | description |
---|---|---|
morpheus_cloud_formation_app_blueprint Resource - terraform-provider-morpheus |
Provides a Morpheus cloud formation app blueprint resource |
Provides a Morpheus cloud formation app blueprint resource
Creating the Cloud Formation app blueprint with local content in json format:
resource "morpheus_cloud_formation_app_blueprint" "tf_example_cloud_formation_app_blueprint_git" {
name = "example_cloud_formation_app_blueprint_json"
description = "Example cloud formation app blueprint"
category = "cloudformation"
install_agent = true
cloud_init_enabled = true
capability_iam = true
capability_named_iam = true
capability_auto_expand = true
source_type = "json"
blueprint_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
}
Creating the Cloud Formation app blueprint with local content in yaml format:
resource "morpheus_cloud_formation_app_blueprint" "tf_example_cloud_formation_app_blueprint_git" {
name = "example_cloud_formation_app_blueprint_yaml"
description = "Example cloud formation app blueprint"
category = "cloudformation"
install_agent = true
cloud_init_enabled = true
capability_iam = true
capability_named_iam = true
capability_auto_expand = true
source_type = "yaml"
blueprint_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
}
Creating the Cloud Formation app blueprint with the blueprint fetched via git:
resource "morpheus_cloud_formation_app_blueprint" "tf_example_cloud_formation_app_blueprint_git" {
name = "example_cloud_formation_app_blueprint_git"
description = "Example cloud formation app blueprint"
category = "cloudformation"
install_agent = true
cloud_init_enabled = true
capability_iam = true
capability_named_iam = true
capability_auto_expand = true
source_type = "repository"
working_path = "./test"
integration_id = 3
repository_id = 1
version_ref = "main"
}
name
(String) The name of the cloud formation app blueprintsource_type
(String) The source of the cloud formation app blueprint (yaml, json, repository)
blueprint_content
(String) The content of the cloud formation app blueprint. Used when the yaml or json source types are specifiedcapability_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 formationcategory
(String) The category of the cloud formation app blueprintcloud_init_enabled
(Boolean) Whether cloud init is enableddescription
(String) The description of the cloud formation app blueprintinstall_agent
(Boolean) Whether to install the Morpheus agentintegration_id
(Number) The ID of the git integrationrepository_id
(Number) The ID of the git repositoryversion_ref
(String) The git reference of the repository to pull (main, master, etc.)working_path
(String) The path of the cloud formation chart in the git repository
id
(String) The ID of the cloud formation app blueprint
Import is supported using the following syntax:
terraform import morpheus_cloud_formation_app_blueprint.tf_example_cloud_formation_app_blueprint 1