feat: provider v0.1.9 — namespace removed from resources, moved to provider block
This commit is contained in:
@@ -14,7 +14,6 @@ data "archive_file" "handler_http" {
|
||||
}
|
||||
|
||||
resource "sless_function" "hello_http" {
|
||||
namespace = "default"
|
||||
name = "hello-http"
|
||||
runtime = "nodejs20"
|
||||
entrypoint = "handler-http.handle"
|
||||
@@ -28,7 +27,6 @@ resource "sless_function" "hello_http" {
|
||||
}
|
||||
|
||||
resource "sless_trigger" "hello_http" {
|
||||
namespace = "default"
|
||||
name = "hello-http-trigger"
|
||||
type = "http"
|
||||
function = sless_function.hello_http.name
|
||||
|
||||
@@ -16,7 +16,6 @@ data "archive_file" "handler_job" {
|
||||
}
|
||||
|
||||
resource "sless_function" "hello_job" {
|
||||
namespace = "default"
|
||||
name = "hello-job"
|
||||
runtime = "nodejs20"
|
||||
entrypoint = "handler-job.handle"
|
||||
@@ -31,7 +30,6 @@ resource "sless_function" "hello_job" {
|
||||
# Одноразовый запуск. Все поля immutable — изменение любого пересоздаёт джоб.
|
||||
# run_id: 0 = не запускать, 1+ = запустить. Для повторного запуска увеличь run_id (1→2→3...).
|
||||
resource "sless_job" "hello_run" {
|
||||
namespace = "default"
|
||||
name = "hello-run"
|
||||
function = sless_function.hello_job.name
|
||||
event_json = jsonencode({ numbers = [100, 200, 300] })
|
||||
|
||||
@@ -8,7 +8,7 @@ terraform {
|
||||
required_providers {
|
||||
sless = {
|
||||
source = "terra.k8c.ru/naeel/sless"
|
||||
version = "~> 0.1.7"
|
||||
version = "~> 0.1.9"
|
||||
}
|
||||
archive = {
|
||||
source = "hashicorp/archive"
|
||||
@@ -18,7 +18,8 @@ terraform {
|
||||
}
|
||||
|
||||
provider "sless" {
|
||||
endpoint = "https://sless-api.kube5s.ru"
|
||||
token = "dev-token-change-me"
|
||||
endpoint = "https://sless-api.kube5s.ru"
|
||||
token = "dev-token-change-me"
|
||||
namespace = "default"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user