update
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Steve McMaster 2023-10-12 21:45:47 -04:00
parent ee46c93342
commit 8be23b96e8
3 changed files with 39 additions and 0 deletions

View File

@ -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",

View File

@ -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
View 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 %}