-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.tf
50 lines (41 loc) · 944 Bytes
/
main.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Example of how to use the resource
terraform {
required_providers {
appstore = {
version = "~> 1.0.0"
source = "lifeomic.com/tf/appstore" # Doesn't mean anything
}
}
}
variable "name" {
type = string
}
variable "icons" {
type = list(object({
src = string
sizes = string
}))
}
variable "start_url" {
type = string
}
variable "description" {
type = string
}
# Not the right name, just for testing
variable "url_base" {
type = string
default = "https://lifeapplets.dev.lifeomic.com" # The anxiety part should probably be separate
}
locals {
app_url = "${var.url_base}/anxiety"
}
provider "appstore" {}
resource "applet" "terraform_test_applet" {
provider = appstore
name = var.name
description = var.description
author_display = "LifeOmic"
url = "${local.app_url}/${var.start_url}"
image = "${local.app_url}/${var.icons[0].src}"
}