page_title | subcategory | description |
---|---|---|
morpheus_helm_spec_template Resource - terraform-provider-morpheus |
Provides a Morpheus helm spec template resource |
Provides a Morpheus helm spec template resource
Creating the helm spec template with local content:
resource "morpheus_helm_spec_template" "tfexample_helm_spec_template_local" {
name = "tf-helm-spec-example-local"
source_type = "local"
spec_content = <<TFEOF
apiVersion: v1
kind: Service
metadata:
name: {{ template "fullname" . }}
labels:
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.externalPort }}
targetPort: {{ .Values.service.internalPort }}
protocol: TCP
name: {{ .Values.service.name }}
selector:
app: {{ template "fullname" . }}
TFEOF
}
Creating the helm spec template with the template fetched from a url:
resource "morpheus_helm_spec_template" "tfexample_helm_spec_template_url" {
name = "tf-helm-spec-example-url"
source_type = "url"
spec_path = "http://example.com/chart.yaml"
}
Creating the helm spec template with the template fetched via git:
resource "morpheus_helm_spec_template" "tfexample_helm_spec_template_git" {
name = "tf-helm-spec-example-git"
source_type = "repository"
repository_id = 2
version_ref = "main"
spec_path = "./spec.yaml"
}
name
(String) The name of the helm spec templatesource_type
(String) The source of the helm spec template (local, url or repository)
repository_id
(Number) The ID of the git repository integrationspec_content
(String) The content of the helm spec template. Used when the local source type is specifiedspec_path
(String) The path of the helm 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 helm spec template
Import is supported using the following syntax:
terraform import morpheus_helm_spec_template.tf_example_helm_spec_template 1