page_title | subcategory | description |
---|---|---|
morpheus_kubernetes_app_blueprint Resource - terraform-provider-morpheus |
Provides a Morpheus kubernetes app blueprint resource |
Provides a Morpheus kubernetes app blueprint resource
Creating the Kubernetes app blueprint with local content in yaml format:
resource "morpheus_kubernetes_app_blueprint" "tfexample_kubernetes_app_blueprint_yaml" {
name = "tf-kubernetes-app-blueprint-example-yaml"
description = "tf example kubernetes app blueprint"
category = "k8s"
source_type = "yaml"
blueprint_content = <<TFEOF
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
labels:
app: nginx
spec:
replicas: 3
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.14.2
ports:
- containerPort: 80
TFEOF
}
Creating the Kubernetes app blueprint with Kubernetes spec templates:
resource "morpheus_kubernetes_app_blueprint" "tfexample_kubernetes_app_blueprint_spec" {
name = "tf-kubernetes-app-blueprint-example-spec"
description = "tf example kubernetes app blueprint"
category = "k8s"
source_type = "spec"
spec_template_ids = [2, 3]
}
Creating the Kubernetes app blueprint with the blueprint fetched via git:
resource "morpheus_kubernetes_app_blueprint" "tfexample_kubernetes_app_blueprint_git" {
name = "tf-kubernetes-app-blueprint-example-git"
description = "tf example kubernetes app blueprint"
category = "k8s"
source_type = "repository"
integration_id = 3
repository_id = 1
version_ref = "main"
working_path = "./test"
}
name
(String) The name of the kubernetes app blueprintsource_type
(String) The source of the kubernetes app blueprint (yaml, spec or repository)
blueprint_content
(String) The content of the kubernetes app blueprint. Used when the yaml source type is specifiedcategory
(String) The category of the kubernetes app blueprintdescription
(String) The description of the kubernetes 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 kubernetes spec template ids associated with the app blueprintversion_ref
(String) The git reference of the repository to pull (main, master, etc.)working_path
(String) The path of the kubernetes app blueprint in the git repository
id
(String) The ID of the kubernetes app blueprint
Import is supported using the following syntax:
terraform import morpheus_kubernetes_app_blueprint.tf_example_kubernetes_app_blueprint 1