feat: complete MVP resources and validate end-to-end terraform flow

This commit is contained in:
Naeel
2026-04-14 22:53:33 +03:00
parent cf55828ba6
commit f0446742fe
8 changed files with 215 additions and 76 deletions
+43
View File
@@ -0,0 +1,43 @@
terraform {
required_providers {
fission = {
source = "nail/fission"
version = "~> 0.1.0"
}
}
}
provider "fission" {
kubeconfig_path = "/home/naeel/.kube/config"
namespace = "default"
}
resource "fission_environment" "python" {
name = "tf-python-env"
image = "ghcr.io/fission/python-env"
version = 3
}
resource "fission_package" "hello" {
name = "tf-hello-pkg"
environment = fission_environment.python.name
source_dir = "${path.module}/code"
}
resource "fission_function" "hello" {
name = "tf-hello-fn"
environment = fission_environment.python.name
package_name = fission_package.hello.name
entrypoint = "main.main"
}
resource "fission_http_trigger" "hello" {
name = "tf-hello-route"
function = fission_function.hello.name
url = "/tf-hello"
methods = ["GET"]
}
output "hello_url" {
value = "https://fission.kube5s.ru/tf-hello"
}