feat: complete MVP resources and validate end-to-end terraform flow
This commit is contained in:
@@ -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"
|
||||
}
|
||||
Reference in New Issue
Block a user