diff --git a/examples/templates/aws-linux/main.tf b/examples/templates/aws-linux/main.tf index 96d9136dfe758..f1f41024d938a 100644 --- a/examples/templates/aws-linux/main.tf +++ b/examples/templates/aws-linux/main.tf @@ -2,7 +2,7 @@ terraform { required_providers { coder = { source = "coder/coder" - version = "~> 0.7.0" + version = "~> 0.11.0" } aws = { source = "hashicorp/aws" @@ -30,24 +30,24 @@ data "coder_parameter" "region" { icon = "/emojis/1f1f0-1f1f7.png" } option { - name = "Asia Pacific (Osaka-Local)" + name = "Asia Pacific (Osaka)" value = "ap-northeast-3" - icon = "/emojis/1f1f0-1f1f7.png" + icon = "/emojis/1f1ef-1f1f5.png" } option { name = "Asia Pacific (Mumbai)" value = "ap-south-1" - icon = "/emojis/1f1f0-1f1f7.png" + icon = "/emojis/1f1ee-1f1f3.png" } option { name = "Asia Pacific (Singapore)" value = "ap-southeast-1" - icon = "/emojis/1f1f0-1f1f7.png" + icon = "/emojis/1f1f8-1f1ec.png" } option { name = "Asia Pacific (Sydney)" value = "ap-southeast-2" - icon = "/emojis/1f1f0-1f1f7.png" + icon = "/emojis/1f1e6-1f1fa.png" } option { name = "Canada (Central)" @@ -176,33 +176,21 @@ resource "coder_agent" "main" { display_name = "CPU Usage" interval = 5 timeout = 5 - script = <<-EOT - #!/bin/bash - set -e - top -bn1 | grep "Cpu(s)" | awk '{print $2 + $4 "%"}' - EOT + script = "coder stat cpu" } metadata { key = "memory" display_name = "Memory Usage" interval = 5 timeout = 5 - script = <<-EOT - #!/bin/bash - set -e - free -m | awk 'NR==2{printf "%.2f%%\t", $3*100/$2 }' - EOT + script = "coder stat mem" } metadata { key = "disk" display_name = "Disk Usage" interval = 600 # every 10 minutes timeout = 30 # df can take a while on large filesystems - script = <<-EOT - #!/bin/bash - set -e - df /home/coder | awk '$NF=="/"{printf "%s", $5}' - EOT + script = "coder stat disk --path $HOME" } } @@ -223,11 +211,9 @@ resource "coder_app" "code-server" { } locals { - - # User data is used to stop/start AWS instances. See: - # https://github.com/hashicorp/terraform-provider-aws/issues/22 - - user_data_start = < pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy