mirror of
				https://github.com/optim-enterprises-bv/terraform-talos.git
				synced 2025-10-31 18:28:32 +00:00 
			
		
		
		
	Split blocks
This commit is contained in:
		| @@ -8,22 +8,6 @@ packer { | |||||||
|   } |   } | ||||||
| } | } | ||||||
|  |  | ||||||
| variable "do_api_token" { |  | ||||||
|   type      = string |  | ||||||
|   default   = "${env("DO_API_TOKEN")}" |  | ||||||
|   sensitive = true |  | ||||||
| } |  | ||||||
|  |  | ||||||
| variable "do_region" { |  | ||||||
|   type      = string |  | ||||||
|   default   = "lon1" |  | ||||||
| } |  | ||||||
|  |  | ||||||
| variable "talos_version" { |  | ||||||
|   type    = string |  | ||||||
|   default = "v0.11.0" |  | ||||||
| } |  | ||||||
|  |  | ||||||
| source "digitalocean" "talos" { | source "digitalocean" "talos" { | ||||||
|   api_token    = var.do_api_token |   api_token    = var.do_api_token | ||||||
|   image        = "debian-10-x64" |   image        = "debian-10-x64" | ||||||
|   | |||||||
							
								
								
									
										16
									
								
								system_os/digitalocean/variables.pkr.hcl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								system_os/digitalocean/variables.pkr.hcl
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,16 @@ | |||||||
|  |  | ||||||
|  | variable "do_api_token" { | ||||||
|  |   type      = string | ||||||
|  |   default   = "${env("DO_API_TOKEN")}" | ||||||
|  |   sensitive = true | ||||||
|  | } | ||||||
|  |  | ||||||
|  | variable "do_region" { | ||||||
|  |   type      = string | ||||||
|  |   default   = "lon1" | ||||||
|  | } | ||||||
|  |  | ||||||
|  | variable "talos_version" { | ||||||
|  |   type    = string | ||||||
|  |   default = "v0.11.0" | ||||||
|  | } | ||||||
							
								
								
									
										6
									
								
								system_os/hetzner/Makefile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								system_os/hetzner/Makefile
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,6 @@ | |||||||
|  |  | ||||||
|  | release: | ||||||
|  | 	packer build -only=release.hcloud.talos . | ||||||
|  |  | ||||||
|  | develop: | ||||||
|  | 	packer build -only=develop.hcloud.talos . | ||||||
| @@ -8,17 +8,6 @@ packer { | |||||||
|   } |   } | ||||||
| } | } | ||||||
|  |  | ||||||
| variable "hcloud_token" { |  | ||||||
|   type      = string |  | ||||||
|   default   = env("HCLOUD_TOKEN") |  | ||||||
|   sensitive = true |  | ||||||
| } |  | ||||||
|  |  | ||||||
| variable "talos_version" { |  | ||||||
|   type    = string |  | ||||||
|   default = "v0.11.4" |  | ||||||
| } |  | ||||||
|  |  | ||||||
| source "hcloud" "talos" { | source "hcloud" "talos" { | ||||||
|   token        = var.hcloud_token |   token        = var.hcloud_token | ||||||
|   rescue       = "linux64" |   rescue       = "linux64" | ||||||
| @@ -36,11 +25,28 @@ source "hcloud" "talos" { | |||||||
| } | } | ||||||
|  |  | ||||||
| build { | build { | ||||||
|  |   name    = "release" | ||||||
|   sources = ["source.hcloud.talos"] |   sources = ["source.hcloud.talos"] | ||||||
|  |  | ||||||
|   provisioner "shell" { |   provisioner "shell" { | ||||||
|     inline = [ |     inline = [ | ||||||
|       "apt-get install -y wget", |       "apt-get install -y wget", | ||||||
|       "wget -O /tmp/openstack.tar.gz https://github.com/talos-systems/talos/releases/download/${var.talos_version}/openstack-amd64.tar.gz", |       "wget -O /tmp/openstack.tar.gz ${local.image}", | ||||||
|  |       "tar xOzf /tmp/talos.tar.gz | dd of=/dev/sda && sync", | ||||||
|  |     ] | ||||||
|  |   } | ||||||
|  | } | ||||||
|  |  | ||||||
|  | build { | ||||||
|  |   name    = "develop" | ||||||
|  |   sources = ["source.hcloud.talos"] | ||||||
|  |  | ||||||
|  |   provisioner "file" { | ||||||
|  |     source      = "../../../talos-pr/_out/hcloud-amd64.tar.gz" | ||||||
|  |     destination = "/tmp/talos.tar.gz" | ||||||
|  |   } | ||||||
|  |   provisioner "shell" { | ||||||
|  |     inline = [ | ||||||
|       "tar xOzf /tmp/talos.tar.gz | dd of=/dev/sda && sync", |       "tar xOzf /tmp/talos.tar.gz | dd of=/dev/sda && sync", | ||||||
|     ] |     ] | ||||||
|   } |   } | ||||||
|   | |||||||
							
								
								
									
										15
									
								
								system_os/hetzner/variables.pkr.hcl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								system_os/hetzner/variables.pkr.hcl
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,15 @@ | |||||||
|  |  | ||||||
|  | variable "hcloud_token" { | ||||||
|  |   type      = string | ||||||
|  |   default   = env("HCLOUD_TOKEN") | ||||||
|  |   sensitive = true | ||||||
|  | } | ||||||
|  |  | ||||||
|  | variable "talos_version" { | ||||||
|  |   type    = string | ||||||
|  |   default = "v0.12.0" | ||||||
|  | } | ||||||
|  |  | ||||||
|  | locals { | ||||||
|  |   image = "https://github.com/talos-systems/talos/releases/download/${var.talos_version}/openstack-amd64.tar.gz" | ||||||
|  | } | ||||||
		Reference in New Issue
	
	Block a user
	 Serge Logvinov
					Serge Logvinov