This commit is contained in:
parent
ee46c93342
commit
8be23b96e8
@ -64,6 +64,12 @@ TEMPLATES = {
|
||||
"vs_code_root": "/opt/splunk"
|
||||
},
|
||||
},
|
||||
"terraform": {
|
||||
"terraform": {
|
||||
"image": "cr.smcm.xyz/coder-images/terraform",
|
||||
"terraform_versions": ["1.6"],
|
||||
},
|
||||
},
|
||||
"ubuntu": {
|
||||
"ubuntu": {
|
||||
"image": "cr.smcm.xyz/coder-images/ubuntu",
|
||||
|
||||
@ -33,6 +33,10 @@ terraform {
|
||||
{% set vs_code_root = coder_user_home %}
|
||||
{% endif %}
|
||||
|
||||
{% if image_pull_policy is not defined %}
|
||||
{% set image_pull_policy = "Always" %}
|
||||
{% endif %}
|
||||
|
||||
locals {
|
||||
{% block locals %}
|
||||
{% endblock %}
|
||||
@ -305,6 +309,7 @@ resource "kubernetes_deployment" "main" {
|
||||
{% block kubernetes_pod_main_command %}
|
||||
command = ["bash", "-c", coder_agent.main.init_script]
|
||||
{% endblock %}
|
||||
image_pull_policy = {{ image_pull_policy }}
|
||||
|
||||
{% block kubernetes_pod_main_container_security_context %}
|
||||
security_context {
|
||||
|
||||
28
terraform.tf.jinja
Normal file
28
terraform.tf.jinja
Normal file
@ -0,0 +1,28 @@
|
||||
{% extends "base.tf.jinja" %}
|
||||
|
||||
{% block parameters %}
|
||||
{{ super() }}
|
||||
|
||||
data "coder_parameter" "terraform_version" {
|
||||
name = "Terraform Version"
|
||||
description = "Terraform Version"
|
||||
type = "string"
|
||||
default = ""
|
||||
|
||||
mutable = true
|
||||
option {
|
||||
name = "Latest"
|
||||
value = ""
|
||||
}
|
||||
{% for version in terraform_versions %}
|
||||
option {
|
||||
name = "{{ version }}"
|
||||
value = "-{{ version }}"
|
||||
}
|
||||
{% endfor %}
|
||||
}
|
||||
{% endblock %}
|
||||
|
||||
{% block kubernetes_pod_main_image %}
|
||||
image = "{{image}}${data.coder_parameter.terraform_version.value}:latest"
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user