page_title | subcategory | description |
---|---|---|
morpheus_kubernetes_spec_template Resource - terraform-provider-morpheus |
Provides a Morpheus kubernetes spec template resource |
Provides a Morpheus kubernetes spec template resource
Creating the kubernetes spec template with local content:
resource "morpheus_kubernetes_spec_template" "tfexample_kubernetes_spec_template_local" {
name = "tf-terraform-spec-example-local"
source_type = "local"
spec_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 spec template with the template fetched from a url:
resource "morpheus_kubernetes_spec_template" "tfexample_kubernetes_spec_template_url" {
name = "tf-kubernetes-spec-example-url"
source_type = "url"
spec_path = "http://example.com/spec.yaml"
}
Creating the kubernetes spec template with the template fetched via git:
resource "morpheus_kubernetes_spec_template" "tfexample_kubernetes_spec_template_git" {
name = "tf-kubernetes-spec-example-git"
source_type = "repository"
repository_id = 2
version_ref = "main"
spec_path = "./spec.yaml"
}
name
(String) The name of the kubernetes spec templatesource_type
(String) The source of the kubernetes spec template (local, url or repository)
repository_id
(Number) The ID of the git repository integrationspec_content
(String) The content of the kubernetes spec template. Used when the local source type is specifiedspec_path
(String) The path of the kubernetes 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 kubernetes spec template
Import is supported using the following syntax:
terraform import morpheus_kubernetes_spec_template.tf_example_kubernetes_spec_template 1