From 1505e94c5857496fa2cb6bdb97d534d8a7298742 Mon Sep 17 00:00:00 2001 From: Zhenguo Niu Date: Fri, 30 Apr 2021 18:02:39 +0800 Subject: [PATCH] Support text func code for fgs (#1096) --- docs/resources/fgs_function.md | 33 ++++++++- .../resource_huaweicloud_fgs_function_v2.go | 44 ++++++++++-- ...source_huaweicloud_fgs_function_v2_test.go | 69 ++++++++++++++++--- 3 files changed, 131 insertions(+), 15 deletions(-) diff --git a/docs/resources/fgs_function.md b/docs/resources/fgs_function.md index 45e7836774..8f5dcc5e52 100644 --- a/docs/resources/fgs_function.md +++ b/docs/resources/fgs_function.md @@ -7,7 +7,7 @@ subcategory: "FunctionGraph" Manages a Function resource within HuaweiCloud. This is an alternative to `huaweicloud_fgs_function_v2` -## Example Usage +## Example Usage With base64 func code ```hcl resource "huaweicloud_fgs_function" "f_1" { @@ -24,6 +24,35 @@ resource "huaweicloud_fgs_function" "f_1" { } ``` +## Example Usage With text code + +```hcl +resource "huaweicloud_fgs_function" "f_1" { + name = "func_1" + app = "default" + agency = "test" + description = "fuction test" + handler = "test.handler" + memory_size = 128 + timeout = 3 + runtime = "Python2.7" + code_type = "inline" + func_code = <