- PHP: ghcr.io/fission/php-env, entrypoint main.php::handler
- Ruby: ghcr.io/fission/ruby-env, entrypoint handler (single-word)
- Perl: ghcr.io/fission/perl-env (version=1), sub {} return value
- Go: ghcr.io/fission/binary-env with pre-compiled binary (shell script placeholder)
Provider changes:
- package_resource: added main.php, main.rb, main.pl to source_dir candidates
- function_resource: relaxed entrypoint validation to allow PHP (::), Ruby, Perl (single-word)
- function_resource_test: updated BadFormat test to reflect new valid formats
41 lines
937 B
Terraform
41 lines
937 B
Terraform
terraform {
|
|
required_providers {
|
|
fission = {
|
|
source = "nail/fission"
|
|
version = "~> 0.1.0"
|
|
}
|
|
}
|
|
}
|
|
|
|
provider "fission" {
|
|
kubeconfig_path = "/home/naeel/.kube/config"
|
|
namespace = "default"
|
|
}
|
|
|
|
# version = 1: Perl env uses v1 specialization (/specialize endpoint)
|
|
resource "fission_environment" "perl" {
|
|
name = "tf-perl-hello-env"
|
|
image = "ghcr.io/fission/perl-env"
|
|
version = 1
|
|
}
|
|
|
|
resource "fission_package" "pkg" {
|
|
name = "tf-perl-hello-pkg"
|
|
environment = fission_environment.perl.name
|
|
source_dir = "${path.module}/code"
|
|
}
|
|
|
|
resource "fission_function" "fn" {
|
|
name = "tf-perl-hello-fn"
|
|
environment = fission_environment.perl.name
|
|
package_name = fission_package.pkg.name
|
|
entrypoint = "handler"
|
|
}
|
|
|
|
resource "fission_http_trigger" "route" {
|
|
name = "tf-perl-hello-route"
|
|
function = fission_function.fn.name
|
|
url = "/perl-hello"
|
|
methods = ["GET"]
|
|
}
|