diff --git a/libs/wingsdk/src/core/app.ts b/libs/wingsdk/src/core/app.ts index 781cdefed5e..8988cf390da 100644 --- a/libs/wingsdk/src/core/app.ts +++ b/libs/wingsdk/src/core/app.ts @@ -100,6 +100,17 @@ export abstract class App extends Construct { } } + /** + * The name of the compilation target. + * @internal + */ + public abstract readonly _target: + | "sim" + | "tf-aws" + | "tf-azure" + | "tf-gcp" + | "awscdk"; + /** * Wing source files directory absolute path */ diff --git a/libs/wingsdk/src/std/test.ts b/libs/wingsdk/src/std/test.ts index ee28c9ec01e..9d6da098079 100644 --- a/libs/wingsdk/src/std/test.ts +++ b/libs/wingsdk/src/std/test.ts @@ -38,8 +38,12 @@ export class Test extends Resource implements IInflightHost { return App.of(scope).newAbstract(TEST_FQN, scope, id, inflight, props); } - /** @internal */ - public readonly _fn: Function; + /** + * The function that will be called when the test is run. This will only be created + * if the app is compiled with `wing test` for a non-simulator target. + * @internal + */ + public readonly _fn: Function | undefined; constructor( scope: Construct, @@ -52,13 +56,15 @@ export class Test extends Resource implements IInflightHost { Node.of(this).title = "Test"; Node.of(this).description = "A cloud unit test."; - this._fn = App.of(scope).newAbstract( - FUNCTION_FQN, - this, - "Handler", - inflight, - props - ); + if (App.of(this).isTestEnvironment || App.of(this)._target === "sim") { + this._fn = App.of(scope).newAbstract( + FUNCTION_FQN, + this, + "Handler", + inflight, + props + ); + } } /** @internal */ diff --git a/libs/wingsdk/src/target-awscdk/app.ts b/libs/wingsdk/src/target-awscdk/app.ts index e315f4cb06f..1c03fdaf0d7 100644 --- a/libs/wingsdk/src/target-awscdk/app.ts +++ b/libs/wingsdk/src/target-awscdk/app.ts @@ -54,6 +54,8 @@ export class App extends CoreApp { public readonly isTestEnvironment: boolean; public readonly _tokens: CdkTokens; + public readonly _target = "awscdk"; + private readonly cdkApp: cdk.App; private readonly cdkStack: cdk.Stack; private readonly pluginManager: PluginManager; diff --git a/libs/wingsdk/src/target-awscdk/test-runner.ts b/libs/wingsdk/src/target-awscdk/test-runner.ts index dd76990e8f3..6e04bcb635b 100644 --- a/libs/wingsdk/src/target-awscdk/test-runner.ts +++ b/libs/wingsdk/src/target-awscdk/test-runner.ts @@ -56,7 +56,9 @@ export class TestRunner extends std.TestRunner { public _preSynthesize(): void { // add a dependency on each test function for (const test of this.findTests()) { - this.node.addDependency(test._fn); + if (test._fn) { + this.node.addDependency(test._fn); + } } super._preSynthesize(); @@ -65,12 +67,14 @@ export class TestRunner extends std.TestRunner { private getTestFunctionArns(): Map { const arns = new Map(); for (const test of this.findTests()) { - if (!(test._fn instanceof AwsFunction)) { - throw new Error( - `Unsupported test function type, ${test._fn.node.path} was not a tfaws.Function` - ); + if (test._fn) { + if (!(test._fn instanceof AwsFunction)) { + throw new Error( + `Unsupported test function type, ${test._fn.node.path} was not a tfaws.Function` + ); + } + arns.set(test.node.path, (test._fn as AwsFunction).arn); } - arns.set(test.node.path, (test._fn as AwsFunction).arn); } return arns; } diff --git a/libs/wingsdk/src/target-sim/app.ts b/libs/wingsdk/src/target-sim/app.ts index b36d1f86e7e..bb67bb7e8d6 100644 --- a/libs/wingsdk/src/target-sim/app.ts +++ b/libs/wingsdk/src/target-sim/app.ts @@ -51,6 +51,8 @@ export class App extends core.App { public readonly isTestEnvironment: boolean; public readonly _tokens: SimTokens; + public readonly _target = "sim"; + /** * The test runner for this app. */ diff --git a/libs/wingsdk/src/target-sim/test-runner.ts b/libs/wingsdk/src/target-sim/test-runner.ts index b20e94c9173..d071c92ae46 100644 --- a/libs/wingsdk/src/target-sim/test-runner.ts +++ b/libs/wingsdk/src/target-sim/test-runner.ts @@ -39,7 +39,9 @@ export class TestRunner extends std.TestRunner implements ISimulatorResource { public _preSynthesize(): void { // add a dependency on each test function for (const test of this.findTests()) { - this.node.addDependency(test._fn); + if (test._fn) { + this.node.addDependency(test._fn); + } } super._preSynthesize(); @@ -48,7 +50,9 @@ export class TestRunner extends std.TestRunner implements ISimulatorResource { private getTestFunctionHandles(): Record { const handles: Record = {}; for (const test of this.findTests()) { - handles[test.node.path] = simulatorHandleToken(test._fn); + if (test._fn) { + handles[test.node.path] = simulatorHandleToken(test._fn); + } } return handles; } diff --git a/libs/wingsdk/src/target-tf-aws/app.ts b/libs/wingsdk/src/target-tf-aws/app.ts index 4c0870bb0df..e9673d65c65 100644 --- a/libs/wingsdk/src/target-tf-aws/app.ts +++ b/libs/wingsdk/src/target-tf-aws/app.ts @@ -51,6 +51,8 @@ export class App extends CdktfApp { */ protected readonly testRunner: TestRunner; + public readonly _target = "tf-aws"; + private awsRegionProvider?: DataAwsRegion; private awsAccountIdProvider?: DataAwsCallerIdentity; private _vpc?: Vpc; diff --git a/libs/wingsdk/src/target-tf-aws/test-runner.ts b/libs/wingsdk/src/target-tf-aws/test-runner.ts index 29108bdfbc4..5a8e95a9873 100644 --- a/libs/wingsdk/src/target-tf-aws/test-runner.ts +++ b/libs/wingsdk/src/target-tf-aws/test-runner.ts @@ -56,7 +56,9 @@ export class TestRunner extends std.TestRunner { public _preSynthesize(): void { // add a dependency on each test function for (const test of this.findTests()) { - this.node.addDependency(test._fn); + if (test._fn) { + this.node.addDependency(test._fn); + } } super._preSynthesize(); @@ -65,12 +67,14 @@ export class TestRunner extends std.TestRunner { private getTestFunctionArns(): Map { const arns = new Map(); for (const test of this.findTests()) { - if (!(test._fn instanceof AwsFunction)) { - throw new Error( - `Unsupported test function type, ${test._fn.node.path} was not a tfaws.Function` - ); + if (test._fn) { + if (!(test._fn instanceof AwsFunction)) { + throw new Error( + `Unsupported test function type, ${test._fn.node.path} was not a tfaws.Function` + ); + } + arns.set(test.node.path, (test._fn as AwsFunction).arn); } - arns.set(test.node.path, (test._fn as AwsFunction).arn); } return arns; } diff --git a/libs/wingsdk/src/target-tf-azure/app.ts b/libs/wingsdk/src/target-tf-azure/app.ts index 5e9757d9493..10f5168be6c 100644 --- a/libs/wingsdk/src/target-tf-azure/app.ts +++ b/libs/wingsdk/src/target-tf-azure/app.ts @@ -59,6 +59,7 @@ export class App extends CdktfApp { * @link https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/resource_group#location * */ public readonly location: string; + public readonly _target = "tf-azure"; private _resourceGroup?: ResourceGroup; private _storageAccount?: StorageAccount; private _servicePlan?: ServicePlan; diff --git a/libs/wingsdk/src/target-tf-gcp/app.ts b/libs/wingsdk/src/target-tf-gcp/app.ts index e861408dbdb..ce9517f2f4a 100644 --- a/libs/wingsdk/src/target-tf-gcp/app.ts +++ b/libs/wingsdk/src/target-tf-gcp/app.ts @@ -37,6 +37,8 @@ export class App extends CdktfApp { */ public readonly storageLocation: string; + public readonly _target = "tf-gcp"; + constructor(props: AppProps) { super(props); diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/404.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/404.w_compile_tf-aws.md index 0287aeb265e..907603d4d76 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/404.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/404.w_compile_tf-aws.md @@ -72,7 +72,7 @@ module.exports = function({ $api_url, $http_Util }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:it responds with 404\",\"${aws_lambda_function.testitrespondswith404_Handler_2D34428F.arn}\"]]" + "value": "[]" } }, "provider": { @@ -132,15 +132,6 @@ module.exports = function({ $api_url, $http_Util }) { } }, "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testitrespondswith404_Handler_IamRole_E0973EE8": { - "//": { - "metadata": { - "path": "root/Default/Default/test:it responds with 404/Handler/IamRole", - "uniqueId": "testitrespondswith404_Handler_IamRole_E0973EE8" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" } }, "aws_iam_role_policy": { @@ -153,16 +144,6 @@ module.exports = function({ $api_url, $http_Util }) { }, "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.name}" - }, - "testitrespondswith404_Handler_IamRolePolicy_4E2D3D6D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:it responds with 404/Handler/IamRolePolicy", - "uniqueId": "testitrespondswith404_Handler_IamRolePolicy_4E2D3D6D" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testitrespondswith404_Handler_IamRole_E0973EE8.name}" } }, "aws_iam_role_policy_attachment": { @@ -175,16 +156,6 @@ module.exports = function({ $api_url, $http_Util }) { }, "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.name}" - }, - "testitrespondswith404_Handler_IamRolePolicyAttachment_943423A4": { - "//": { - "metadata": { - "path": "root/Default/Default/test:it responds with 404/Handler/IamRolePolicyAttachment", - "uniqueId": "testitrespondswith404_Handler_IamRolePolicyAttachment_943423A4" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testitrespondswith404_Handler_IamRole_E0973EE8.name}" } }, "aws_lambda_function": { @@ -216,36 +187,6 @@ module.exports = function({ $api_url, $http_Util }) { "security_group_ids": [], "subnet_ids": [] } - }, - "testitrespondswith404_Handler_2D34428F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:it responds with 404/Handler/Default", - "uniqueId": "testitrespondswith404_Handler_2D34428F" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c83f9661", - "WING_TARGET": "tf-aws", - "WING_TOKEN_TFTOKEN_TOKEN_8": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" - } - }, - "function_name": "Handler-c83f9661", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testitrespondswith404_Handler_IamRole_E0973EE8.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testitrespondswith404_Handler_S3Object_7180AA4B.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } } }, "aws_lambda_permission": { @@ -285,17 +226,6 @@ module.exports = function({ $api_url, $http_Util }) { "bucket": "${aws_s3_bucket.Code.bucket}", "key": "", "source": "" - }, - "testitrespondswith404_Handler_S3Object_7180AA4B": { - "//": { - "metadata": { - "path": "root/Default/Default/test:it responds with 404/Handler/S3Object", - "uniqueId": "testitrespondswith404_Handler_S3Object_7180AA4B" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" } } } diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/cors.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/cors.w_compile_tf-aws.md index 387fe8cc53d..815cd761a16 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/cors.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/cors.w_compile_tf-aws.md @@ -71,7 +71,7 @@ module.exports = function({ $api_url, $http_Util }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:http.get and http.fetch can preform a call to an api\",\"${aws_lambda_function.testhttpgetandhttpfetchcanpreformacalltoanapi_Handler_9FEA2521.arn}\"]]" + "value": "[]" } }, "provider": { @@ -131,15 +131,6 @@ module.exports = function({ $api_url, $http_Util }) { } }, "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testhttpgetandhttpfetchcanpreformacalltoanapi_Handler_IamRole_678DDBCB": { - "//": { - "metadata": { - "path": "root/Default/Default/test:http.get and http.fetch can preform a call to an api/Handler/IamRole", - "uniqueId": "testhttpgetandhttpfetchcanpreformacalltoanapi_Handler_IamRole_678DDBCB" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" } }, "aws_iam_role_policy": { @@ -152,16 +143,6 @@ module.exports = function({ $api_url, $http_Util }) { }, "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.name}" - }, - "testhttpgetandhttpfetchcanpreformacalltoanapi_Handler_IamRolePolicy_047F62EA": { - "//": { - "metadata": { - "path": "root/Default/Default/test:http.get and http.fetch can preform a call to an api/Handler/IamRolePolicy", - "uniqueId": "testhttpgetandhttpfetchcanpreformacalltoanapi_Handler_IamRolePolicy_047F62EA" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testhttpgetandhttpfetchcanpreformacalltoanapi_Handler_IamRole_678DDBCB.name}" } }, "aws_iam_role_policy_attachment": { @@ -174,16 +155,6 @@ module.exports = function({ $api_url, $http_Util }) { }, "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.name}" - }, - "testhttpgetandhttpfetchcanpreformacalltoanapi_Handler_IamRolePolicyAttachment_328C8EF0": { - "//": { - "metadata": { - "path": "root/Default/Default/test:http.get and http.fetch can preform a call to an api/Handler/IamRolePolicyAttachment", - "uniqueId": "testhttpgetandhttpfetchcanpreformacalltoanapi_Handler_IamRolePolicyAttachment_328C8EF0" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testhttpgetandhttpfetchcanpreformacalltoanapi_Handler_IamRole_678DDBCB.name}" } }, "aws_lambda_function": { @@ -215,36 +186,6 @@ module.exports = function({ $api_url, $http_Util }) { "security_group_ids": [], "subnet_ids": [] } - }, - "testhttpgetandhttpfetchcanpreformacalltoanapi_Handler_9FEA2521": { - "//": { - "metadata": { - "path": "root/Default/Default/test:http.get and http.fetch can preform a call to an api/Handler/Default", - "uniqueId": "testhttpgetandhttpfetchcanpreformacalltoanapi_Handler_9FEA2521" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c838ce37", - "WING_TARGET": "tf-aws", - "WING_TOKEN_TFTOKEN_TOKEN_8": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" - } - }, - "function_name": "Handler-c838ce37", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testhttpgetandhttpfetchcanpreformacalltoanapi_Handler_IamRole_678DDBCB.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testhttpgetandhttpfetchcanpreformacalltoanapi_Handler_S3Object_88ED484E.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } } }, "aws_lambda_permission": { @@ -284,17 +225,6 @@ module.exports = function({ $api_url, $http_Util }) { "bucket": "${aws_s3_bucket.Code.bucket}", "key": "", "source": "" - }, - "testhttpgetandhttpfetchcanpreformacalltoanapi_Handler_S3Object_88ED484E": { - "//": { - "metadata": { - "path": "root/Default/Default/test:http.get and http.fetch can preform a call to an api/Handler/S3Object", - "uniqueId": "testhttpgetandhttpfetchcanpreformacalltoanapi_Handler_S3Object_88ED484E" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" } } } diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/delete.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/delete.w_compile_tf-aws.md index f2fa22ee2d0..c2fd3bab0b2 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/delete.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/delete.w_compile_tf-aws.md @@ -81,7 +81,7 @@ module.exports = function({ $api_url, $http_HttpMethod, $http_Util }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:http.delete and http.fetch can preform a call to an api\",\"${aws_lambda_function.testhttpdeleteandhttpfetchcanpreformacalltoanapi_Handler_98044CDF.arn}\"]]" + "value": "[]" } }, "provider": { @@ -141,15 +141,6 @@ module.exports = function({ $api_url, $http_HttpMethod, $http_Util }) { } }, "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testhttpdeleteandhttpfetchcanpreformacalltoanapi_Handler_IamRole_F3B23120": { - "//": { - "metadata": { - "path": "root/Default/Default/test:http.delete and http.fetch can preform a call to an api/Handler/IamRole", - "uniqueId": "testhttpdeleteandhttpfetchcanpreformacalltoanapi_Handler_IamRole_F3B23120" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" } }, "aws_iam_role_policy": { @@ -162,16 +153,6 @@ module.exports = function({ $api_url, $http_HttpMethod, $http_Util }) { }, "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.name}" - }, - "testhttpdeleteandhttpfetchcanpreformacalltoanapi_Handler_IamRolePolicy_03683652": { - "//": { - "metadata": { - "path": "root/Default/Default/test:http.delete and http.fetch can preform a call to an api/Handler/IamRolePolicy", - "uniqueId": "testhttpdeleteandhttpfetchcanpreformacalltoanapi_Handler_IamRolePolicy_03683652" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testhttpdeleteandhttpfetchcanpreformacalltoanapi_Handler_IamRole_F3B23120.name}" } }, "aws_iam_role_policy_attachment": { @@ -184,16 +165,6 @@ module.exports = function({ $api_url, $http_HttpMethod, $http_Util }) { }, "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.name}" - }, - "testhttpdeleteandhttpfetchcanpreformacalltoanapi_Handler_IamRolePolicyAttachment_A5AE872D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:http.delete and http.fetch can preform a call to an api/Handler/IamRolePolicyAttachment", - "uniqueId": "testhttpdeleteandhttpfetchcanpreformacalltoanapi_Handler_IamRolePolicyAttachment_A5AE872D" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testhttpdeleteandhttpfetchcanpreformacalltoanapi_Handler_IamRole_F3B23120.name}" } }, "aws_lambda_function": { @@ -225,36 +196,6 @@ module.exports = function({ $api_url, $http_HttpMethod, $http_Util }) { "security_group_ids": [], "subnet_ids": [] } - }, - "testhttpdeleteandhttpfetchcanpreformacalltoanapi_Handler_98044CDF": { - "//": { - "metadata": { - "path": "root/Default/Default/test:http.delete and http.fetch can preform a call to an api/Handler/Default", - "uniqueId": "testhttpdeleteandhttpfetchcanpreformacalltoanapi_Handler_98044CDF" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c897cd38", - "WING_TARGET": "tf-aws", - "WING_TOKEN_TFTOKEN_TOKEN_8": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" - } - }, - "function_name": "Handler-c897cd38", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testhttpdeleteandhttpfetchcanpreformacalltoanapi_Handler_IamRole_F3B23120.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testhttpdeleteandhttpfetchcanpreformacalltoanapi_Handler_S3Object_64313242.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } } }, "aws_lambda_permission": { @@ -294,17 +235,6 @@ module.exports = function({ $api_url, $http_HttpMethod, $http_Util }) { "bucket": "${aws_s3_bucket.Code.bucket}", "key": "", "source": "" - }, - "testhttpdeleteandhttpfetchcanpreformacalltoanapi_Handler_S3Object_64313242": { - "//": { - "metadata": { - "path": "root/Default/Default/test:http.delete and http.fetch can preform a call to an api/Handler/S3Object", - "uniqueId": "testhttpdeleteandhttpfetchcanpreformacalltoanapi_Handler_S3Object_64313242" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" } } } diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/get.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/get.w_compile_tf-aws.md index 3c8823de3ce..e448e0f458b 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/get.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/get.w_compile_tf-aws.md @@ -85,7 +85,7 @@ module.exports = function({ $api_url, $body, $http_HttpMethod, $http_Util }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:http.get and http.fetch can preform a call to an api\",\"${aws_lambda_function.testhttpgetandhttpfetchcanpreformacalltoanapi_Handler_9FEA2521.arn}\"]]" + "value": "[]" } }, "provider": { @@ -145,15 +145,6 @@ module.exports = function({ $api_url, $body, $http_HttpMethod, $http_Util }) { } }, "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testhttpgetandhttpfetchcanpreformacalltoanapi_Handler_IamRole_678DDBCB": { - "//": { - "metadata": { - "path": "root/Default/Default/test:http.get and http.fetch can preform a call to an api/Handler/IamRole", - "uniqueId": "testhttpgetandhttpfetchcanpreformacalltoanapi_Handler_IamRole_678DDBCB" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" } }, "aws_iam_role_policy": { @@ -166,16 +157,6 @@ module.exports = function({ $api_url, $body, $http_HttpMethod, $http_Util }) { }, "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.name}" - }, - "testhttpgetandhttpfetchcanpreformacalltoanapi_Handler_IamRolePolicy_047F62EA": { - "//": { - "metadata": { - "path": "root/Default/Default/test:http.get and http.fetch can preform a call to an api/Handler/IamRolePolicy", - "uniqueId": "testhttpgetandhttpfetchcanpreformacalltoanapi_Handler_IamRolePolicy_047F62EA" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testhttpgetandhttpfetchcanpreformacalltoanapi_Handler_IamRole_678DDBCB.name}" } }, "aws_iam_role_policy_attachment": { @@ -188,16 +169,6 @@ module.exports = function({ $api_url, $body, $http_HttpMethod, $http_Util }) { }, "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.name}" - }, - "testhttpgetandhttpfetchcanpreformacalltoanapi_Handler_IamRolePolicyAttachment_328C8EF0": { - "//": { - "metadata": { - "path": "root/Default/Default/test:http.get and http.fetch can preform a call to an api/Handler/IamRolePolicyAttachment", - "uniqueId": "testhttpgetandhttpfetchcanpreformacalltoanapi_Handler_IamRolePolicyAttachment_328C8EF0" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testhttpgetandhttpfetchcanpreformacalltoanapi_Handler_IamRole_678DDBCB.name}" } }, "aws_lambda_function": { @@ -229,36 +200,6 @@ module.exports = function({ $api_url, $body, $http_HttpMethod, $http_Util }) { "security_group_ids": [], "subnet_ids": [] } - }, - "testhttpgetandhttpfetchcanpreformacalltoanapi_Handler_9FEA2521": { - "//": { - "metadata": { - "path": "root/Default/Default/test:http.get and http.fetch can preform a call to an api/Handler/Default", - "uniqueId": "testhttpgetandhttpfetchcanpreformacalltoanapi_Handler_9FEA2521" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c838ce37", - "WING_TARGET": "tf-aws", - "WING_TOKEN_TFTOKEN_TOKEN_8": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" - } - }, - "function_name": "Handler-c838ce37", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testhttpgetandhttpfetchcanpreformacalltoanapi_Handler_IamRole_678DDBCB.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testhttpgetandhttpfetchcanpreformacalltoanapi_Handler_S3Object_88ED484E.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } } }, "aws_lambda_permission": { @@ -298,17 +239,6 @@ module.exports = function({ $api_url, $body, $http_HttpMethod, $http_Util }) { "bucket": "${aws_s3_bucket.Code.bucket}", "key": "", "source": "" - }, - "testhttpgetandhttpfetchcanpreformacalltoanapi_Handler_S3Object_88ED484E": { - "//": { - "metadata": { - "path": "root/Default/Default/test:http.get and http.fetch can preform a call to an api/Handler/S3Object", - "uniqueId": "testhttpgetandhttpfetchcanpreformacalltoanapi_Handler_S3Object_88ED484E" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" } } } diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/options.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/options.w_compile_tf-aws.md index 149cc13cb69..8c2456fc12f 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/options.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/options.w_compile_tf-aws.md @@ -115,7 +115,7 @@ module.exports = function({ $api_url, $http_HttpMethod, $http_Util, $path }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:http.fetch can preform a call to an api to CONNECT, HEAD and OPTIONS\",\"${aws_lambda_function.testhttpfetchcanpreformacalltoanapitoCONNECTHEADandOPTIONS_Handler_E8EF5111.arn}\"]]" + "value": "[]" } }, "provider": { @@ -193,15 +193,6 @@ module.exports = function({ $api_url, $http_HttpMethod, $http_Util, $path }) { } }, "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testhttpfetchcanpreformacalltoanapitoCONNECTHEADandOPTIONS_Handler_IamRole_F762CCC6": { - "//": { - "metadata": { - "path": "root/Default/Default/test:http.fetch can preform a call to an api to CONNECT, HEAD and OPTIONS/Handler/IamRole", - "uniqueId": "testhttpfetchcanpreformacalltoanapitoCONNECTHEADandOPTIONS_Handler_IamRole_F762CCC6" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" } }, "aws_iam_role_policy": { @@ -234,16 +225,6 @@ module.exports = function({ $api_url, $http_HttpMethod, $http_Util, $path }) { }, "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.name}" - }, - "testhttpfetchcanpreformacalltoanapitoCONNECTHEADandOPTIONS_Handler_IamRolePolicy_665D7306": { - "//": { - "metadata": { - "path": "root/Default/Default/test:http.fetch can preform a call to an api to CONNECT, HEAD and OPTIONS/Handler/IamRolePolicy", - "uniqueId": "testhttpfetchcanpreformacalltoanapitoCONNECTHEADandOPTIONS_Handler_IamRolePolicy_665D7306" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testhttpfetchcanpreformacalltoanapitoCONNECTHEADandOPTIONS_Handler_IamRole_F762CCC6.name}" } }, "aws_iam_role_policy_attachment": { @@ -276,16 +257,6 @@ module.exports = function({ $api_url, $http_HttpMethod, $http_Util, $path }) { }, "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.name}" - }, - "testhttpfetchcanpreformacalltoanapitoCONNECTHEADandOPTIONS_Handler_IamRolePolicyAttachment_032BCE8A": { - "//": { - "metadata": { - "path": "root/Default/Default/test:http.fetch can preform a call to an api to CONNECT, HEAD and OPTIONS/Handler/IamRolePolicyAttachment", - "uniqueId": "testhttpfetchcanpreformacalltoanapitoCONNECTHEADandOPTIONS_Handler_IamRolePolicyAttachment_032BCE8A" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testhttpfetchcanpreformacalltoanapitoCONNECTHEADandOPTIONS_Handler_IamRole_F762CCC6.name}" } }, "aws_lambda_function": { @@ -375,36 +346,6 @@ module.exports = function({ $api_url, $http_HttpMethod, $http_Util, $path }) { "security_group_ids": [], "subnet_ids": [] } - }, - "testhttpfetchcanpreformacalltoanapitoCONNECTHEADandOPTIONS_Handler_E8EF5111": { - "//": { - "metadata": { - "path": "root/Default/Default/test:http.fetch can preform a call to an api to CONNECT, HEAD and OPTIONS/Handler/Default", - "uniqueId": "testhttpfetchcanpreformacalltoanapitoCONNECTHEADandOPTIONS_Handler_E8EF5111" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8f5c667", - "WING_TARGET": "tf-aws", - "WING_TOKEN_TFTOKEN_TOKEN_8": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" - } - }, - "function_name": "Handler-c8f5c667", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testhttpfetchcanpreformacalltoanapitoCONNECTHEADandOPTIONS_Handler_IamRole_F762CCC6.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testhttpfetchcanpreformacalltoanapitoCONNECTHEADandOPTIONS_Handler_S3Object_FEEF8ACC.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } } }, "aws_lambda_permission": { @@ -492,17 +433,6 @@ module.exports = function({ $api_url, $http_HttpMethod, $http_Util, $path }) { "bucket": "${aws_s3_bucket.Code.bucket}", "key": "", "source": "" - }, - "testhttpfetchcanpreformacalltoanapitoCONNECTHEADandOPTIONS_Handler_S3Object_FEEF8ACC": { - "//": { - "metadata": { - "path": "root/Default/Default/test:http.fetch can preform a call to an api to CONNECT, HEAD and OPTIONS/Handler/S3Object", - "uniqueId": "testhttpfetchcanpreformacalltoanapitoCONNECTHEADandOPTIONS_Handler_S3Object_FEEF8ACC" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" } } } diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/patch.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/patch.w_compile_tf-aws.md index 8dc60e45ab4..4836661a6f6 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/patch.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/patch.w_compile_tf-aws.md @@ -82,7 +82,7 @@ module.exports = function({ $_id, $api_url, $body, $http_HttpMethod, $http_Util, }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:http.patch and http.fetch can preform a call to an api\",\"${aws_lambda_function.testhttppatchandhttpfetchcanpreformacalltoanapi_Handler_185CBA02.arn}\"]]" + "value": "[]" } }, "provider": { @@ -142,15 +142,6 @@ module.exports = function({ $_id, $api_url, $body, $http_HttpMethod, $http_Util, } }, "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testhttppatchandhttpfetchcanpreformacalltoanapi_Handler_IamRole_C2F43DF0": { - "//": { - "metadata": { - "path": "root/Default/Default/test:http.patch and http.fetch can preform a call to an api/Handler/IamRole", - "uniqueId": "testhttppatchandhttpfetchcanpreformacalltoanapi_Handler_IamRole_C2F43DF0" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" } }, "aws_iam_role_policy": { @@ -163,16 +154,6 @@ module.exports = function({ $_id, $api_url, $body, $http_HttpMethod, $http_Util, }, "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.name}" - }, - "testhttppatchandhttpfetchcanpreformacalltoanapi_Handler_IamRolePolicy_6D4DBF6C": { - "//": { - "metadata": { - "path": "root/Default/Default/test:http.patch and http.fetch can preform a call to an api/Handler/IamRolePolicy", - "uniqueId": "testhttppatchandhttpfetchcanpreformacalltoanapi_Handler_IamRolePolicy_6D4DBF6C" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testhttppatchandhttpfetchcanpreformacalltoanapi_Handler_IamRole_C2F43DF0.name}" } }, "aws_iam_role_policy_attachment": { @@ -185,16 +166,6 @@ module.exports = function({ $_id, $api_url, $body, $http_HttpMethod, $http_Util, }, "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.name}" - }, - "testhttppatchandhttpfetchcanpreformacalltoanapi_Handler_IamRolePolicyAttachment_FDA4E9BA": { - "//": { - "metadata": { - "path": "root/Default/Default/test:http.patch and http.fetch can preform a call to an api/Handler/IamRolePolicyAttachment", - "uniqueId": "testhttppatchandhttpfetchcanpreformacalltoanapi_Handler_IamRolePolicyAttachment_FDA4E9BA" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testhttppatchandhttpfetchcanpreformacalltoanapi_Handler_IamRole_C2F43DF0.name}" } }, "aws_lambda_function": { @@ -226,36 +197,6 @@ module.exports = function({ $_id, $api_url, $body, $http_HttpMethod, $http_Util, "security_group_ids": [], "subnet_ids": [] } - }, - "testhttppatchandhttpfetchcanpreformacalltoanapi_Handler_185CBA02": { - "//": { - "metadata": { - "path": "root/Default/Default/test:http.patch and http.fetch can preform a call to an api/Handler/Default", - "uniqueId": "testhttppatchandhttpfetchcanpreformacalltoanapi_Handler_185CBA02" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c89df580", - "WING_TARGET": "tf-aws", - "WING_TOKEN_TFTOKEN_TOKEN_8": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" - } - }, - "function_name": "Handler-c89df580", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testhttppatchandhttpfetchcanpreformacalltoanapi_Handler_IamRole_C2F43DF0.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testhttppatchandhttpfetchcanpreformacalltoanapi_Handler_S3Object_2CE72DAC.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } } }, "aws_lambda_permission": { @@ -295,17 +236,6 @@ module.exports = function({ $_id, $api_url, $body, $http_HttpMethod, $http_Util, "bucket": "${aws_s3_bucket.Code.bucket}", "key": "", "source": "" - }, - "testhttppatchandhttpfetchcanpreformacalltoanapi_Handler_S3Object_2CE72DAC": { - "//": { - "metadata": { - "path": "root/Default/Default/test:http.patch and http.fetch can preform a call to an api/Handler/S3Object", - "uniqueId": "testhttppatchandhttpfetchcanpreformacalltoanapi_Handler_S3Object_2CE72DAC" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" } } } diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/path_vars.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/path_vars.w_compile_tf-aws.md index dd8f9db3dfd..f93a63f8685 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/path_vars.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/path_vars.w_compile_tf-aws.md @@ -155,7 +155,7 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:test\",\"${aws_lambda_function.testtest_Handler_295107CC.arn}\"],[\"root/Default/Default/test:test2\",\"${aws_lambda_function.testtest2_Handler_EB79E487.arn}\"],[\"root/Default/Default/test:test3\",\"${aws_lambda_function.testtest3_Handler_A2A8E3A1.arn}\"],[\"root/Default/Default/test:test4\",\"${aws_lambda_function.testtest4_Handler_4B54514B.arn}\"]]" + "value": "[]" } }, "provider": { @@ -224,42 +224,6 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { } }, "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testtest2_Handler_IamRole_9304BBE5": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test2/Handler/IamRole", - "uniqueId": "testtest2_Handler_IamRole_9304BBE5" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testtest3_Handler_IamRole_6E5F9CB2": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test3/Handler/IamRole", - "uniqueId": "testtest3_Handler_IamRole_6E5F9CB2" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testtest4_Handler_IamRole_F3E77BF2": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test4/Handler/IamRole", - "uniqueId": "testtest4_Handler_IamRole_F3E77BF2" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testtest_Handler_IamRole_15693C93": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRole", - "uniqueId": "testtest_Handler_IamRole_15693C93" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" } }, "aws_iam_role_policy": { @@ -282,46 +246,6 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { }, "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.name}" - }, - "testtest2_Handler_IamRolePolicy_77807769": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test2/Handler/IamRolePolicy", - "uniqueId": "testtest2_Handler_IamRolePolicy_77807769" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testtest2_Handler_IamRole_9304BBE5.name}" - }, - "testtest3_Handler_IamRolePolicy_CD8584B9": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test3/Handler/IamRolePolicy", - "uniqueId": "testtest3_Handler_IamRolePolicy_CD8584B9" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testtest3_Handler_IamRole_6E5F9CB2.name}" - }, - "testtest4_Handler_IamRolePolicy_92DB0F08": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test4/Handler/IamRolePolicy", - "uniqueId": "testtest4_Handler_IamRolePolicy_92DB0F08" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testtest4_Handler_IamRole_F3E77BF2.name}" - }, - "testtest_Handler_IamRolePolicy_AF0279BD": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRolePolicy", - "uniqueId": "testtest_Handler_IamRolePolicy_AF0279BD" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.name}" } }, "aws_iam_role_policy_attachment": { @@ -344,46 +268,6 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { }, "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.name}" - }, - "testtest2_Handler_IamRolePolicyAttachment_57665B6F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test2/Handler/IamRolePolicyAttachment", - "uniqueId": "testtest2_Handler_IamRolePolicyAttachment_57665B6F" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testtest2_Handler_IamRole_9304BBE5.name}" - }, - "testtest3_Handler_IamRolePolicyAttachment_EA1CC147": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test3/Handler/IamRolePolicyAttachment", - "uniqueId": "testtest3_Handler_IamRolePolicyAttachment_EA1CC147" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testtest3_Handler_IamRole_6E5F9CB2.name}" - }, - "testtest4_Handler_IamRolePolicyAttachment_AC735E44": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test4/Handler/IamRolePolicyAttachment", - "uniqueId": "testtest4_Handler_IamRolePolicyAttachment_AC735E44" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testtest4_Handler_IamRole_F3E77BF2.name}" - }, - "testtest_Handler_IamRolePolicyAttachment_ADF4752D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRolePolicyAttachment", - "uniqueId": "testtest_Handler_IamRolePolicyAttachment_ADF4752D" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.name}" } }, "aws_lambda_function": { @@ -444,126 +328,6 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { "security_group_ids": [], "subnet_ids": [] } - }, - "testtest2_Handler_EB79E487": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test2/Handler/Default", - "uniqueId": "testtest2_Handler_EB79E487" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c89fe587", - "WING_TARGET": "tf-aws", - "WING_TOKEN_TFTOKEN_TOKEN_8": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" - } - }, - "function_name": "Handler-c89fe587", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testtest2_Handler_IamRole_9304BBE5.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testtest2_Handler_S3Object_21FCD712.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testtest3_Handler_A2A8E3A1": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test3/Handler/Default", - "uniqueId": "testtest3_Handler_A2A8E3A1" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8445457", - "WING_TARGET": "tf-aws", - "WING_TOKEN_TFTOKEN_TOKEN_8": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" - } - }, - "function_name": "Handler-c8445457", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testtest3_Handler_IamRole_6E5F9CB2.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testtest3_Handler_S3Object_417A3842.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testtest4_Handler_4B54514B": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test4/Handler/Default", - "uniqueId": "testtest4_Handler_4B54514B" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c82aef8d", - "WING_TARGET": "tf-aws", - "WING_TOKEN_TFTOKEN_TOKEN_8": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" - } - }, - "function_name": "Handler-c82aef8d", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testtest4_Handler_IamRole_F3E77BF2.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testtest4_Handler_S3Object_7A3CDC0E.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testtest_Handler_295107CC": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/Default", - "uniqueId": "testtest_Handler_295107CC" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8f4f2a1", - "WING_TARGET": "tf-aws", - "WING_TOKEN_TFTOKEN_TOKEN_8": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" - } - }, - "function_name": "Handler-c8f4f2a1", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testtest_Handler_S3Object_9F4E28A7.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } } }, "aws_lambda_permission": { @@ -653,50 +417,6 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { "bucket": "${aws_s3_bucket.Code.bucket}", "key": "", "source": "" - }, - "testtest2_Handler_S3Object_21FCD712": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test2/Handler/S3Object", - "uniqueId": "testtest2_Handler_S3Object_21FCD712" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testtest3_Handler_S3Object_417A3842": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test3/Handler/S3Object", - "uniqueId": "testtest3_Handler_S3Object_417A3842" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testtest4_Handler_S3Object_7A3CDC0E": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test4/Handler/S3Object", - "uniqueId": "testtest4_Handler_S3Object_7A3CDC0E" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testtest_Handler_S3Object_9F4E28A7": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/S3Object", - "uniqueId": "testtest_Handler_S3Object_9F4E28A7" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" } } } diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/post.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/post.w_compile_tf-aws.md index d535e875a54..2e56f112473 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/post.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/post.w_compile_tf-aws.md @@ -81,7 +81,7 @@ module.exports = function({ $api_url, $body, $http_HttpMethod, $http_Util, $std_ }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:http.post and http.fetch can preform a call to an api\",\"${aws_lambda_function.testhttppostandhttpfetchcanpreformacalltoanapi_Handler_C4853DBD.arn}\"]]" + "value": "[]" } }, "provider": { @@ -141,15 +141,6 @@ module.exports = function({ $api_url, $body, $http_HttpMethod, $http_Util, $std_ } }, "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testhttppostandhttpfetchcanpreformacalltoanapi_Handler_IamRole_364748FC": { - "//": { - "metadata": { - "path": "root/Default/Default/test:http.post and http.fetch can preform a call to an api/Handler/IamRole", - "uniqueId": "testhttppostandhttpfetchcanpreformacalltoanapi_Handler_IamRole_364748FC" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" } }, "aws_iam_role_policy": { @@ -162,16 +153,6 @@ module.exports = function({ $api_url, $body, $http_HttpMethod, $http_Util, $std_ }, "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.name}" - }, - "testhttppostandhttpfetchcanpreformacalltoanapi_Handler_IamRolePolicy_720C559E": { - "//": { - "metadata": { - "path": "root/Default/Default/test:http.post and http.fetch can preform a call to an api/Handler/IamRolePolicy", - "uniqueId": "testhttppostandhttpfetchcanpreformacalltoanapi_Handler_IamRolePolicy_720C559E" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testhttppostandhttpfetchcanpreformacalltoanapi_Handler_IamRole_364748FC.name}" } }, "aws_iam_role_policy_attachment": { @@ -184,16 +165,6 @@ module.exports = function({ $api_url, $body, $http_HttpMethod, $http_Util, $std_ }, "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.name}" - }, - "testhttppostandhttpfetchcanpreformacalltoanapi_Handler_IamRolePolicyAttachment_E623498E": { - "//": { - "metadata": { - "path": "root/Default/Default/test:http.post and http.fetch can preform a call to an api/Handler/IamRolePolicyAttachment", - "uniqueId": "testhttppostandhttpfetchcanpreformacalltoanapi_Handler_IamRolePolicyAttachment_E623498E" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testhttppostandhttpfetchcanpreformacalltoanapi_Handler_IamRole_364748FC.name}" } }, "aws_lambda_function": { @@ -225,36 +196,6 @@ module.exports = function({ $api_url, $body, $http_HttpMethod, $http_Util, $std_ "security_group_ids": [], "subnet_ids": [] } - }, - "testhttppostandhttpfetchcanpreformacalltoanapi_Handler_C4853DBD": { - "//": { - "metadata": { - "path": "root/Default/Default/test:http.post and http.fetch can preform a call to an api/Handler/Default", - "uniqueId": "testhttppostandhttpfetchcanpreformacalltoanapi_Handler_C4853DBD" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c88947b5", - "WING_TARGET": "tf-aws", - "WING_TOKEN_TFTOKEN_TOKEN_8": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" - } - }, - "function_name": "Handler-c88947b5", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testhttppostandhttpfetchcanpreformacalltoanapi_Handler_IamRole_364748FC.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testhttppostandhttpfetchcanpreformacalltoanapi_Handler_S3Object_BEC67279.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } } }, "aws_lambda_permission": { @@ -294,17 +235,6 @@ module.exports = function({ $api_url, $body, $http_HttpMethod, $http_Util, $std_ "bucket": "${aws_s3_bucket.Code.bucket}", "key": "", "source": "" - }, - "testhttppostandhttpfetchcanpreformacalltoanapi_Handler_S3Object_BEC67279": { - "//": { - "metadata": { - "path": "root/Default/Default/test:http.post and http.fetch can preform a call to an api/Handler/S3Object", - "uniqueId": "testhttppostandhttpfetchcanpreformacalltoanapi_Handler_S3Object_BEC67279" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" } } } diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/put.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/put.w_compile_tf-aws.md index 6aa19413204..39a28a468d8 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/put.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/api/put.w_compile_tf-aws.md @@ -86,7 +86,7 @@ module.exports = function({ $_id, $api_url, $body, $http_HttpMethod, $http_Util, }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:http.put and http.fetch can preform a call to an api\",\"${aws_lambda_function.testhttpputandhttpfetchcanpreformacalltoanapi_Handler_2B7157C1.arn}\"]]" + "value": "[]" } }, "provider": { @@ -146,15 +146,6 @@ module.exports = function({ $_id, $api_url, $body, $http_HttpMethod, $http_Util, } }, "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testhttpputandhttpfetchcanpreformacalltoanapi_Handler_IamRole_4C35EBED": { - "//": { - "metadata": { - "path": "root/Default/Default/test:http.put and http.fetch can preform a call to an api/Handler/IamRole", - "uniqueId": "testhttpputandhttpfetchcanpreformacalltoanapi_Handler_IamRole_4C35EBED" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" } }, "aws_iam_role_policy": { @@ -167,16 +158,6 @@ module.exports = function({ $_id, $api_url, $body, $http_HttpMethod, $http_Util, }, "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.name}" - }, - "testhttpputandhttpfetchcanpreformacalltoanapi_Handler_IamRolePolicy_D35A09FD": { - "//": { - "metadata": { - "path": "root/Default/Default/test:http.put and http.fetch can preform a call to an api/Handler/IamRolePolicy", - "uniqueId": "testhttpputandhttpfetchcanpreformacalltoanapi_Handler_IamRolePolicy_D35A09FD" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testhttpputandhttpfetchcanpreformacalltoanapi_Handler_IamRole_4C35EBED.name}" } }, "aws_iam_role_policy_attachment": { @@ -189,16 +170,6 @@ module.exports = function({ $_id, $api_url, $body, $http_HttpMethod, $http_Util, }, "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.name}" - }, - "testhttpputandhttpfetchcanpreformacalltoanapi_Handler_IamRolePolicyAttachment_DEDD4EEB": { - "//": { - "metadata": { - "path": "root/Default/Default/test:http.put and http.fetch can preform a call to an api/Handler/IamRolePolicyAttachment", - "uniqueId": "testhttpputandhttpfetchcanpreformacalltoanapi_Handler_IamRolePolicyAttachment_DEDD4EEB" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testhttpputandhttpfetchcanpreformacalltoanapi_Handler_IamRole_4C35EBED.name}" } }, "aws_lambda_function": { @@ -230,36 +201,6 @@ module.exports = function({ $_id, $api_url, $body, $http_HttpMethod, $http_Util, "security_group_ids": [], "subnet_ids": [] } - }, - "testhttpputandhttpfetchcanpreformacalltoanapi_Handler_2B7157C1": { - "//": { - "metadata": { - "path": "root/Default/Default/test:http.put and http.fetch can preform a call to an api/Handler/Default", - "uniqueId": "testhttpputandhttpfetchcanpreformacalltoanapi_Handler_2B7157C1" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8e4b12f", - "WING_TARGET": "tf-aws", - "WING_TOKEN_TFTOKEN_TOKEN_8": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" - } - }, - "function_name": "Handler-c8e4b12f", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testhttpputandhttpfetchcanpreformacalltoanapi_Handler_IamRole_4C35EBED.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testhttpputandhttpfetchcanpreformacalltoanapi_Handler_S3Object_8E1D5390.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } } }, "aws_lambda_permission": { @@ -299,17 +240,6 @@ module.exports = function({ $_id, $api_url, $body, $http_HttpMethod, $http_Util, "bucket": "${aws_s3_bucket.Code.bucket}", "key": "", "source": "" - }, - "testhttpputandhttpfetchcanpreformacalltoanapi_Handler_S3Object_8E1D5390": { - "//": { - "metadata": { - "path": "root/Default/Default/test:http.put and http.fetch can preform a call to an api/Handler/S3Object", - "uniqueId": "testhttpputandhttpfetchcanpreformacalltoanapi_Handler_S3Object_8E1D5390" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" } } } diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/add_file.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/add_file.w_compile_tf-aws.md index 2f25be6be3a..0c9f875365e 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/add_file.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/add_file.w_compile_tf-aws.md @@ -41,7 +41,7 @@ module.exports = function({ $b }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:addObject\",\"${aws_lambda_function.testaddObject_Handler_44ECC49C.arn}\"]]" + "value": "[]" } }, "provider": { @@ -50,83 +50,7 @@ module.exports = function({ $b }) { ] }, "resource": { - "aws_iam_role": { - "testaddObject_Handler_IamRole_1A9672A7": { - "//": { - "metadata": { - "path": "root/Default/Default/test:addObject/Handler/IamRole", - "uniqueId": "testaddObject_Handler_IamRole_1A9672A7" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testaddObject_Handler_IamRolePolicy_B5188189": { - "//": { - "metadata": { - "path": "root/Default/Default/test:addObject/Handler/IamRolePolicy", - "uniqueId": "testaddObject_Handler_IamRolePolicy_B5188189" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"s3:List*\",\"s3:GetObject*\",\"s3:GetBucket*\"],\"Resource\":[\"${aws_s3_bucket.cloudBucket.arn}\",\"${aws_s3_bucket.cloudBucket.arn}/*\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testaddObject_Handler_IamRole_1A9672A7.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testaddObject_Handler_IamRolePolicyAttachment_DB1EE647": { - "//": { - "metadata": { - "path": "root/Default/Default/test:addObject/Handler/IamRolePolicyAttachment", - "uniqueId": "testaddObject_Handler_IamRolePolicyAttachment_DB1EE647" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testaddObject_Handler_IamRole_1A9672A7.name}" - } - }, - "aws_lambda_function": { - "testaddObject_Handler_44ECC49C": { - "//": { - "metadata": { - "path": "root/Default/Default/test:addObject/Handler/Default", - "uniqueId": "testaddObject_Handler_44ECC49C" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", - "WING_FUNCTION_NAME": "Handler-c89ea41b", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c89ea41b", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testaddObject_Handler_IamRole_1A9672A7.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testaddObject_Handler_S3Object_88DEF745.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - }, "cloudBucket": { "//": { "metadata": { @@ -178,17 +102,6 @@ module.exports = function({ $b }) { "bucket": "${aws_s3_bucket.cloudBucket.bucket}", "content": "test2", "key": "file2.txt" - }, - "testaddObject_Handler_S3Object_88DEF745": { - "//": { - "metadata": { - "path": "root/Default/Default/test:addObject/Handler/S3Object", - "uniqueId": "testaddObject_Handler_S3Object_88DEF745" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" } } } diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/add_object.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/add_object.w_compile_tf-aws.md index 7b87297508a..765164b56fa 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/add_object.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/add_object.w_compile_tf-aws.md @@ -41,7 +41,7 @@ module.exports = function({ $b, $jsonObj1, $std_Json }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:addObject\",\"${aws_lambda_function.testaddObject_Handler_44ECC49C.arn}\"]]" + "value": "[]" } }, "provider": { @@ -50,83 +50,7 @@ module.exports = function({ $b, $jsonObj1, $std_Json }) { ] }, "resource": { - "aws_iam_role": { - "testaddObject_Handler_IamRole_1A9672A7": { - "//": { - "metadata": { - "path": "root/Default/Default/test:addObject/Handler/IamRole", - "uniqueId": "testaddObject_Handler_IamRole_1A9672A7" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testaddObject_Handler_IamRolePolicy_B5188189": { - "//": { - "metadata": { - "path": "root/Default/Default/test:addObject/Handler/IamRolePolicy", - "uniqueId": "testaddObject_Handler_IamRolePolicy_B5188189" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"s3:List*\",\"s3:GetObject*\",\"s3:GetBucket*\"],\"Resource\":[\"${aws_s3_bucket.cloudBucket.arn}\",\"${aws_s3_bucket.cloudBucket.arn}/*\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testaddObject_Handler_IamRole_1A9672A7.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testaddObject_Handler_IamRolePolicyAttachment_DB1EE647": { - "//": { - "metadata": { - "path": "root/Default/Default/test:addObject/Handler/IamRolePolicyAttachment", - "uniqueId": "testaddObject_Handler_IamRolePolicyAttachment_DB1EE647" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testaddObject_Handler_IamRole_1A9672A7.name}" - } - }, - "aws_lambda_function": { - "testaddObject_Handler_44ECC49C": { - "//": { - "metadata": { - "path": "root/Default/Default/test:addObject/Handler/Default", - "uniqueId": "testaddObject_Handler_44ECC49C" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", - "WING_FUNCTION_NAME": "Handler-c89ea41b", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c89ea41b", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testaddObject_Handler_IamRole_1A9672A7.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testaddObject_Handler_S3Object_88DEF745.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - }, "cloudBucket": { "//": { "metadata": { @@ -178,17 +102,6 @@ module.exports = function({ $b, $jsonObj1, $std_Json }) { "bucket": "${aws_s3_bucket.cloudBucket.bucket}", "content": "Bar", "key": "file2.txt" - }, - "testaddObject_Handler_S3Object_88DEF745": { - "//": { - "metadata": { - "path": "root/Default/Default/test:addObject/Handler/S3Object", - "uniqueId": "testaddObject_Handler_S3Object_88DEF745" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" } } } diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/bucket_list.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/bucket_list.w_compile_tf-aws.md index d906f742bf5..8169ea801d0 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/bucket_list.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/bucket_list.w_compile_tf-aws.md @@ -55,7 +55,7 @@ module.exports = function({ $b }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:list\",\"${aws_lambda_function.testlist_Handler_58856559.arn}\"]]" + "value": "[]" } }, "provider": { @@ -64,83 +64,7 @@ module.exports = function({ $b }) { ] }, "resource": { - "aws_iam_role": { - "testlist_Handler_IamRole_1E7E84A8": { - "//": { - "metadata": { - "path": "root/Default/Default/test:list/Handler/IamRole", - "uniqueId": "testlist_Handler_IamRole_1E7E84A8" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testlist_Handler_IamRolePolicy_7EFE6464": { - "//": { - "metadata": { - "path": "root/Default/Default/test:list/Handler/IamRolePolicy", - "uniqueId": "testlist_Handler_IamRolePolicy_7EFE6464" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"s3:List*\",\"s3:PutObject*\",\"s3:Abort*\",\"s3:GetObject*\",\"s3:GetBucket*\"],\"Resource\":[\"${aws_s3_bucket.cloudBucket.arn}\",\"${aws_s3_bucket.cloudBucket.arn}/*\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testlist_Handler_IamRole_1E7E84A8.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testlist_Handler_IamRolePolicyAttachment_913EEFDF": { - "//": { - "metadata": { - "path": "root/Default/Default/test:list/Handler/IamRolePolicyAttachment", - "uniqueId": "testlist_Handler_IamRolePolicyAttachment_913EEFDF" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testlist_Handler_IamRole_1E7E84A8.name}" - } - }, - "aws_lambda_function": { - "testlist_Handler_58856559": { - "//": { - "metadata": { - "path": "root/Default/Default/test:list/Handler/Default", - "uniqueId": "testlist_Handler_58856559" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", - "WING_FUNCTION_NAME": "Handler-c8867143", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8867143", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testlist_Handler_IamRole_1E7E84A8.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testlist_Handler_S3Object_8A6D3046.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - }, "cloudBucket": { "//": { "metadata": { @@ -181,17 +105,6 @@ module.exports = function({ $b }) { "bucket": "${aws_s3_bucket.cloudBucket.bucket}", "content": "Baz", "key": "file3.txt" - }, - "testlist_Handler_S3Object_8A6D3046": { - "//": { - "metadata": { - "path": "root/Default/Default/test:list/Handler/S3Object", - "uniqueId": "testlist_Handler_S3Object_8A6D3046" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" } } } diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/delete.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/delete.w_compile_tf-aws.md index 7c6c567f64b..8b2d062e39e 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/delete.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/delete.w_compile_tf-aws.md @@ -65,7 +65,7 @@ module.exports = function({ $b }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:delete\",\"${aws_lambda_function.testdelete_Handler_3DFCE06A.arn}\"]]" + "value": "[]" } }, "provider": { @@ -74,83 +74,7 @@ module.exports = function({ $b }) { ] }, "resource": { - "aws_iam_role": { - "testdelete_Handler_IamRole_0B29F48A": { - "//": { - "metadata": { - "path": "root/Default/Default/test:delete/Handler/IamRole", - "uniqueId": "testdelete_Handler_IamRole_0B29F48A" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testdelete_Handler_IamRolePolicy_D6FF0B67": { - "//": { - "metadata": { - "path": "root/Default/Default/test:delete/Handler/IamRolePolicy", - "uniqueId": "testdelete_Handler_IamRolePolicy_D6FF0B67" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"s3:List*\",\"s3:PutObject*\",\"s3:Abort*\",\"s3:GetObject*\",\"s3:GetBucket*\",\"s3:DeleteObject*\",\"s3:DeleteObjectVersion*\",\"s3:PutLifecycleConfiguration*\"],\"Resource\":[\"${aws_s3_bucket.cloudBucket.arn}\",\"${aws_s3_bucket.cloudBucket.arn}/*\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testdelete_Handler_IamRole_0B29F48A.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testdelete_Handler_IamRolePolicyAttachment_F5BB5ED1": { - "//": { - "metadata": { - "path": "root/Default/Default/test:delete/Handler/IamRolePolicyAttachment", - "uniqueId": "testdelete_Handler_IamRolePolicyAttachment_F5BB5ED1" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testdelete_Handler_IamRole_0B29F48A.name}" - } - }, - "aws_lambda_function": { - "testdelete_Handler_3DFCE06A": { - "//": { - "metadata": { - "path": "root/Default/Default/test:delete/Handler/Default", - "uniqueId": "testdelete_Handler_3DFCE06A" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", - "WING_FUNCTION_NAME": "Handler-c8edf1bd", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8edf1bd", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testdelete_Handler_IamRole_0B29F48A.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testdelete_Handler_S3Object_3216CE50.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - }, "cloudBucket": { "//": { "metadata": { @@ -191,17 +115,6 @@ module.exports = function({ $b }) { "bucket": "${aws_s3_bucket.cloudBucket.bucket}", "content": "Bar", "key": "file2.txt" - }, - "testdelete_Handler_S3Object_3216CE50": { - "//": { - "metadata": { - "path": "root/Default/Default/test:delete/Handler/S3Object", - "uniqueId": "testdelete_Handler_S3Object_3216CE50" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" } } } diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/events.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/events.w_compile_tf-aws.md index a112394970e..ae3c8af12e9 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/events.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/events.w_compile_tf-aws.md @@ -235,7 +235,7 @@ module.exports = function({ $Source, $b, $checkHitCount, $util_Util, $wait }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/hitCount is incremented according to the bucket event\",\"${aws_lambda_function.hitCountisincrementedaccordingtothebucketevent_Handler_29DEB1F6.arn}\"]]" + "value": "[]" } }, "provider": { @@ -334,15 +334,6 @@ module.exports = function({ $Source, $b, $checkHitCount, $util_Util, $wait }) { } }, "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "hitCountisincrementedaccordingtothebucketevent_Handler_IamRole_AF1E4A64": { - "//": { - "metadata": { - "path": "root/Default/Default/hitCount is incremented according to the bucket event/Handler/IamRole", - "uniqueId": "hitCountisincrementedaccordingtothebucketevent_Handler_IamRole_AF1E4A64" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" } }, "aws_iam_role_policy": { @@ -405,16 +396,6 @@ module.exports = function({ $Source, $b, $checkHitCount, $util_Util, $wait }) { }, "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"dynamodb:UpdateItem\"],\"Resource\":[\"${aws_dynamodb_table.cloudCounter.arn}\"],\"Effect\":\"Allow\"},{\"Action\":[\"dynamodb:PutItem\"],\"Resource\":[\"${aws_dynamodb_table.exTable.arn}\"],\"Effect\":\"Allow\"}]}", "role": "${aws_iam_role.cloudBucket_cloudBucket-onupdate-OnMessage-ff1f5e53_IamRole_0503E83B.name}" - }, - "hitCountisincrementedaccordingtothebucketevent_Handler_IamRolePolicy_678D6495": { - "//": { - "metadata": { - "path": "root/Default/Default/hitCount is incremented according to the bucket event/Handler/IamRolePolicy", - "uniqueId": "hitCountisincrementedaccordingtothebucketevent_Handler_IamRolePolicy_678D6495" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"s3:PutObject*\",\"s3:Abort*\",\"s3:DeleteObject*\",\"s3:DeleteObjectVersion*\",\"s3:PutLifecycleConfiguration*\"],\"Resource\":[\"${aws_s3_bucket.cloudBucket.arn}\",\"${aws_s3_bucket.cloudBucket.arn}/*\"],\"Effect\":\"Allow\"},{\"Action\":[\"dynamodb:Scan\"],\"Resource\":[\"${aws_dynamodb_table.exTable.arn}\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.hitCountisincrementedaccordingtothebucketevent_Handler_IamRole_AF1E4A64.name}" } }, "aws_iam_role_policy_attachment": { @@ -477,16 +458,6 @@ module.exports = function({ $Source, $b, $checkHitCount, $util_Util, $wait }) { }, "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", "role": "${aws_iam_role.cloudBucket_cloudBucket-onupdate-OnMessage-ff1f5e53_IamRole_0503E83B.name}" - }, - "hitCountisincrementedaccordingtothebucketevent_Handler_IamRolePolicyAttachment_A3DD9377": { - "//": { - "metadata": { - "path": "root/Default/Default/hitCount is incremented according to the bucket event/Handler/IamRolePolicyAttachment", - "uniqueId": "hitCountisincrementedaccordingtothebucketevent_Handler_IamRolePolicyAttachment_A3DD9377" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.hitCountisincrementedaccordingtothebucketevent_Handler_IamRole_AF1E4A64.name}" } }, "aws_lambda_function": { @@ -687,39 +658,6 @@ module.exports = function({ $Source, $b, $checkHitCount, $util_Util, $wait }) { "security_group_ids": [], "subnet_ids": [] } - }, - "hitCountisincrementedaccordingtothebucketevent_Handler_29DEB1F6": { - "//": { - "metadata": { - "path": "root/Default/Default/hitCount is incremented according to the bucket event/Handler/Default", - "uniqueId": "hitCountisincrementedaccordingtothebucketevent_Handler_29DEB1F6" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", - "DYNAMODB_TABLE_NAME_d5d44f18": "${aws_dynamodb_table.exTable.name}", - "DYNAMODB_TABLE_NAME_d5d44f18_COLUMNS": "{\"_id\":0,\"key\":0,\"operation\":0,\"source\":0}", - "DYNAMODB_TABLE_NAME_d5d44f18_PRIMARY_KEY": "_id", - "WING_FUNCTION_NAME": "Handler-c88204a7", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c88204a7", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.hitCountisincrementedaccordingtothebucketevent_Handler_IamRole_AF1E4A64.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.hitCountisincrementedaccordingtothebucketevent_Handler_S3Object_B1A3036B.key}", - "timeout": 480, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } } }, "aws_lambda_permission": { @@ -940,17 +878,6 @@ module.exports = function({ $Source, $b, $checkHitCount, $util_Util, $wait }) { "bucket": "${aws_s3_bucket.Code.bucket}", "key": "", "source": "" - }, - "hitCountisincrementedaccordingtothebucketevent_Handler_S3Object_B1A3036B": { - "//": { - "metadata": { - "path": "root/Default/Default/hitCount is incremented according to the bucket event/Handler/S3Object", - "uniqueId": "hitCountisincrementedaccordingtothebucketevent_Handler_S3Object_B1A3036B" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" } }, "aws_sns_topic": { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/exists.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/exists.w_compile_tf-aws.md index 170de2dde04..511c2eece06 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/exists.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/exists.w_compile_tf-aws.md @@ -45,7 +45,7 @@ module.exports = function({ $b }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:exists\",\"${aws_lambda_function.testexists_Handler_D37905B7.arn}\"]]" + "value": "[]" } }, "provider": { @@ -54,83 +54,7 @@ module.exports = function({ $b }) { ] }, "resource": { - "aws_iam_role": { - "testexists_Handler_IamRole_4F58045B": { - "//": { - "metadata": { - "path": "root/Default/Default/test:exists/Handler/IamRole", - "uniqueId": "testexists_Handler_IamRole_4F58045B" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testexists_Handler_IamRolePolicy_46744240": { - "//": { - "metadata": { - "path": "root/Default/Default/test:exists/Handler/IamRolePolicy", - "uniqueId": "testexists_Handler_IamRolePolicy_46744240" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"s3:List*\",\"s3:PutObject*\",\"s3:Abort*\",\"s3:GetObject*\",\"s3:GetBucket*\",\"s3:DeleteObject*\",\"s3:DeleteObjectVersion*\",\"s3:PutLifecycleConfiguration*\"],\"Resource\":[\"${aws_s3_bucket.cloudBucket.arn}\",\"${aws_s3_bucket.cloudBucket.arn}/*\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testexists_Handler_IamRole_4F58045B.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testexists_Handler_IamRolePolicyAttachment_9CA2A3C0": { - "//": { - "metadata": { - "path": "root/Default/Default/test:exists/Handler/IamRolePolicyAttachment", - "uniqueId": "testexists_Handler_IamRolePolicyAttachment_9CA2A3C0" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testexists_Handler_IamRole_4F58045B.name}" - } - }, - "aws_lambda_function": { - "testexists_Handler_D37905B7": { - "//": { - "metadata": { - "path": "root/Default/Default/test:exists/Handler/Default", - "uniqueId": "testexists_Handler_D37905B7" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", - "WING_FUNCTION_NAME": "Handler-c823e891", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c823e891", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testexists_Handler_IamRole_4F58045B.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testexists_Handler_S3Object_C4A6EC16.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - }, "cloudBucket": { "//": { "metadata": { @@ -159,19 +83,6 @@ module.exports = function({ $b }) { } ] } - }, - "aws_s3_object": { - "testexists_Handler_S3Object_C4A6EC16": { - "//": { - "metadata": { - "path": "root/Default/Default/test:exists/Handler/S3Object", - "uniqueId": "testexists_Handler_S3Object_C4A6EC16" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } } } } diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/public_url.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/public_url.w_compile_tf-aws.md index 71130c23f21..89398c4d1a8 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/public_url.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/public_url.w_compile_tf-aws.md @@ -63,7 +63,7 @@ module.exports = function({ $http_Util, $privateBucket, $publicBucket, $util_Uti }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:publicUrl\",\"${aws_lambda_function.testpublicUrl_Handler_E965919F.arn}\"]]" + "value": "[]" } }, "provider": { @@ -72,84 +72,7 @@ module.exports = function({ $http_Util, $privateBucket, $publicBucket, $util_Uti ] }, "resource": { - "aws_iam_role": { - "testpublicUrl_Handler_IamRole_9C38B5EF": { - "//": { - "metadata": { - "path": "root/Default/Default/test:publicUrl/Handler/IamRole", - "uniqueId": "testpublicUrl_Handler_IamRole_9C38B5EF" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testpublicUrl_Handler_IamRolePolicy_5664CCF6": { - "//": { - "metadata": { - "path": "root/Default/Default/test:publicUrl/Handler/IamRolePolicy", - "uniqueId": "testpublicUrl_Handler_IamRolePolicy_5664CCF6" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"s3:List*\",\"s3:PutObject*\",\"s3:Abort*\",\"s3:GetObject*\",\"s3:GetBucket*\",\"s3:GetBucketPublicAccessBlock\"],\"Resource\":[\"${aws_s3_bucket.publicBucket.arn}\",\"${aws_s3_bucket.publicBucket.arn}/*\"],\"Effect\":\"Allow\"},{\"Action\":[\"s3:List*\",\"s3:PutObject*\",\"s3:Abort*\",\"s3:GetObject*\",\"s3:GetBucket*\",\"s3:GetBucketPublicAccessBlock\"],\"Resource\":[\"${aws_s3_bucket.privateBucket.arn}\",\"${aws_s3_bucket.privateBucket.arn}/*\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testpublicUrl_Handler_IamRole_9C38B5EF.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testpublicUrl_Handler_IamRolePolicyAttachment_8E7665CA": { - "//": { - "metadata": { - "path": "root/Default/Default/test:publicUrl/Handler/IamRolePolicyAttachment", - "uniqueId": "testpublicUrl_Handler_IamRolePolicyAttachment_8E7665CA" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testpublicUrl_Handler_IamRole_9C38B5EF.name}" - } - }, - "aws_lambda_function": { - "testpublicUrl_Handler_E965919F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:publicUrl/Handler/Default", - "uniqueId": "testpublicUrl_Handler_E965919F" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "BUCKET_NAME_7c320eda": "${aws_s3_bucket.publicBucket.bucket}", - "BUCKET_NAME_e82f6088": "${aws_s3_bucket.privateBucket.bucket}", - "WING_FUNCTION_NAME": "Handler-c849898f", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c849898f", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testpublicUrl_Handler_IamRole_9C38B5EF.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testpublicUrl_Handler_S3Object_CF3B31A2.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - }, "privateBucket": { "//": { "metadata": { @@ -234,19 +157,6 @@ module.exports = function({ $http_Util, $privateBucket, $publicBucket, $util_Uti } ] } - }, - "aws_s3_object": { - "testpublicUrl_Handler_S3Object_CF3B31A2": { - "//": { - "metadata": { - "path": "root/Default/Default/test:publicUrl/Handler/S3Object", - "uniqueId": "testpublicUrl_Handler_S3Object_CF3B31A2" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } } } } diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/put.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/put.w_compile_tf-aws.md index 915fa071bbb..cedac1fadd5 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/put.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/put.w_compile_tf-aws.md @@ -51,7 +51,7 @@ module.exports = function({ $b }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:put\",\"${aws_lambda_function.testput_Handler_724F92D5.arn}\"]]" + "value": "[]" } }, "provider": { @@ -60,83 +60,7 @@ module.exports = function({ $b }) { ] }, "resource": { - "aws_iam_role": { - "testput_Handler_IamRole_0914AA2F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:put/Handler/IamRole", - "uniqueId": "testput_Handler_IamRole_0914AA2F" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testput_Handler_IamRolePolicy_CB5C72C0": { - "//": { - "metadata": { - "path": "root/Default/Default/test:put/Handler/IamRolePolicy", - "uniqueId": "testput_Handler_IamRolePolicy_CB5C72C0" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"s3:List*\",\"s3:PutObject*\",\"s3:Abort*\",\"s3:GetObject*\",\"s3:GetBucket*\",\"s3:DeleteObject*\",\"s3:DeleteObjectVersion*\",\"s3:PutLifecycleConfiguration*\"],\"Resource\":[\"${aws_s3_bucket.cloudBucket.arn}\",\"${aws_s3_bucket.cloudBucket.arn}/*\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testput_Handler_IamRole_0914AA2F.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testput_Handler_IamRolePolicyAttachment_B3A1DDC2": { - "//": { - "metadata": { - "path": "root/Default/Default/test:put/Handler/IamRolePolicyAttachment", - "uniqueId": "testput_Handler_IamRolePolicyAttachment_B3A1DDC2" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testput_Handler_IamRole_0914AA2F.name}" - } - }, - "aws_lambda_function": { - "testput_Handler_724F92D5": { - "//": { - "metadata": { - "path": "root/Default/Default/test:put/Handler/Default", - "uniqueId": "testput_Handler_724F92D5" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", - "WING_FUNCTION_NAME": "Handler-c8a253bd", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8a253bd", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testput_Handler_IamRole_0914AA2F.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testput_Handler_S3Object_920402A2.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - }, "cloudBucket": { "//": { "metadata": { @@ -165,19 +89,6 @@ module.exports = function({ $b }) { } ] } - }, - "aws_s3_object": { - "testput_Handler_S3Object_920402A2": { - "//": { - "metadata": { - "path": "root/Default/Default/test:put/Handler/S3Object", - "uniqueId": "testput_Handler_S3Object_920402A2" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } } } } diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/put_json.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/put_json.w_compile_tf-aws.md index 9348600b7cd..fb39193b089 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/put_json.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/put_json.w_compile_tf-aws.md @@ -54,7 +54,7 @@ module.exports = function({ $b }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:putJson\",\"${aws_lambda_function.testputJson_Handler_08BF437F.arn}\"]]" + "value": "[]" } }, "provider": { @@ -63,83 +63,7 @@ module.exports = function({ $b }) { ] }, "resource": { - "aws_iam_role": { - "testputJson_Handler_IamRole_B9675271": { - "//": { - "metadata": { - "path": "root/Default/Default/test:putJson/Handler/IamRole", - "uniqueId": "testputJson_Handler_IamRole_B9675271" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testputJson_Handler_IamRolePolicy_0B757023": { - "//": { - "metadata": { - "path": "root/Default/Default/test:putJson/Handler/IamRolePolicy", - "uniqueId": "testputJson_Handler_IamRolePolicy_0B757023" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"s3:List*\",\"s3:PutObject*\",\"s3:Abort*\",\"s3:GetObject*\",\"s3:GetBucket*\",\"s3:DeleteObject*\",\"s3:DeleteObjectVersion*\",\"s3:PutLifecycleConfiguration*\"],\"Resource\":[\"${aws_s3_bucket.cloudBucket.arn}\",\"${aws_s3_bucket.cloudBucket.arn}/*\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testputJson_Handler_IamRole_B9675271.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testputJson_Handler_IamRolePolicyAttachment_B9EC2D2D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:putJson/Handler/IamRolePolicyAttachment", - "uniqueId": "testputJson_Handler_IamRolePolicyAttachment_B9EC2D2D" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testputJson_Handler_IamRole_B9675271.name}" - } - }, - "aws_lambda_function": { - "testputJson_Handler_08BF437F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:putJson/Handler/Default", - "uniqueId": "testputJson_Handler_08BF437F" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", - "WING_FUNCTION_NAME": "Handler-c8cf1c6a", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8cf1c6a", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testputJson_Handler_IamRole_B9675271.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testputJson_Handler_S3Object_37173600.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - }, "cloudBucket": { "//": { "metadata": { @@ -168,19 +92,6 @@ module.exports = function({ $b }) { } ] } - }, - "aws_s3_object": { - "testputJson_Handler_S3Object_37173600": { - "//": { - "metadata": { - "path": "root/Default/Default/test:putJson/Handler/S3Object", - "uniqueId": "testputJson_Handler_S3Object_37173600" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } } } } diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/try_delete.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/try_delete.w_compile_tf-aws.md index 5203cbfa670..05f8725711a 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/try_delete.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/try_delete.w_compile_tf-aws.md @@ -49,7 +49,7 @@ module.exports = function({ $b }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:tryDelete\",\"${aws_lambda_function.testtryDelete_Handler_C4052A94.arn}\"]]" + "value": "[]" } }, "provider": { @@ -58,83 +58,7 @@ module.exports = function({ $b }) { ] }, "resource": { - "aws_iam_role": { - "testtryDelete_Handler_IamRole_9139123D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:tryDelete/Handler/IamRole", - "uniqueId": "testtryDelete_Handler_IamRole_9139123D" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testtryDelete_Handler_IamRolePolicy_1DEE72C3": { - "//": { - "metadata": { - "path": "root/Default/Default/test:tryDelete/Handler/IamRolePolicy", - "uniqueId": "testtryDelete_Handler_IamRolePolicy_1DEE72C3" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"s3:List*\",\"s3:PutObject*\",\"s3:Abort*\",\"s3:GetObject*\",\"s3:GetBucket*\",\"s3:DeleteObject*\",\"s3:DeleteObjectVersion*\",\"s3:PutLifecycleConfiguration*\"],\"Resource\":[\"${aws_s3_bucket.cloudBucket.arn}\",\"${aws_s3_bucket.cloudBucket.arn}/*\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testtryDelete_Handler_IamRole_9139123D.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testtryDelete_Handler_IamRolePolicyAttachment_A43F0399": { - "//": { - "metadata": { - "path": "root/Default/Default/test:tryDelete/Handler/IamRolePolicyAttachment", - "uniqueId": "testtryDelete_Handler_IamRolePolicyAttachment_A43F0399" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testtryDelete_Handler_IamRole_9139123D.name}" - } - }, - "aws_lambda_function": { - "testtryDelete_Handler_C4052A94": { - "//": { - "metadata": { - "path": "root/Default/Default/test:tryDelete/Handler/Default", - "uniqueId": "testtryDelete_Handler_C4052A94" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", - "WING_FUNCTION_NAME": "Handler-c85151e8", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c85151e8", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testtryDelete_Handler_IamRole_9139123D.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testtryDelete_Handler_S3Object_DD0AB5F1.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - }, "cloudBucket": { "//": { "metadata": { @@ -163,19 +87,6 @@ module.exports = function({ $b }) { } ] } - }, - "aws_s3_object": { - "testtryDelete_Handler_S3Object_DD0AB5F1": { - "//": { - "metadata": { - "path": "root/Default/Default/test:tryDelete/Handler/S3Object", - "uniqueId": "testtryDelete_Handler_S3Object_DD0AB5F1" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } } } } diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/try_get.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/try_get.w_compile_tf-aws.md index 6f626cffd2d..6507a66d80f 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/try_get.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/try_get.w_compile_tf-aws.md @@ -45,7 +45,7 @@ module.exports = function({ $b }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:tryGet\",\"${aws_lambda_function.testtryGet_Handler_EE8DDBD9.arn}\"]]" + "value": "[]" } }, "provider": { @@ -54,83 +54,7 @@ module.exports = function({ $b }) { ] }, "resource": { - "aws_iam_role": { - "testtryGet_Handler_IamRole_04D8F7C5": { - "//": { - "metadata": { - "path": "root/Default/Default/test:tryGet/Handler/IamRole", - "uniqueId": "testtryGet_Handler_IamRole_04D8F7C5" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testtryGet_Handler_IamRolePolicy_23F604C9": { - "//": { - "metadata": { - "path": "root/Default/Default/test:tryGet/Handler/IamRolePolicy", - "uniqueId": "testtryGet_Handler_IamRolePolicy_23F604C9" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"s3:List*\",\"s3:PutObject*\",\"s3:Abort*\",\"s3:GetObject*\",\"s3:GetBucket*\",\"s3:DeleteObject*\",\"s3:DeleteObjectVersion*\",\"s3:PutLifecycleConfiguration*\"],\"Resource\":[\"${aws_s3_bucket.cloudBucket.arn}\",\"${aws_s3_bucket.cloudBucket.arn}/*\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testtryGet_Handler_IamRole_04D8F7C5.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testtryGet_Handler_IamRolePolicyAttachment_025C3AD6": { - "//": { - "metadata": { - "path": "root/Default/Default/test:tryGet/Handler/IamRolePolicyAttachment", - "uniqueId": "testtryGet_Handler_IamRolePolicyAttachment_025C3AD6" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testtryGet_Handler_IamRole_04D8F7C5.name}" - } - }, - "aws_lambda_function": { - "testtryGet_Handler_EE8DDBD9": { - "//": { - "metadata": { - "path": "root/Default/Default/test:tryGet/Handler/Default", - "uniqueId": "testtryGet_Handler_EE8DDBD9" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", - "WING_FUNCTION_NAME": "Handler-c85da482", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c85da482", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testtryGet_Handler_IamRole_04D8F7C5.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testtryGet_Handler_S3Object_2C3F6849.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - }, "cloudBucket": { "//": { "metadata": { @@ -159,19 +83,6 @@ module.exports = function({ $b }) { } ] } - }, - "aws_s3_object": { - "testtryGet_Handler_S3Object_2C3F6849": { - "//": { - "metadata": { - "path": "root/Default/Default/test:tryGet/Handler/S3Object", - "uniqueId": "testtryGet_Handler_S3Object_2C3F6849" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } } } } diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/try_get_json.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/try_get_json.w_compile_tf-aws.md index baef5267885..7629bb40b7b 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/try_get_json.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/bucket/try_get_json.w_compile_tf-aws.md @@ -49,7 +49,7 @@ module.exports = function({ $b, $std_Json }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:tryGetJson\",\"${aws_lambda_function.testtryGetJson_Handler_A244DB7C.arn}\"]]" + "value": "[]" } }, "provider": { @@ -58,83 +58,7 @@ module.exports = function({ $b, $std_Json }) { ] }, "resource": { - "aws_iam_role": { - "testtryGetJson_Handler_IamRole_AA5E00E8": { - "//": { - "metadata": { - "path": "root/Default/Default/test:tryGetJson/Handler/IamRole", - "uniqueId": "testtryGetJson_Handler_IamRole_AA5E00E8" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testtryGetJson_Handler_IamRolePolicy_061A4068": { - "//": { - "metadata": { - "path": "root/Default/Default/test:tryGetJson/Handler/IamRolePolicy", - "uniqueId": "testtryGetJson_Handler_IamRolePolicy_061A4068" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"s3:List*\",\"s3:PutObject*\",\"s3:Abort*\",\"s3:GetObject*\",\"s3:GetBucket*\",\"s3:DeleteObject*\",\"s3:DeleteObjectVersion*\",\"s3:PutLifecycleConfiguration*\"],\"Resource\":[\"${aws_s3_bucket.cloudBucket.arn}\",\"${aws_s3_bucket.cloudBucket.arn}/*\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testtryGetJson_Handler_IamRole_AA5E00E8.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testtryGetJson_Handler_IamRolePolicyAttachment_4FC81A05": { - "//": { - "metadata": { - "path": "root/Default/Default/test:tryGetJson/Handler/IamRolePolicyAttachment", - "uniqueId": "testtryGetJson_Handler_IamRolePolicyAttachment_4FC81A05" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testtryGetJson_Handler_IamRole_AA5E00E8.name}" - } - }, - "aws_lambda_function": { - "testtryGetJson_Handler_A244DB7C": { - "//": { - "metadata": { - "path": "root/Default/Default/test:tryGetJson/Handler/Default", - "uniqueId": "testtryGetJson_Handler_A244DB7C" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", - "WING_FUNCTION_NAME": "Handler-c8858898", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8858898", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testtryGetJson_Handler_IamRole_AA5E00E8.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testtryGetJson_Handler_S3Object_A843B277.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - }, "cloudBucket": { "//": { "metadata": { @@ -163,19 +87,6 @@ module.exports = function({ $b, $std_Json }) { } ] } - }, - "aws_s3_object": { - "testtryGetJson_Handler_S3Object_A843B277": { - "//": { - "metadata": { - "path": "root/Default/Default/test:tryGetJson/Handler/S3Object", - "uniqueId": "testtryGetJson_Handler_S3Object_A843B277" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } } } } diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/dec.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/dec.w_compile_tf-aws.md index f3563d53649..6f292a105fd 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/dec.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/dec.w_compile_tf-aws.md @@ -70,7 +70,7 @@ module.exports = function({ $counter }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:dec\",\"${aws_lambda_function.testdec_Handler_BE7C58D4.arn}\"],[\"root/Default/Default/test:key dec\",\"${aws_lambda_function.testkeydec_Handler_4A8C3A6B.arn}\"]]" + "value": "[]" } }, "provider": { @@ -97,167 +97,6 @@ module.exports = function({ $counter }) { "hash_key": "id", "name": "wing-counter-cloud.Counter-c866f225" } - }, - "aws_iam_role": { - "testdec_Handler_IamRole_C9D0FD1F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:dec/Handler/IamRole", - "uniqueId": "testdec_Handler_IamRole_C9D0FD1F" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testkeydec_Handler_IamRole_593F2293": { - "//": { - "metadata": { - "path": "root/Default/Default/test:key dec/Handler/IamRole", - "uniqueId": "testkeydec_Handler_IamRole_593F2293" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testdec_Handler_IamRolePolicy_4212B76A": { - "//": { - "metadata": { - "path": "root/Default/Default/test:dec/Handler/IamRolePolicy", - "uniqueId": "testdec_Handler_IamRolePolicy_4212B76A" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"dynamodb:UpdateItem\"],\"Resource\":[\"${aws_dynamodb_table.cloudCounter.arn}\"],\"Effect\":\"Allow\"},{\"Action\":[\"dynamodb:GetItem\"],\"Resource\":[\"${aws_dynamodb_table.cloudCounter.arn}\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testdec_Handler_IamRole_C9D0FD1F.name}" - }, - "testkeydec_Handler_IamRolePolicy_B81B16D6": { - "//": { - "metadata": { - "path": "root/Default/Default/test:key dec/Handler/IamRolePolicy", - "uniqueId": "testkeydec_Handler_IamRolePolicy_B81B16D6" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"dynamodb:UpdateItem\"],\"Resource\":[\"${aws_dynamodb_table.cloudCounter.arn}\"],\"Effect\":\"Allow\"},{\"Action\":[\"dynamodb:GetItem\"],\"Resource\":[\"${aws_dynamodb_table.cloudCounter.arn}\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testkeydec_Handler_IamRole_593F2293.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testdec_Handler_IamRolePolicyAttachment_3904F3E7": { - "//": { - "metadata": { - "path": "root/Default/Default/test:dec/Handler/IamRolePolicyAttachment", - "uniqueId": "testdec_Handler_IamRolePolicyAttachment_3904F3E7" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testdec_Handler_IamRole_C9D0FD1F.name}" - }, - "testkeydec_Handler_IamRolePolicyAttachment_DEBB09D6": { - "//": { - "metadata": { - "path": "root/Default/Default/test:key dec/Handler/IamRolePolicyAttachment", - "uniqueId": "testkeydec_Handler_IamRolePolicyAttachment_DEBB09D6" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testkeydec_Handler_IamRole_593F2293.name}" - } - }, - "aws_lambda_function": { - "testdec_Handler_BE7C58D4": { - "//": { - "metadata": { - "path": "root/Default/Default/test:dec/Handler/Default", - "uniqueId": "testdec_Handler_BE7C58D4" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", - "WING_FUNCTION_NAME": "Handler-c8daa879", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8daa879", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testdec_Handler_IamRole_C9D0FD1F.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testdec_Handler_S3Object_3C960783.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testkeydec_Handler_4A8C3A6B": { - "//": { - "metadata": { - "path": "root/Default/Default/test:key dec/Handler/Default", - "uniqueId": "testkeydec_Handler_4A8C3A6B" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", - "WING_FUNCTION_NAME": "Handler-c8a42d0e", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8a42d0e", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testkeydec_Handler_IamRole_593F2293.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testkeydec_Handler_S3Object_EF48CE0E.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testdec_Handler_S3Object_3C960783": { - "//": { - "metadata": { - "path": "root/Default/Default/test:dec/Handler/S3Object", - "uniqueId": "testdec_Handler_S3Object_3C960783" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testkeydec_Handler_S3Object_EF48CE0E": { - "//": { - "metadata": { - "path": "root/Default/Default/test:key dec/Handler/S3Object", - "uniqueId": "testkeydec_Handler_S3Object_EF48CE0E" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } } } } diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/inc.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/inc.w_compile_tf-aws.md index 88cb1755f10..6141fd1258f 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/inc.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/inc.w_compile_tf-aws.md @@ -80,7 +80,7 @@ module.exports = function({ $counter }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:inc\",\"${aws_lambda_function.testinc_Handler_5C48B863.arn}\"],[\"root/Default/Default/test:key inc\",\"${aws_lambda_function.testkeyinc_Handler_15600574.arn}\"]]" + "value": "[]" } }, "provider": { @@ -107,167 +107,6 @@ module.exports = function({ $counter }) { "hash_key": "id", "name": "wing-counter-cloud.Counter-c866f225" } - }, - "aws_iam_role": { - "testinc_Handler_IamRole_3AAB9B32": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inc/Handler/IamRole", - "uniqueId": "testinc_Handler_IamRole_3AAB9B32" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testkeyinc_Handler_IamRole_13A4B666": { - "//": { - "metadata": { - "path": "root/Default/Default/test:key inc/Handler/IamRole", - "uniqueId": "testkeyinc_Handler_IamRole_13A4B666" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testinc_Handler_IamRolePolicy_8B469F7E": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inc/Handler/IamRolePolicy", - "uniqueId": "testinc_Handler_IamRolePolicy_8B469F7E" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"dynamodb:UpdateItem\"],\"Resource\":[\"${aws_dynamodb_table.cloudCounter.arn}\"],\"Effect\":\"Allow\"},{\"Action\":[\"dynamodb:GetItem\"],\"Resource\":[\"${aws_dynamodb_table.cloudCounter.arn}\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testinc_Handler_IamRole_3AAB9B32.name}" - }, - "testkeyinc_Handler_IamRolePolicy_FC9413B6": { - "//": { - "metadata": { - "path": "root/Default/Default/test:key inc/Handler/IamRolePolicy", - "uniqueId": "testkeyinc_Handler_IamRolePolicy_FC9413B6" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"dynamodb:UpdateItem\"],\"Resource\":[\"${aws_dynamodb_table.cloudCounter.arn}\"],\"Effect\":\"Allow\"},{\"Action\":[\"dynamodb:GetItem\"],\"Resource\":[\"${aws_dynamodb_table.cloudCounter.arn}\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testkeyinc_Handler_IamRole_13A4B666.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testinc_Handler_IamRolePolicyAttachment_0B0CDAE1": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inc/Handler/IamRolePolicyAttachment", - "uniqueId": "testinc_Handler_IamRolePolicyAttachment_0B0CDAE1" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinc_Handler_IamRole_3AAB9B32.name}" - }, - "testkeyinc_Handler_IamRolePolicyAttachment_7E0AFF36": { - "//": { - "metadata": { - "path": "root/Default/Default/test:key inc/Handler/IamRolePolicyAttachment", - "uniqueId": "testkeyinc_Handler_IamRolePolicyAttachment_7E0AFF36" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testkeyinc_Handler_IamRole_13A4B666.name}" - } - }, - "aws_lambda_function": { - "testinc_Handler_5C48B863": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inc/Handler/Default", - "uniqueId": "testinc_Handler_5C48B863" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", - "WING_FUNCTION_NAME": "Handler-c8ddbb5a", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8ddbb5a", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinc_Handler_IamRole_3AAB9B32.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinc_Handler_S3Object_111FAB39.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testkeyinc_Handler_15600574": { - "//": { - "metadata": { - "path": "root/Default/Default/test:key inc/Handler/Default", - "uniqueId": "testkeyinc_Handler_15600574" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", - "WING_FUNCTION_NAME": "Handler-c87f92b5", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c87f92b5", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testkeyinc_Handler_IamRole_13A4B666.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testkeyinc_Handler_S3Object_A4437850.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testinc_Handler_S3Object_111FAB39": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inc/Handler/S3Object", - "uniqueId": "testinc_Handler_S3Object_111FAB39" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testkeyinc_Handler_S3Object_A4437850": { - "//": { - "metadata": { - "path": "root/Default/Default/test:key inc/Handler/S3Object", - "uniqueId": "testkeyinc_Handler_S3Object_A4437850" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } } } } diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/initial.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/initial.w_compile_tf-aws.md index f9e15fec18c..98c2dc1ebb9 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/initial.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/initial.w_compile_tf-aws.md @@ -75,7 +75,7 @@ module.exports = function({ $counterC }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:initial:default\",\"${aws_lambda_function.testinitialdefault_Handler_CE963B96.arn}\"],[\"root/Default/Default/test:initial:positive-value\",\"${aws_lambda_function.testinitialpositive-value_Handler_473ACDB1.arn}\"],[\"root/Default/Default/test:initial:negative-value\",\"${aws_lambda_function.testinitialnegative-value_Handler_C5E9E480.arn}\"]]" + "value": "[]" } }, "provider": { @@ -136,237 +136,6 @@ module.exports = function({ $counterC }) { "hash_key": "id", "name": "wing-counter-counterC-c83ab8ef" } - }, - "aws_iam_role": { - "testinitialdefault_Handler_IamRole_17A8E87E": { - "//": { - "metadata": { - "path": "root/Default/Default/test:initial:default/Handler/IamRole", - "uniqueId": "testinitialdefault_Handler_IamRole_17A8E87E" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testinitialnegative-value_Handler_IamRole_ABB74877": { - "//": { - "metadata": { - "path": "root/Default/Default/test:initial:negative-value/Handler/IamRole", - "uniqueId": "testinitialnegative-value_Handler_IamRole_ABB74877" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testinitialpositive-value_Handler_IamRole_C4B67BEC": { - "//": { - "metadata": { - "path": "root/Default/Default/test:initial:positive-value/Handler/IamRole", - "uniqueId": "testinitialpositive-value_Handler_IamRole_C4B67BEC" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testinitialdefault_Handler_IamRolePolicy_D5C46C98": { - "//": { - "metadata": { - "path": "root/Default/Default/test:initial:default/Handler/IamRolePolicy", - "uniqueId": "testinitialdefault_Handler_IamRolePolicy_D5C46C98" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"dynamodb:GetItem\"],\"Resource\":[\"${aws_dynamodb_table.counterA.arn}\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testinitialdefault_Handler_IamRole_17A8E87E.name}" - }, - "testinitialnegative-value_Handler_IamRolePolicy_18C99321": { - "//": { - "metadata": { - "path": "root/Default/Default/test:initial:negative-value/Handler/IamRolePolicy", - "uniqueId": "testinitialnegative-value_Handler_IamRolePolicy_18C99321" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"dynamodb:GetItem\"],\"Resource\":[\"${aws_dynamodb_table.counterC.arn}\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testinitialnegative-value_Handler_IamRole_ABB74877.name}" - }, - "testinitialpositive-value_Handler_IamRolePolicy_B8E28D3D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:initial:positive-value/Handler/IamRolePolicy", - "uniqueId": "testinitialpositive-value_Handler_IamRolePolicy_B8E28D3D" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"dynamodb:GetItem\"],\"Resource\":[\"${aws_dynamodb_table.counterB.arn}\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testinitialpositive-value_Handler_IamRole_C4B67BEC.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testinitialdefault_Handler_IamRolePolicyAttachment_2901029D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:initial:default/Handler/IamRolePolicyAttachment", - "uniqueId": "testinitialdefault_Handler_IamRolePolicyAttachment_2901029D" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinitialdefault_Handler_IamRole_17A8E87E.name}" - }, - "testinitialnegative-value_Handler_IamRolePolicyAttachment_11314DB1": { - "//": { - "metadata": { - "path": "root/Default/Default/test:initial:negative-value/Handler/IamRolePolicyAttachment", - "uniqueId": "testinitialnegative-value_Handler_IamRolePolicyAttachment_11314DB1" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinitialnegative-value_Handler_IamRole_ABB74877.name}" - }, - "testinitialpositive-value_Handler_IamRolePolicyAttachment_5834A2E4": { - "//": { - "metadata": { - "path": "root/Default/Default/test:initial:positive-value/Handler/IamRolePolicyAttachment", - "uniqueId": "testinitialpositive-value_Handler_IamRolePolicyAttachment_5834A2E4" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinitialpositive-value_Handler_IamRole_C4B67BEC.name}" - } - }, - "aws_lambda_function": { - "testinitialdefault_Handler_CE963B96": { - "//": { - "metadata": { - "path": "root/Default/Default/test:initial:default/Handler/Default", - "uniqueId": "testinitialdefault_Handler_CE963B96" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "DYNAMODB_TABLE_NAME_220d28dd": "${aws_dynamodb_table.counterA.name}", - "WING_FUNCTION_NAME": "Handler-c88a038b", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c88a038b", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinitialdefault_Handler_IamRole_17A8E87E.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinitialdefault_Handler_S3Object_905C4002.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testinitialnegative-value_Handler_C5E9E480": { - "//": { - "metadata": { - "path": "root/Default/Default/test:initial:negative-value/Handler/Default", - "uniqueId": "testinitialnegative-value_Handler_C5E9E480" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "DYNAMODB_TABLE_NAME_4795370d": "${aws_dynamodb_table.counterC.name}", - "WING_FUNCTION_NAME": "Handler-c88178b6", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c88178b6", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinitialnegative-value_Handler_IamRole_ABB74877.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinitialnegative-value_Handler_S3Object_02526CAC.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testinitialpositive-value_Handler_473ACDB1": { - "//": { - "metadata": { - "path": "root/Default/Default/test:initial:positive-value/Handler/Default", - "uniqueId": "testinitialpositive-value_Handler_473ACDB1" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "DYNAMODB_TABLE_NAME_96df6c3c": "${aws_dynamodb_table.counterB.name}", - "WING_FUNCTION_NAME": "Handler-c835d39a", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c835d39a", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinitialpositive-value_Handler_IamRole_C4B67BEC.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinitialpositive-value_Handler_S3Object_B6747816.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testinitialdefault_Handler_S3Object_905C4002": { - "//": { - "metadata": { - "path": "root/Default/Default/test:initial:default/Handler/S3Object", - "uniqueId": "testinitialdefault_Handler_S3Object_905C4002" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testinitialnegative-value_Handler_S3Object_02526CAC": { - "//": { - "metadata": { - "path": "root/Default/Default/test:initial:negative-value/Handler/S3Object", - "uniqueId": "testinitialnegative-value_Handler_S3Object_02526CAC" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testinitialpositive-value_Handler_S3Object_B6747816": { - "//": { - "metadata": { - "path": "root/Default/Default/test:initial:positive-value/Handler/S3Object", - "uniqueId": "testinitialpositive-value_Handler_S3Object_B6747816" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } } } } diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/peek.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/peek.w_compile_tf-aws.md index f16ceb4e84f..6056364abd4 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/peek.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/peek.w_compile_tf-aws.md @@ -64,7 +64,7 @@ module.exports = function({ $c }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:peek\",\"${aws_lambda_function.testpeek_Handler_70E78480.arn}\"],[\"root/Default/Default/test:key peek\",\"${aws_lambda_function.testkeypeek_Handler_03F3EFDE.arn}\"]]" + "value": "[]" } }, "provider": { @@ -91,167 +91,6 @@ module.exports = function({ $c }) { "hash_key": "id", "name": "wing-counter-cloud.Counter-c866f225" } - }, - "aws_iam_role": { - "testkeypeek_Handler_IamRole_FD05C484": { - "//": { - "metadata": { - "path": "root/Default/Default/test:key peek/Handler/IamRole", - "uniqueId": "testkeypeek_Handler_IamRole_FD05C484" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testpeek_Handler_IamRole_25D42825": { - "//": { - "metadata": { - "path": "root/Default/Default/test:peek/Handler/IamRole", - "uniqueId": "testpeek_Handler_IamRole_25D42825" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testkeypeek_Handler_IamRolePolicy_C3B6AC0B": { - "//": { - "metadata": { - "path": "root/Default/Default/test:key peek/Handler/IamRolePolicy", - "uniqueId": "testkeypeek_Handler_IamRolePolicy_C3B6AC0B" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"dynamodb:UpdateItem\"],\"Resource\":[\"${aws_dynamodb_table.cloudCounter.arn}\"],\"Effect\":\"Allow\"},{\"Action\":[\"dynamodb:GetItem\"],\"Resource\":[\"${aws_dynamodb_table.cloudCounter.arn}\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testkeypeek_Handler_IamRole_FD05C484.name}" - }, - "testpeek_Handler_IamRolePolicy_DBD6D786": { - "//": { - "metadata": { - "path": "root/Default/Default/test:peek/Handler/IamRolePolicy", - "uniqueId": "testpeek_Handler_IamRolePolicy_DBD6D786" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"dynamodb:UpdateItem\"],\"Resource\":[\"${aws_dynamodb_table.cloudCounter.arn}\"],\"Effect\":\"Allow\"},{\"Action\":[\"dynamodb:GetItem\"],\"Resource\":[\"${aws_dynamodb_table.cloudCounter.arn}\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testpeek_Handler_IamRole_25D42825.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testkeypeek_Handler_IamRolePolicyAttachment_D3726FF9": { - "//": { - "metadata": { - "path": "root/Default/Default/test:key peek/Handler/IamRolePolicyAttachment", - "uniqueId": "testkeypeek_Handler_IamRolePolicyAttachment_D3726FF9" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testkeypeek_Handler_IamRole_FD05C484.name}" - }, - "testpeek_Handler_IamRolePolicyAttachment_8A891B50": { - "//": { - "metadata": { - "path": "root/Default/Default/test:peek/Handler/IamRolePolicyAttachment", - "uniqueId": "testpeek_Handler_IamRolePolicyAttachment_8A891B50" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testpeek_Handler_IamRole_25D42825.name}" - } - }, - "aws_lambda_function": { - "testkeypeek_Handler_03F3EFDE": { - "//": { - "metadata": { - "path": "root/Default/Default/test:key peek/Handler/Default", - "uniqueId": "testkeypeek_Handler_03F3EFDE" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", - "WING_FUNCTION_NAME": "Handler-c8197eb3", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8197eb3", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testkeypeek_Handler_IamRole_FD05C484.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testkeypeek_Handler_S3Object_A6C1E1BA.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testpeek_Handler_70E78480": { - "//": { - "metadata": { - "path": "root/Default/Default/test:peek/Handler/Default", - "uniqueId": "testpeek_Handler_70E78480" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", - "WING_FUNCTION_NAME": "Handler-c846323d", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c846323d", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testpeek_Handler_IamRole_25D42825.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testpeek_Handler_S3Object_1C8453A0.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testkeypeek_Handler_S3Object_A6C1E1BA": { - "//": { - "metadata": { - "path": "root/Default/Default/test:key peek/Handler/S3Object", - "uniqueId": "testkeypeek_Handler_S3Object_A6C1E1BA" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testpeek_Handler_S3Object_1C8453A0": { - "//": { - "metadata": { - "path": "root/Default/Default/test:peek/Handler/S3Object", - "uniqueId": "testpeek_Handler_S3Object_1C8453A0" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } } } } diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/set.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/set.w_compile_tf-aws.md index b9749f2f97b..5d62494a205 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/set.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/counter/set.w_compile_tf-aws.md @@ -74,7 +74,7 @@ module.exports = function({ $counter }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:set\",\"${aws_lambda_function.testset_Handler_62442DF2.arn}\"],[\"root/Default/Default/test:key set\",\"${aws_lambda_function.testkeyset_Handler_33945E34.arn}\"]]" + "value": "[]" } }, "provider": { @@ -101,167 +101,6 @@ module.exports = function({ $counter }) { "hash_key": "id", "name": "wing-counter-cloud.Counter-c866f225" } - }, - "aws_iam_role": { - "testkeyset_Handler_IamRole_649B2F6E": { - "//": { - "metadata": { - "path": "root/Default/Default/test:key set/Handler/IamRole", - "uniqueId": "testkeyset_Handler_IamRole_649B2F6E" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testset_Handler_IamRole_D0AA7310": { - "//": { - "metadata": { - "path": "root/Default/Default/test:set/Handler/IamRole", - "uniqueId": "testset_Handler_IamRole_D0AA7310" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testkeyset_Handler_IamRolePolicy_66D89336": { - "//": { - "metadata": { - "path": "root/Default/Default/test:key set/Handler/IamRolePolicy", - "uniqueId": "testkeyset_Handler_IamRolePolicy_66D89336" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"dynamodb:UpdateItem\"],\"Resource\":[\"${aws_dynamodb_table.cloudCounter.arn}\"],\"Effect\":\"Allow\"},{\"Action\":[\"dynamodb:GetItem\"],\"Resource\":[\"${aws_dynamodb_table.cloudCounter.arn}\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testkeyset_Handler_IamRole_649B2F6E.name}" - }, - "testset_Handler_IamRolePolicy_1DDA6703": { - "//": { - "metadata": { - "path": "root/Default/Default/test:set/Handler/IamRolePolicy", - "uniqueId": "testset_Handler_IamRolePolicy_1DDA6703" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"dynamodb:UpdateItem\"],\"Resource\":[\"${aws_dynamodb_table.cloudCounter.arn}\"],\"Effect\":\"Allow\"},{\"Action\":[\"dynamodb:GetItem\"],\"Resource\":[\"${aws_dynamodb_table.cloudCounter.arn}\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testset_Handler_IamRole_D0AA7310.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testkeyset_Handler_IamRolePolicyAttachment_118A0C8A": { - "//": { - "metadata": { - "path": "root/Default/Default/test:key set/Handler/IamRolePolicyAttachment", - "uniqueId": "testkeyset_Handler_IamRolePolicyAttachment_118A0C8A" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testkeyset_Handler_IamRole_649B2F6E.name}" - }, - "testset_Handler_IamRolePolicyAttachment_B0CA7B44": { - "//": { - "metadata": { - "path": "root/Default/Default/test:set/Handler/IamRolePolicyAttachment", - "uniqueId": "testset_Handler_IamRolePolicyAttachment_B0CA7B44" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testset_Handler_IamRole_D0AA7310.name}" - } - }, - "aws_lambda_function": { - "testkeyset_Handler_33945E34": { - "//": { - "metadata": { - "path": "root/Default/Default/test:key set/Handler/Default", - "uniqueId": "testkeyset_Handler_33945E34" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", - "WING_FUNCTION_NAME": "Handler-c87cc733", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c87cc733", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testkeyset_Handler_IamRole_649B2F6E.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testkeyset_Handler_S3Object_35E53A93.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testset_Handler_62442DF2": { - "//": { - "metadata": { - "path": "root/Default/Default/test:set/Handler/Default", - "uniqueId": "testset_Handler_62442DF2" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", - "WING_FUNCTION_NAME": "Handler-c80adb7b", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c80adb7b", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testset_Handler_IamRole_D0AA7310.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testset_Handler_S3Object_92D7E655.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testkeyset_Handler_S3Object_35E53A93": { - "//": { - "metadata": { - "path": "root/Default/Default/test:key set/Handler/S3Object", - "uniqueId": "testkeyset_Handler_S3Object_35E53A93" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testset_Handler_S3Object_92D7E655": { - "//": { - "metadata": { - "path": "root/Default/Default/test:set/Handler/S3Object", - "uniqueId": "testset_Handler_S3Object_92D7E655" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } } } } diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/function/invoke.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/function/invoke.w_compile_tf-aws.md index d00fb21423f..e9d1148ddcb 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/function/invoke.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/function/invoke.w_compile_tf-aws.md @@ -62,7 +62,7 @@ module.exports = function({ $f }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:invoke\",\"${aws_lambda_function.testinvoke_Handler_A47C4946.arn}\"]]" + "value": "[]" } }, "provider": { @@ -80,15 +80,6 @@ module.exports = function({ $f }) { } }, "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testinvoke_Handler_IamRole_08022A25": { - "//": { - "metadata": { - "path": "root/Default/Default/test:invoke/Handler/IamRole", - "uniqueId": "testinvoke_Handler_IamRole_08022A25" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" } }, "aws_iam_role_policy": { @@ -101,16 +92,6 @@ module.exports = function({ $f }) { }, "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", "role": "${aws_iam_role.cloudFunction_IamRole_5A4430DC.name}" - }, - "testinvoke_Handler_IamRolePolicy_D174EE99": { - "//": { - "metadata": { - "path": "root/Default/Default/test:invoke/Handler/IamRolePolicy", - "uniqueId": "testinvoke_Handler_IamRolePolicy_D174EE99" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"lambda:InvokeFunction\"],\"Resource\":[\"${aws_lambda_function.cloudFunction.arn}\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testinvoke_Handler_IamRole_08022A25.name}" } }, "aws_iam_role_policy_attachment": { @@ -123,16 +104,6 @@ module.exports = function({ $f }) { }, "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", "role": "${aws_iam_role.cloudFunction_IamRole_5A4430DC.name}" - }, - "testinvoke_Handler_IamRolePolicyAttachment_C9F537DD": { - "//": { - "metadata": { - "path": "root/Default/Default/test:invoke/Handler/IamRolePolicyAttachment", - "uniqueId": "testinvoke_Handler_IamRolePolicyAttachment_C9F537DD" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinvoke_Handler_IamRole_08022A25.name}" } }, "aws_lambda_function": { @@ -164,36 +135,6 @@ module.exports = function({ $f }) { "security_group_ids": [], "subnet_ids": [] } - }, - "testinvoke_Handler_A47C4946": { - "//": { - "metadata": { - "path": "root/Default/Default/test:invoke/Handler/Default", - "uniqueId": "testinvoke_Handler_A47C4946" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "FUNCTION_NAME_5bb84dfa": "${aws_lambda_function.cloudFunction.arn}", - "WING_FUNCTION_NAME": "Handler-c8031175", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8031175", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinvoke_Handler_IamRole_08022A25.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinvoke_Handler_S3Object_ED59B66F.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } } }, "aws_s3_bucket": { @@ -218,17 +159,6 @@ module.exports = function({ $f }) { "bucket": "${aws_s3_bucket.Code.bucket}", "key": "", "source": "" - }, - "testinvoke_Handler_S3Object_ED59B66F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:invoke/Handler/S3Object", - "uniqueId": "testinvoke_Handler_S3Object_ED59B66F" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" } } } diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/function/logging.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/function/logging.w_compile_tf-aws.md index 256dd8654b3..5168cfa83d5 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/function/logging.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/function/logging.w_compile_tf-aws.md @@ -95,7 +95,7 @@ module.exports = function({ }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:logging\",\"${aws_lambda_function.testlogging_Handler_2002EF98.arn}\"]]" + "value": "[]" } }, "provider": { @@ -122,15 +122,6 @@ module.exports = function({ }) { } }, "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testlogging_Handler_IamRole_68ABF7AD": { - "//": { - "metadata": { - "path": "root/Default/Default/test:logging/Handler/IamRole", - "uniqueId": "testlogging_Handler_IamRole_68ABF7AD" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" } }, "aws_iam_role_policy": { @@ -153,16 +144,6 @@ module.exports = function({ }) { }, "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"lambda:InvokeFunction\"],\"Resource\":[\"${aws_lambda_function.f1.arn}\"],\"Effect\":\"Allow\"}]}", "role": "${aws_iam_role.f2_IamRole_B66911B2.name}" - }, - "testlogging_Handler_IamRolePolicy_8CFCB9C2": { - "//": { - "metadata": { - "path": "root/Default/Default/test:logging/Handler/IamRolePolicy", - "uniqueId": "testlogging_Handler_IamRolePolicy_8CFCB9C2" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"lambda:InvokeFunction\"],\"Resource\":[\"${aws_lambda_function.f2.arn}\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testlogging_Handler_IamRole_68ABF7AD.name}" } }, "aws_iam_role_policy_attachment": { @@ -185,16 +166,6 @@ module.exports = function({ }) { }, "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", "role": "${aws_iam_role.f2_IamRole_B66911B2.name}" - }, - "testlogging_Handler_IamRolePolicyAttachment_9E5DEC2E": { - "//": { - "metadata": { - "path": "root/Default/Default/test:logging/Handler/IamRolePolicyAttachment", - "uniqueId": "testlogging_Handler_IamRolePolicyAttachment_9E5DEC2E" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testlogging_Handler_IamRole_68ABF7AD.name}" } }, "aws_lambda_function": { @@ -256,36 +227,6 @@ module.exports = function({ }) { "security_group_ids": [], "subnet_ids": [] } - }, - "testlogging_Handler_2002EF98": { - "//": { - "metadata": { - "path": "root/Default/Default/test:logging/Handler/Default", - "uniqueId": "testlogging_Handler_2002EF98" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "FUNCTION_NAME_0300817a": "${aws_lambda_function.f2.arn}", - "WING_FUNCTION_NAME": "Handler-c886ec8e", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c886ec8e", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testlogging_Handler_IamRole_68ABF7AD.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testlogging_Handler_S3Object_335C77BA.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } } }, "aws_s3_bucket": { @@ -321,17 +262,6 @@ module.exports = function({ }) { "bucket": "${aws_s3_bucket.Code.bucket}", "key": "", "source": "" - }, - "testlogging_Handler_S3Object_335C77BA": { - "//": { - "metadata": { - "path": "root/Default/Default/test:logging/Handler/S3Object", - "uniqueId": "testlogging_Handler_S3Object_335C77BA" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" } } } diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/function/memory_and_env.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/function/memory_and_env.w_compile_tf-aws.md index 3093cc37e9f..63625dc81b9 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/function/memory_and_env.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/function/memory_and_env.w_compile_tf-aws.md @@ -80,7 +80,7 @@ module.exports = function({ $c, $f1, $f2 }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:function with memory and function with env can be invoked\",\"${aws_lambda_function.testfunctionwithmemoryandfunctionwithenvcanbeinvoked_Handler_BE0A518F.arn}\"]]" + "value": "[]" } }, "provider": { @@ -126,15 +126,6 @@ module.exports = function({ $c, $f1, $f2 }) { } }, "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testfunctionwithmemoryandfunctionwithenvcanbeinvoked_Handler_IamRole_8471F020": { - "//": { - "metadata": { - "path": "root/Default/Default/test:function with memory and function with env can be invoked/Handler/IamRole", - "uniqueId": "testfunctionwithmemoryandfunctionwithenvcanbeinvoked_Handler_IamRole_8471F020" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" } }, "aws_iam_role_policy": { @@ -157,16 +148,6 @@ module.exports = function({ $c, $f1, $f2 }) { }, "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"dynamodb:UpdateItem\"],\"Resource\":[\"${aws_dynamodb_table.cloudCounter.arn}\"],\"Effect\":\"Allow\"}]}", "role": "${aws_iam_role.memoryfn_IamRole_87751238.name}" - }, - "testfunctionwithmemoryandfunctionwithenvcanbeinvoked_Handler_IamRolePolicy_8C973050": { - "//": { - "metadata": { - "path": "root/Default/Default/test:function with memory and function with env can be invoked/Handler/IamRolePolicy", - "uniqueId": "testfunctionwithmemoryandfunctionwithenvcanbeinvoked_Handler_IamRolePolicy_8C973050" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"dynamodb:GetItem\"],\"Resource\":[\"${aws_dynamodb_table.cloudCounter.arn}\"],\"Effect\":\"Allow\"},{\"Action\":[\"lambda:InvokeFunction\"],\"Resource\":[\"${aws_lambda_function.memoryfn.arn}\"],\"Effect\":\"Allow\"},{\"Action\":[\"lambda:InvokeFunction\"],\"Resource\":[\"${aws_lambda_function.envfn.arn}\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testfunctionwithmemoryandfunctionwithenvcanbeinvoked_Handler_IamRole_8471F020.name}" } }, "aws_iam_role_policy_attachment": { @@ -189,16 +170,6 @@ module.exports = function({ $c, $f1, $f2 }) { }, "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", "role": "${aws_iam_role.memoryfn_IamRole_87751238.name}" - }, - "testfunctionwithmemoryandfunctionwithenvcanbeinvoked_Handler_IamRolePolicyAttachment_82EEF7BB": { - "//": { - "metadata": { - "path": "root/Default/Default/test:function with memory and function with env can be invoked/Handler/IamRolePolicyAttachment", - "uniqueId": "testfunctionwithmemoryandfunctionwithenvcanbeinvoked_Handler_IamRolePolicyAttachment_82EEF7BB" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testfunctionwithmemoryandfunctionwithenvcanbeinvoked_Handler_IamRole_8471F020.name}" } }, "aws_lambda_function": { @@ -264,38 +235,6 @@ module.exports = function({ $c, $f1, $f2 }) { "security_group_ids": [], "subnet_ids": [] } - }, - "testfunctionwithmemoryandfunctionwithenvcanbeinvoked_Handler_BE0A518F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:function with memory and function with env can be invoked/Handler/Default", - "uniqueId": "testfunctionwithmemoryandfunctionwithenvcanbeinvoked_Handler_BE0A518F" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", - "FUNCTION_NAME_2d5b932f": "${aws_lambda_function.memoryfn.arn}", - "FUNCTION_NAME_d7a1b8c8": "${aws_lambda_function.envfn.arn}", - "WING_FUNCTION_NAME": "Handler-c8bf8232", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8bf8232", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testfunctionwithmemoryandfunctionwithenvcanbeinvoked_Handler_IamRole_8471F020.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testfunctionwithmemoryandfunctionwithenvcanbeinvoked_Handler_S3Object_8A751E03.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } } }, "aws_s3_bucket": { @@ -359,17 +298,6 @@ module.exports = function({ $c, $f1, $f2 }) { "bucket": "${aws_s3_bucket.Code.bucket}", "key": "", "source": "" - }, - "testfunctionwithmemoryandfunctionwithenvcanbeinvoked_Handler_S3Object_8A751E03": { - "//": { - "metadata": { - "path": "root/Default/Default/test:function with memory and function with env can be invoked/Handler/S3Object", - "uniqueId": "testfunctionwithmemoryandfunctionwithenvcanbeinvoked_Handler_S3Object_8A751E03" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" } } } diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/abs.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/abs.w_compile_tf-aws.md index 206383e974a..3f62c3934b9 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/abs.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/abs.w_compile_tf-aws.md @@ -40,105 +40,13 @@ module.exports = function({ $math_Util, $x, $y }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:inflight absolute\",\"${aws_lambda_function.testinflightabsolute_Handler_DB051761.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testinflightabsolute_Handler_IamRole_73FC0806": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight absolute/Handler/IamRole", - "uniqueId": "testinflightabsolute_Handler_IamRole_73FC0806" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testinflightabsolute_Handler_IamRolePolicy_6FD74632": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight absolute/Handler/IamRolePolicy", - "uniqueId": "testinflightabsolute_Handler_IamRolePolicy_6FD74632" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testinflightabsolute_Handler_IamRole_73FC0806.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testinflightabsolute_Handler_IamRolePolicyAttachment_C2286158": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight absolute/Handler/IamRolePolicyAttachment", - "uniqueId": "testinflightabsolute_Handler_IamRolePolicyAttachment_C2286158" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinflightabsolute_Handler_IamRole_73FC0806.name}" - } - }, - "aws_lambda_function": { - "testinflightabsolute_Handler_DB051761": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight absolute/Handler/Default", - "uniqueId": "testinflightabsolute_Handler_DB051761" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c84ad0c4", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c84ad0c4", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinflightabsolute_Handler_IamRole_73FC0806.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinflightabsolute_Handler_S3Object_B9AB2D8D.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testinflightabsolute_Handler_S3Object_B9AB2D8D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight absolute/Handler/S3Object", - "uniqueId": "testinflightabsolute_Handler_S3Object_B9AB2D8D" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/acos.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/acos.w_compile_tf-aws.md index 9eed3491138..35ebed96d5d 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/acos.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/acos.w_compile_tf-aws.md @@ -57,105 +57,13 @@ module.exports = function({ $math_Util }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:inflight arc cosine\",\"${aws_lambda_function.testinflightarccosine_Handler_506E61C9.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testinflightarccosine_Handler_IamRole_257E26AA": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight arc cosine/Handler/IamRole", - "uniqueId": "testinflightarccosine_Handler_IamRole_257E26AA" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testinflightarccosine_Handler_IamRolePolicy_EC4E3669": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight arc cosine/Handler/IamRolePolicy", - "uniqueId": "testinflightarccosine_Handler_IamRolePolicy_EC4E3669" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testinflightarccosine_Handler_IamRole_257E26AA.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testinflightarccosine_Handler_IamRolePolicyAttachment_B810E693": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight arc cosine/Handler/IamRolePolicyAttachment", - "uniqueId": "testinflightarccosine_Handler_IamRolePolicyAttachment_B810E693" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinflightarccosine_Handler_IamRole_257E26AA.name}" - } - }, - "aws_lambda_function": { - "testinflightarccosine_Handler_506E61C9": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight arc cosine/Handler/Default", - "uniqueId": "testinflightarccosine_Handler_506E61C9" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c853dd3e", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c853dd3e", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinflightarccosine_Handler_IamRole_257E26AA.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinflightarccosine_Handler_S3Object_5C3F35A1.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testinflightarccosine_Handler_S3Object_5C3F35A1": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight arc cosine/Handler/S3Object", - "uniqueId": "testinflightarccosine_Handler_S3Object_5C3F35A1" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/acot.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/acot.w_compile_tf-aws.md index 5a88cf64a65..0622360ee5b 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/acot.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/acot.w_compile_tf-aws.md @@ -43,105 +43,13 @@ module.exports = function({ $math_Util }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:inflight arc cotgent\",\"${aws_lambda_function.testinflightarccotgent_Handler_E7A125FF.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testinflightarccotgent_Handler_IamRole_5DBFD930": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight arc cotgent/Handler/IamRole", - "uniqueId": "testinflightarccotgent_Handler_IamRole_5DBFD930" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testinflightarccotgent_Handler_IamRolePolicy_BC8B89F2": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight arc cotgent/Handler/IamRolePolicy", - "uniqueId": "testinflightarccotgent_Handler_IamRolePolicy_BC8B89F2" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testinflightarccotgent_Handler_IamRole_5DBFD930.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testinflightarccotgent_Handler_IamRolePolicyAttachment_19D8D49F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight arc cotgent/Handler/IamRolePolicyAttachment", - "uniqueId": "testinflightarccotgent_Handler_IamRolePolicyAttachment_19D8D49F" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinflightarccotgent_Handler_IamRole_5DBFD930.name}" - } - }, - "aws_lambda_function": { - "testinflightarccotgent_Handler_E7A125FF": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight arc cotgent/Handler/Default", - "uniqueId": "testinflightarccotgent_Handler_E7A125FF" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8e6e1b8", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8e6e1b8", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinflightarccotgent_Handler_IamRole_5DBFD930.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinflightarccotgent_Handler_S3Object_2DFE3117.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testinflightarccotgent_Handler_S3Object_2DFE3117": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight arc cotgent/Handler/S3Object", - "uniqueId": "testinflightarccotgent_Handler_S3Object_2DFE3117" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/acsc.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/acsc.w_compile_tf-aws.md index b410c0d6ba4..5a2ee780bf1 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/acsc.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/acsc.w_compile_tf-aws.md @@ -50,105 +50,13 @@ module.exports = function({ $math_Util }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:inflight arc cosecant\",\"${aws_lambda_function.testinflightarccosecant_Handler_B1D46C37.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testinflightarccosecant_Handler_IamRole_63014DBB": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight arc cosecant/Handler/IamRole", - "uniqueId": "testinflightarccosecant_Handler_IamRole_63014DBB" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testinflightarccosecant_Handler_IamRolePolicy_B50BC665": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight arc cosecant/Handler/IamRolePolicy", - "uniqueId": "testinflightarccosecant_Handler_IamRolePolicy_B50BC665" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testinflightarccosecant_Handler_IamRole_63014DBB.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testinflightarccosecant_Handler_IamRolePolicyAttachment_5CC41860": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight arc cosecant/Handler/IamRolePolicyAttachment", - "uniqueId": "testinflightarccosecant_Handler_IamRolePolicyAttachment_5CC41860" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinflightarccosecant_Handler_IamRole_63014DBB.name}" - } - }, - "aws_lambda_function": { - "testinflightarccosecant_Handler_B1D46C37": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight arc cosecant/Handler/Default", - "uniqueId": "testinflightarccosecant_Handler_B1D46C37" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c850f94d", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c850f94d", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinflightarccosecant_Handler_IamRole_63014DBB.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinflightarccosecant_Handler_S3Object_1952C506.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testinflightarccosecant_Handler_S3Object_1952C506": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight arc cosecant/Handler/S3Object", - "uniqueId": "testinflightarccosecant_Handler_S3Object_1952C506" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/angular_conversion.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/angular_conversion.w_compile_tf-aws.md index 20f0bc6b0df..ce2cca605c0 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/angular_conversion.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/angular_conversion.w_compile_tf-aws.md @@ -50,105 +50,13 @@ module.exports = function({ $math_Util }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:inflight angular conversions\",\"${aws_lambda_function.testinflightangularconversions_Handler_70CD171D.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testinflightangularconversions_Handler_IamRole_AEAE2854": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight angular conversions/Handler/IamRole", - "uniqueId": "testinflightangularconversions_Handler_IamRole_AEAE2854" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testinflightangularconversions_Handler_IamRolePolicy_C649FC50": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight angular conversions/Handler/IamRolePolicy", - "uniqueId": "testinflightangularconversions_Handler_IamRolePolicy_C649FC50" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testinflightangularconversions_Handler_IamRole_AEAE2854.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testinflightangularconversions_Handler_IamRolePolicyAttachment_1DB6ACA8": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight angular conversions/Handler/IamRolePolicyAttachment", - "uniqueId": "testinflightangularconversions_Handler_IamRolePolicyAttachment_1DB6ACA8" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinflightangularconversions_Handler_IamRole_AEAE2854.name}" - } - }, - "aws_lambda_function": { - "testinflightangularconversions_Handler_70CD171D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight angular conversions/Handler/Default", - "uniqueId": "testinflightangularconversions_Handler_70CD171D" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c85ddda6", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c85ddda6", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinflightangularconversions_Handler_IamRole_AEAE2854.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinflightangularconversions_Handler_S3Object_87548D7C.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testinflightangularconversions_Handler_S3Object_87548D7C": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight angular conversions/Handler/S3Object", - "uniqueId": "testinflightangularconversions_Handler_S3Object_87548D7C" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/asec.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/asec.w_compile_tf-aws.md index 5906d10c699..627b93d5cc4 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/asec.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/asec.w_compile_tf-aws.md @@ -51,105 +51,13 @@ module.exports = function({ $math_Util }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:inflight arc cosecant\",\"${aws_lambda_function.testinflightarccosecant_Handler_B1D46C37.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testinflightarccosecant_Handler_IamRole_63014DBB": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight arc cosecant/Handler/IamRole", - "uniqueId": "testinflightarccosecant_Handler_IamRole_63014DBB" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testinflightarccosecant_Handler_IamRolePolicy_B50BC665": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight arc cosecant/Handler/IamRolePolicy", - "uniqueId": "testinflightarccosecant_Handler_IamRolePolicy_B50BC665" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testinflightarccosecant_Handler_IamRole_63014DBB.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testinflightarccosecant_Handler_IamRolePolicyAttachment_5CC41860": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight arc cosecant/Handler/IamRolePolicyAttachment", - "uniqueId": "testinflightarccosecant_Handler_IamRolePolicyAttachment_5CC41860" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinflightarccosecant_Handler_IamRole_63014DBB.name}" - } - }, - "aws_lambda_function": { - "testinflightarccosecant_Handler_B1D46C37": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight arc cosecant/Handler/Default", - "uniqueId": "testinflightarccosecant_Handler_B1D46C37" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c850f94d", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c850f94d", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinflightarccosecant_Handler_IamRole_63014DBB.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinflightarccosecant_Handler_S3Object_1952C506.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testinflightarccosecant_Handler_S3Object_1952C506": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight arc cosecant/Handler/S3Object", - "uniqueId": "testinflightarccosecant_Handler_S3Object_1952C506" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/asin.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/asin.w_compile_tf-aws.md index e5febf958ee..9404de0bd16 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/asin.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/asin.w_compile_tf-aws.md @@ -57,105 +57,13 @@ module.exports = function({ $math_Util }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:inflight arc sine\",\"${aws_lambda_function.testinflightarcsine_Handler_7B606063.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testinflightarcsine_Handler_IamRole_EBCCD81D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight arc sine/Handler/IamRole", - "uniqueId": "testinflightarcsine_Handler_IamRole_EBCCD81D" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testinflightarcsine_Handler_IamRolePolicy_58AE68F0": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight arc sine/Handler/IamRolePolicy", - "uniqueId": "testinflightarcsine_Handler_IamRolePolicy_58AE68F0" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testinflightarcsine_Handler_IamRole_EBCCD81D.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testinflightarcsine_Handler_IamRolePolicyAttachment_62A643BB": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight arc sine/Handler/IamRolePolicyAttachment", - "uniqueId": "testinflightarcsine_Handler_IamRolePolicyAttachment_62A643BB" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinflightarcsine_Handler_IamRole_EBCCD81D.name}" - } - }, - "aws_lambda_function": { - "testinflightarcsine_Handler_7B606063": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight arc sine/Handler/Default", - "uniqueId": "testinflightarcsine_Handler_7B606063" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8343dcd", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8343dcd", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinflightarcsine_Handler_IamRole_EBCCD81D.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinflightarcsine_Handler_S3Object_D9A3F771.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testinflightarcsine_Handler_S3Object_D9A3F771": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight arc sine/Handler/S3Object", - "uniqueId": "testinflightarcsine_Handler_S3Object_D9A3F771" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/atan.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/atan.w_compile_tf-aws.md index f160c15d462..207c29d2c40 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/atan.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/atan.w_compile_tf-aws.md @@ -42,105 +42,13 @@ module.exports = function({ $math_Util }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:inflight arc tangent\",\"${aws_lambda_function.testinflightarctangent_Handler_85128CD1.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testinflightarctangent_Handler_IamRole_6933EC6D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight arc tangent/Handler/IamRole", - "uniqueId": "testinflightarctangent_Handler_IamRole_6933EC6D" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testinflightarctangent_Handler_IamRolePolicy_3001687F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight arc tangent/Handler/IamRolePolicy", - "uniqueId": "testinflightarctangent_Handler_IamRolePolicy_3001687F" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testinflightarctangent_Handler_IamRole_6933EC6D.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testinflightarctangent_Handler_IamRolePolicyAttachment_EB5930CF": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight arc tangent/Handler/IamRolePolicyAttachment", - "uniqueId": "testinflightarctangent_Handler_IamRolePolicyAttachment_EB5930CF" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinflightarctangent_Handler_IamRole_6933EC6D.name}" - } - }, - "aws_lambda_function": { - "testinflightarctangent_Handler_85128CD1": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight arc tangent/Handler/Default", - "uniqueId": "testinflightarctangent_Handler_85128CD1" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8657687", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8657687", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinflightarctangent_Handler_IamRole_6933EC6D.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinflightarctangent_Handler_S3Object_29D83C27.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testinflightarctangent_Handler_S3Object_29D83C27": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight arc tangent/Handler/S3Object", - "uniqueId": "testinflightarctangent_Handler_S3Object_29D83C27" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/atan2.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/atan2.w_compile_tf-aws.md index 8c7f9fe803c..7430ed9c66f 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/atan2.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/atan2.w_compile_tf-aws.md @@ -45,105 +45,13 @@ module.exports = function({ $math_Util }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:inflight arc tangent 2\",\"${aws_lambda_function.testinflightarctangent2_Handler_412D0A11.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testinflightarctangent2_Handler_IamRole_A44E8A65": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight arc tangent 2/Handler/IamRole", - "uniqueId": "testinflightarctangent2_Handler_IamRole_A44E8A65" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testinflightarctangent2_Handler_IamRolePolicy_09C9F58C": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight arc tangent 2/Handler/IamRolePolicy", - "uniqueId": "testinflightarctangent2_Handler_IamRolePolicy_09C9F58C" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testinflightarctangent2_Handler_IamRole_A44E8A65.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testinflightarctangent2_Handler_IamRolePolicyAttachment_E30CFCB6": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight arc tangent 2/Handler/IamRolePolicyAttachment", - "uniqueId": "testinflightarctangent2_Handler_IamRolePolicyAttachment_E30CFCB6" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinflightarctangent2_Handler_IamRole_A44E8A65.name}" - } - }, - "aws_lambda_function": { - "testinflightarctangent2_Handler_412D0A11": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight arc tangent 2/Handler/Default", - "uniqueId": "testinflightarctangent2_Handler_412D0A11" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c88af4a6", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c88af4a6", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinflightarctangent2_Handler_IamRole_A44E8A65.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinflightarctangent2_Handler_S3Object_B9ED1582.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testinflightarctangent2_Handler_S3Object_B9ED1582": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight arc tangent 2/Handler/S3Object", - "uniqueId": "testinflightarctangent2_Handler_S3Object_B9ED1582" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/combinations.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/combinations.w_compile_tf-aws.md index ed1388d65dd..c12d164bba2 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/combinations.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/combinations.w_compile_tf-aws.md @@ -39,105 +39,13 @@ module.exports = function({ $math_Util, $population, $subset }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:inflight combinations\",\"${aws_lambda_function.testinflightcombinations_Handler_B89BE656.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testinflightcombinations_Handler_IamRole_26C977CF": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight combinations/Handler/IamRole", - "uniqueId": "testinflightcombinations_Handler_IamRole_26C977CF" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testinflightcombinations_Handler_IamRolePolicy_647AC836": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight combinations/Handler/IamRolePolicy", - "uniqueId": "testinflightcombinations_Handler_IamRolePolicy_647AC836" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testinflightcombinations_Handler_IamRole_26C977CF.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testinflightcombinations_Handler_IamRolePolicyAttachment_B8FEFA0D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight combinations/Handler/IamRolePolicyAttachment", - "uniqueId": "testinflightcombinations_Handler_IamRolePolicyAttachment_B8FEFA0D" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinflightcombinations_Handler_IamRole_26C977CF.name}" - } - }, - "aws_lambda_function": { - "testinflightcombinations_Handler_B89BE656": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight combinations/Handler/Default", - "uniqueId": "testinflightcombinations_Handler_B89BE656" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8a6ff13", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8a6ff13", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinflightcombinations_Handler_IamRole_26C977CF.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinflightcombinations_Handler_S3Object_A90E2DFD.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testinflightcombinations_Handler_S3Object_A90E2DFD": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight combinations/Handler/S3Object", - "uniqueId": "testinflightcombinations_Handler_S3Object_A90E2DFD" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/cos.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/cos.w_compile_tf-aws.md index b6775527e36..641ccd65d54 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/cos.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/cos.w_compile_tf-aws.md @@ -44,105 +44,13 @@ module.exports = function({ $math_Util }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:inflight cosine\",\"${aws_lambda_function.testinflightcosine_Handler_8C1A066C.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testinflightcosine_Handler_IamRole_3CB91B01": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight cosine/Handler/IamRole", - "uniqueId": "testinflightcosine_Handler_IamRole_3CB91B01" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testinflightcosine_Handler_IamRolePolicy_DEC09071": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight cosine/Handler/IamRolePolicy", - "uniqueId": "testinflightcosine_Handler_IamRolePolicy_DEC09071" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testinflightcosine_Handler_IamRole_3CB91B01.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testinflightcosine_Handler_IamRolePolicyAttachment_30BBA33F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight cosine/Handler/IamRolePolicyAttachment", - "uniqueId": "testinflightcosine_Handler_IamRolePolicyAttachment_30BBA33F" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinflightcosine_Handler_IamRole_3CB91B01.name}" - } - }, - "aws_lambda_function": { - "testinflightcosine_Handler_8C1A066C": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight cosine/Handler/Default", - "uniqueId": "testinflightcosine_Handler_8C1A066C" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c81ebe2a", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c81ebe2a", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinflightcosine_Handler_IamRole_3CB91B01.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinflightcosine_Handler_S3Object_20AE5FC3.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testinflightcosine_Handler_S3Object_20AE5FC3": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight cosine/Handler/S3Object", - "uniqueId": "testinflightcosine_Handler_S3Object_20AE5FC3" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/cot.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/cot.w_compile_tf-aws.md index 89eb25735bf..9bdaebcf90a 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/cot.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/cot.w_compile_tf-aws.md @@ -42,105 +42,13 @@ module.exports = function({ $math_Util }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:inflight cotangent\",\"${aws_lambda_function.testinflightcotangent_Handler_93C199E4.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testinflightcotangent_Handler_IamRole_4B4EF664": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight cotangent/Handler/IamRole", - "uniqueId": "testinflightcotangent_Handler_IamRole_4B4EF664" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testinflightcotangent_Handler_IamRolePolicy_79041ED0": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight cotangent/Handler/IamRolePolicy", - "uniqueId": "testinflightcotangent_Handler_IamRolePolicy_79041ED0" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testinflightcotangent_Handler_IamRole_4B4EF664.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testinflightcotangent_Handler_IamRolePolicyAttachment_D8E7B217": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight cotangent/Handler/IamRolePolicyAttachment", - "uniqueId": "testinflightcotangent_Handler_IamRolePolicyAttachment_D8E7B217" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinflightcotangent_Handler_IamRole_4B4EF664.name}" - } - }, - "aws_lambda_function": { - "testinflightcotangent_Handler_93C199E4": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight cotangent/Handler/Default", - "uniqueId": "testinflightcotangent_Handler_93C199E4" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8fc3a88", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8fc3a88", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinflightcotangent_Handler_IamRole_4B4EF664.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinflightcotangent_Handler_S3Object_3699819A.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testinflightcotangent_Handler_S3Object_3699819A": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight cotangent/Handler/S3Object", - "uniqueId": "testinflightcotangent_Handler_S3Object_3699819A" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/csc.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/csc.w_compile_tf-aws.md index a16fdc9d379..28527271db2 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/csc.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/csc.w_compile_tf-aws.md @@ -46,105 +46,13 @@ module.exports = function({ $math_Util }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:inflight cosecant\",\"${aws_lambda_function.testinflightcosecant_Handler_0491DCB0.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testinflightcosecant_Handler_IamRole_D7226B8F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight cosecant/Handler/IamRole", - "uniqueId": "testinflightcosecant_Handler_IamRole_D7226B8F" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testinflightcosecant_Handler_IamRolePolicy_09309D29": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight cosecant/Handler/IamRolePolicy", - "uniqueId": "testinflightcosecant_Handler_IamRolePolicy_09309D29" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testinflightcosecant_Handler_IamRole_D7226B8F.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testinflightcosecant_Handler_IamRolePolicyAttachment_79166A81": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight cosecant/Handler/IamRolePolicyAttachment", - "uniqueId": "testinflightcosecant_Handler_IamRolePolicyAttachment_79166A81" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinflightcosecant_Handler_IamRole_D7226B8F.name}" - } - }, - "aws_lambda_function": { - "testinflightcosecant_Handler_0491DCB0": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight cosecant/Handler/Default", - "uniqueId": "testinflightcosecant_Handler_0491DCB0" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8baaa0a", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8baaa0a", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinflightcosecant_Handler_IamRole_D7226B8F.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinflightcosecant_Handler_S3Object_82EC6921.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testinflightcosecant_Handler_S3Object_82EC6921": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight cosecant/Handler/S3Object", - "uniqueId": "testinflightcosecant_Handler_S3Object_82EC6921" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/euler.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/euler.w_compile_tf-aws.md index 1a87149436d..c0cd66440aa 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/euler.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/euler.w_compile_tf-aws.md @@ -57,105 +57,13 @@ module.exports = function({ $compoundOneYear, $interest, $math_Util, $value }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:EULER\",\"${aws_lambda_function.testEULER_Handler_7DE24200.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testEULER_Handler_IamRole_ED3CFA98": { - "//": { - "metadata": { - "path": "root/Default/Default/test:EULER/Handler/IamRole", - "uniqueId": "testEULER_Handler_IamRole_ED3CFA98" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testEULER_Handler_IamRolePolicy_53F6F25E": { - "//": { - "metadata": { - "path": "root/Default/Default/test:EULER/Handler/IamRolePolicy", - "uniqueId": "testEULER_Handler_IamRolePolicy_53F6F25E" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testEULER_Handler_IamRole_ED3CFA98.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testEULER_Handler_IamRolePolicyAttachment_00CBFA14": { - "//": { - "metadata": { - "path": "root/Default/Default/test:EULER/Handler/IamRolePolicyAttachment", - "uniqueId": "testEULER_Handler_IamRolePolicyAttachment_00CBFA14" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testEULER_Handler_IamRole_ED3CFA98.name}" - } - }, - "aws_lambda_function": { - "testEULER_Handler_7DE24200": { - "//": { - "metadata": { - "path": "root/Default/Default/test:EULER/Handler/Default", - "uniqueId": "testEULER_Handler_7DE24200" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c80e7a9d", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c80e7a9d", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testEULER_Handler_IamRole_ED3CFA98.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testEULER_Handler_S3Object_A010D852.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testEULER_Handler_S3Object_A010D852": { - "//": { - "metadata": { - "path": "root/Default/Default/test:EULER/Handler/S3Object", - "uniqueId": "testEULER_Handler_S3Object_A010D852" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/factorial.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/factorial.w_compile_tf-aws.md index 821f58d10ea..837f4bbb992 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/factorial.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/factorial.w_compile_tf-aws.md @@ -44,105 +44,13 @@ module.exports = function({ $math_Util }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:inflight factorial\",\"${aws_lambda_function.testinflightfactorial_Handler_23BDFAA4.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testinflightfactorial_Handler_IamRole_80B0F8FB": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight factorial/Handler/IamRole", - "uniqueId": "testinflightfactorial_Handler_IamRole_80B0F8FB" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testinflightfactorial_Handler_IamRolePolicy_B923CA7E": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight factorial/Handler/IamRolePolicy", - "uniqueId": "testinflightfactorial_Handler_IamRolePolicy_B923CA7E" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testinflightfactorial_Handler_IamRole_80B0F8FB.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testinflightfactorial_Handler_IamRolePolicyAttachment_9BD211DB": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight factorial/Handler/IamRolePolicyAttachment", - "uniqueId": "testinflightfactorial_Handler_IamRolePolicyAttachment_9BD211DB" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinflightfactorial_Handler_IamRole_80B0F8FB.name}" - } - }, - "aws_lambda_function": { - "testinflightfactorial_Handler_23BDFAA4": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight factorial/Handler/Default", - "uniqueId": "testinflightfactorial_Handler_23BDFAA4" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c818ed07", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c818ed07", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinflightfactorial_Handler_IamRole_80B0F8FB.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinflightfactorial_Handler_S3Object_AC36C24F.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testinflightfactorial_Handler_S3Object_AC36C24F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight factorial/Handler/S3Object", - "uniqueId": "testinflightfactorial_Handler_S3Object_AC36C24F" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/fibonacci.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/fibonacci.w_compile_tf-aws.md index 83dc942e550..1952b9848ee 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/fibonacci.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/fibonacci.w_compile_tf-aws.md @@ -49,105 +49,13 @@ module.exports = function({ $math_Util }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:inflight fibonacci\",\"${aws_lambda_function.testinflightfibonacci_Handler_5DF5857A.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testinflightfibonacci_Handler_IamRole_654132EC": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight fibonacci/Handler/IamRole", - "uniqueId": "testinflightfibonacci_Handler_IamRole_654132EC" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testinflightfibonacci_Handler_IamRolePolicy_00ECCCC9": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight fibonacci/Handler/IamRolePolicy", - "uniqueId": "testinflightfibonacci_Handler_IamRolePolicy_00ECCCC9" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testinflightfibonacci_Handler_IamRole_654132EC.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testinflightfibonacci_Handler_IamRolePolicyAttachment_BA853587": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight fibonacci/Handler/IamRolePolicyAttachment", - "uniqueId": "testinflightfibonacci_Handler_IamRolePolicyAttachment_BA853587" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinflightfibonacci_Handler_IamRole_654132EC.name}" - } - }, - "aws_lambda_function": { - "testinflightfibonacci_Handler_5DF5857A": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight fibonacci/Handler/Default", - "uniqueId": "testinflightfibonacci_Handler_5DF5857A" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c87dfd42", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c87dfd42", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinflightfibonacci_Handler_IamRole_654132EC.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinflightfibonacci_Handler_S3Object_60E100A8.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testinflightfibonacci_Handler_S3Object_60E100A8": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight fibonacci/Handler/S3Object", - "uniqueId": "testinflightfibonacci_Handler_S3Object_60E100A8" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/floor_ceil_round.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/floor_ceil_round.w_compile_tf-aws.md index aa1b9c11c6b..7fb5e2de367 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/floor_ceil_round.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/floor_ceil_round.w_compile_tf-aws.md @@ -49,105 +49,13 @@ module.exports = function({ $__x_, $__y_, $math_Util, $x, $y }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:inflight floor--ceil--round\",\"${aws_lambda_function.testinflightfloor--ceil--round_Handler_90E85A3F.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testinflightfloor--ceil--round_Handler_IamRole_70C76120": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight floor--ceil--round/Handler/IamRole", - "uniqueId": "testinflightfloor--ceil--round_Handler_IamRole_70C76120" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testinflightfloor--ceil--round_Handler_IamRolePolicy_FA154202": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight floor--ceil--round/Handler/IamRolePolicy", - "uniqueId": "testinflightfloor--ceil--round_Handler_IamRolePolicy_FA154202" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testinflightfloor--ceil--round_Handler_IamRole_70C76120.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testinflightfloor--ceil--round_Handler_IamRolePolicyAttachment_A4FE3D1C": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight floor--ceil--round/Handler/IamRolePolicyAttachment", - "uniqueId": "testinflightfloor--ceil--round_Handler_IamRolePolicyAttachment_A4FE3D1C" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinflightfloor--ceil--round_Handler_IamRole_70C76120.name}" - } - }, - "aws_lambda_function": { - "testinflightfloor--ceil--round_Handler_90E85A3F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight floor--ceil--round/Handler/Default", - "uniqueId": "testinflightfloor--ceil--round_Handler_90E85A3F" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8bf255a", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8bf255a", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinflightfloor--ceil--round_Handler_IamRole_70C76120.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinflightfloor--ceil--round_Handler_S3Object_CBAFAFCF.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testinflightfloor--ceil--round_Handler_S3Object_CBAFAFCF": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight floor--ceil--round/Handler/S3Object", - "uniqueId": "testinflightfloor--ceil--round_Handler_S3Object_CBAFAFCF" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/hypot.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/hypot.w_compile_tf-aws.md index f082f86f4a3..809cb1868d8 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/hypot.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/hypot.w_compile_tf-aws.md @@ -42,105 +42,13 @@ module.exports = function({ $math_Util }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:inflight hypot\",\"${aws_lambda_function.testinflighthypot_Handler_892C5ACF.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testinflighthypot_Handler_IamRole_1958850E": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight hypot/Handler/IamRole", - "uniqueId": "testinflighthypot_Handler_IamRole_1958850E" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testinflighthypot_Handler_IamRolePolicy_3A895B06": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight hypot/Handler/IamRolePolicy", - "uniqueId": "testinflighthypot_Handler_IamRolePolicy_3A895B06" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testinflighthypot_Handler_IamRole_1958850E.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testinflighthypot_Handler_IamRolePolicyAttachment_D2DB4216": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight hypot/Handler/IamRolePolicyAttachment", - "uniqueId": "testinflighthypot_Handler_IamRolePolicyAttachment_D2DB4216" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinflighthypot_Handler_IamRole_1958850E.name}" - } - }, - "aws_lambda_function": { - "testinflighthypot_Handler_892C5ACF": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight hypot/Handler/Default", - "uniqueId": "testinflighthypot_Handler_892C5ACF" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8289cd0", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8289cd0", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinflighthypot_Handler_IamRole_1958850E.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinflighthypot_Handler_S3Object_7DF86846.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testinflighthypot_Handler_S3Object_7DF86846": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight hypot/Handler/S3Object", - "uniqueId": "testinflighthypot_Handler_S3Object_7DF86846" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/median_mode_mean.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/median_mode_mean.w_compile_tf-aws.md index 363122d7305..846a24a91e4 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/median_mode_mean.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/median_mode_mean.w_compile_tf-aws.md @@ -83,243 +83,13 @@ module.exports = function({ $math_Util, $mean_arr }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:inflight median\",\"${aws_lambda_function.testinflightmedian_Handler_B978E173.arn}\"],[\"root/Default/Default/test:inflight mode\",\"${aws_lambda_function.testinflightmode_Handler_72A19270.arn}\"],[\"root/Default/Default/test:inflight mean\",\"${aws_lambda_function.testinflightmean_Handler_8EC47095.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testinflightmean_Handler_IamRole_FBB742BC": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight mean/Handler/IamRole", - "uniqueId": "testinflightmean_Handler_IamRole_FBB742BC" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testinflightmedian_Handler_IamRole_3B7DA0C5": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight median/Handler/IamRole", - "uniqueId": "testinflightmedian_Handler_IamRole_3B7DA0C5" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testinflightmode_Handler_IamRole_06517FF6": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight mode/Handler/IamRole", - "uniqueId": "testinflightmode_Handler_IamRole_06517FF6" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testinflightmean_Handler_IamRolePolicy_67540022": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight mean/Handler/IamRolePolicy", - "uniqueId": "testinflightmean_Handler_IamRolePolicy_67540022" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testinflightmean_Handler_IamRole_FBB742BC.name}" - }, - "testinflightmedian_Handler_IamRolePolicy_FF81B1E5": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight median/Handler/IamRolePolicy", - "uniqueId": "testinflightmedian_Handler_IamRolePolicy_FF81B1E5" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testinflightmedian_Handler_IamRole_3B7DA0C5.name}" - }, - "testinflightmode_Handler_IamRolePolicy_CB816C3B": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight mode/Handler/IamRolePolicy", - "uniqueId": "testinflightmode_Handler_IamRolePolicy_CB816C3B" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testinflightmode_Handler_IamRole_06517FF6.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testinflightmean_Handler_IamRolePolicyAttachment_ED6C9099": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight mean/Handler/IamRolePolicyAttachment", - "uniqueId": "testinflightmean_Handler_IamRolePolicyAttachment_ED6C9099" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinflightmean_Handler_IamRole_FBB742BC.name}" - }, - "testinflightmedian_Handler_IamRolePolicyAttachment_48BFB0EF": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight median/Handler/IamRolePolicyAttachment", - "uniqueId": "testinflightmedian_Handler_IamRolePolicyAttachment_48BFB0EF" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinflightmedian_Handler_IamRole_3B7DA0C5.name}" - }, - "testinflightmode_Handler_IamRolePolicyAttachment_FB3CC1BF": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight mode/Handler/IamRolePolicyAttachment", - "uniqueId": "testinflightmode_Handler_IamRolePolicyAttachment_FB3CC1BF" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinflightmode_Handler_IamRole_06517FF6.name}" - } - }, - "aws_lambda_function": { - "testinflightmean_Handler_8EC47095": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight mean/Handler/Default", - "uniqueId": "testinflightmean_Handler_8EC47095" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c81bc5c0", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c81bc5c0", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinflightmean_Handler_IamRole_FBB742BC.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinflightmean_Handler_S3Object_B038C877.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testinflightmedian_Handler_B978E173": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight median/Handler/Default", - "uniqueId": "testinflightmedian_Handler_B978E173" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8d95514", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8d95514", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinflightmedian_Handler_IamRole_3B7DA0C5.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinflightmedian_Handler_S3Object_24DB22D7.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testinflightmode_Handler_72A19270": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight mode/Handler/Default", - "uniqueId": "testinflightmode_Handler_72A19270" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8c7e996", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8c7e996", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinflightmode_Handler_IamRole_06517FF6.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinflightmode_Handler_S3Object_48CE9E2C.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testinflightmean_Handler_S3Object_B038C877": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight mean/Handler/S3Object", - "uniqueId": "testinflightmean_Handler_S3Object_B038C877" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testinflightmedian_Handler_S3Object_24DB22D7": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight median/Handler/S3Object", - "uniqueId": "testinflightmedian_Handler_S3Object_24DB22D7" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testinflightmode_Handler_S3Object_48CE9E2C": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight mode/Handler/S3Object", - "uniqueId": "testinflightmode_Handler_S3Object_48CE9E2C" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/min_max.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/min_max.w_compile_tf-aws.md index 2a57adf094e..7fbcab6634a 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/min_max.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/min_max.w_compile_tf-aws.md @@ -40,105 +40,13 @@ module.exports = function({ $math_Util, $myArray }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:inflight min--max\",\"${aws_lambda_function.testinflightmin--max_Handler_7896C0CC.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testinflightmin--max_Handler_IamRole_F9B896A0": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight min--max/Handler/IamRole", - "uniqueId": "testinflightmin--max_Handler_IamRole_F9B896A0" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testinflightmin--max_Handler_IamRolePolicy_2C02F5B3": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight min--max/Handler/IamRolePolicy", - "uniqueId": "testinflightmin--max_Handler_IamRolePolicy_2C02F5B3" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testinflightmin--max_Handler_IamRole_F9B896A0.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testinflightmin--max_Handler_IamRolePolicyAttachment_5612AA50": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight min--max/Handler/IamRolePolicyAttachment", - "uniqueId": "testinflightmin--max_Handler_IamRolePolicyAttachment_5612AA50" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinflightmin--max_Handler_IamRole_F9B896A0.name}" - } - }, - "aws_lambda_function": { - "testinflightmin--max_Handler_7896C0CC": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight min--max/Handler/Default", - "uniqueId": "testinflightmin--max_Handler_7896C0CC" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c88f3f4b", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c88f3f4b", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinflightmin--max_Handler_IamRole_F9B896A0.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinflightmin--max_Handler_S3Object_8C967067.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testinflightmin--max_Handler_S3Object_8C967067": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight min--max/Handler/S3Object", - "uniqueId": "testinflightmin--max_Handler_S3Object_8C967067" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/pi.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/pi.w_compile_tf-aws.md index 4f5eaa2a469..16b573fd607 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/pi.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/pi.w_compile_tf-aws.md @@ -57,105 +57,13 @@ module.exports = function({ $circumference, $math_Util, $r }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:PI\",\"${aws_lambda_function.testPI_Handler_129F22B0.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testPI_Handler_IamRole_F2FA3740": { - "//": { - "metadata": { - "path": "root/Default/Default/test:PI/Handler/IamRole", - "uniqueId": "testPI_Handler_IamRole_F2FA3740" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testPI_Handler_IamRolePolicy_95F2AAC2": { - "//": { - "metadata": { - "path": "root/Default/Default/test:PI/Handler/IamRolePolicy", - "uniqueId": "testPI_Handler_IamRolePolicy_95F2AAC2" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testPI_Handler_IamRole_F2FA3740.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testPI_Handler_IamRolePolicyAttachment_85BE5FFB": { - "//": { - "metadata": { - "path": "root/Default/Default/test:PI/Handler/IamRolePolicyAttachment", - "uniqueId": "testPI_Handler_IamRolePolicyAttachment_85BE5FFB" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testPI_Handler_IamRole_F2FA3740.name}" - } - }, - "aws_lambda_function": { - "testPI_Handler_129F22B0": { - "//": { - "metadata": { - "path": "root/Default/Default/test:PI/Handler/Default", - "uniqueId": "testPI_Handler_129F22B0" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8f48054", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8f48054", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testPI_Handler_IamRole_F2FA3740.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testPI_Handler_S3Object_85C16122.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testPI_Handler_S3Object_85C16122": { - "//": { - "metadata": { - "path": "root/Default/Default/test:PI/Handler/S3Object", - "uniqueId": "testPI_Handler_S3Object_85C16122" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/prime.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/prime.w_compile_tf-aws.md index b3f20f5cdaa..b0db709b4dd 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/prime.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/prime.w_compile_tf-aws.md @@ -45,105 +45,13 @@ module.exports = function({ $math_Util }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:inflight prime numbers\",\"${aws_lambda_function.testinflightprimenumbers_Handler_E7E982CC.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testinflightprimenumbers_Handler_IamRole_8F4FF334": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight prime numbers/Handler/IamRole", - "uniqueId": "testinflightprimenumbers_Handler_IamRole_8F4FF334" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testinflightprimenumbers_Handler_IamRolePolicy_75A11057": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight prime numbers/Handler/IamRolePolicy", - "uniqueId": "testinflightprimenumbers_Handler_IamRolePolicy_75A11057" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testinflightprimenumbers_Handler_IamRole_8F4FF334.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testinflightprimenumbers_Handler_IamRolePolicyAttachment_80C5EF7B": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight prime numbers/Handler/IamRolePolicyAttachment", - "uniqueId": "testinflightprimenumbers_Handler_IamRolePolicyAttachment_80C5EF7B" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinflightprimenumbers_Handler_IamRole_8F4FF334.name}" - } - }, - "aws_lambda_function": { - "testinflightprimenumbers_Handler_E7E982CC": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight prime numbers/Handler/Default", - "uniqueId": "testinflightprimenumbers_Handler_E7E982CC" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c80a9be6", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c80a9be6", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinflightprimenumbers_Handler_IamRole_8F4FF334.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinflightprimenumbers_Handler_S3Object_AA8A6648.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testinflightprimenumbers_Handler_S3Object_AA8A6648": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight prime numbers/Handler/S3Object", - "uniqueId": "testinflightprimenumbers_Handler_S3Object_AA8A6648" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/random.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/random.w_compile_tf-aws.md index 78351f3a910..db77604fecb 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/random.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/random.w_compile_tf-aws.md @@ -40,105 +40,13 @@ module.exports = function({ $math_Util }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:inflight absolute\",\"${aws_lambda_function.testinflightabsolute_Handler_DB051761.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testinflightabsolute_Handler_IamRole_73FC0806": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight absolute/Handler/IamRole", - "uniqueId": "testinflightabsolute_Handler_IamRole_73FC0806" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testinflightabsolute_Handler_IamRolePolicy_6FD74632": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight absolute/Handler/IamRolePolicy", - "uniqueId": "testinflightabsolute_Handler_IamRolePolicy_6FD74632" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testinflightabsolute_Handler_IamRole_73FC0806.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testinflightabsolute_Handler_IamRolePolicyAttachment_C2286158": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight absolute/Handler/IamRolePolicyAttachment", - "uniqueId": "testinflightabsolute_Handler_IamRolePolicyAttachment_C2286158" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinflightabsolute_Handler_IamRole_73FC0806.name}" - } - }, - "aws_lambda_function": { - "testinflightabsolute_Handler_DB051761": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight absolute/Handler/Default", - "uniqueId": "testinflightabsolute_Handler_DB051761" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c84ad0c4", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c84ad0c4", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinflightabsolute_Handler_IamRole_73FC0806.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinflightabsolute_Handler_S3Object_B9AB2D8D.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testinflightabsolute_Handler_S3Object_B9AB2D8D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight absolute/Handler/S3Object", - "uniqueId": "testinflightabsolute_Handler_S3Object_B9AB2D8D" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/sec.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/sec.w_compile_tf-aws.md index 81d3f4524fb..c9a9bdd0a5b 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/sec.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/sec.w_compile_tf-aws.md @@ -44,105 +44,13 @@ module.exports = function({ $math_Util }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:inflight secant\",\"${aws_lambda_function.testinflightsecant_Handler_72888816.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testinflightsecant_Handler_IamRole_7DD6883F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight secant/Handler/IamRole", - "uniqueId": "testinflightsecant_Handler_IamRole_7DD6883F" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testinflightsecant_Handler_IamRolePolicy_BC7487D0": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight secant/Handler/IamRolePolicy", - "uniqueId": "testinflightsecant_Handler_IamRolePolicy_BC7487D0" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testinflightsecant_Handler_IamRole_7DD6883F.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testinflightsecant_Handler_IamRolePolicyAttachment_C7BA2EAF": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight secant/Handler/IamRolePolicyAttachment", - "uniqueId": "testinflightsecant_Handler_IamRolePolicyAttachment_C7BA2EAF" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinflightsecant_Handler_IamRole_7DD6883F.name}" - } - }, - "aws_lambda_function": { - "testinflightsecant_Handler_72888816": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight secant/Handler/Default", - "uniqueId": "testinflightsecant_Handler_72888816" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8dc1a66", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8dc1a66", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinflightsecant_Handler_IamRole_7DD6883F.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinflightsecant_Handler_S3Object_38691B5F.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testinflightsecant_Handler_S3Object_38691B5F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight secant/Handler/S3Object", - "uniqueId": "testinflightsecant_Handler_S3Object_38691B5F" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/sin.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/sin.w_compile_tf-aws.md index bd999869ccb..cdc6d68453d 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/sin.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/sin.w_compile_tf-aws.md @@ -43,105 +43,13 @@ module.exports = function({ $math_Util }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:inflight sine\",\"${aws_lambda_function.testinflightsine_Handler_C32FE4B8.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testinflightsine_Handler_IamRole_8DD2DA91": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight sine/Handler/IamRole", - "uniqueId": "testinflightsine_Handler_IamRole_8DD2DA91" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testinflightsine_Handler_IamRolePolicy_E84601AE": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight sine/Handler/IamRolePolicy", - "uniqueId": "testinflightsine_Handler_IamRolePolicy_E84601AE" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testinflightsine_Handler_IamRole_8DD2DA91.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testinflightsine_Handler_IamRolePolicyAttachment_A95E724C": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight sine/Handler/IamRolePolicyAttachment", - "uniqueId": "testinflightsine_Handler_IamRolePolicyAttachment_A95E724C" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinflightsine_Handler_IamRole_8DD2DA91.name}" - } - }, - "aws_lambda_function": { - "testinflightsine_Handler_C32FE4B8": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight sine/Handler/Default", - "uniqueId": "testinflightsine_Handler_C32FE4B8" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8977bb8", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8977bb8", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinflightsine_Handler_IamRole_8DD2DA91.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinflightsine_Handler_S3Object_75C2B40C.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testinflightsine_Handler_S3Object_75C2B40C": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight sine/Handler/S3Object", - "uniqueId": "testinflightsine_Handler_S3Object_75C2B40C" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/sqrt.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/sqrt.w_compile_tf-aws.md index 3c982f3d277..c75cedbf9ae 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/sqrt.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/sqrt.w_compile_tf-aws.md @@ -51,105 +51,13 @@ module.exports = function({ $math_Util }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:inflight square root\",\"${aws_lambda_function.testinflightsquareroot_Handler_2121E9F7.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testinflightsquareroot_Handler_IamRole_5F64DF30": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight square root/Handler/IamRole", - "uniqueId": "testinflightsquareroot_Handler_IamRole_5F64DF30" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testinflightsquareroot_Handler_IamRolePolicy_BB3920C3": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight square root/Handler/IamRolePolicy", - "uniqueId": "testinflightsquareroot_Handler_IamRolePolicy_BB3920C3" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testinflightsquareroot_Handler_IamRole_5F64DF30.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testinflightsquareroot_Handler_IamRolePolicyAttachment_6869E2D7": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight square root/Handler/IamRolePolicyAttachment", - "uniqueId": "testinflightsquareroot_Handler_IamRolePolicyAttachment_6869E2D7" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinflightsquareroot_Handler_IamRole_5F64DF30.name}" - } - }, - "aws_lambda_function": { - "testinflightsquareroot_Handler_2121E9F7": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight square root/Handler/Default", - "uniqueId": "testinflightsquareroot_Handler_2121E9F7" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c88a288d", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c88a288d", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinflightsquareroot_Handler_IamRole_5F64DF30.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinflightsquareroot_Handler_S3Object_016D3297.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testinflightsquareroot_Handler_S3Object_016D3297": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight square root/Handler/S3Object", - "uniqueId": "testinflightsquareroot_Handler_S3Object_016D3297" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/tan.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/tan.w_compile_tf-aws.md index 1bc9a59fea2..e51b35cb20f 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/tan.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/tan.w_compile_tf-aws.md @@ -42,105 +42,13 @@ module.exports = function({ $math_Util }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:inflight tangent\",\"${aws_lambda_function.testinflighttangent_Handler_C5A37FFB.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testinflighttangent_Handler_IamRole_A44BF0B4": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight tangent/Handler/IamRole", - "uniqueId": "testinflighttangent_Handler_IamRole_A44BF0B4" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testinflighttangent_Handler_IamRolePolicy_8BE35603": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight tangent/Handler/IamRolePolicy", - "uniqueId": "testinflighttangent_Handler_IamRolePolicy_8BE35603" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testinflighttangent_Handler_IamRole_A44BF0B4.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testinflighttangent_Handler_IamRolePolicyAttachment_60FAB5D8": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight tangent/Handler/IamRolePolicyAttachment", - "uniqueId": "testinflighttangent_Handler_IamRolePolicyAttachment_60FAB5D8" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinflighttangent_Handler_IamRole_A44BF0B4.name}" - } - }, - "aws_lambda_function": { - "testinflighttangent_Handler_C5A37FFB": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight tangent/Handler/Default", - "uniqueId": "testinflighttangent_Handler_C5A37FFB" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8879d07", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8879d07", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinflighttangent_Handler_IamRole_A44BF0B4.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinflighttangent_Handler_S3Object_B7B06C62.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testinflighttangent_Handler_S3Object_B7B06C62": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight tangent/Handler/S3Object", - "uniqueId": "testinflighttangent_Handler_S3Object_B7B06C62" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/tau.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/tau.w_compile_tf-aws.md index 73f86639612..f065ac8fe30 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/tau.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/math/tau.w_compile_tf-aws.md @@ -42,105 +42,13 @@ module.exports = function({ $math_Util }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:TAU\",\"${aws_lambda_function.testTAU_Handler_FB9BAA33.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testTAU_Handler_IamRole_51C39285": { - "//": { - "metadata": { - "path": "root/Default/Default/test:TAU/Handler/IamRole", - "uniqueId": "testTAU_Handler_IamRole_51C39285" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testTAU_Handler_IamRolePolicy_B4700D56": { - "//": { - "metadata": { - "path": "root/Default/Default/test:TAU/Handler/IamRolePolicy", - "uniqueId": "testTAU_Handler_IamRolePolicy_B4700D56" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testTAU_Handler_IamRole_51C39285.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testTAU_Handler_IamRolePolicyAttachment_D96C3941": { - "//": { - "metadata": { - "path": "root/Default/Default/test:TAU/Handler/IamRolePolicyAttachment", - "uniqueId": "testTAU_Handler_IamRolePolicyAttachment_D96C3941" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testTAU_Handler_IamRole_51C39285.name}" - } - }, - "aws_lambda_function": { - "testTAU_Handler_FB9BAA33": { - "//": { - "metadata": { - "path": "root/Default/Default/test:TAU/Handler/Default", - "uniqueId": "testTAU_Handler_FB9BAA33" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c86e3343", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c86e3343", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testTAU_Handler_IamRole_51C39285.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testTAU_Handler_S3Object_61434DF6.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testTAU_Handler_S3Object_61434DF6": { - "//": { - "metadata": { - "path": "root/Default/Default/test:TAU/Handler/S3Object", - "uniqueId": "testTAU_Handler_S3Object_61434DF6" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/on_deploy/execute_after.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/on_deploy/execute_after.w_compile_tf-aws.md index 1f66d348f53..5b7c379e584 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/on_deploy/execute_after.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/on_deploy/execute_after.w_compile_tf-aws.md @@ -108,7 +108,7 @@ module.exports = function({ $counter }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:counter\",\"${aws_lambda_function.testcounter_Handler_9843F4E3.arn}\"]]" + "value": "[]" } }, "provider": { @@ -154,15 +154,6 @@ module.exports = function({ $counter }) { } }, "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testcounter_Handler_IamRole_51A9CC6B": { - "//": { - "metadata": { - "path": "root/Default/Default/test:counter/Handler/IamRole", - "uniqueId": "testcounter_Handler_IamRole_51A9CC6B" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" } }, "aws_iam_role_policy": { @@ -185,16 +176,6 @@ module.exports = function({ $counter }) { }, "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"dynamodb:UpdateItem\"],\"Resource\":[\"${aws_dynamodb_table.cloudCounter.arn}\"],\"Effect\":\"Allow\"}]}", "role": "${aws_iam_role.init2_Function_IamRole_A05B341B.name}" - }, - "testcounter_Handler_IamRolePolicy_0194151B": { - "//": { - "metadata": { - "path": "root/Default/Default/test:counter/Handler/IamRolePolicy", - "uniqueId": "testcounter_Handler_IamRolePolicy_0194151B" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"dynamodb:GetItem\"],\"Resource\":[\"${aws_dynamodb_table.cloudCounter.arn}\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testcounter_Handler_IamRole_51A9CC6B.name}" } }, "aws_iam_role_policy_attachment": { @@ -217,16 +198,6 @@ module.exports = function({ $counter }) { }, "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", "role": "${aws_iam_role.init2_Function_IamRole_A05B341B.name}" - }, - "testcounter_Handler_IamRolePolicyAttachment_346F0C14": { - "//": { - "metadata": { - "path": "root/Default/Default/test:counter/Handler/IamRolePolicyAttachment", - "uniqueId": "testcounter_Handler_IamRolePolicyAttachment_346F0C14" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testcounter_Handler_IamRole_51A9CC6B.name}" } }, "aws_lambda_function": { @@ -289,36 +260,6 @@ module.exports = function({ $counter }) { "security_group_ids": [], "subnet_ids": [] } - }, - "testcounter_Handler_9843F4E3": { - "//": { - "metadata": { - "path": "root/Default/Default/test:counter/Handler/Default", - "uniqueId": "testcounter_Handler_9843F4E3" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", - "WING_FUNCTION_NAME": "Handler-c8401b74", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8401b74", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testcounter_Handler_IamRole_51A9CC6B.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testcounter_Handler_S3Object_AD39EA57.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } } }, "aws_s3_bucket": { @@ -354,17 +295,6 @@ module.exports = function({ $counter }) { "bucket": "${aws_s3_bucket.Code.bucket}", "key": "", "source": "" - }, - "testcounter_Handler_S3Object_AD39EA57": { - "//": { - "metadata": { - "path": "root/Default/Default/test:counter/Handler/S3Object", - "uniqueId": "testcounter_Handler_S3Object_AD39EA57" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" } } } diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/queue/pop.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/queue/pop.w_compile_tf-aws.md index b1339a07f9c..6243fc76f81 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/queue/pop.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/queue/pop.w_compile_tf-aws.md @@ -45,7 +45,7 @@ module.exports = function({ $q }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:pop\",\"${aws_lambda_function.testpop_Handler_595175BF.arn}\"]]" + "value": "[]" } }, "provider": { @@ -54,97 +54,6 @@ module.exports = function({ $q }) { ] }, "resource": { - "aws_iam_role": { - "testpop_Handler_IamRole_2CAAA350": { - "//": { - "metadata": { - "path": "root/Default/Default/test:pop/Handler/IamRole", - "uniqueId": "testpop_Handler_IamRole_2CAAA350" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testpop_Handler_IamRolePolicy_81414D48": { - "//": { - "metadata": { - "path": "root/Default/Default/test:pop/Handler/IamRolePolicy", - "uniqueId": "testpop_Handler_IamRolePolicy_81414D48" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"sqs:SendMessage\"],\"Resource\":[\"${aws_sqs_queue.cloudQueue.arn}\"],\"Effect\":\"Allow\"},{\"Action\":[\"sqs:ReceiveMessage\"],\"Resource\":[\"${aws_sqs_queue.cloudQueue.arn}\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testpop_Handler_IamRole_2CAAA350.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testpop_Handler_IamRolePolicyAttachment_DBFE44D0": { - "//": { - "metadata": { - "path": "root/Default/Default/test:pop/Handler/IamRolePolicyAttachment", - "uniqueId": "testpop_Handler_IamRolePolicyAttachment_DBFE44D0" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testpop_Handler_IamRole_2CAAA350.name}" - } - }, - "aws_lambda_function": { - "testpop_Handler_595175BF": { - "//": { - "metadata": { - "path": "root/Default/Default/test:pop/Handler/Default", - "uniqueId": "testpop_Handler_595175BF" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "QUEUE_URL_31e95cbd": "${aws_sqs_queue.cloudQueue.url}", - "WING_FUNCTION_NAME": "Handler-c888e5ca", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c888e5ca", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testpop_Handler_IamRole_2CAAA350.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testpop_Handler_S3Object_35D71FAF.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testpop_Handler_S3Object_35D71FAF": { - "//": { - "metadata": { - "path": "root/Default/Default/test:pop/Handler/S3Object", - "uniqueId": "testpop_Handler_S3Object_35D71FAF" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - }, "aws_sqs_queue": { "cloudQueue": { "//": { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/queue/purge.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/queue/purge.w_compile_tf-aws.md index 3f97ba69e31..fdb58446faa 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/queue/purge.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/queue/purge.w_compile_tf-aws.md @@ -62,7 +62,7 @@ module.exports = function({ $q, $std_Duration, $util_Util }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:purge\",\"${aws_lambda_function.testpurge_Handler_F7A5D0E5.arn}\"]]" + "value": "[]" } }, "provider": { @@ -71,97 +71,6 @@ module.exports = function({ $q, $std_Duration, $util_Util }) { ] }, "resource": { - "aws_iam_role": { - "testpurge_Handler_IamRole_242BC35C": { - "//": { - "metadata": { - "path": "root/Default/Default/test:purge/Handler/IamRole", - "uniqueId": "testpurge_Handler_IamRole_242BC35C" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testpurge_Handler_IamRolePolicy_DF93FF98": { - "//": { - "metadata": { - "path": "root/Default/Default/test:purge/Handler/IamRolePolicy", - "uniqueId": "testpurge_Handler_IamRolePolicy_DF93FF98" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"sqs:SendMessage\"],\"Resource\":[\"${aws_sqs_queue.cloudQueue.arn}\"],\"Effect\":\"Allow\"},{\"Action\":[\"sqs:PurgeQueue\"],\"Resource\":[\"${aws_sqs_queue.cloudQueue.arn}\"],\"Effect\":\"Allow\"},{\"Action\":[\"sqs:GetQueueAttributes\"],\"Resource\":[\"${aws_sqs_queue.cloudQueue.arn}\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testpurge_Handler_IamRole_242BC35C.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testpurge_Handler_IamRolePolicyAttachment_0261B438": { - "//": { - "metadata": { - "path": "root/Default/Default/test:purge/Handler/IamRolePolicyAttachment", - "uniqueId": "testpurge_Handler_IamRolePolicyAttachment_0261B438" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testpurge_Handler_IamRole_242BC35C.name}" - } - }, - "aws_lambda_function": { - "testpurge_Handler_F7A5D0E5": { - "//": { - "metadata": { - "path": "root/Default/Default/test:purge/Handler/Default", - "uniqueId": "testpurge_Handler_F7A5D0E5" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "QUEUE_URL_31e95cbd": "${aws_sqs_queue.cloudQueue.url}", - "WING_FUNCTION_NAME": "Handler-c849290f", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c849290f", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testpurge_Handler_IamRole_242BC35C.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testpurge_Handler_S3Object_97CF2166.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testpurge_Handler_S3Object_97CF2166": { - "//": { - "metadata": { - "path": "root/Default/Default/test:purge/Handler/S3Object", - "uniqueId": "testpurge_Handler_S3Object_97CF2166" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - }, "aws_sqs_queue": { "cloudQueue": { "//": { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/queue/set_consumer.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/queue/set_consumer.w_compile_tf-aws.md index 861db1bad6d..1275b26cad8 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/queue/set_consumer.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/queue/set_consumer.w_compile_tf-aws.md @@ -84,7 +84,7 @@ module.exports = function({ }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:setConsumer\",\"${aws_lambda_function.testsetConsumer_Handler_A97FE23F.arn}\"]]" + "value": "[]" } }, "provider": { @@ -121,15 +121,6 @@ module.exports = function({ }) { } }, "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testsetConsumer_Handler_IamRole_33893F11": { - "//": { - "metadata": { - "path": "root/Default/Default/test:setConsumer/Handler/IamRole", - "uniqueId": "testsetConsumer_Handler_IamRole_33893F11" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" } }, "aws_iam_role_policy": { @@ -142,16 +133,6 @@ module.exports = function({ }) { }, "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"sqs:ReceiveMessage\",\"sqs:ChangeMessageVisibility\",\"sqs:GetQueueUrl\",\"sqs:DeleteMessage\",\"sqs:GetQueueAttributes\"],\"Resource\":[\"${aws_sqs_queue.cloudQueue.arn}\"],\"Effect\":\"Allow\"},{\"Action\":[\"dynamodb:UpdateItem\"],\"Resource\":[\"${aws_dynamodb_table.cloudCounter.arn}\"],\"Effect\":\"Allow\"}]}", "role": "${aws_iam_role.cloudQueue-SetConsumer-cdafee6e_IamRole_2548D828.name}" - }, - "testsetConsumer_Handler_IamRolePolicy_312A2B4F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:setConsumer/Handler/IamRolePolicy", - "uniqueId": "testsetConsumer_Handler_IamRolePolicy_312A2B4F" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"sqs:SendMessage\"],\"Resource\":[\"${aws_sqs_queue.cloudQueue.arn}\"],\"Effect\":\"Allow\"},{\"Action\":[\"dynamodb:GetItem\"],\"Resource\":[\"${aws_dynamodb_table.cloudCounter.arn}\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testsetConsumer_Handler_IamRole_33893F11.name}" } }, "aws_iam_role_policy_attachment": { @@ -164,16 +145,6 @@ module.exports = function({ }) { }, "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", "role": "${aws_iam_role.cloudQueue-SetConsumer-cdafee6e_IamRole_2548D828.name}" - }, - "testsetConsumer_Handler_IamRolePolicyAttachment_7EA0336F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:setConsumer/Handler/IamRolePolicyAttachment", - "uniqueId": "testsetConsumer_Handler_IamRolePolicyAttachment_7EA0336F" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testsetConsumer_Handler_IamRole_33893F11.name}" } }, "aws_lambda_event_source_mapping": { @@ -219,37 +190,6 @@ module.exports = function({ }) { "security_group_ids": [], "subnet_ids": [] } - }, - "testsetConsumer_Handler_A97FE23F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:setConsumer/Handler/Default", - "uniqueId": "testsetConsumer_Handler_A97FE23F" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", - "QUEUE_URL_31e95cbd": "${aws_sqs_queue.cloudQueue.url}", - "WING_FUNCTION_NAME": "Handler-c88cb529", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c88cb529", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testsetConsumer_Handler_IamRole_33893F11.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testsetConsumer_Handler_S3Object_A663C394.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } } }, "aws_s3_bucket": { @@ -274,17 +214,6 @@ module.exports = function({ }) { "bucket": "${aws_s3_bucket.Code.bucket}", "key": "", "source": "" - }, - "testsetConsumer_Handler_S3Object_A663C394": { - "//": { - "metadata": { - "path": "root/Default/Default/test:setConsumer/Handler/S3Object", - "uniqueId": "testsetConsumer_Handler_S3Object_A663C394" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" } }, "aws_sqs_queue": { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/regex/match.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/regex/match.w_compile_tf-aws.md index 51405e27007..dcd542fbaf2 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/regex/match.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/regex/match.w_compile_tf-aws.md @@ -58,105 +58,13 @@ module.exports = function({ $regex_Util }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:inflight match\",\"${aws_lambda_function.testinflightmatch_Handler_91AFEF4E.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testinflightmatch_Handler_IamRole_DA813D38": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight match/Handler/IamRole", - "uniqueId": "testinflightmatch_Handler_IamRole_DA813D38" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testinflightmatch_Handler_IamRolePolicy_B7F9EB14": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight match/Handler/IamRolePolicy", - "uniqueId": "testinflightmatch_Handler_IamRolePolicy_B7F9EB14" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testinflightmatch_Handler_IamRole_DA813D38.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testinflightmatch_Handler_IamRolePolicyAttachment_B8D01B6A": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight match/Handler/IamRolePolicyAttachment", - "uniqueId": "testinflightmatch_Handler_IamRolePolicyAttachment_B8D01B6A" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinflightmatch_Handler_IamRole_DA813D38.name}" - } - }, - "aws_lambda_function": { - "testinflightmatch_Handler_91AFEF4E": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight match/Handler/Default", - "uniqueId": "testinflightmatch_Handler_91AFEF4E" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8aa61ca", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8aa61ca", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinflightmatch_Handler_IamRole_DA813D38.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinflightmatch_Handler_S3Object_2184865C.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testinflightmatch_Handler_S3Object_2184865C": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight match/Handler/S3Object", - "uniqueId": "testinflightmatch_Handler_S3Object_2184865C" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/schedule/on_tick.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/schedule/on_tick.w_compile_tf-aws.md index 9d837aabe42..b81f5826138 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/schedule/on_tick.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/schedule/on_tick.w_compile_tf-aws.md @@ -79,7 +79,7 @@ module.exports = function({ $c1, $c2, $std_Duration, $util_Util }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/on tick is called both for rate and cron schedules\",\"${aws_lambda_function.ontickiscalledbothforrateandcronschedules_Handler_B4B8DF58.arn}\"]]" + "value": "[]" } }, "provider": { @@ -186,15 +186,6 @@ module.exports = function({ $c1, $c2, $std_Duration, $util_Util }) { } }, "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "ontickiscalledbothforrateandcronschedules_Handler_IamRole_89BBCA80": { - "//": { - "metadata": { - "path": "root/Default/Default/on tick is called both for rate and cron schedules/Handler/IamRole", - "uniqueId": "ontickiscalledbothforrateandcronschedules_Handler_IamRole_89BBCA80" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" } }, "aws_iam_role_policy": { @@ -217,16 +208,6 @@ module.exports = function({ $c1, $c2, $std_Duration, $util_Util }) { }, "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"dynamodb:UpdateItem\"],\"Resource\":[\"${aws_dynamodb_table.c2.arn}\"],\"Effect\":\"Allow\"}]}", "role": "${aws_iam_role.from_rate-OnTick-86898773_IamRole_0C967FAF.name}" - }, - "ontickiscalledbothforrateandcronschedules_Handler_IamRolePolicy_458097AC": { - "//": { - "metadata": { - "path": "root/Default/Default/on tick is called both for rate and cron schedules/Handler/IamRolePolicy", - "uniqueId": "ontickiscalledbothforrateandcronschedules_Handler_IamRolePolicy_458097AC" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"dynamodb:GetItem\"],\"Resource\":[\"${aws_dynamodb_table.c1.arn}\"],\"Effect\":\"Allow\"},{\"Action\":[\"dynamodb:GetItem\"],\"Resource\":[\"${aws_dynamodb_table.c2.arn}\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.ontickiscalledbothforrateandcronschedules_Handler_IamRole_89BBCA80.name}" } }, "aws_iam_role_policy_attachment": { @@ -249,16 +230,6 @@ module.exports = function({ $c1, $c2, $std_Duration, $util_Util }) { }, "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", "role": "${aws_iam_role.from_rate-OnTick-86898773_IamRole_0C967FAF.name}" - }, - "ontickiscalledbothforrateandcronschedules_Handler_IamRolePolicyAttachment_39063BDF": { - "//": { - "metadata": { - "path": "root/Default/Default/on tick is called both for rate and cron schedules/Handler/IamRolePolicyAttachment", - "uniqueId": "ontickiscalledbothforrateandcronschedules_Handler_IamRolePolicyAttachment_39063BDF" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.ontickiscalledbothforrateandcronschedules_Handler_IamRole_89BBCA80.name}" } }, "aws_lambda_function": { @@ -321,37 +292,6 @@ module.exports = function({ $c1, $c2, $std_Duration, $util_Util }) { "security_group_ids": [], "subnet_ids": [] } - }, - "ontickiscalledbothforrateandcronschedules_Handler_B4B8DF58": { - "//": { - "metadata": { - "path": "root/Default/Default/on tick is called both for rate and cron schedules/Handler/Default", - "uniqueId": "ontickiscalledbothforrateandcronschedules_Handler_B4B8DF58" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "DYNAMODB_TABLE_NAME_7ba9f967": "${aws_dynamodb_table.c2.name}", - "DYNAMODB_TABLE_NAME_bca69a1d": "${aws_dynamodb_table.c1.name}", - "WING_FUNCTION_NAME": "Handler-c8fa0698", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8fa0698", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.ontickiscalledbothforrateandcronschedules_Handler_IamRole_89BBCA80.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.ontickiscalledbothforrateandcronschedules_Handler_S3Object_C05D01D6.key}", - "timeout": 120, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } } }, "aws_lambda_permission": { @@ -415,17 +355,6 @@ module.exports = function({ $c1, $c2, $std_Duration, $util_Util }) { "bucket": "${aws_s3_bucket.Code.bucket}", "key": "", "source": "" - }, - "ontickiscalledbothforrateandcronschedules_Handler_S3Object_C05D01D6": { - "//": { - "metadata": { - "path": "root/Default/Default/on tick is called both for rate and cron schedules/Handler/S3Object", - "uniqueId": "ontickiscalledbothforrateandcronschedules_Handler_S3Object_C05D01D6" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" } } } diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/array.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/array.w_compile_tf-aws.md index b55cf8f7ab8..0216f8fe748 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/array.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/array.w_compile_tf-aws.md @@ -465,7 +465,7 @@ module.exports = function({ }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:length\",\"${aws_lambda_function.testlength_Handler_BFD8933F.arn}\"],[\"root/Default/Default/test:at()\",\"${aws_lambda_function.testat_Handler_E4F013BC.arn}\"],[\"root/Default/Default/test:pushAndPop()\",\"${aws_lambda_function.testpushAndPop_Handler_EAC0C8FF.arn}\"],[\"root/Default/Default/test:popAt()\",\"${aws_lambda_function.testpopAt_Handler_A6739840.arn}\"],[\"root/Default/Default/test:concatMutArray()\",\"${aws_lambda_function.testconcatMutArray_Handler_40D88E89.arn}\"],[\"root/Default/Default/test:concatArray()\",\"${aws_lambda_function.testconcatArray_Handler_F66848AE.arn}\"],[\"root/Default/Default/test:contains()\",\"${aws_lambda_function.testcontains_Handler_F60865D9.arn}\"],[\"root/Default/Default/test:indexOf()\",\"${aws_lambda_function.testindexOf_Handler_BD91EA6F.arn}\"],[\"root/Default/Default/test:indexOfArray()\",\"${aws_lambda_function.testindexOfArray_Handler_DB3A81F5.arn}\"],[\"root/Default/Default/test:join()\",\"${aws_lambda_function.testjoin_Handler_6AC62A8E.arn}\"],[\"root/Default/Default/test:joinWithDefaultSeparator()\",\"${aws_lambda_function.testjoinWithDefaultSeparator_Handler_7AE1258D.arn}\"],[\"root/Default/Default/test:copy()\",\"${aws_lambda_function.testcopy_Handler_27A14A0E.arn}\"],[\"root/Default/Default/test:copyMut()\",\"${aws_lambda_function.testcopyMut_Handler_851E24B4.arn}\"],[\"root/Default/Default/test:lastIndexOf()\",\"${aws_lambda_function.testlastIndexOf_Handler_FFB2061F.arn}\"],[\"root/Default/Default/test:set()\",\"${aws_lambda_function.testset_Handler_ADDF1A01.arn}\"],[\"root/Default/Default/test:insert()\",\"${aws_lambda_function.testinsert_Handler_20BB87F8.arn}\"],[\"root/Default/Default/test:removeFirst()\",\"${aws_lambda_function.testremoveFirst_Handler_4D1D9086.arn}\"]]" + "value": "[]" } }, "provider": { @@ -474,1010 +474,7 @@ module.exports = function({ }) { ] }, "resource": { - "aws_iam_role": { - "testat_Handler_IamRole_17A4EF25": { - "//": { - "metadata": { - "path": "root/Default/Default/test:at()/Handler/IamRole", - "uniqueId": "testat_Handler_IamRole_17A4EF25" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testconcatArray_Handler_IamRole_91E4CC58": { - "//": { - "metadata": { - "path": "root/Default/Default/test:concatArray()/Handler/IamRole", - "uniqueId": "testconcatArray_Handler_IamRole_91E4CC58" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testconcatMutArray_Handler_IamRole_D15DDECD": { - "//": { - "metadata": { - "path": "root/Default/Default/test:concatMutArray()/Handler/IamRole", - "uniqueId": "testconcatMutArray_Handler_IamRole_D15DDECD" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testcontains_Handler_IamRole_654B73B4": { - "//": { - "metadata": { - "path": "root/Default/Default/test:contains()/Handler/IamRole", - "uniqueId": "testcontains_Handler_IamRole_654B73B4" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testcopyMut_Handler_IamRole_D315FFC7": { - "//": { - "metadata": { - "path": "root/Default/Default/test:copyMut()/Handler/IamRole", - "uniqueId": "testcopyMut_Handler_IamRole_D315FFC7" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testcopy_Handler_IamRole_1C204862": { - "//": { - "metadata": { - "path": "root/Default/Default/test:copy()/Handler/IamRole", - "uniqueId": "testcopy_Handler_IamRole_1C204862" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testindexOfArray_Handler_IamRole_7E74F988": { - "//": { - "metadata": { - "path": "root/Default/Default/test:indexOfArray()/Handler/IamRole", - "uniqueId": "testindexOfArray_Handler_IamRole_7E74F988" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testindexOf_Handler_IamRole_F0D11C74": { - "//": { - "metadata": { - "path": "root/Default/Default/test:indexOf()/Handler/IamRole", - "uniqueId": "testindexOf_Handler_IamRole_F0D11C74" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testinsert_Handler_IamRole_8D4BB8D7": { - "//": { - "metadata": { - "path": "root/Default/Default/test:insert()/Handler/IamRole", - "uniqueId": "testinsert_Handler_IamRole_8D4BB8D7" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testjoinWithDefaultSeparator_Handler_IamRole_F4B07C96": { - "//": { - "metadata": { - "path": "root/Default/Default/test:joinWithDefaultSeparator()/Handler/IamRole", - "uniqueId": "testjoinWithDefaultSeparator_Handler_IamRole_F4B07C96" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testjoin_Handler_IamRole_FC92EB9B": { - "//": { - "metadata": { - "path": "root/Default/Default/test:join()/Handler/IamRole", - "uniqueId": "testjoin_Handler_IamRole_FC92EB9B" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testlastIndexOf_Handler_IamRole_91224FF2": { - "//": { - "metadata": { - "path": "root/Default/Default/test:lastIndexOf()/Handler/IamRole", - "uniqueId": "testlastIndexOf_Handler_IamRole_91224FF2" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testlength_Handler_IamRole_0AFDC7CB": { - "//": { - "metadata": { - "path": "root/Default/Default/test:length/Handler/IamRole", - "uniqueId": "testlength_Handler_IamRole_0AFDC7CB" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testpopAt_Handler_IamRole_D00C1FE4": { - "//": { - "metadata": { - "path": "root/Default/Default/test:popAt()/Handler/IamRole", - "uniqueId": "testpopAt_Handler_IamRole_D00C1FE4" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testpushAndPop_Handler_IamRole_5F6E6E00": { - "//": { - "metadata": { - "path": "root/Default/Default/test:pushAndPop()/Handler/IamRole", - "uniqueId": "testpushAndPop_Handler_IamRole_5F6E6E00" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testremoveFirst_Handler_IamRole_A9164B23": { - "//": { - "metadata": { - "path": "root/Default/Default/test:removeFirst()/Handler/IamRole", - "uniqueId": "testremoveFirst_Handler_IamRole_A9164B23" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testset_Handler_IamRole_B9B79227": { - "//": { - "metadata": { - "path": "root/Default/Default/test:set()/Handler/IamRole", - "uniqueId": "testset_Handler_IamRole_B9B79227" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testat_Handler_IamRolePolicy_8B108027": { - "//": { - "metadata": { - "path": "root/Default/Default/test:at()/Handler/IamRolePolicy", - "uniqueId": "testat_Handler_IamRolePolicy_8B108027" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testat_Handler_IamRole_17A4EF25.name}" - }, - "testconcatArray_Handler_IamRolePolicy_E96FB1EA": { - "//": { - "metadata": { - "path": "root/Default/Default/test:concatArray()/Handler/IamRolePolicy", - "uniqueId": "testconcatArray_Handler_IamRolePolicy_E96FB1EA" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testconcatArray_Handler_IamRole_91E4CC58.name}" - }, - "testconcatMutArray_Handler_IamRolePolicy_75833E57": { - "//": { - "metadata": { - "path": "root/Default/Default/test:concatMutArray()/Handler/IamRolePolicy", - "uniqueId": "testconcatMutArray_Handler_IamRolePolicy_75833E57" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testconcatMutArray_Handler_IamRole_D15DDECD.name}" - }, - "testcontains_Handler_IamRolePolicy_F4401AB2": { - "//": { - "metadata": { - "path": "root/Default/Default/test:contains()/Handler/IamRolePolicy", - "uniqueId": "testcontains_Handler_IamRolePolicy_F4401AB2" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testcontains_Handler_IamRole_654B73B4.name}" - }, - "testcopyMut_Handler_IamRolePolicy_E62EECBF": { - "//": { - "metadata": { - "path": "root/Default/Default/test:copyMut()/Handler/IamRolePolicy", - "uniqueId": "testcopyMut_Handler_IamRolePolicy_E62EECBF" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testcopyMut_Handler_IamRole_D315FFC7.name}" - }, - "testcopy_Handler_IamRolePolicy_C631E0BA": { - "//": { - "metadata": { - "path": "root/Default/Default/test:copy()/Handler/IamRolePolicy", - "uniqueId": "testcopy_Handler_IamRolePolicy_C631E0BA" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testcopy_Handler_IamRole_1C204862.name}" - }, - "testindexOfArray_Handler_IamRolePolicy_A7F1827B": { - "//": { - "metadata": { - "path": "root/Default/Default/test:indexOfArray()/Handler/IamRolePolicy", - "uniqueId": "testindexOfArray_Handler_IamRolePolicy_A7F1827B" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testindexOfArray_Handler_IamRole_7E74F988.name}" - }, - "testindexOf_Handler_IamRolePolicy_44B0136F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:indexOf()/Handler/IamRolePolicy", - "uniqueId": "testindexOf_Handler_IamRolePolicy_44B0136F" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testindexOf_Handler_IamRole_F0D11C74.name}" - }, - "testinsert_Handler_IamRolePolicy_2FD3AAA8": { - "//": { - "metadata": { - "path": "root/Default/Default/test:insert()/Handler/IamRolePolicy", - "uniqueId": "testinsert_Handler_IamRolePolicy_2FD3AAA8" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testinsert_Handler_IamRole_8D4BB8D7.name}" - }, - "testjoinWithDefaultSeparator_Handler_IamRolePolicy_BE8C8109": { - "//": { - "metadata": { - "path": "root/Default/Default/test:joinWithDefaultSeparator()/Handler/IamRolePolicy", - "uniqueId": "testjoinWithDefaultSeparator_Handler_IamRolePolicy_BE8C8109" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testjoinWithDefaultSeparator_Handler_IamRole_F4B07C96.name}" - }, - "testjoin_Handler_IamRolePolicy_DFD6A993": { - "//": { - "metadata": { - "path": "root/Default/Default/test:join()/Handler/IamRolePolicy", - "uniqueId": "testjoin_Handler_IamRolePolicy_DFD6A993" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testjoin_Handler_IamRole_FC92EB9B.name}" - }, - "testlastIndexOf_Handler_IamRolePolicy_AB422B9C": { - "//": { - "metadata": { - "path": "root/Default/Default/test:lastIndexOf()/Handler/IamRolePolicy", - "uniqueId": "testlastIndexOf_Handler_IamRolePolicy_AB422B9C" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testlastIndexOf_Handler_IamRole_91224FF2.name}" - }, - "testlength_Handler_IamRolePolicy_30FC50C3": { - "//": { - "metadata": { - "path": "root/Default/Default/test:length/Handler/IamRolePolicy", - "uniqueId": "testlength_Handler_IamRolePolicy_30FC50C3" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testlength_Handler_IamRole_0AFDC7CB.name}" - }, - "testpopAt_Handler_IamRolePolicy_9E762AA5": { - "//": { - "metadata": { - "path": "root/Default/Default/test:popAt()/Handler/IamRolePolicy", - "uniqueId": "testpopAt_Handler_IamRolePolicy_9E762AA5" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testpopAt_Handler_IamRole_D00C1FE4.name}" - }, - "testpushAndPop_Handler_IamRolePolicy_7A2A0323": { - "//": { - "metadata": { - "path": "root/Default/Default/test:pushAndPop()/Handler/IamRolePolicy", - "uniqueId": "testpushAndPop_Handler_IamRolePolicy_7A2A0323" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testpushAndPop_Handler_IamRole_5F6E6E00.name}" - }, - "testremoveFirst_Handler_IamRolePolicy_878A7F57": { - "//": { - "metadata": { - "path": "root/Default/Default/test:removeFirst()/Handler/IamRolePolicy", - "uniqueId": "testremoveFirst_Handler_IamRolePolicy_878A7F57" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testremoveFirst_Handler_IamRole_A9164B23.name}" - }, - "testset_Handler_IamRolePolicy_ADE48415": { - "//": { - "metadata": { - "path": "root/Default/Default/test:set()/Handler/IamRolePolicy", - "uniqueId": "testset_Handler_IamRolePolicy_ADE48415" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testset_Handler_IamRole_B9B79227.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testat_Handler_IamRolePolicyAttachment_16B3C8B1": { - "//": { - "metadata": { - "path": "root/Default/Default/test:at()/Handler/IamRolePolicyAttachment", - "uniqueId": "testat_Handler_IamRolePolicyAttachment_16B3C8B1" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testat_Handler_IamRole_17A4EF25.name}" - }, - "testconcatArray_Handler_IamRolePolicyAttachment_A92013C8": { - "//": { - "metadata": { - "path": "root/Default/Default/test:concatArray()/Handler/IamRolePolicyAttachment", - "uniqueId": "testconcatArray_Handler_IamRolePolicyAttachment_A92013C8" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testconcatArray_Handler_IamRole_91E4CC58.name}" - }, - "testconcatMutArray_Handler_IamRolePolicyAttachment_412A245F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:concatMutArray()/Handler/IamRolePolicyAttachment", - "uniqueId": "testconcatMutArray_Handler_IamRolePolicyAttachment_412A245F" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testconcatMutArray_Handler_IamRole_D15DDECD.name}" - }, - "testcontains_Handler_IamRolePolicyAttachment_D324FFE4": { - "//": { - "metadata": { - "path": "root/Default/Default/test:contains()/Handler/IamRolePolicyAttachment", - "uniqueId": "testcontains_Handler_IamRolePolicyAttachment_D324FFE4" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testcontains_Handler_IamRole_654B73B4.name}" - }, - "testcopyMut_Handler_IamRolePolicyAttachment_F41EBCFC": { - "//": { - "metadata": { - "path": "root/Default/Default/test:copyMut()/Handler/IamRolePolicyAttachment", - "uniqueId": "testcopyMut_Handler_IamRolePolicyAttachment_F41EBCFC" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testcopyMut_Handler_IamRole_D315FFC7.name}" - }, - "testcopy_Handler_IamRolePolicyAttachment_8E7F5E53": { - "//": { - "metadata": { - "path": "root/Default/Default/test:copy()/Handler/IamRolePolicyAttachment", - "uniqueId": "testcopy_Handler_IamRolePolicyAttachment_8E7F5E53" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testcopy_Handler_IamRole_1C204862.name}" - }, - "testindexOfArray_Handler_IamRolePolicyAttachment_FC4444FE": { - "//": { - "metadata": { - "path": "root/Default/Default/test:indexOfArray()/Handler/IamRolePolicyAttachment", - "uniqueId": "testindexOfArray_Handler_IamRolePolicyAttachment_FC4444FE" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testindexOfArray_Handler_IamRole_7E74F988.name}" - }, - "testindexOf_Handler_IamRolePolicyAttachment_07DB0649": { - "//": { - "metadata": { - "path": "root/Default/Default/test:indexOf()/Handler/IamRolePolicyAttachment", - "uniqueId": "testindexOf_Handler_IamRolePolicyAttachment_07DB0649" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testindexOf_Handler_IamRole_F0D11C74.name}" - }, - "testinsert_Handler_IamRolePolicyAttachment_D83DEDF1": { - "//": { - "metadata": { - "path": "root/Default/Default/test:insert()/Handler/IamRolePolicyAttachment", - "uniqueId": "testinsert_Handler_IamRolePolicyAttachment_D83DEDF1" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinsert_Handler_IamRole_8D4BB8D7.name}" - }, - "testjoinWithDefaultSeparator_Handler_IamRolePolicyAttachment_CCD2125B": { - "//": { - "metadata": { - "path": "root/Default/Default/test:joinWithDefaultSeparator()/Handler/IamRolePolicyAttachment", - "uniqueId": "testjoinWithDefaultSeparator_Handler_IamRolePolicyAttachment_CCD2125B" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testjoinWithDefaultSeparator_Handler_IamRole_F4B07C96.name}" - }, - "testjoin_Handler_IamRolePolicyAttachment_CC1F36FC": { - "//": { - "metadata": { - "path": "root/Default/Default/test:join()/Handler/IamRolePolicyAttachment", - "uniqueId": "testjoin_Handler_IamRolePolicyAttachment_CC1F36FC" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testjoin_Handler_IamRole_FC92EB9B.name}" - }, - "testlastIndexOf_Handler_IamRolePolicyAttachment_48E66B52": { - "//": { - "metadata": { - "path": "root/Default/Default/test:lastIndexOf()/Handler/IamRolePolicyAttachment", - "uniqueId": "testlastIndexOf_Handler_IamRolePolicyAttachment_48E66B52" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testlastIndexOf_Handler_IamRole_91224FF2.name}" - }, - "testlength_Handler_IamRolePolicyAttachment_2C0296CF": { - "//": { - "metadata": { - "path": "root/Default/Default/test:length/Handler/IamRolePolicyAttachment", - "uniqueId": "testlength_Handler_IamRolePolicyAttachment_2C0296CF" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testlength_Handler_IamRole_0AFDC7CB.name}" - }, - "testpopAt_Handler_IamRolePolicyAttachment_11532865": { - "//": { - "metadata": { - "path": "root/Default/Default/test:popAt()/Handler/IamRolePolicyAttachment", - "uniqueId": "testpopAt_Handler_IamRolePolicyAttachment_11532865" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testpopAt_Handler_IamRole_D00C1FE4.name}" - }, - "testpushAndPop_Handler_IamRolePolicyAttachment_D18E216F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:pushAndPop()/Handler/IamRolePolicyAttachment", - "uniqueId": "testpushAndPop_Handler_IamRolePolicyAttachment_D18E216F" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testpushAndPop_Handler_IamRole_5F6E6E00.name}" - }, - "testremoveFirst_Handler_IamRolePolicyAttachment_511FE450": { - "//": { - "metadata": { - "path": "root/Default/Default/test:removeFirst()/Handler/IamRolePolicyAttachment", - "uniqueId": "testremoveFirst_Handler_IamRolePolicyAttachment_511FE450" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testremoveFirst_Handler_IamRole_A9164B23.name}" - }, - "testset_Handler_IamRolePolicyAttachment_58805670": { - "//": { - "metadata": { - "path": "root/Default/Default/test:set()/Handler/IamRolePolicyAttachment", - "uniqueId": "testset_Handler_IamRolePolicyAttachment_58805670" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testset_Handler_IamRole_B9B79227.name}" - } - }, - "aws_lambda_function": { - "testat_Handler_E4F013BC": { - "//": { - "metadata": { - "path": "root/Default/Default/test:at()/Handler/Default", - "uniqueId": "testat_Handler_E4F013BC" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c858faac", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c858faac", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testat_Handler_IamRole_17A4EF25.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testat_Handler_S3Object_AE9ADE42.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testconcatArray_Handler_F66848AE": { - "//": { - "metadata": { - "path": "root/Default/Default/test:concatArray()/Handler/Default", - "uniqueId": "testconcatArray_Handler_F66848AE" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8ba9aa0", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8ba9aa0", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testconcatArray_Handler_IamRole_91E4CC58.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testconcatArray_Handler_S3Object_51EBC412.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testconcatMutArray_Handler_40D88E89": { - "//": { - "metadata": { - "path": "root/Default/Default/test:concatMutArray()/Handler/Default", - "uniqueId": "testconcatMutArray_Handler_40D88E89" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8e5a138", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8e5a138", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testconcatMutArray_Handler_IamRole_D15DDECD.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testconcatMutArray_Handler_S3Object_070213DC.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testcontains_Handler_F60865D9": { - "//": { - "metadata": { - "path": "root/Default/Default/test:contains()/Handler/Default", - "uniqueId": "testcontains_Handler_F60865D9" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8e953a0", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8e953a0", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testcontains_Handler_IamRole_654B73B4.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testcontains_Handler_S3Object_4387F7AE.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testcopyMut_Handler_851E24B4": { - "//": { - "metadata": { - "path": "root/Default/Default/test:copyMut()/Handler/Default", - "uniqueId": "testcopyMut_Handler_851E24B4" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8b1cc09", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8b1cc09", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testcopyMut_Handler_IamRole_D315FFC7.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testcopyMut_Handler_S3Object_9A27F38E.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testcopy_Handler_27A14A0E": { - "//": { - "metadata": { - "path": "root/Default/Default/test:copy()/Handler/Default", - "uniqueId": "testcopy_Handler_27A14A0E" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c802a3d7", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c802a3d7", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testcopy_Handler_IamRole_1C204862.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testcopy_Handler_S3Object_75FB5F66.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testindexOfArray_Handler_DB3A81F5": { - "//": { - "metadata": { - "path": "root/Default/Default/test:indexOfArray()/Handler/Default", - "uniqueId": "testindexOfArray_Handler_DB3A81F5" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c88fa7a3", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c88fa7a3", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testindexOfArray_Handler_IamRole_7E74F988.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testindexOfArray_Handler_S3Object_97FDD78D.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testindexOf_Handler_BD91EA6F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:indexOf()/Handler/Default", - "uniqueId": "testindexOf_Handler_BD91EA6F" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c80be453", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c80be453", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testindexOf_Handler_IamRole_F0D11C74.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testindexOf_Handler_S3Object_C2C2987B.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testinsert_Handler_20BB87F8": { - "//": { - "metadata": { - "path": "root/Default/Default/test:insert()/Handler/Default", - "uniqueId": "testinsert_Handler_20BB87F8" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8bd9541", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8bd9541", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinsert_Handler_IamRole_8D4BB8D7.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinsert_Handler_S3Object_B3145049.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testjoinWithDefaultSeparator_Handler_7AE1258D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:joinWithDefaultSeparator()/Handler/Default", - "uniqueId": "testjoinWithDefaultSeparator_Handler_7AE1258D" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c833ed71", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c833ed71", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testjoinWithDefaultSeparator_Handler_IamRole_F4B07C96.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testjoinWithDefaultSeparator_Handler_S3Object_3891F637.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testjoin_Handler_6AC62A8E": { - "//": { - "metadata": { - "path": "root/Default/Default/test:join()/Handler/Default", - "uniqueId": "testjoin_Handler_6AC62A8E" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8a46f15", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8a46f15", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testjoin_Handler_IamRole_FC92EB9B.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testjoin_Handler_S3Object_AA8680E5.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testlastIndexOf_Handler_FFB2061F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:lastIndexOf()/Handler/Default", - "uniqueId": "testlastIndexOf_Handler_FFB2061F" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c84609d0", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c84609d0", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testlastIndexOf_Handler_IamRole_91224FF2.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testlastIndexOf_Handler_S3Object_D642CBE9.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testlength_Handler_BFD8933F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:length/Handler/Default", - "uniqueId": "testlength_Handler_BFD8933F" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8e0ccbd", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8e0ccbd", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testlength_Handler_IamRole_0AFDC7CB.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testlength_Handler_S3Object_1AB463C9.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testpopAt_Handler_A6739840": { - "//": { - "metadata": { - "path": "root/Default/Default/test:popAt()/Handler/Default", - "uniqueId": "testpopAt_Handler_A6739840" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c817e47d", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c817e47d", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testpopAt_Handler_IamRole_D00C1FE4.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testpopAt_Handler_S3Object_0EEB898A.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testpushAndPop_Handler_EAC0C8FF": { - "//": { - "metadata": { - "path": "root/Default/Default/test:pushAndPop()/Handler/Default", - "uniqueId": "testpushAndPop_Handler_EAC0C8FF" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8b6e896", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8b6e896", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testpushAndPop_Handler_IamRole_5F6E6E00.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testpushAndPop_Handler_S3Object_3F93E368.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testremoveFirst_Handler_4D1D9086": { - "//": { - "metadata": { - "path": "root/Default/Default/test:removeFirst()/Handler/Default", - "uniqueId": "testremoveFirst_Handler_4D1D9086" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8d404f0", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8d404f0", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testremoveFirst_Handler_IamRole_A9164B23.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testremoveFirst_Handler_S3Object_9034C8E7.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testset_Handler_ADDF1A01": { - "//": { - "metadata": { - "path": "root/Default/Default/test:set()/Handler/Default", - "uniqueId": "testset_Handler_ADDF1A01" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8240bc7", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8240bc7", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testset_Handler_IamRole_B9B79227.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testset_Handler_S3Object_A8FBF518.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - }, "cloudBucket": { "//": { "metadata": { @@ -1558,195 +555,6 @@ module.exports = function({ }) { } ] } - }, - "aws_s3_object": { - "testat_Handler_S3Object_AE9ADE42": { - "//": { - "metadata": { - "path": "root/Default/Default/test:at()/Handler/S3Object", - "uniqueId": "testat_Handler_S3Object_AE9ADE42" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testconcatArray_Handler_S3Object_51EBC412": { - "//": { - "metadata": { - "path": "root/Default/Default/test:concatArray()/Handler/S3Object", - "uniqueId": "testconcatArray_Handler_S3Object_51EBC412" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testconcatMutArray_Handler_S3Object_070213DC": { - "//": { - "metadata": { - "path": "root/Default/Default/test:concatMutArray()/Handler/S3Object", - "uniqueId": "testconcatMutArray_Handler_S3Object_070213DC" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testcontains_Handler_S3Object_4387F7AE": { - "//": { - "metadata": { - "path": "root/Default/Default/test:contains()/Handler/S3Object", - "uniqueId": "testcontains_Handler_S3Object_4387F7AE" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testcopyMut_Handler_S3Object_9A27F38E": { - "//": { - "metadata": { - "path": "root/Default/Default/test:copyMut()/Handler/S3Object", - "uniqueId": "testcopyMut_Handler_S3Object_9A27F38E" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testcopy_Handler_S3Object_75FB5F66": { - "//": { - "metadata": { - "path": "root/Default/Default/test:copy()/Handler/S3Object", - "uniqueId": "testcopy_Handler_S3Object_75FB5F66" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testindexOfArray_Handler_S3Object_97FDD78D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:indexOfArray()/Handler/S3Object", - "uniqueId": "testindexOfArray_Handler_S3Object_97FDD78D" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testindexOf_Handler_S3Object_C2C2987B": { - "//": { - "metadata": { - "path": "root/Default/Default/test:indexOf()/Handler/S3Object", - "uniqueId": "testindexOf_Handler_S3Object_C2C2987B" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testinsert_Handler_S3Object_B3145049": { - "//": { - "metadata": { - "path": "root/Default/Default/test:insert()/Handler/S3Object", - "uniqueId": "testinsert_Handler_S3Object_B3145049" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testjoinWithDefaultSeparator_Handler_S3Object_3891F637": { - "//": { - "metadata": { - "path": "root/Default/Default/test:joinWithDefaultSeparator()/Handler/S3Object", - "uniqueId": "testjoinWithDefaultSeparator_Handler_S3Object_3891F637" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testjoin_Handler_S3Object_AA8680E5": { - "//": { - "metadata": { - "path": "root/Default/Default/test:join()/Handler/S3Object", - "uniqueId": "testjoin_Handler_S3Object_AA8680E5" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testlastIndexOf_Handler_S3Object_D642CBE9": { - "//": { - "metadata": { - "path": "root/Default/Default/test:lastIndexOf()/Handler/S3Object", - "uniqueId": "testlastIndexOf_Handler_S3Object_D642CBE9" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testlength_Handler_S3Object_1AB463C9": { - "//": { - "metadata": { - "path": "root/Default/Default/test:length/Handler/S3Object", - "uniqueId": "testlength_Handler_S3Object_1AB463C9" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testpopAt_Handler_S3Object_0EEB898A": { - "//": { - "metadata": { - "path": "root/Default/Default/test:popAt()/Handler/S3Object", - "uniqueId": "testpopAt_Handler_S3Object_0EEB898A" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testpushAndPop_Handler_S3Object_3F93E368": { - "//": { - "metadata": { - "path": "root/Default/Default/test:pushAndPop()/Handler/S3Object", - "uniqueId": "testpushAndPop_Handler_S3Object_3F93E368" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testremoveFirst_Handler_S3Object_9034C8E7": { - "//": { - "metadata": { - "path": "root/Default/Default/test:removeFirst()/Handler/S3Object", - "uniqueId": "testremoveFirst_Handler_S3Object_9034C8E7" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testset_Handler_S3Object_A8FBF518": { - "//": { - "metadata": { - "path": "root/Default/Default/test:set()/Handler/S3Object", - "uniqueId": "testset_Handler_S3Object_A8FBF518" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } } } } diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/bool.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/bool.w_compile_tf-aws.md index ca2f3290a7b..beac176aa7c 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/bool.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/bool.w_compile_tf-aws.md @@ -49,105 +49,13 @@ module.exports = function({ $PARSE_ERROR, $std_Boolean, $std_Json }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:fromJson()\",\"${aws_lambda_function.testfromJson_Handler_ACD6C987.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testfromJson_Handler_IamRole_B9C3FE4B": { - "//": { - "metadata": { - "path": "root/Default/Default/test:fromJson()/Handler/IamRole", - "uniqueId": "testfromJson_Handler_IamRole_B9C3FE4B" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testfromJson_Handler_IamRolePolicy_98ED7AC7": { - "//": { - "metadata": { - "path": "root/Default/Default/test:fromJson()/Handler/IamRolePolicy", - "uniqueId": "testfromJson_Handler_IamRolePolicy_98ED7AC7" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testfromJson_Handler_IamRole_B9C3FE4B.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testfromJson_Handler_IamRolePolicyAttachment_DB66F55A": { - "//": { - "metadata": { - "path": "root/Default/Default/test:fromJson()/Handler/IamRolePolicyAttachment", - "uniqueId": "testfromJson_Handler_IamRolePolicyAttachment_DB66F55A" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testfromJson_Handler_IamRole_B9C3FE4B.name}" - } - }, - "aws_lambda_function": { - "testfromJson_Handler_ACD6C987": { - "//": { - "metadata": { - "path": "root/Default/Default/test:fromJson()/Handler/Default", - "uniqueId": "testfromJson_Handler_ACD6C987" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8d3ce6e", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8d3ce6e", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testfromJson_Handler_IamRole_B9C3FE4B.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testfromJson_Handler_S3Object_7F3A23CC.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testfromJson_Handler_S3Object_7F3A23CC": { - "//": { - "metadata": { - "path": "root/Default/Default/test:fromJson()/Handler/S3Object", - "uniqueId": "testfromJson_Handler_S3Object_7F3A23CC" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/datetime.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/datetime.w_compile_tf-aws.md index 2f943b1e9d7..d9688b5fef2 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/datetime.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/datetime.w_compile_tf-aws.md @@ -60,105 +60,13 @@ module.exports = function({ $_d4_toUtc____hours, $d4_hours, $d4_timezone, $math_ }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:inflight datetime\",\"${aws_lambda_function.testinflightdatetime_Handler_CCA19CA1.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testinflightdatetime_Handler_IamRole_F29772B9": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight datetime/Handler/IamRole", - "uniqueId": "testinflightdatetime_Handler_IamRole_F29772B9" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testinflightdatetime_Handler_IamRolePolicy_BA52AB3F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight datetime/Handler/IamRolePolicy", - "uniqueId": "testinflightdatetime_Handler_IamRolePolicy_BA52AB3F" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testinflightdatetime_Handler_IamRole_F29772B9.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testinflightdatetime_Handler_IamRolePolicyAttachment_BBFA8051": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight datetime/Handler/IamRolePolicyAttachment", - "uniqueId": "testinflightdatetime_Handler_IamRolePolicyAttachment_BBFA8051" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinflightdatetime_Handler_IamRole_F29772B9.name}" - } - }, - "aws_lambda_function": { - "testinflightdatetime_Handler_CCA19CA1": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight datetime/Handler/Default", - "uniqueId": "testinflightdatetime_Handler_CCA19CA1" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8211bab", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8211bab", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinflightdatetime_Handler_IamRole_F29772B9.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinflightdatetime_Handler_S3Object_972D133E.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testinflightdatetime_Handler_S3Object_972D133E": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight datetime/Handler/S3Object", - "uniqueId": "testinflightdatetime_Handler_S3Object_972D133E" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/duration.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/duration.w_compile_tf-aws.md index c0ffaf00871..105f7378f73 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/duration.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/duration.w_compile_tf-aws.md @@ -58,105 +58,13 @@ module.exports = function({ $std_Duration }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:duration\",\"${aws_lambda_function.testduration_Handler_50E6E252.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testduration_Handler_IamRole_E8904CA2": { - "//": { - "metadata": { - "path": "root/Default/Default/test:duration/Handler/IamRole", - "uniqueId": "testduration_Handler_IamRole_E8904CA2" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testduration_Handler_IamRolePolicy_0F7DF922": { - "//": { - "metadata": { - "path": "root/Default/Default/test:duration/Handler/IamRolePolicy", - "uniqueId": "testduration_Handler_IamRolePolicy_0F7DF922" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testduration_Handler_IamRole_E8904CA2.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testduration_Handler_IamRolePolicyAttachment_80DA5D49": { - "//": { - "metadata": { - "path": "root/Default/Default/test:duration/Handler/IamRolePolicyAttachment", - "uniqueId": "testduration_Handler_IamRolePolicyAttachment_80DA5D49" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testduration_Handler_IamRole_E8904CA2.name}" - } - }, - "aws_lambda_function": { - "testduration_Handler_50E6E252": { - "//": { - "metadata": { - "path": "root/Default/Default/test:duration/Handler/Default", - "uniqueId": "testduration_Handler_50E6E252" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8eae108", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8eae108", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testduration_Handler_IamRole_E8904CA2.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testduration_Handler_S3Object_0D531EBE.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testduration_Handler_S3Object_0D531EBE": { - "//": { - "metadata": { - "path": "root/Default/Default/test:duration/Handler/S3Object", - "uniqueId": "testduration_Handler_S3Object_0D531EBE" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/json.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/json.w_compile_tf-aws.md index ecf6c4202a4..083f47ee13c 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/json.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/json.w_compile_tf-aws.md @@ -170,381 +170,13 @@ module.exports = function({ $std_Json }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:get()\",\"${aws_lambda_function.testget_Handler_A37EBFC3.arn}\"],[\"root/Default/Default/test:getAt()\",\"${aws_lambda_function.testgetAt_Handler_44D7BE7A.arn}\"],[\"root/Default/Default/test:set()\",\"${aws_lambda_function.testset_Handler_ADDF1A01.arn}\"],[\"root/Default/Default/test:setAt()\",\"${aws_lambda_function.testsetAt_Handler_51015029.arn}\"],[\"root/Default/Default/test:stringify()\",\"${aws_lambda_function.teststringify_Handler_2E93A8A7.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testgetAt_Handler_IamRole_915EA920": { - "//": { - "metadata": { - "path": "root/Default/Default/test:getAt()/Handler/IamRole", - "uniqueId": "testgetAt_Handler_IamRole_915EA920" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testget_Handler_IamRole_7FCA766F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:get()/Handler/IamRole", - "uniqueId": "testget_Handler_IamRole_7FCA766F" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testsetAt_Handler_IamRole_C36C780A": { - "//": { - "metadata": { - "path": "root/Default/Default/test:setAt()/Handler/IamRole", - "uniqueId": "testsetAt_Handler_IamRole_C36C780A" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testset_Handler_IamRole_B9B79227": { - "//": { - "metadata": { - "path": "root/Default/Default/test:set()/Handler/IamRole", - "uniqueId": "testset_Handler_IamRole_B9B79227" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "teststringify_Handler_IamRole_D79B403A": { - "//": { - "metadata": { - "path": "root/Default/Default/test:stringify()/Handler/IamRole", - "uniqueId": "teststringify_Handler_IamRole_D79B403A" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testgetAt_Handler_IamRolePolicy_0F6A0772": { - "//": { - "metadata": { - "path": "root/Default/Default/test:getAt()/Handler/IamRolePolicy", - "uniqueId": "testgetAt_Handler_IamRolePolicy_0F6A0772" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testgetAt_Handler_IamRole_915EA920.name}" - }, - "testget_Handler_IamRolePolicy_B215A072": { - "//": { - "metadata": { - "path": "root/Default/Default/test:get()/Handler/IamRolePolicy", - "uniqueId": "testget_Handler_IamRolePolicy_B215A072" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testget_Handler_IamRole_7FCA766F.name}" - }, - "testsetAt_Handler_IamRolePolicy_24EE9CC0": { - "//": { - "metadata": { - "path": "root/Default/Default/test:setAt()/Handler/IamRolePolicy", - "uniqueId": "testsetAt_Handler_IamRolePolicy_24EE9CC0" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testsetAt_Handler_IamRole_C36C780A.name}" - }, - "testset_Handler_IamRolePolicy_ADE48415": { - "//": { - "metadata": { - "path": "root/Default/Default/test:set()/Handler/IamRolePolicy", - "uniqueId": "testset_Handler_IamRolePolicy_ADE48415" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testset_Handler_IamRole_B9B79227.name}" - }, - "teststringify_Handler_IamRolePolicy_2C7E059D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:stringify()/Handler/IamRolePolicy", - "uniqueId": "teststringify_Handler_IamRolePolicy_2C7E059D" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.teststringify_Handler_IamRole_D79B403A.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testgetAt_Handler_IamRolePolicyAttachment_4D020DB9": { - "//": { - "metadata": { - "path": "root/Default/Default/test:getAt()/Handler/IamRolePolicyAttachment", - "uniqueId": "testgetAt_Handler_IamRolePolicyAttachment_4D020DB9" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testgetAt_Handler_IamRole_915EA920.name}" - }, - "testget_Handler_IamRolePolicyAttachment_63E5FC9C": { - "//": { - "metadata": { - "path": "root/Default/Default/test:get()/Handler/IamRolePolicyAttachment", - "uniqueId": "testget_Handler_IamRolePolicyAttachment_63E5FC9C" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testget_Handler_IamRole_7FCA766F.name}" - }, - "testsetAt_Handler_IamRolePolicyAttachment_764BF14B": { - "//": { - "metadata": { - "path": "root/Default/Default/test:setAt()/Handler/IamRolePolicyAttachment", - "uniqueId": "testsetAt_Handler_IamRolePolicyAttachment_764BF14B" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testsetAt_Handler_IamRole_C36C780A.name}" - }, - "testset_Handler_IamRolePolicyAttachment_58805670": { - "//": { - "metadata": { - "path": "root/Default/Default/test:set()/Handler/IamRolePolicyAttachment", - "uniqueId": "testset_Handler_IamRolePolicyAttachment_58805670" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testset_Handler_IamRole_B9B79227.name}" - }, - "teststringify_Handler_IamRolePolicyAttachment_B6E5A35D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:stringify()/Handler/IamRolePolicyAttachment", - "uniqueId": "teststringify_Handler_IamRolePolicyAttachment_B6E5A35D" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.teststringify_Handler_IamRole_D79B403A.name}" - } - }, - "aws_lambda_function": { - "testgetAt_Handler_44D7BE7A": { - "//": { - "metadata": { - "path": "root/Default/Default/test:getAt()/Handler/Default", - "uniqueId": "testgetAt_Handler_44D7BE7A" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8b9b051", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8b9b051", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testgetAt_Handler_IamRole_915EA920.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testgetAt_Handler_S3Object_AE45FDF0.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testget_Handler_A37EBFC3": { - "//": { - "metadata": { - "path": "root/Default/Default/test:get()/Handler/Default", - "uniqueId": "testget_Handler_A37EBFC3" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8b799d4", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8b799d4", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testget_Handler_IamRole_7FCA766F.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testget_Handler_S3Object_27E25F7F.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testsetAt_Handler_51015029": { - "//": { - "metadata": { - "path": "root/Default/Default/test:setAt()/Handler/Default", - "uniqueId": "testsetAt_Handler_51015029" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c841d86c", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c841d86c", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testsetAt_Handler_IamRole_C36C780A.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testsetAt_Handler_S3Object_FE28177A.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testset_Handler_ADDF1A01": { - "//": { - "metadata": { - "path": "root/Default/Default/test:set()/Handler/Default", - "uniqueId": "testset_Handler_ADDF1A01" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8240bc7", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8240bc7", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testset_Handler_IamRole_B9B79227.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testset_Handler_S3Object_A8FBF518.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "teststringify_Handler_2E93A8A7": { - "//": { - "metadata": { - "path": "root/Default/Default/test:stringify()/Handler/Default", - "uniqueId": "teststringify_Handler_2E93A8A7" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c84b217d", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c84b217d", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.teststringify_Handler_IamRole_D79B403A.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.teststringify_Handler_S3Object_938C4856.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testgetAt_Handler_S3Object_AE45FDF0": { - "//": { - "metadata": { - "path": "root/Default/Default/test:getAt()/Handler/S3Object", - "uniqueId": "testgetAt_Handler_S3Object_AE45FDF0" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testget_Handler_S3Object_27E25F7F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:get()/Handler/S3Object", - "uniqueId": "testget_Handler_S3Object_27E25F7F" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testsetAt_Handler_S3Object_FE28177A": { - "//": { - "metadata": { - "path": "root/Default/Default/test:setAt()/Handler/S3Object", - "uniqueId": "testsetAt_Handler_S3Object_FE28177A" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testset_Handler_S3Object_A8FBF518": { - "//": { - "metadata": { - "path": "root/Default/Default/test:set()/Handler/S3Object", - "uniqueId": "testset_Handler_S3Object_A8FBF518" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "teststringify_Handler_S3Object_938C4856": { - "//": { - "metadata": { - "path": "root/Default/Default/test:stringify()/Handler/S3Object", - "uniqueId": "teststringify_Handler_S3Object_938C4856" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/number.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/number.w_compile_tf-aws.md index 71df21b3263..284a48f6327 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/number.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/number.w_compile_tf-aws.md @@ -57,174 +57,13 @@ module.exports = function({ $std_Number }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:fromJson\",\"${aws_lambda_function.testfromJson_Handler_CA86BEEA.arn}\"],[\"root/Default/Default/test:fromStr\",\"${aws_lambda_function.testfromStr_Handler_03ACB5A8.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testfromJson_Handler_IamRole_1C3963E1": { - "//": { - "metadata": { - "path": "root/Default/Default/test:fromJson/Handler/IamRole", - "uniqueId": "testfromJson_Handler_IamRole_1C3963E1" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testfromStr_Handler_IamRole_2F6D7B32": { - "//": { - "metadata": { - "path": "root/Default/Default/test:fromStr/Handler/IamRole", - "uniqueId": "testfromStr_Handler_IamRole_2F6D7B32" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testfromJson_Handler_IamRolePolicy_431D7515": { - "//": { - "metadata": { - "path": "root/Default/Default/test:fromJson/Handler/IamRolePolicy", - "uniqueId": "testfromJson_Handler_IamRolePolicy_431D7515" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testfromJson_Handler_IamRole_1C3963E1.name}" - }, - "testfromStr_Handler_IamRolePolicy_1E219800": { - "//": { - "metadata": { - "path": "root/Default/Default/test:fromStr/Handler/IamRolePolicy", - "uniqueId": "testfromStr_Handler_IamRolePolicy_1E219800" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testfromStr_Handler_IamRole_2F6D7B32.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testfromJson_Handler_IamRolePolicyAttachment_71E8933E": { - "//": { - "metadata": { - "path": "root/Default/Default/test:fromJson/Handler/IamRolePolicyAttachment", - "uniqueId": "testfromJson_Handler_IamRolePolicyAttachment_71E8933E" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testfromJson_Handler_IamRole_1C3963E1.name}" - }, - "testfromStr_Handler_IamRolePolicyAttachment_3E19DAAF": { - "//": { - "metadata": { - "path": "root/Default/Default/test:fromStr/Handler/IamRolePolicyAttachment", - "uniqueId": "testfromStr_Handler_IamRolePolicyAttachment_3E19DAAF" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testfromStr_Handler_IamRole_2F6D7B32.name}" - } - }, - "aws_lambda_function": { - "testfromJson_Handler_CA86BEEA": { - "//": { - "metadata": { - "path": "root/Default/Default/test:fromJson/Handler/Default", - "uniqueId": "testfromJson_Handler_CA86BEEA" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c89f3277", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c89f3277", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testfromJson_Handler_IamRole_1C3963E1.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testfromJson_Handler_S3Object_90641F99.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testfromStr_Handler_03ACB5A8": { - "//": { - "metadata": { - "path": "root/Default/Default/test:fromStr/Handler/Default", - "uniqueId": "testfromStr_Handler_03ACB5A8" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8fdb1d1", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8fdb1d1", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testfromStr_Handler_IamRole_2F6D7B32.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testfromStr_Handler_S3Object_9922A9EF.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testfromJson_Handler_S3Object_90641F99": { - "//": { - "metadata": { - "path": "root/Default/Default/test:fromJson/Handler/S3Object", - "uniqueId": "testfromJson_Handler_S3Object_90641F99" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testfromStr_Handler_S3Object_9922A9EF": { - "//": { - "metadata": { - "path": "root/Default/Default/test:fromStr/Handler/S3Object", - "uniqueId": "testfromStr_Handler_S3Object_9922A9EF" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/string.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/string.w_compile_tf-aws.md index 88c0120a097..2150cab3406 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/string.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/std/string.w_compile_tf-aws.md @@ -323,1002 +323,13 @@ module.exports = function({ }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:fromJson\",\"${aws_lambda_function.testfromJson_Handler_CA86BEEA.arn}\"],[\"root/Default/Default/test:length\",\"${aws_lambda_function.testlength_Handler_BFD8933F.arn}\"],[\"root/Default/Default/test:at()\",\"${aws_lambda_function.testat_Handler_E4F013BC.arn}\"],[\"root/Default/Default/test:concat()\",\"${aws_lambda_function.testconcat_Handler_E184D86A.arn}\"],[\"root/Default/Default/test:endsWith()\",\"${aws_lambda_function.testendsWith_Handler_9BA42993.arn}\"],[\"root/Default/Default/test:indexOf()\",\"${aws_lambda_function.testindexOf_Handler_BD91EA6F.arn}\"],[\"root/Default/Default/test:lowercase()\",\"${aws_lambda_function.testlowercase_Handler_EAADE79D.arn}\"],[\"root/Default/Default/test:uppercase()\",\"${aws_lambda_function.testuppercase_Handler_352FFA2E.arn}\"],[\"root/Default/Default/test:split()\",\"${aws_lambda_function.testsplit_Handler_4FAF6D9E.arn}\"],[\"root/Default/Default/test:startsWith()\",\"${aws_lambda_function.teststartsWith_Handler_C8752245.arn}\"],[\"root/Default/Default/test:substring()\",\"${aws_lambda_function.testsubstring_Handler_E6617207.arn}\"],[\"root/Default/Default/test:trim()\",\"${aws_lambda_function.testtrim_Handler_403ED8AD.arn}\"],[\"root/Default/Default/test:contains()\",\"${aws_lambda_function.testcontains_Handler_F60865D9.arn}\"],[\"root/Default/Default/test:replace()\",\"${aws_lambda_function.testreplace_Handler_83836186.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testat_Handler_IamRole_17A4EF25": { - "//": { - "metadata": { - "path": "root/Default/Default/test:at()/Handler/IamRole", - "uniqueId": "testat_Handler_IamRole_17A4EF25" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testconcat_Handler_IamRole_95DF0DBB": { - "//": { - "metadata": { - "path": "root/Default/Default/test:concat()/Handler/IamRole", - "uniqueId": "testconcat_Handler_IamRole_95DF0DBB" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testcontains_Handler_IamRole_654B73B4": { - "//": { - "metadata": { - "path": "root/Default/Default/test:contains()/Handler/IamRole", - "uniqueId": "testcontains_Handler_IamRole_654B73B4" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testendsWith_Handler_IamRole_FF7C666A": { - "//": { - "metadata": { - "path": "root/Default/Default/test:endsWith()/Handler/IamRole", - "uniqueId": "testendsWith_Handler_IamRole_FF7C666A" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testfromJson_Handler_IamRole_1C3963E1": { - "//": { - "metadata": { - "path": "root/Default/Default/test:fromJson/Handler/IamRole", - "uniqueId": "testfromJson_Handler_IamRole_1C3963E1" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testindexOf_Handler_IamRole_F0D11C74": { - "//": { - "metadata": { - "path": "root/Default/Default/test:indexOf()/Handler/IamRole", - "uniqueId": "testindexOf_Handler_IamRole_F0D11C74" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testlength_Handler_IamRole_0AFDC7CB": { - "//": { - "metadata": { - "path": "root/Default/Default/test:length/Handler/IamRole", - "uniqueId": "testlength_Handler_IamRole_0AFDC7CB" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testlowercase_Handler_IamRole_AD4BFFD1": { - "//": { - "metadata": { - "path": "root/Default/Default/test:lowercase()/Handler/IamRole", - "uniqueId": "testlowercase_Handler_IamRole_AD4BFFD1" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testreplace_Handler_IamRole_8269B4F2": { - "//": { - "metadata": { - "path": "root/Default/Default/test:replace()/Handler/IamRole", - "uniqueId": "testreplace_Handler_IamRole_8269B4F2" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testsplit_Handler_IamRole_8F132662": { - "//": { - "metadata": { - "path": "root/Default/Default/test:split()/Handler/IamRole", - "uniqueId": "testsplit_Handler_IamRole_8F132662" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "teststartsWith_Handler_IamRole_954988DB": { - "//": { - "metadata": { - "path": "root/Default/Default/test:startsWith()/Handler/IamRole", - "uniqueId": "teststartsWith_Handler_IamRole_954988DB" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testsubstring_Handler_IamRole_3EEC66DD": { - "//": { - "metadata": { - "path": "root/Default/Default/test:substring()/Handler/IamRole", - "uniqueId": "testsubstring_Handler_IamRole_3EEC66DD" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testtrim_Handler_IamRole_92F0C855": { - "//": { - "metadata": { - "path": "root/Default/Default/test:trim()/Handler/IamRole", - "uniqueId": "testtrim_Handler_IamRole_92F0C855" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testuppercase_Handler_IamRole_0A95D353": { - "//": { - "metadata": { - "path": "root/Default/Default/test:uppercase()/Handler/IamRole", - "uniqueId": "testuppercase_Handler_IamRole_0A95D353" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testat_Handler_IamRolePolicy_8B108027": { - "//": { - "metadata": { - "path": "root/Default/Default/test:at()/Handler/IamRolePolicy", - "uniqueId": "testat_Handler_IamRolePolicy_8B108027" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testat_Handler_IamRole_17A4EF25.name}" - }, - "testconcat_Handler_IamRolePolicy_742C5395": { - "//": { - "metadata": { - "path": "root/Default/Default/test:concat()/Handler/IamRolePolicy", - "uniqueId": "testconcat_Handler_IamRolePolicy_742C5395" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testconcat_Handler_IamRole_95DF0DBB.name}" - }, - "testcontains_Handler_IamRolePolicy_F4401AB2": { - "//": { - "metadata": { - "path": "root/Default/Default/test:contains()/Handler/IamRolePolicy", - "uniqueId": "testcontains_Handler_IamRolePolicy_F4401AB2" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testcontains_Handler_IamRole_654B73B4.name}" - }, - "testendsWith_Handler_IamRolePolicy_DD4E72BF": { - "//": { - "metadata": { - "path": "root/Default/Default/test:endsWith()/Handler/IamRolePolicy", - "uniqueId": "testendsWith_Handler_IamRolePolicy_DD4E72BF" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testendsWith_Handler_IamRole_FF7C666A.name}" - }, - "testfromJson_Handler_IamRolePolicy_431D7515": { - "//": { - "metadata": { - "path": "root/Default/Default/test:fromJson/Handler/IamRolePolicy", - "uniqueId": "testfromJson_Handler_IamRolePolicy_431D7515" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testfromJson_Handler_IamRole_1C3963E1.name}" - }, - "testindexOf_Handler_IamRolePolicy_44B0136F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:indexOf()/Handler/IamRolePolicy", - "uniqueId": "testindexOf_Handler_IamRolePolicy_44B0136F" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testindexOf_Handler_IamRole_F0D11C74.name}" - }, - "testlength_Handler_IamRolePolicy_30FC50C3": { - "//": { - "metadata": { - "path": "root/Default/Default/test:length/Handler/IamRolePolicy", - "uniqueId": "testlength_Handler_IamRolePolicy_30FC50C3" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testlength_Handler_IamRole_0AFDC7CB.name}" - }, - "testlowercase_Handler_IamRolePolicy_BF0B79C7": { - "//": { - "metadata": { - "path": "root/Default/Default/test:lowercase()/Handler/IamRolePolicy", - "uniqueId": "testlowercase_Handler_IamRolePolicy_BF0B79C7" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testlowercase_Handler_IamRole_AD4BFFD1.name}" - }, - "testreplace_Handler_IamRolePolicy_B1BDF250": { - "//": { - "metadata": { - "path": "root/Default/Default/test:replace()/Handler/IamRolePolicy", - "uniqueId": "testreplace_Handler_IamRolePolicy_B1BDF250" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testreplace_Handler_IamRole_8269B4F2.name}" - }, - "testsplit_Handler_IamRolePolicy_2CBFEABE": { - "//": { - "metadata": { - "path": "root/Default/Default/test:split()/Handler/IamRolePolicy", - "uniqueId": "testsplit_Handler_IamRolePolicy_2CBFEABE" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testsplit_Handler_IamRole_8F132662.name}" - }, - "teststartsWith_Handler_IamRolePolicy_35ABC22F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:startsWith()/Handler/IamRolePolicy", - "uniqueId": "teststartsWith_Handler_IamRolePolicy_35ABC22F" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.teststartsWith_Handler_IamRole_954988DB.name}" - }, - "testsubstring_Handler_IamRolePolicy_B61E4E35": { - "//": { - "metadata": { - "path": "root/Default/Default/test:substring()/Handler/IamRolePolicy", - "uniqueId": "testsubstring_Handler_IamRolePolicy_B61E4E35" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testsubstring_Handler_IamRole_3EEC66DD.name}" - }, - "testtrim_Handler_IamRolePolicy_EF3E08A2": { - "//": { - "metadata": { - "path": "root/Default/Default/test:trim()/Handler/IamRolePolicy", - "uniqueId": "testtrim_Handler_IamRolePolicy_EF3E08A2" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testtrim_Handler_IamRole_92F0C855.name}" - }, - "testuppercase_Handler_IamRolePolicy_0915B296": { - "//": { - "metadata": { - "path": "root/Default/Default/test:uppercase()/Handler/IamRolePolicy", - "uniqueId": "testuppercase_Handler_IamRolePolicy_0915B296" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testuppercase_Handler_IamRole_0A95D353.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testat_Handler_IamRolePolicyAttachment_16B3C8B1": { - "//": { - "metadata": { - "path": "root/Default/Default/test:at()/Handler/IamRolePolicyAttachment", - "uniqueId": "testat_Handler_IamRolePolicyAttachment_16B3C8B1" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testat_Handler_IamRole_17A4EF25.name}" - }, - "testconcat_Handler_IamRolePolicyAttachment_1D49A0C8": { - "//": { - "metadata": { - "path": "root/Default/Default/test:concat()/Handler/IamRolePolicyAttachment", - "uniqueId": "testconcat_Handler_IamRolePolicyAttachment_1D49A0C8" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testconcat_Handler_IamRole_95DF0DBB.name}" - }, - "testcontains_Handler_IamRolePolicyAttachment_D324FFE4": { - "//": { - "metadata": { - "path": "root/Default/Default/test:contains()/Handler/IamRolePolicyAttachment", - "uniqueId": "testcontains_Handler_IamRolePolicyAttachment_D324FFE4" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testcontains_Handler_IamRole_654B73B4.name}" - }, - "testendsWith_Handler_IamRolePolicyAttachment_76A301AA": { - "//": { - "metadata": { - "path": "root/Default/Default/test:endsWith()/Handler/IamRolePolicyAttachment", - "uniqueId": "testendsWith_Handler_IamRolePolicyAttachment_76A301AA" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testendsWith_Handler_IamRole_FF7C666A.name}" - }, - "testfromJson_Handler_IamRolePolicyAttachment_71E8933E": { - "//": { - "metadata": { - "path": "root/Default/Default/test:fromJson/Handler/IamRolePolicyAttachment", - "uniqueId": "testfromJson_Handler_IamRolePolicyAttachment_71E8933E" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testfromJson_Handler_IamRole_1C3963E1.name}" - }, - "testindexOf_Handler_IamRolePolicyAttachment_07DB0649": { - "//": { - "metadata": { - "path": "root/Default/Default/test:indexOf()/Handler/IamRolePolicyAttachment", - "uniqueId": "testindexOf_Handler_IamRolePolicyAttachment_07DB0649" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testindexOf_Handler_IamRole_F0D11C74.name}" - }, - "testlength_Handler_IamRolePolicyAttachment_2C0296CF": { - "//": { - "metadata": { - "path": "root/Default/Default/test:length/Handler/IamRolePolicyAttachment", - "uniqueId": "testlength_Handler_IamRolePolicyAttachment_2C0296CF" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testlength_Handler_IamRole_0AFDC7CB.name}" - }, - "testlowercase_Handler_IamRolePolicyAttachment_74C34A7A": { - "//": { - "metadata": { - "path": "root/Default/Default/test:lowercase()/Handler/IamRolePolicyAttachment", - "uniqueId": "testlowercase_Handler_IamRolePolicyAttachment_74C34A7A" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testlowercase_Handler_IamRole_AD4BFFD1.name}" - }, - "testreplace_Handler_IamRolePolicyAttachment_3A28D781": { - "//": { - "metadata": { - "path": "root/Default/Default/test:replace()/Handler/IamRolePolicyAttachment", - "uniqueId": "testreplace_Handler_IamRolePolicyAttachment_3A28D781" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testreplace_Handler_IamRole_8269B4F2.name}" - }, - "testsplit_Handler_IamRolePolicyAttachment_50460D67": { - "//": { - "metadata": { - "path": "root/Default/Default/test:split()/Handler/IamRolePolicyAttachment", - "uniqueId": "testsplit_Handler_IamRolePolicyAttachment_50460D67" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testsplit_Handler_IamRole_8F132662.name}" - }, - "teststartsWith_Handler_IamRolePolicyAttachment_71D91495": { - "//": { - "metadata": { - "path": "root/Default/Default/test:startsWith()/Handler/IamRolePolicyAttachment", - "uniqueId": "teststartsWith_Handler_IamRolePolicyAttachment_71D91495" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.teststartsWith_Handler_IamRole_954988DB.name}" - }, - "testsubstring_Handler_IamRolePolicyAttachment_73196EBC": { - "//": { - "metadata": { - "path": "root/Default/Default/test:substring()/Handler/IamRolePolicyAttachment", - "uniqueId": "testsubstring_Handler_IamRolePolicyAttachment_73196EBC" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testsubstring_Handler_IamRole_3EEC66DD.name}" - }, - "testtrim_Handler_IamRolePolicyAttachment_2B623F40": { - "//": { - "metadata": { - "path": "root/Default/Default/test:trim()/Handler/IamRolePolicyAttachment", - "uniqueId": "testtrim_Handler_IamRolePolicyAttachment_2B623F40" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testtrim_Handler_IamRole_92F0C855.name}" - }, - "testuppercase_Handler_IamRolePolicyAttachment_02EC7380": { - "//": { - "metadata": { - "path": "root/Default/Default/test:uppercase()/Handler/IamRolePolicyAttachment", - "uniqueId": "testuppercase_Handler_IamRolePolicyAttachment_02EC7380" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testuppercase_Handler_IamRole_0A95D353.name}" - } - }, - "aws_lambda_function": { - "testat_Handler_E4F013BC": { - "//": { - "metadata": { - "path": "root/Default/Default/test:at()/Handler/Default", - "uniqueId": "testat_Handler_E4F013BC" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c858faac", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c858faac", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testat_Handler_IamRole_17A4EF25.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testat_Handler_S3Object_AE9ADE42.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testconcat_Handler_E184D86A": { - "//": { - "metadata": { - "path": "root/Default/Default/test:concat()/Handler/Default", - "uniqueId": "testconcat_Handler_E184D86A" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c869963c", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c869963c", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testconcat_Handler_IamRole_95DF0DBB.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testconcat_Handler_S3Object_65D4C81D.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testcontains_Handler_F60865D9": { - "//": { - "metadata": { - "path": "root/Default/Default/test:contains()/Handler/Default", - "uniqueId": "testcontains_Handler_F60865D9" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8e953a0", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8e953a0", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testcontains_Handler_IamRole_654B73B4.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testcontains_Handler_S3Object_4387F7AE.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testendsWith_Handler_9BA42993": { - "//": { - "metadata": { - "path": "root/Default/Default/test:endsWith()/Handler/Default", - "uniqueId": "testendsWith_Handler_9BA42993" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8465c4f", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8465c4f", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testendsWith_Handler_IamRole_FF7C666A.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testendsWith_Handler_S3Object_8FBD72C0.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testfromJson_Handler_CA86BEEA": { - "//": { - "metadata": { - "path": "root/Default/Default/test:fromJson/Handler/Default", - "uniqueId": "testfromJson_Handler_CA86BEEA" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c89f3277", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c89f3277", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testfromJson_Handler_IamRole_1C3963E1.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testfromJson_Handler_S3Object_90641F99.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testindexOf_Handler_BD91EA6F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:indexOf()/Handler/Default", - "uniqueId": "testindexOf_Handler_BD91EA6F" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c80be453", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c80be453", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testindexOf_Handler_IamRole_F0D11C74.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testindexOf_Handler_S3Object_C2C2987B.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testlength_Handler_BFD8933F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:length/Handler/Default", - "uniqueId": "testlength_Handler_BFD8933F" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8e0ccbd", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8e0ccbd", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testlength_Handler_IamRole_0AFDC7CB.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testlength_Handler_S3Object_1AB463C9.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testlowercase_Handler_EAADE79D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:lowercase()/Handler/Default", - "uniqueId": "testlowercase_Handler_EAADE79D" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c86ac32a", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c86ac32a", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testlowercase_Handler_IamRole_AD4BFFD1.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testlowercase_Handler_S3Object_41A6B15B.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testreplace_Handler_83836186": { - "//": { - "metadata": { - "path": "root/Default/Default/test:replace()/Handler/Default", - "uniqueId": "testreplace_Handler_83836186" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c876baf0", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c876baf0", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testreplace_Handler_IamRole_8269B4F2.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testreplace_Handler_S3Object_20DF2856.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testsplit_Handler_4FAF6D9E": { - "//": { - "metadata": { - "path": "root/Default/Default/test:split()/Handler/Default", - "uniqueId": "testsplit_Handler_4FAF6D9E" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8e87cf7", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8e87cf7", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testsplit_Handler_IamRole_8F132662.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testsplit_Handler_S3Object_08906E51.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "teststartsWith_Handler_C8752245": { - "//": { - "metadata": { - "path": "root/Default/Default/test:startsWith()/Handler/Default", - "uniqueId": "teststartsWith_Handler_C8752245" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8f6a537", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8f6a537", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.teststartsWith_Handler_IamRole_954988DB.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.teststartsWith_Handler_S3Object_48B24E69.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testsubstring_Handler_E6617207": { - "//": { - "metadata": { - "path": "root/Default/Default/test:substring()/Handler/Default", - "uniqueId": "testsubstring_Handler_E6617207" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c803a722", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c803a722", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testsubstring_Handler_IamRole_3EEC66DD.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testsubstring_Handler_S3Object_6C0217C3.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testtrim_Handler_403ED8AD": { - "//": { - "metadata": { - "path": "root/Default/Default/test:trim()/Handler/Default", - "uniqueId": "testtrim_Handler_403ED8AD" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c81cc785", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c81cc785", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testtrim_Handler_IamRole_92F0C855.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testtrim_Handler_S3Object_3E2EF93C.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testuppercase_Handler_352FFA2E": { - "//": { - "metadata": { - "path": "root/Default/Default/test:uppercase()/Handler/Default", - "uniqueId": "testuppercase_Handler_352FFA2E" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c882dfb8", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c882dfb8", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testuppercase_Handler_IamRole_0A95D353.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testuppercase_Handler_S3Object_DA85E4BE.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testat_Handler_S3Object_AE9ADE42": { - "//": { - "metadata": { - "path": "root/Default/Default/test:at()/Handler/S3Object", - "uniqueId": "testat_Handler_S3Object_AE9ADE42" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testconcat_Handler_S3Object_65D4C81D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:concat()/Handler/S3Object", - "uniqueId": "testconcat_Handler_S3Object_65D4C81D" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testcontains_Handler_S3Object_4387F7AE": { - "//": { - "metadata": { - "path": "root/Default/Default/test:contains()/Handler/S3Object", - "uniqueId": "testcontains_Handler_S3Object_4387F7AE" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testendsWith_Handler_S3Object_8FBD72C0": { - "//": { - "metadata": { - "path": "root/Default/Default/test:endsWith()/Handler/S3Object", - "uniqueId": "testendsWith_Handler_S3Object_8FBD72C0" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testfromJson_Handler_S3Object_90641F99": { - "//": { - "metadata": { - "path": "root/Default/Default/test:fromJson/Handler/S3Object", - "uniqueId": "testfromJson_Handler_S3Object_90641F99" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testindexOf_Handler_S3Object_C2C2987B": { - "//": { - "metadata": { - "path": "root/Default/Default/test:indexOf()/Handler/S3Object", - "uniqueId": "testindexOf_Handler_S3Object_C2C2987B" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testlength_Handler_S3Object_1AB463C9": { - "//": { - "metadata": { - "path": "root/Default/Default/test:length/Handler/S3Object", - "uniqueId": "testlength_Handler_S3Object_1AB463C9" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testlowercase_Handler_S3Object_41A6B15B": { - "//": { - "metadata": { - "path": "root/Default/Default/test:lowercase()/Handler/S3Object", - "uniqueId": "testlowercase_Handler_S3Object_41A6B15B" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testreplace_Handler_S3Object_20DF2856": { - "//": { - "metadata": { - "path": "root/Default/Default/test:replace()/Handler/S3Object", - "uniqueId": "testreplace_Handler_S3Object_20DF2856" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testsplit_Handler_S3Object_08906E51": { - "//": { - "metadata": { - "path": "root/Default/Default/test:split()/Handler/S3Object", - "uniqueId": "testsplit_Handler_S3Object_08906E51" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "teststartsWith_Handler_S3Object_48B24E69": { - "//": { - "metadata": { - "path": "root/Default/Default/test:startsWith()/Handler/S3Object", - "uniqueId": "teststartsWith_Handler_S3Object_48B24E69" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testsubstring_Handler_S3Object_6C0217C3": { - "//": { - "metadata": { - "path": "root/Default/Default/test:substring()/Handler/S3Object", - "uniqueId": "testsubstring_Handler_S3Object_6C0217C3" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testtrim_Handler_S3Object_3E2EF93C": { - "//": { - "metadata": { - "path": "root/Default/Default/test:trim()/Handler/S3Object", - "uniqueId": "testtrim_Handler_S3Object_3E2EF93C" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testuppercase_Handler_S3Object_DA85E4BE": { - "//": { - "metadata": { - "path": "root/Default/Default/test:uppercase()/Handler/S3Object", - "uniqueId": "testuppercase_Handler_S3Object_DA85E4BE" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/table/add_row.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/table/add_row.w_compile_tf-aws.md index 6fe9a46a22d..1c087424a28 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/table/add_row.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/table/add_row.w_compile_tf-aws.md @@ -44,7 +44,7 @@ module.exports = function({ $__obj__args_______if__obj_args______undefined__thro }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:addRow\",\"${aws_lambda_function.testaddRow_Handler_2806A65E.arn}\"]]" + "value": "[]" } }, "provider": { @@ -95,99 +95,6 @@ module.exports = function({ $__obj__args_______if__obj_args______undefined__thro "item": "{\"name\":{\"S\":\"peach\"},\"gender\":{\"S\":\"female\"},\"role\":{\"S\":\"princess\"}}", "table_name": "${aws_dynamodb_table.exTable.name}" } - }, - "aws_iam_role": { - "testaddRow_Handler_IamRole_809942D9": { - "//": { - "metadata": { - "path": "root/Default/Default/test:addRow/Handler/IamRole", - "uniqueId": "testaddRow_Handler_IamRole_809942D9" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testaddRow_Handler_IamRolePolicy_CA240997": { - "//": { - "metadata": { - "path": "root/Default/Default/test:addRow/Handler/IamRolePolicy", - "uniqueId": "testaddRow_Handler_IamRolePolicy_CA240997" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"dynamodb:GetItem\"],\"Resource\":[\"${aws_dynamodb_table.exTable.arn}\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testaddRow_Handler_IamRole_809942D9.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testaddRow_Handler_IamRolePolicyAttachment_0784B360": { - "//": { - "metadata": { - "path": "root/Default/Default/test:addRow/Handler/IamRolePolicyAttachment", - "uniqueId": "testaddRow_Handler_IamRolePolicyAttachment_0784B360" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testaddRow_Handler_IamRole_809942D9.name}" - } - }, - "aws_lambda_function": { - "testaddRow_Handler_2806A65E": { - "//": { - "metadata": { - "path": "root/Default/Default/test:addRow/Handler/Default", - "uniqueId": "testaddRow_Handler_2806A65E" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "DYNAMODB_TABLE_NAME_d5d44f18": "${aws_dynamodb_table.exTable.name}", - "DYNAMODB_TABLE_NAME_d5d44f18_COLUMNS": "{\"gender\":0,\"role\":0}", - "DYNAMODB_TABLE_NAME_d5d44f18_PRIMARY_KEY": "name", - "WING_FUNCTION_NAME": "Handler-c8f74599", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8f74599", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testaddRow_Handler_IamRole_809942D9.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testaddRow_Handler_S3Object_1B25BFDC.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testaddRow_Handler_S3Object_1B25BFDC": { - "//": { - "metadata": { - "path": "root/Default/Default/test:addRow/Handler/S3Object", - "uniqueId": "testaddRow_Handler_S3Object_1B25BFDC" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } } } } diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/table/list.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/table/list.w_compile_tf-aws.md index a4b3f46825d..ea053ad2a36 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/table/list.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/table/list.w_compile_tf-aws.md @@ -50,7 +50,7 @@ module.exports = function({ $std_String, $table }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:list\",\"${aws_lambda_function.testlist_Handler_58856559.arn}\"]]" + "value": "[]" } }, "provider": { @@ -77,99 +77,6 @@ module.exports = function({ $std_String, $table }) { "hash_key": "name", "name": "usersex.Table-c840a49c" } - }, - "aws_iam_role": { - "testlist_Handler_IamRole_1E7E84A8": { - "//": { - "metadata": { - "path": "root/Default/Default/test:list/Handler/IamRole", - "uniqueId": "testlist_Handler_IamRole_1E7E84A8" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testlist_Handler_IamRolePolicy_7EFE6464": { - "//": { - "metadata": { - "path": "root/Default/Default/test:list/Handler/IamRolePolicy", - "uniqueId": "testlist_Handler_IamRolePolicy_7EFE6464" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"dynamodb:PutItem\"],\"Resource\":[\"${aws_dynamodb_table.exTable.arn}\"],\"Effect\":\"Allow\"},{\"Action\":[\"dynamodb:Scan\"],\"Resource\":[\"${aws_dynamodb_table.exTable.arn}\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testlist_Handler_IamRole_1E7E84A8.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testlist_Handler_IamRolePolicyAttachment_913EEFDF": { - "//": { - "metadata": { - "path": "root/Default/Default/test:list/Handler/IamRolePolicyAttachment", - "uniqueId": "testlist_Handler_IamRolePolicyAttachment_913EEFDF" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testlist_Handler_IamRole_1E7E84A8.name}" - } - }, - "aws_lambda_function": { - "testlist_Handler_58856559": { - "//": { - "metadata": { - "path": "root/Default/Default/test:list/Handler/Default", - "uniqueId": "testlist_Handler_58856559" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "DYNAMODB_TABLE_NAME_d5d44f18": "${aws_dynamodb_table.exTable.name}", - "DYNAMODB_TABLE_NAME_d5d44f18_COLUMNS": "{\"gender\":0}", - "DYNAMODB_TABLE_NAME_d5d44f18_PRIMARY_KEY": "name", - "WING_FUNCTION_NAME": "Handler-c8867143", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8867143", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testlist_Handler_IamRole_1E7E84A8.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testlist_Handler_S3Object_8A6D3046.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testlist_Handler_S3Object_8A6D3046": { - "//": { - "metadata": { - "path": "root/Default/Default/test:list/Handler/S3Object", - "uniqueId": "testlist_Handler_S3Object_8A6D3046" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } } } } diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/topic/on_message.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/topic/on_message.w_compile_tf-aws.md index d547c7bc674..0b1ca182fc0 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/topic/on_message.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/topic/on_message.w_compile_tf-aws.md @@ -103,7 +103,7 @@ module.exports = function({ }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:onMessage\",\"${aws_lambda_function.testonMessage_Handler_1EC8F213.arn}\"]]" + "value": "[]" } }, "provider": { @@ -149,15 +149,6 @@ module.exports = function({ }) { } }, "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testonMessage_Handler_IamRole_194597D0": { - "//": { - "metadata": { - "path": "root/Default/Default/test:onMessage/Handler/IamRole", - "uniqueId": "testonMessage_Handler_IamRole_194597D0" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" } }, "aws_iam_role_policy": { @@ -180,16 +171,6 @@ module.exports = function({ }) { }, "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"dynamodb:UpdateItem\"],\"Resource\":[\"${aws_dynamodb_table.cloudCounter.arn}\"],\"Effect\":\"Allow\"}]}", "role": "${aws_iam_role.cloudTopic-OnMessage-cdafee6e_IamRole_54B0303A.name}" - }, - "testonMessage_Handler_IamRolePolicy_B409EF1A": { - "//": { - "metadata": { - "path": "root/Default/Default/test:onMessage/Handler/IamRolePolicy", - "uniqueId": "testonMessage_Handler_IamRolePolicy_B409EF1A" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"sns:Publish\"],\"Resource\":[\"${aws_sns_topic.cloudTopic.arn}\"],\"Effect\":\"Allow\"},{\"Action\":[\"dynamodb:GetItem\"],\"Resource\":[\"${aws_dynamodb_table.cloudCounter.arn}\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testonMessage_Handler_IamRole_194597D0.name}" } }, "aws_iam_role_policy_attachment": { @@ -212,16 +193,6 @@ module.exports = function({ }) { }, "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", "role": "${aws_iam_role.cloudTopic-OnMessage-cdafee6e_IamRole_54B0303A.name}" - }, - "testonMessage_Handler_IamRolePolicyAttachment_01BECFE0": { - "//": { - "metadata": { - "path": "root/Default/Default/test:onMessage/Handler/IamRolePolicyAttachment", - "uniqueId": "testonMessage_Handler_IamRolePolicyAttachment_01BECFE0" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testonMessage_Handler_IamRole_194597D0.name}" } }, "aws_lambda_function": { @@ -284,37 +255,6 @@ module.exports = function({ }) { "security_group_ids": [], "subnet_ids": [] } - }, - "testonMessage_Handler_1EC8F213": { - "//": { - "metadata": { - "path": "root/Default/Default/test:onMessage/Handler/Default", - "uniqueId": "testonMessage_Handler_1EC8F213" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", - "TOPIC_ARN_f61df91b": "${aws_sns_topic.cloudTopic.arn}", - "WING_FUNCTION_NAME": "Handler-c8e9f8cd", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8e9f8cd", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testonMessage_Handler_IamRole_194597D0.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testonMessage_Handler_S3Object_0253F81F.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } } }, "aws_lambda_permission": { @@ -376,17 +316,6 @@ module.exports = function({ }) { "bucket": "${aws_s3_bucket.Code.bucket}", "key": "", "source": "" - }, - "testonMessage_Handler_S3Object_0253F81F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:onMessage/Handler/S3Object", - "uniqueId": "testonMessage_Handler_S3Object_0253F81F" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" } }, "aws_sns_topic": { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/base64.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/base64.w_compile_tf-aws.md index ffed4cfec60..1967b08a929 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/base64.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/base64.w_compile_tf-aws.md @@ -47,105 +47,13 @@ module.exports = function({ $util_Util }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:inflight base64\",\"${aws_lambda_function.testinflightbase64_Handler_31E9772F.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testinflightbase64_Handler_IamRole_49F68A60": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight base64/Handler/IamRole", - "uniqueId": "testinflightbase64_Handler_IamRole_49F68A60" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testinflightbase64_Handler_IamRolePolicy_031C1061": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight base64/Handler/IamRolePolicy", - "uniqueId": "testinflightbase64_Handler_IamRolePolicy_031C1061" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testinflightbase64_Handler_IamRole_49F68A60.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testinflightbase64_Handler_IamRolePolicyAttachment_FA451656": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight base64/Handler/IamRolePolicyAttachment", - "uniqueId": "testinflightbase64_Handler_IamRolePolicyAttachment_FA451656" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinflightbase64_Handler_IamRole_49F68A60.name}" - } - }, - "aws_lambda_function": { - "testinflightbase64_Handler_31E9772F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight base64/Handler/Default", - "uniqueId": "testinflightbase64_Handler_31E9772F" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c853d8cf", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c853d8cf", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinflightbase64_Handler_IamRole_49F68A60.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinflightbase64_Handler_S3Object_C9A792F2.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testinflightbase64_Handler_S3Object_C9A792F2": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight base64/Handler/S3Object", - "uniqueId": "testinflightbase64_Handler_S3Object_C9A792F2" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/env.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/env.w_compile_tf-aws.md index b26dc78c689..feae14cdd48 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/env.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/env.w_compile_tf-aws.md @@ -41,105 +41,13 @@ module.exports = function({ $NIL, $RANDOM, $util_Util }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:use util from inflight\",\"${aws_lambda_function.testuseutilfrominflight_Handler_6C871F39.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testuseutilfrominflight_Handler_IamRole_0F4456F5": { - "//": { - "metadata": { - "path": "root/Default/Default/test:use util from inflight/Handler/IamRole", - "uniqueId": "testuseutilfrominflight_Handler_IamRole_0F4456F5" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testuseutilfrominflight_Handler_IamRolePolicy_17DE9CD4": { - "//": { - "metadata": { - "path": "root/Default/Default/test:use util from inflight/Handler/IamRolePolicy", - "uniqueId": "testuseutilfrominflight_Handler_IamRolePolicy_17DE9CD4" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testuseutilfrominflight_Handler_IamRole_0F4456F5.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testuseutilfrominflight_Handler_IamRolePolicyAttachment_FC7E7304": { - "//": { - "metadata": { - "path": "root/Default/Default/test:use util from inflight/Handler/IamRolePolicyAttachment", - "uniqueId": "testuseutilfrominflight_Handler_IamRolePolicyAttachment_FC7E7304" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testuseutilfrominflight_Handler_IamRole_0F4456F5.name}" - } - }, - "aws_lambda_function": { - "testuseutilfrominflight_Handler_6C871F39": { - "//": { - "metadata": { - "path": "root/Default/Default/test:use util from inflight/Handler/Default", - "uniqueId": "testuseutilfrominflight_Handler_6C871F39" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8904ffd", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8904ffd", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testuseutilfrominflight_Handler_IamRole_0F4456F5.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testuseutilfrominflight_Handler_S3Object_6902665C.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testuseutilfrominflight_Handler_S3Object_6902665C": { - "//": { - "metadata": { - "path": "root/Default/Default/test:use util from inflight/Handler/S3Object", - "uniqueId": "testuseutilfrominflight_Handler_S3Object_6902665C" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/nanoid.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/nanoid.w_compile_tf-aws.md index ee498a4479e..641914adacc 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/nanoid.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/nanoid.w_compile_tf-aws.md @@ -52,105 +52,13 @@ module.exports = function({ $util_Util }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:inflight nanoid\",\"${aws_lambda_function.testinflightnanoid_Handler_154ED1B9.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testinflightnanoid_Handler_IamRole_150CF122": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight nanoid/Handler/IamRole", - "uniqueId": "testinflightnanoid_Handler_IamRole_150CF122" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testinflightnanoid_Handler_IamRolePolicy_8D2559C4": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight nanoid/Handler/IamRolePolicy", - "uniqueId": "testinflightnanoid_Handler_IamRolePolicy_8D2559C4" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testinflightnanoid_Handler_IamRole_150CF122.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testinflightnanoid_Handler_IamRolePolicyAttachment_C418852A": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight nanoid/Handler/IamRolePolicyAttachment", - "uniqueId": "testinflightnanoid_Handler_IamRolePolicyAttachment_C418852A" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinflightnanoid_Handler_IamRole_150CF122.name}" - } - }, - "aws_lambda_function": { - "testinflightnanoid_Handler_154ED1B9": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight nanoid/Handler/Default", - "uniqueId": "testinflightnanoid_Handler_154ED1B9" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c864f292", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c864f292", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinflightnanoid_Handler_IamRole_150CF122.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinflightnanoid_Handler_S3Object_F7A4E7DD.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testinflightnanoid_Handler_S3Object_F7A4E7DD": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight nanoid/Handler/S3Object", - "uniqueId": "testinflightnanoid_Handler_S3Object_F7A4E7DD" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/sha256.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/sha256.w_compile_tf-aws.md index 3d28993286b..26ff4e1fba5 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/sha256.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/sha256.w_compile_tf-aws.md @@ -40,105 +40,13 @@ module.exports = function({ $util_Util }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:inflight sha256\",\"${aws_lambda_function.testinflightsha256_Handler_A03FE0BD.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testinflightsha256_Handler_IamRole_926D9589": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight sha256/Handler/IamRole", - "uniqueId": "testinflightsha256_Handler_IamRole_926D9589" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testinflightsha256_Handler_IamRolePolicy_FC33E982": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight sha256/Handler/IamRolePolicy", - "uniqueId": "testinflightsha256_Handler_IamRolePolicy_FC33E982" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testinflightsha256_Handler_IamRole_926D9589.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testinflightsha256_Handler_IamRolePolicyAttachment_44DF0769": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight sha256/Handler/IamRolePolicyAttachment", - "uniqueId": "testinflightsha256_Handler_IamRolePolicyAttachment_44DF0769" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinflightsha256_Handler_IamRole_926D9589.name}" - } - }, - "aws_lambda_function": { - "testinflightsha256_Handler_A03FE0BD": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight sha256/Handler/Default", - "uniqueId": "testinflightsha256_Handler_A03FE0BD" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8b74430", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8b74430", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinflightsha256_Handler_IamRole_926D9589.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinflightsha256_Handler_S3Object_2EB8C1FF.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testinflightsha256_Handler_S3Object_2EB8C1FF": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight sha256/Handler/S3Object", - "uniqueId": "testinflightsha256_Handler_S3Object_2EB8C1FF" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/sleep.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/sleep.w_compile_tf-aws.md index b13831fc730..8c423d2a725 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/sleep.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/sleep.w_compile_tf-aws.md @@ -58,105 +58,13 @@ module.exports = function({ }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:sleep 100 mili seconds\",\"${aws_lambda_function.testsleep100miliseconds_Handler_F390CA22.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testsleep100miliseconds_Handler_IamRole_4A0A8D88": { - "//": { - "metadata": { - "path": "root/Default/Default/test:sleep 100 mili seconds/Handler/IamRole", - "uniqueId": "testsleep100miliseconds_Handler_IamRole_4A0A8D88" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testsleep100miliseconds_Handler_IamRolePolicy_2690041A": { - "//": { - "metadata": { - "path": "root/Default/Default/test:sleep 100 mili seconds/Handler/IamRolePolicy", - "uniqueId": "testsleep100miliseconds_Handler_IamRolePolicy_2690041A" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testsleep100miliseconds_Handler_IamRole_4A0A8D88.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testsleep100miliseconds_Handler_IamRolePolicyAttachment_813D87C8": { - "//": { - "metadata": { - "path": "root/Default/Default/test:sleep 100 mili seconds/Handler/IamRolePolicyAttachment", - "uniqueId": "testsleep100miliseconds_Handler_IamRolePolicyAttachment_813D87C8" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testsleep100miliseconds_Handler_IamRole_4A0A8D88.name}" - } - }, - "aws_lambda_function": { - "testsleep100miliseconds_Handler_F390CA22": { - "//": { - "metadata": { - "path": "root/Default/Default/test:sleep 100 mili seconds/Handler/Default", - "uniqueId": "testsleep100miliseconds_Handler_F390CA22" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8e32fa2", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8e32fa2", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testsleep100miliseconds_Handler_IamRole_4A0A8D88.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testsleep100miliseconds_Handler_S3Object_2E151A52.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testsleep100miliseconds_Handler_S3Object_2E151A52": { - "//": { - "metadata": { - "path": "root/Default/Default/test:sleep 100 mili seconds/Handler/S3Object", - "uniqueId": "testsleep100miliseconds_Handler_S3Object_2E151A52" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/uuidv4.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/uuidv4.w_compile_tf-aws.md index 010f2d39e65..a50b30c21be 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/uuidv4.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/uuidv4.w_compile_tf-aws.md @@ -67,105 +67,13 @@ module.exports = function({ }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:inflight uuidv4\",\"${aws_lambda_function.testinflightuuidv4_Handler_3A34A54F.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testinflightuuidv4_Handler_IamRole_053AB873": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight uuidv4/Handler/IamRole", - "uniqueId": "testinflightuuidv4_Handler_IamRole_053AB873" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testinflightuuidv4_Handler_IamRolePolicy_D25285D3": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight uuidv4/Handler/IamRolePolicy", - "uniqueId": "testinflightuuidv4_Handler_IamRolePolicy_D25285D3" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testinflightuuidv4_Handler_IamRole_053AB873.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testinflightuuidv4_Handler_IamRolePolicyAttachment_F779B01B": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight uuidv4/Handler/IamRolePolicyAttachment", - "uniqueId": "testinflightuuidv4_Handler_IamRolePolicyAttachment_F779B01B" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinflightuuidv4_Handler_IamRole_053AB873.name}" - } - }, - "aws_lambda_function": { - "testinflightuuidv4_Handler_3A34A54F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight uuidv4/Handler/Default", - "uniqueId": "testinflightuuidv4_Handler_3A34A54F" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c86b3dcf", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c86b3dcf", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinflightuuidv4_Handler_IamRole_053AB873.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinflightuuidv4_Handler_S3Object_E57447EF.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testinflightuuidv4_Handler_S3Object_E57447EF": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight uuidv4/Handler/S3Object", - "uniqueId": "testinflightuuidv4_Handler_S3Object_E57447EF" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/wait-until.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/wait-until.w_compile_tf-aws.md index 1b904bda376..650dce5e3be 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/wait-until.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/util/wait-until.w_compile_tf-aws.md @@ -178,7 +178,7 @@ module.exports = function({ }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:returns true immediately\",\"${aws_lambda_function.testreturnstrueimmediately_Handler_0210037F.arn}\"],[\"root/Default/Default/test:returns false goes to timeout\",\"${aws_lambda_function.testreturnsfalsegoestotimeout_Handler_A7F9DD9D.arn}\"],[\"root/Default/Default/test:returns after some time waiting\",\"${aws_lambda_function.testreturnsaftersometimewaiting_Handler_436A90C3.arn}\"],[\"root/Default/Default/test:setting props\",\"${aws_lambda_function.testsettingprops_Handler_8BB7DC9B.arn}\"],[\"root/Default/Default/test:throwing exception from predicate should throw immediately\",\"${aws_lambda_function.testthrowingexceptionfrompredicateshouldthrowimmediately_Handler_B4BADFD9.arn}\"]]" + "value": "[]" } }, "provider": { @@ -205,375 +205,6 @@ module.exports = function({ }) { "hash_key": "id", "name": "wing-counter-cloud.Counter-c866f225" } - }, - "aws_iam_role": { - "testreturnsaftersometimewaiting_Handler_IamRole_24ED1A3A": { - "//": { - "metadata": { - "path": "root/Default/Default/test:returns after some time waiting/Handler/IamRole", - "uniqueId": "testreturnsaftersometimewaiting_Handler_IamRole_24ED1A3A" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testreturnsfalsegoestotimeout_Handler_IamRole_57890A08": { - "//": { - "metadata": { - "path": "root/Default/Default/test:returns false goes to timeout/Handler/IamRole", - "uniqueId": "testreturnsfalsegoestotimeout_Handler_IamRole_57890A08" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testreturnstrueimmediately_Handler_IamRole_62FB5976": { - "//": { - "metadata": { - "path": "root/Default/Default/test:returns true immediately/Handler/IamRole", - "uniqueId": "testreturnstrueimmediately_Handler_IamRole_62FB5976" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testsettingprops_Handler_IamRole_6953F1F6": { - "//": { - "metadata": { - "path": "root/Default/Default/test:setting props/Handler/IamRole", - "uniqueId": "testsettingprops_Handler_IamRole_6953F1F6" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testthrowingexceptionfrompredicateshouldthrowimmediately_Handler_IamRole_B0167A3F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:throwing exception from predicate should throw immediately/Handler/IamRole", - "uniqueId": "testthrowingexceptionfrompredicateshouldthrowimmediately_Handler_IamRole_B0167A3F" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testreturnsaftersometimewaiting_Handler_IamRolePolicy_0EE22452": { - "//": { - "metadata": { - "path": "root/Default/Default/test:returns after some time waiting/Handler/IamRolePolicy", - "uniqueId": "testreturnsaftersometimewaiting_Handler_IamRolePolicy_0EE22452" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"dynamodb:UpdateItem\"],\"Resource\":[\"${aws_dynamodb_table.cloudCounter.arn}\"],\"Effect\":\"Allow\"},{\"Action\":[\"dynamodb:GetItem\"],\"Resource\":[\"${aws_dynamodb_table.cloudCounter.arn}\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testreturnsaftersometimewaiting_Handler_IamRole_24ED1A3A.name}" - }, - "testreturnsfalsegoestotimeout_Handler_IamRolePolicy_25F86059": { - "//": { - "metadata": { - "path": "root/Default/Default/test:returns false goes to timeout/Handler/IamRolePolicy", - "uniqueId": "testreturnsfalsegoestotimeout_Handler_IamRolePolicy_25F86059" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testreturnsfalsegoestotimeout_Handler_IamRole_57890A08.name}" - }, - "testreturnstrueimmediately_Handler_IamRolePolicy_870CB70A": { - "//": { - "metadata": { - "path": "root/Default/Default/test:returns true immediately/Handler/IamRolePolicy", - "uniqueId": "testreturnstrueimmediately_Handler_IamRolePolicy_870CB70A" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testreturnstrueimmediately_Handler_IamRole_62FB5976.name}" - }, - "testsettingprops_Handler_IamRolePolicy_B2AEA6D4": { - "//": { - "metadata": { - "path": "root/Default/Default/test:setting props/Handler/IamRolePolicy", - "uniqueId": "testsettingprops_Handler_IamRolePolicy_B2AEA6D4" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"dynamodb:UpdateItem\"],\"Resource\":[\"${aws_dynamodb_table.cloudCounter.arn}\"],\"Effect\":\"Allow\"},{\"Action\":[\"dynamodb:GetItem\"],\"Resource\":[\"${aws_dynamodb_table.cloudCounter.arn}\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testsettingprops_Handler_IamRole_6953F1F6.name}" - }, - "testthrowingexceptionfrompredicateshouldthrowimmediately_Handler_IamRolePolicy_CEF05D37": { - "//": { - "metadata": { - "path": "root/Default/Default/test:throwing exception from predicate should throw immediately/Handler/IamRolePolicy", - "uniqueId": "testthrowingexceptionfrompredicateshouldthrowimmediately_Handler_IamRolePolicy_CEF05D37" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"dynamodb:UpdateItem\"],\"Resource\":[\"${aws_dynamodb_table.cloudCounter.arn}\"],\"Effect\":\"Allow\"},{\"Action\":[\"dynamodb:GetItem\"],\"Resource\":[\"${aws_dynamodb_table.cloudCounter.arn}\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testthrowingexceptionfrompredicateshouldthrowimmediately_Handler_IamRole_B0167A3F.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testreturnsaftersometimewaiting_Handler_IamRolePolicyAttachment_2969D994": { - "//": { - "metadata": { - "path": "root/Default/Default/test:returns after some time waiting/Handler/IamRolePolicyAttachment", - "uniqueId": "testreturnsaftersometimewaiting_Handler_IamRolePolicyAttachment_2969D994" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testreturnsaftersometimewaiting_Handler_IamRole_24ED1A3A.name}" - }, - "testreturnsfalsegoestotimeout_Handler_IamRolePolicyAttachment_92041F39": { - "//": { - "metadata": { - "path": "root/Default/Default/test:returns false goes to timeout/Handler/IamRolePolicyAttachment", - "uniqueId": "testreturnsfalsegoestotimeout_Handler_IamRolePolicyAttachment_92041F39" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testreturnsfalsegoestotimeout_Handler_IamRole_57890A08.name}" - }, - "testreturnstrueimmediately_Handler_IamRolePolicyAttachment_4674DB18": { - "//": { - "metadata": { - "path": "root/Default/Default/test:returns true immediately/Handler/IamRolePolicyAttachment", - "uniqueId": "testreturnstrueimmediately_Handler_IamRolePolicyAttachment_4674DB18" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testreturnstrueimmediately_Handler_IamRole_62FB5976.name}" - }, - "testsettingprops_Handler_IamRolePolicyAttachment_EBCE864E": { - "//": { - "metadata": { - "path": "root/Default/Default/test:setting props/Handler/IamRolePolicyAttachment", - "uniqueId": "testsettingprops_Handler_IamRolePolicyAttachment_EBCE864E" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testsettingprops_Handler_IamRole_6953F1F6.name}" - }, - "testthrowingexceptionfrompredicateshouldthrowimmediately_Handler_IamRolePolicyAttachment_5075162A": { - "//": { - "metadata": { - "path": "root/Default/Default/test:throwing exception from predicate should throw immediately/Handler/IamRolePolicyAttachment", - "uniqueId": "testthrowingexceptionfrompredicateshouldthrowimmediately_Handler_IamRolePolicyAttachment_5075162A" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testthrowingexceptionfrompredicateshouldthrowimmediately_Handler_IamRole_B0167A3F.name}" - } - }, - "aws_lambda_function": { - "testreturnsaftersometimewaiting_Handler_436A90C3": { - "//": { - "metadata": { - "path": "root/Default/Default/test:returns after some time waiting/Handler/Default", - "uniqueId": "testreturnsaftersometimewaiting_Handler_436A90C3" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", - "WING_FUNCTION_NAME": "Handler-c825136f", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c825136f", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testreturnsaftersometimewaiting_Handler_IamRole_24ED1A3A.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testreturnsaftersometimewaiting_Handler_S3Object_71DBD4AC.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testreturnsfalsegoestotimeout_Handler_A7F9DD9D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:returns false goes to timeout/Handler/Default", - "uniqueId": "testreturnsfalsegoestotimeout_Handler_A7F9DD9D" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c857ac6d", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c857ac6d", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testreturnsfalsegoestotimeout_Handler_IamRole_57890A08.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testreturnsfalsegoestotimeout_Handler_S3Object_1B345AEE.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testreturnstrueimmediately_Handler_0210037F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:returns true immediately/Handler/Default", - "uniqueId": "testreturnstrueimmediately_Handler_0210037F" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c85e05f6", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c85e05f6", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testreturnstrueimmediately_Handler_IamRole_62FB5976.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testreturnstrueimmediately_Handler_S3Object_BDE35D32.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testsettingprops_Handler_8BB7DC9B": { - "//": { - "metadata": { - "path": "root/Default/Default/test:setting props/Handler/Default", - "uniqueId": "testsettingprops_Handler_8BB7DC9B" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", - "WING_FUNCTION_NAME": "Handler-c8da809f", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8da809f", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testsettingprops_Handler_IamRole_6953F1F6.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testsettingprops_Handler_S3Object_EBE1EFD3.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testthrowingexceptionfrompredicateshouldthrowimmediately_Handler_B4BADFD9": { - "//": { - "metadata": { - "path": "root/Default/Default/test:throwing exception from predicate should throw immediately/Handler/Default", - "uniqueId": "testthrowingexceptionfrompredicateshouldthrowimmediately_Handler_B4BADFD9" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", - "WING_FUNCTION_NAME": "Handler-c8a3878e", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8a3878e", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testthrowingexceptionfrompredicateshouldthrowimmediately_Handler_IamRole_B0167A3F.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testthrowingexceptionfrompredicateshouldthrowimmediately_Handler_S3Object_EBADB0B5.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testreturnsaftersometimewaiting_Handler_S3Object_71DBD4AC": { - "//": { - "metadata": { - "path": "root/Default/Default/test:returns after some time waiting/Handler/S3Object", - "uniqueId": "testreturnsaftersometimewaiting_Handler_S3Object_71DBD4AC" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testreturnsfalsegoestotimeout_Handler_S3Object_1B345AEE": { - "//": { - "metadata": { - "path": "root/Default/Default/test:returns false goes to timeout/Handler/S3Object", - "uniqueId": "testreturnsfalsegoestotimeout_Handler_S3Object_1B345AEE" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testreturnstrueimmediately_Handler_S3Object_BDE35D32": { - "//": { - "metadata": { - "path": "root/Default/Default/test:returns true immediately/Handler/S3Object", - "uniqueId": "testreturnstrueimmediately_Handler_S3Object_BDE35D32" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testsettingprops_Handler_S3Object_EBE1EFD3": { - "//": { - "metadata": { - "path": "root/Default/Default/test:setting props/Handler/S3Object", - "uniqueId": "testsettingprops_Handler_S3Object_EBE1EFD3" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testthrowingexceptionfrompredicateshouldthrowimmediately_Handler_S3Object_EBADB0B5": { - "//": { - "metadata": { - "path": "root/Default/Default/test:throwing exception from predicate should throw immediately/Handler/S3Object", - "uniqueId": "testthrowingexceptionfrompredicateshouldthrowimmediately_Handler_S3Object_EBADB0B5" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } } } } diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/website/two_websites.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/website/two_websites.w_compile_tf-aws.md index a85b8e23cde..20596a18f1b 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/website/two_websites.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/website/two_websites.w_compile_tf-aws.md @@ -114,7 +114,7 @@ module.exports = function({ $http_Util, $w1_url, $w2_url }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:deploying two websites\",\"${aws_lambda_function.testdeployingtwowebsites_Handler_DDBE7E21.arn}\"]]" + "value": "[]" } }, "provider": { @@ -249,84 +249,7 @@ module.exports = function({ $http_Util, $w1_url, $w2_url }) { "signing_protocol": "sigv4" } }, - "aws_iam_role": { - "testdeployingtwowebsites_Handler_IamRole_C5BF60A5": { - "//": { - "metadata": { - "path": "root/Default/Default/test:deploying two websites/Handler/IamRole", - "uniqueId": "testdeployingtwowebsites_Handler_IamRole_C5BF60A5" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testdeployingtwowebsites_Handler_IamRolePolicy_E99ED47B": { - "//": { - "metadata": { - "path": "root/Default/Default/test:deploying two websites/Handler/IamRolePolicy", - "uniqueId": "testdeployingtwowebsites_Handler_IamRolePolicy_E99ED47B" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testdeployingtwowebsites_Handler_IamRole_C5BF60A5.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testdeployingtwowebsites_Handler_IamRolePolicyAttachment_54B8671A": { - "//": { - "metadata": { - "path": "root/Default/Default/test:deploying two websites/Handler/IamRolePolicyAttachment", - "uniqueId": "testdeployingtwowebsites_Handler_IamRolePolicyAttachment_54B8671A" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testdeployingtwowebsites_Handler_IamRole_C5BF60A5.name}" - } - }, - "aws_lambda_function": { - "testdeployingtwowebsites_Handler_DDBE7E21": { - "//": { - "metadata": { - "path": "root/Default/Default/test:deploying two websites/Handler/Default", - "uniqueId": "testdeployingtwowebsites_Handler_DDBE7E21" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8683851", - "WING_TARGET": "tf-aws", - "WING_TOKEN_HTTPS_TFTOKEN_TOKEN_15": "${jsonencode(\"https://${aws_cloudfront_distribution.cloudWebsite_Distribution_083B5AF9.domain_name}\")}", - "WING_TOKEN_HTTPS_TFTOKEN_TOKEN_30": "${jsonencode(\"https://${aws_cloudfront_distribution.website-2_Distribution_F1FA4680.domain_name}\")}" - } - }, - "function_name": "Handler-c8683851", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testdeployingtwowebsites_Handler_IamRole_C5BF60A5.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testdeployingtwowebsites_Handler_S3Object_E54888BB.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - }, "cloudWebsite_WebsiteBucket_EB03D355": { "//": { "metadata": { @@ -463,17 +386,6 @@ module.exports = function({ $http_Util, $w1_url, $w2_url }) { "source": "", "source_hash": "${filemd5()}" }, - "testdeployingtwowebsites_Handler_S3Object_E54888BB": { - "//": { - "metadata": { - "path": "root/Default/Default/test:deploying two websites/Handler/S3Object", - "uniqueId": "testdeployingtwowebsites_Handler_S3Object_E54888BB" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, "website-2_File--indexhtml_E2F4EB6E": { "//": { "metadata": { diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/website/website.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/website/website.w_compile_tf-aws.md index 5bb3105cf17..10e4ca03e15 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/website/website.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/website/website.w_compile_tf-aws.md @@ -92,7 +92,7 @@ module.exports = function({ }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:access files on the website\",\"${aws_lambda_function.testaccessfilesonthewebsite_Handler_B4D12109.arn}\"]]" + "value": "[]" } }, "provider": { @@ -166,83 +166,7 @@ module.exports = function({ }) { "signing_protocol": "sigv4" } }, - "aws_iam_role": { - "testaccessfilesonthewebsite_Handler_IamRole_1A1B55D7": { - "//": { - "metadata": { - "path": "root/Default/Default/test:access files on the website/Handler/IamRole", - "uniqueId": "testaccessfilesonthewebsite_Handler_IamRole_1A1B55D7" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testaccessfilesonthewebsite_Handler_IamRolePolicy_D3277813": { - "//": { - "metadata": { - "path": "root/Default/Default/test:access files on the website/Handler/IamRolePolicy", - "uniqueId": "testaccessfilesonthewebsite_Handler_IamRolePolicy_D3277813" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testaccessfilesonthewebsite_Handler_IamRole_1A1B55D7.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testaccessfilesonthewebsite_Handler_IamRolePolicyAttachment_15B88AC9": { - "//": { - "metadata": { - "path": "root/Default/Default/test:access files on the website/Handler/IamRolePolicyAttachment", - "uniqueId": "testaccessfilesonthewebsite_Handler_IamRolePolicyAttachment_15B88AC9" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testaccessfilesonthewebsite_Handler_IamRole_1A1B55D7.name}" - } - }, - "aws_lambda_function": { - "testaccessfilesonthewebsite_Handler_B4D12109": { - "//": { - "metadata": { - "path": "root/Default/Default/test:access files on the website/Handler/Default", - "uniqueId": "testaccessfilesonthewebsite_Handler_B4D12109" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c867c4e0", - "WING_TARGET": "tf-aws", - "WING_TOKEN_HTTPS_TFTOKEN_TOKEN_15": "${jsonencode(\"https://${aws_cloudfront_distribution.cloudWebsite_Distribution_083B5AF9.domain_name}\")}" - } - }, - "function_name": "Handler-c867c4e0", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testaccessfilesonthewebsite_Handler_IamRole_1A1B55D7.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testaccessfilesonthewebsite_Handler_S3Object_BD206D0E.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - }, "cloudWebsite_WebsiteBucket_EB03D355": { "//": { "metadata": { @@ -345,17 +269,6 @@ module.exports = function({ }) { "aws_s3_bucket.cloudWebsite_WebsiteBucket_EB03D355" ], "key": "config.json" - }, - "testaccessfilesonthewebsite_Handler_S3Object_BD206D0E": { - "//": { - "metadata": { - "path": "root/Default/Default/test:access files on the website/Handler/S3Object", - "uniqueId": "testaccessfilesonthewebsite_Handler_S3Object_BD206D0E" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" } } } diff --git a/tools/hangar/__snapshots__/test_corpus/valid/api.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/api.w_compile_tf-aws.md index 75d03afb368..0eeaac5dfdf 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/api.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/api.w_compile_tf-aws.md @@ -104,7 +104,7 @@ module.exports = function({ }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:api url\",\"${aws_lambda_function.testapiurl_Handler_7D451301.arn}\"]]" + "value": "[]" } }, "provider": { @@ -228,15 +228,6 @@ module.exports = function({ }) { } }, "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testapiurl_Handler_IamRole_DD062BAC": { - "//": { - "metadata": { - "path": "root/Default/Default/test:api url/Handler/IamRole", - "uniqueId": "testapiurl_Handler_IamRole_DD062BAC" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" } }, "aws_iam_role_policy": { @@ -259,16 +250,6 @@ module.exports = function({ }) { }, "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"dynamodb:UpdateItem\"],\"Resource\":[\"${aws_dynamodb_table.cloudCounter.arn}\"],\"Effect\":\"Allow\"}]}", "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.name}" - }, - "testapiurl_Handler_IamRolePolicy_E5640AD9": { - "//": { - "metadata": { - "path": "root/Default/Default/test:api url/Handler/IamRolePolicy", - "uniqueId": "testapiurl_Handler_IamRolePolicy_E5640AD9" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testapiurl_Handler_IamRole_DD062BAC.name}" } }, "aws_iam_role_policy_attachment": { @@ -291,16 +272,6 @@ module.exports = function({ }) { }, "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.name}" - }, - "testapiurl_Handler_IamRolePolicyAttachment_564B7A5D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:api url/Handler/IamRolePolicyAttachment", - "uniqueId": "testapiurl_Handler_IamRolePolicyAttachment_564B7A5D" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testapiurl_Handler_IamRole_DD062BAC.name}" } }, "aws_lambda_function": { @@ -318,7 +289,7 @@ module.exports = function({ }) { "variables": { "WING_FUNCTION_NAME": "cloud-Api-OnRequest-73c5308f-c85168bb", "WING_TARGET": "tf-aws", - "WING_TOKEN_TFTOKEN_TOKEN_43": "${jsonencode(aws_api_gateway_stage.A_cloudApi_api_stage_6D822CCE.invoke_url)}" + "WING_TOKEN_TFTOKEN_TOKEN_30": "${jsonencode(aws_api_gateway_stage.A_cloudApi_api_stage_6D822CCE.invoke_url)}" } }, "function_name": "cloud-Api-OnRequest-73c5308f-c85168bb", @@ -363,36 +334,6 @@ module.exports = function({ }) { "security_group_ids": [], "subnet_ids": [] } - }, - "testapiurl_Handler_7D451301": { - "//": { - "metadata": { - "path": "root/Default/Default/test:api url/Handler/Default", - "uniqueId": "testapiurl_Handler_7D451301" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8315524", - "WING_TARGET": "tf-aws", - "WING_TOKEN_TFTOKEN_TOKEN_8": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" - } - }, - "function_name": "Handler-c8315524", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testapiurl_Handler_IamRole_DD062BAC.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testapiurl_Handler_S3Object_20B7D72E.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } } }, "aws_lambda_permission": { @@ -456,17 +397,6 @@ module.exports = function({ }) { "bucket": "${aws_s3_bucket.Code.bucket}", "key": "", "source": "" - }, - "testapiurl_Handler_S3Object_20B7D72E": { - "//": { - "metadata": { - "path": "root/Default/Default/test:api url/Handler/S3Object", - "uniqueId": "testapiurl_Handler_S3Object_20B7D72E" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" } } } diff --git a/tools/hangar/__snapshots__/test_corpus/valid/api_cors_custom.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/api_cors_custom.w_compile_tf-aws.md index ddddf0a5289..3b5b9505f13 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/api_cors_custom.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/api_cors_custom.w_compile_tf-aws.md @@ -163,7 +163,7 @@ module.exports = function({ }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:GET --users has cors headers\",\"${aws_lambda_function.testGET--usershascorsheaders_Handler_E0F337CB.arn}\"],[\"root/Default/Default/test:OPTIONS --users has cors headers\",\"${aws_lambda_function.testOPTIONS--usershascorsheaders_Handler_3A565385.arn}\"],[\"root/Default/Default/test:OPTIONS --users responds with proper headers for requested\",\"${aws_lambda_function.testOPTIONS--usersrespondswithproperheadersforrequested_Handler_0A2AB662.arn}\"]]" + "value": "[]" } }, "provider": { @@ -223,33 +223,6 @@ module.exports = function({ }) { } }, "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testGET--usershascorsheaders_Handler_IamRole_6841C3FF": { - "//": { - "metadata": { - "path": "root/Default/Default/test:GET --users has cors headers/Handler/IamRole", - "uniqueId": "testGET--usershascorsheaders_Handler_IamRole_6841C3FF" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testOPTIONS--usershascorsheaders_Handler_IamRole_0EFF66BD": { - "//": { - "metadata": { - "path": "root/Default/Default/test:OPTIONS --users has cors headers/Handler/IamRole", - "uniqueId": "testOPTIONS--usershascorsheaders_Handler_IamRole_0EFF66BD" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testOPTIONS--usersrespondswithproperheadersforrequested_Handler_IamRole_4AB06A0F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:OPTIONS --users responds with proper headers for requested/Handler/IamRole", - "uniqueId": "testOPTIONS--usersrespondswithproperheadersforrequested_Handler_IamRole_4AB06A0F" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" } }, "aws_iam_role_policy": { @@ -262,36 +235,6 @@ module.exports = function({ }) { }, "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.name}" - }, - "testGET--usershascorsheaders_Handler_IamRolePolicy_BEF25776": { - "//": { - "metadata": { - "path": "root/Default/Default/test:GET --users has cors headers/Handler/IamRolePolicy", - "uniqueId": "testGET--usershascorsheaders_Handler_IamRolePolicy_BEF25776" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testGET--usershascorsheaders_Handler_IamRole_6841C3FF.name}" - }, - "testOPTIONS--usershascorsheaders_Handler_IamRolePolicy_F6912B4F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:OPTIONS --users has cors headers/Handler/IamRolePolicy", - "uniqueId": "testOPTIONS--usershascorsheaders_Handler_IamRolePolicy_F6912B4F" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testOPTIONS--usershascorsheaders_Handler_IamRole_0EFF66BD.name}" - }, - "testOPTIONS--usersrespondswithproperheadersforrequested_Handler_IamRolePolicy_00E727F2": { - "//": { - "metadata": { - "path": "root/Default/Default/test:OPTIONS --users responds with proper headers for requested/Handler/IamRolePolicy", - "uniqueId": "testOPTIONS--usersrespondswithproperheadersforrequested_Handler_IamRolePolicy_00E727F2" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testOPTIONS--usersrespondswithproperheadersforrequested_Handler_IamRole_4AB06A0F.name}" } }, "aws_iam_role_policy_attachment": { @@ -304,36 +247,6 @@ module.exports = function({ }) { }, "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.name}" - }, - "testGET--usershascorsheaders_Handler_IamRolePolicyAttachment_54A08CCC": { - "//": { - "metadata": { - "path": "root/Default/Default/test:GET --users has cors headers/Handler/IamRolePolicyAttachment", - "uniqueId": "testGET--usershascorsheaders_Handler_IamRolePolicyAttachment_54A08CCC" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testGET--usershascorsheaders_Handler_IamRole_6841C3FF.name}" - }, - "testOPTIONS--usershascorsheaders_Handler_IamRolePolicyAttachment_CA58727C": { - "//": { - "metadata": { - "path": "root/Default/Default/test:OPTIONS --users has cors headers/Handler/IamRolePolicyAttachment", - "uniqueId": "testOPTIONS--usershascorsheaders_Handler_IamRolePolicyAttachment_CA58727C" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testOPTIONS--usershascorsheaders_Handler_IamRole_0EFF66BD.name}" - }, - "testOPTIONS--usersrespondswithproperheadersforrequested_Handler_IamRolePolicyAttachment_F702A7D9": { - "//": { - "metadata": { - "path": "root/Default/Default/test:OPTIONS --users responds with proper headers for requested/Handler/IamRolePolicyAttachment", - "uniqueId": "testOPTIONS--usersrespondswithproperheadersforrequested_Handler_IamRolePolicyAttachment_F702A7D9" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testOPTIONS--usersrespondswithproperheadersforrequested_Handler_IamRole_4AB06A0F.name}" } }, "aws_lambda_function": { @@ -365,96 +278,6 @@ module.exports = function({ }) { "security_group_ids": [], "subnet_ids": [] } - }, - "testGET--usershascorsheaders_Handler_E0F337CB": { - "//": { - "metadata": { - "path": "root/Default/Default/test:GET --users has cors headers/Handler/Default", - "uniqueId": "testGET--usershascorsheaders_Handler_E0F337CB" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8d51aba", - "WING_TARGET": "tf-aws", - "WING_TOKEN_TFTOKEN_TOKEN_8": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" - } - }, - "function_name": "Handler-c8d51aba", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testGET--usershascorsheaders_Handler_IamRole_6841C3FF.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testGET--usershascorsheaders_Handler_S3Object_A63B28D3.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testOPTIONS--usershascorsheaders_Handler_3A565385": { - "//": { - "metadata": { - "path": "root/Default/Default/test:OPTIONS --users has cors headers/Handler/Default", - "uniqueId": "testOPTIONS--usershascorsheaders_Handler_3A565385" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c81c750d", - "WING_TARGET": "tf-aws", - "WING_TOKEN_TFTOKEN_TOKEN_8": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" - } - }, - "function_name": "Handler-c81c750d", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testOPTIONS--usershascorsheaders_Handler_IamRole_0EFF66BD.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testOPTIONS--usershascorsheaders_Handler_S3Object_7EC6E95C.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testOPTIONS--usersrespondswithproperheadersforrequested_Handler_0A2AB662": { - "//": { - "metadata": { - "path": "root/Default/Default/test:OPTIONS --users responds with proper headers for requested/Handler/Default", - "uniqueId": "testOPTIONS--usersrespondswithproperheadersforrequested_Handler_0A2AB662" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8aef6d3", - "WING_TARGET": "tf-aws", - "WING_TOKEN_TFTOKEN_TOKEN_8": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" - } - }, - "function_name": "Handler-c8aef6d3", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testOPTIONS--usersrespondswithproperheadersforrequested_Handler_IamRole_4AB06A0F.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testOPTIONS--usersrespondswithproperheadersforrequested_Handler_S3Object_0954ACCC.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } } }, "aws_lambda_permission": { @@ -494,39 +317,6 @@ module.exports = function({ }) { "bucket": "${aws_s3_bucket.Code.bucket}", "key": "", "source": "" - }, - "testGET--usershascorsheaders_Handler_S3Object_A63B28D3": { - "//": { - "metadata": { - "path": "root/Default/Default/test:GET --users has cors headers/Handler/S3Object", - "uniqueId": "testGET--usershascorsheaders_Handler_S3Object_A63B28D3" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testOPTIONS--usershascorsheaders_Handler_S3Object_7EC6E95C": { - "//": { - "metadata": { - "path": "root/Default/Default/test:OPTIONS --users has cors headers/Handler/S3Object", - "uniqueId": "testOPTIONS--usershascorsheaders_Handler_S3Object_7EC6E95C" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testOPTIONS--usersrespondswithproperheadersforrequested_Handler_S3Object_0954ACCC": { - "//": { - "metadata": { - "path": "root/Default/Default/test:OPTIONS --users responds with proper headers for requested/Handler/S3Object", - "uniqueId": "testOPTIONS--usersrespondswithproperheadersforrequested_Handler_S3Object_0954ACCC" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" } } } diff --git a/tools/hangar/__snapshots__/test_corpus/valid/api_cors_default.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/api_cors_default.w_compile_tf-aws.md index 2a0040d26b0..28a61d8f58e 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/api_cors_default.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/api_cors_default.w_compile_tf-aws.md @@ -140,7 +140,7 @@ module.exports = function({ }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:GET --users has default cors headers\",\"${aws_lambda_function.testGET--usershasdefaultcorsheaders_Handler_1182379A.arn}\"],[\"root/Default/Default/test:OPTIONS --users has default cors headers\",\"${aws_lambda_function.testOPTIONS--usershasdefaultcorsheaders_Handler_D03A1BFF.arn}\"]]" + "value": "[]" } }, "provider": { @@ -200,24 +200,6 @@ module.exports = function({ }) { } }, "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testGET--usershasdefaultcorsheaders_Handler_IamRole_17E5D7FC": { - "//": { - "metadata": { - "path": "root/Default/Default/test:GET --users has default cors headers/Handler/IamRole", - "uniqueId": "testGET--usershasdefaultcorsheaders_Handler_IamRole_17E5D7FC" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testOPTIONS--usershasdefaultcorsheaders_Handler_IamRole_E58DF921": { - "//": { - "metadata": { - "path": "root/Default/Default/test:OPTIONS --users has default cors headers/Handler/IamRole", - "uniqueId": "testOPTIONS--usershasdefaultcorsheaders_Handler_IamRole_E58DF921" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" } }, "aws_iam_role_policy": { @@ -230,26 +212,6 @@ module.exports = function({ }) { }, "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.name}" - }, - "testGET--usershasdefaultcorsheaders_Handler_IamRolePolicy_F382BF6B": { - "//": { - "metadata": { - "path": "root/Default/Default/test:GET --users has default cors headers/Handler/IamRolePolicy", - "uniqueId": "testGET--usershasdefaultcorsheaders_Handler_IamRolePolicy_F382BF6B" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testGET--usershasdefaultcorsheaders_Handler_IamRole_17E5D7FC.name}" - }, - "testOPTIONS--usershasdefaultcorsheaders_Handler_IamRolePolicy_C496A648": { - "//": { - "metadata": { - "path": "root/Default/Default/test:OPTIONS --users has default cors headers/Handler/IamRolePolicy", - "uniqueId": "testOPTIONS--usershasdefaultcorsheaders_Handler_IamRolePolicy_C496A648" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testOPTIONS--usershasdefaultcorsheaders_Handler_IamRole_E58DF921.name}" } }, "aws_iam_role_policy_attachment": { @@ -262,26 +224,6 @@ module.exports = function({ }) { }, "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.name}" - }, - "testGET--usershasdefaultcorsheaders_Handler_IamRolePolicyAttachment_50A99B49": { - "//": { - "metadata": { - "path": "root/Default/Default/test:GET --users has default cors headers/Handler/IamRolePolicyAttachment", - "uniqueId": "testGET--usershasdefaultcorsheaders_Handler_IamRolePolicyAttachment_50A99B49" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testGET--usershasdefaultcorsheaders_Handler_IamRole_17E5D7FC.name}" - }, - "testOPTIONS--usershasdefaultcorsheaders_Handler_IamRolePolicyAttachment_CF666F56": { - "//": { - "metadata": { - "path": "root/Default/Default/test:OPTIONS --users has default cors headers/Handler/IamRolePolicyAttachment", - "uniqueId": "testOPTIONS--usershasdefaultcorsheaders_Handler_IamRolePolicyAttachment_CF666F56" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testOPTIONS--usershasdefaultcorsheaders_Handler_IamRole_E58DF921.name}" } }, "aws_lambda_function": { @@ -313,66 +255,6 @@ module.exports = function({ }) { "security_group_ids": [], "subnet_ids": [] } - }, - "testGET--usershasdefaultcorsheaders_Handler_1182379A": { - "//": { - "metadata": { - "path": "root/Default/Default/test:GET --users has default cors headers/Handler/Default", - "uniqueId": "testGET--usershasdefaultcorsheaders_Handler_1182379A" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c80c888e", - "WING_TARGET": "tf-aws", - "WING_TOKEN_TFTOKEN_TOKEN_8": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" - } - }, - "function_name": "Handler-c80c888e", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testGET--usershasdefaultcorsheaders_Handler_IamRole_17E5D7FC.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testGET--usershasdefaultcorsheaders_Handler_S3Object_ADAE18A8.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testOPTIONS--usershasdefaultcorsheaders_Handler_D03A1BFF": { - "//": { - "metadata": { - "path": "root/Default/Default/test:OPTIONS --users has default cors headers/Handler/Default", - "uniqueId": "testOPTIONS--usershasdefaultcorsheaders_Handler_D03A1BFF" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c82f7728", - "WING_TARGET": "tf-aws", - "WING_TOKEN_TFTOKEN_TOKEN_8": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" - } - }, - "function_name": "Handler-c82f7728", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testOPTIONS--usershasdefaultcorsheaders_Handler_IamRole_E58DF921.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testOPTIONS--usershasdefaultcorsheaders_Handler_S3Object_2F99FE7D.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } } }, "aws_lambda_permission": { @@ -412,28 +294,6 @@ module.exports = function({ }) { "bucket": "${aws_s3_bucket.Code.bucket}", "key": "", "source": "" - }, - "testGET--usershasdefaultcorsheaders_Handler_S3Object_ADAE18A8": { - "//": { - "metadata": { - "path": "root/Default/Default/test:GET --users has default cors headers/Handler/S3Object", - "uniqueId": "testGET--usershasdefaultcorsheaders_Handler_S3Object_ADAE18A8" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testOPTIONS--usershasdefaultcorsheaders_Handler_S3Object_2F99FE7D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:OPTIONS --users has default cors headers/Handler/S3Object", - "uniqueId": "testOPTIONS--usershasdefaultcorsheaders_Handler_S3Object_2F99FE7D" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" } } } diff --git a/tools/hangar/__snapshots__/test_corpus/valid/assert.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/assert.w_compile_tf-aws.md index 94e399ee765..46fba119184 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/assert.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/assert.w_compile_tf-aws.md @@ -53,105 +53,13 @@ module.exports = function({ $s1, $s2 }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:assert works inflight\",\"${aws_lambda_function.testassertworksinflight_Handler_915EA51A.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testassertworksinflight_Handler_IamRole_9AEF76A8": { - "//": { - "metadata": { - "path": "root/Default/Default/test:assert works inflight/Handler/IamRole", - "uniqueId": "testassertworksinflight_Handler_IamRole_9AEF76A8" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testassertworksinflight_Handler_IamRolePolicy_8FAD880D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:assert works inflight/Handler/IamRolePolicy", - "uniqueId": "testassertworksinflight_Handler_IamRolePolicy_8FAD880D" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testassertworksinflight_Handler_IamRole_9AEF76A8.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testassertworksinflight_Handler_IamRolePolicyAttachment_4F207D95": { - "//": { - "metadata": { - "path": "root/Default/Default/test:assert works inflight/Handler/IamRolePolicyAttachment", - "uniqueId": "testassertworksinflight_Handler_IamRolePolicyAttachment_4F207D95" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testassertworksinflight_Handler_IamRole_9AEF76A8.name}" - } - }, - "aws_lambda_function": { - "testassertworksinflight_Handler_915EA51A": { - "//": { - "metadata": { - "path": "root/Default/Default/test:assert works inflight/Handler/Default", - "uniqueId": "testassertworksinflight_Handler_915EA51A" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8a7b0b3", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8a7b0b3", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testassertworksinflight_Handler_IamRole_9AEF76A8.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testassertworksinflight_Handler_S3Object_9416DC9E.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testassertworksinflight_Handler_S3Object_9416DC9E": { - "//": { - "metadata": { - "path": "root/Default/Default/test:assert works inflight/Handler/S3Object", - "uniqueId": "testassertworksinflight_Handler_S3Object_9416DC9E" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/valid/bring_jsii.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/bring_jsii.w_compile_tf-aws.md index a2c0487ca5a..af23565599d 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/bring_jsii.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/bring_jsii.w_compile_tf-aws.md @@ -39,105 +39,13 @@ module.exports = function({ $greeting }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:sayHello\",\"${aws_lambda_function.testsayHello_Handler_98B5E136.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testsayHello_Handler_IamRole_59C2E116": { - "//": { - "metadata": { - "path": "root/Default/Default/test:sayHello/Handler/IamRole", - "uniqueId": "testsayHello_Handler_IamRole_59C2E116" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testsayHello_Handler_IamRolePolicy_A3967740": { - "//": { - "metadata": { - "path": "root/Default/Default/test:sayHello/Handler/IamRolePolicy", - "uniqueId": "testsayHello_Handler_IamRolePolicy_A3967740" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testsayHello_Handler_IamRole_59C2E116.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testsayHello_Handler_IamRolePolicyAttachment_A8185104": { - "//": { - "metadata": { - "path": "root/Default/Default/test:sayHello/Handler/IamRolePolicyAttachment", - "uniqueId": "testsayHello_Handler_IamRolePolicyAttachment_A8185104" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testsayHello_Handler_IamRole_59C2E116.name}" - } - }, - "aws_lambda_function": { - "testsayHello_Handler_98B5E136": { - "//": { - "metadata": { - "path": "root/Default/Default/test:sayHello/Handler/Default", - "uniqueId": "testsayHello_Handler_98B5E136" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c887876f", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c887876f", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testsayHello_Handler_IamRole_59C2E116.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testsayHello_Handler_S3Object_87C49294.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testsayHello_Handler_S3Object_87C49294": { - "//": { - "metadata": { - "path": "root/Default/Default/test:sayHello/Handler/S3Object", - "uniqueId": "testsayHello_Handler_S3Object_87C49294" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/valid/bring_jsii_path.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/bring_jsii_path.w_compile_tf-aws.md index 85bb480651e..e82ced54345 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/bring_jsii_path.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/bring_jsii_path.w_compile_tf-aws.md @@ -39,105 +39,13 @@ module.exports = function({ $greeting }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:sayHello\",\"${aws_lambda_function.testsayHello_Handler_98B5E136.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testsayHello_Handler_IamRole_59C2E116": { - "//": { - "metadata": { - "path": "root/Default/Default/test:sayHello/Handler/IamRole", - "uniqueId": "testsayHello_Handler_IamRole_59C2E116" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testsayHello_Handler_IamRolePolicy_A3967740": { - "//": { - "metadata": { - "path": "root/Default/Default/test:sayHello/Handler/IamRolePolicy", - "uniqueId": "testsayHello_Handler_IamRolePolicy_A3967740" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testsayHello_Handler_IamRole_59C2E116.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testsayHello_Handler_IamRolePolicyAttachment_A8185104": { - "//": { - "metadata": { - "path": "root/Default/Default/test:sayHello/Handler/IamRolePolicyAttachment", - "uniqueId": "testsayHello_Handler_IamRolePolicyAttachment_A8185104" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testsayHello_Handler_IamRole_59C2E116.name}" - } - }, - "aws_lambda_function": { - "testsayHello_Handler_98B5E136": { - "//": { - "metadata": { - "path": "root/Default/Default/test:sayHello/Handler/Default", - "uniqueId": "testsayHello_Handler_98B5E136" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c887876f", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c887876f", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testsayHello_Handler_IamRole_59C2E116.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testsayHello_Handler_S3Object_87C49294.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testsayHello_Handler_S3Object_87C49294": { - "//": { - "metadata": { - "path": "root/Default/Default/test:sayHello/Handler/S3Object", - "uniqueId": "testsayHello_Handler_S3Object_87C49294" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/valid/bring_local.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/bring_local.w_compile_tf-aws.md index 9eedae9d178..27022c61178 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/bring_local.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/bring_local.w_compile_tf-aws.md @@ -168,7 +168,7 @@ module.exports = function({ }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:add data to store\",\"${aws_lambda_function.testadddatatostore_Handler_19066842.arn}\"]]" + "value": "[]" } }, "provider": { @@ -186,15 +186,6 @@ module.exports = function({ }) { } }, "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testadddatatostore_Handler_IamRole_D112FE1A": { - "//": { - "metadata": { - "path": "root/Default/Default/test:add data to store/Handler/IamRole", - "uniqueId": "testadddatatostore_Handler_IamRole_D112FE1A" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" } }, "aws_iam_role_policy": { @@ -207,16 +198,6 @@ module.exports = function({ }) { }, "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"s3:PutObject*\",\"s3:Abort*\"],\"Resource\":[\"${aws_s3_bucket.file1Store_cloudBucket_86CE87B1.arn}\",\"${aws_s3_bucket.file1Store_cloudBucket_86CE87B1.arn}/*\"],\"Effect\":\"Allow\"}]}", "role": "${aws_iam_role.file1Store_cloudOnDeploy_Function_IamRole_233573CC.name}" - }, - "testadddatatostore_Handler_IamRolePolicy_2759864D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:add data to store/Handler/IamRolePolicy", - "uniqueId": "testadddatatostore_Handler_IamRolePolicy_2759864D" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"s3:PutObject*\",\"s3:Abort*\"],\"Resource\":[\"${aws_s3_bucket.file1Store_cloudBucket_86CE87B1.arn}\",\"${aws_s3_bucket.file1Store_cloudBucket_86CE87B1.arn}/*\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testadddatatostore_Handler_IamRole_D112FE1A.name}" } }, "aws_iam_role_policy_attachment": { @@ -229,16 +210,6 @@ module.exports = function({ }) { }, "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", "role": "${aws_iam_role.file1Store_cloudOnDeploy_Function_IamRole_233573CC.name}" - }, - "testadddatatostore_Handler_IamRolePolicyAttachment_1100277D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:add data to store/Handler/IamRolePolicyAttachment", - "uniqueId": "testadddatatostore_Handler_IamRolePolicyAttachment_1100277D" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testadddatatostore_Handler_IamRole_D112FE1A.name}" } }, "aws_lambda_function": { @@ -271,36 +242,6 @@ module.exports = function({ }) { "security_group_ids": [], "subnet_ids": [] } - }, - "testadddatatostore_Handler_19066842": { - "//": { - "metadata": { - "path": "root/Default/Default/test:add data to store/Handler/Default", - "uniqueId": "testadddatatostore_Handler_19066842" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "BUCKET_NAME_94dc4b3e": "${aws_s3_bucket.file1Store_cloudBucket_86CE87B1.bucket}", - "WING_FUNCTION_NAME": "Handler-c8157444", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8157444", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testadddatatostore_Handler_IamRole_D112FE1A.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testadddatatostore_Handler_S3Object_6CF2BC7E.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } } }, "aws_s3_bucket": { @@ -353,17 +294,6 @@ module.exports = function({ }) { "bucket": "${aws_s3_bucket.Code.bucket}", "key": "", "source": "" - }, - "testadddatatostore_Handler_S3Object_6CF2BC7E": { - "//": { - "metadata": { - "path": "root/Default/Default/test:add data to store/Handler/S3Object", - "uniqueId": "testadddatatostore_Handler_S3Object_6CF2BC7E" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" } } } diff --git a/tools/hangar/__snapshots__/test_corpus/valid/bucket_events.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/bucket_events.w_compile_tf-aws.md index d8d01f39e0e..059f4f2f475 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/bucket_events.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/bucket_events.w_compile_tf-aws.md @@ -133,7 +133,7 @@ module.exports = function({ $b }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:putting and deleting from a bucket to trigger bucket events\",\"${aws_lambda_function.testputtinganddeletingfromabuckettotriggerbucketevents_Handler_31F6B48C.arn}\"]]" + "value": "[]" } }, "provider": { @@ -223,15 +223,6 @@ module.exports = function({ $b }) { } }, "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testputtinganddeletingfromabuckettotriggerbucketevents_Handler_IamRole_C2098456": { - "//": { - "metadata": { - "path": "root/Default/Default/test:putting and deleting from a bucket to trigger bucket events/Handler/IamRole", - "uniqueId": "testputtinganddeletingfromabuckettotriggerbucketevents_Handler_IamRole_C2098456" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" } }, "aws_iam_role_policy": { @@ -324,16 +315,6 @@ module.exports = function({ $b }) { }, "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", "role": "${aws_iam_role.other_other-onupdate-OnMessage-bffa2a20_IamRole_EC396E4E.name}" - }, - "testputtinganddeletingfromabuckettotriggerbucketevents_Handler_IamRolePolicy_4BAD9EF3": { - "//": { - "metadata": { - "path": "root/Default/Default/test:putting and deleting from a bucket to trigger bucket events/Handler/IamRolePolicy", - "uniqueId": "testputtinganddeletingfromabuckettotriggerbucketevents_Handler_IamRolePolicy_4BAD9EF3" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"s3:PutObject*\",\"s3:Abort*\",\"s3:DeleteObject*\",\"s3:DeleteObjectVersion*\",\"s3:PutLifecycleConfiguration*\"],\"Resource\":[\"${aws_s3_bucket.b.arn}\",\"${aws_s3_bucket.b.arn}/*\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testputtinganddeletingfromabuckettotriggerbucketevents_Handler_IamRole_C2098456.name}" } }, "aws_iam_role_policy_attachment": { @@ -426,16 +407,6 @@ module.exports = function({ $b }) { }, "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", "role": "${aws_iam_role.other_other-onupdate-OnMessage-bffa2a20_IamRole_EC396E4E.name}" - }, - "testputtinganddeletingfromabuckettotriggerbucketevents_Handler_IamRolePolicyAttachment_2DB05AD7": { - "//": { - "metadata": { - "path": "root/Default/Default/test:putting and deleting from a bucket to trigger bucket events/Handler/IamRolePolicyAttachment", - "uniqueId": "testputtinganddeletingfromabuckettotriggerbucketevents_Handler_IamRolePolicyAttachment_2DB05AD7" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testputtinganddeletingfromabuckettotriggerbucketevents_Handler_IamRole_C2098456.name}" } }, "aws_lambda_function": { @@ -702,36 +673,6 @@ module.exports = function({ $b }) { "security_group_ids": [], "subnet_ids": [] } - }, - "testputtinganddeletingfromabuckettotriggerbucketevents_Handler_31F6B48C": { - "//": { - "metadata": { - "path": "root/Default/Default/test:putting and deleting from a bucket to trigger bucket events/Handler/Default", - "uniqueId": "testputtinganddeletingfromabuckettotriggerbucketevents_Handler_31F6B48C" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "BUCKET_NAME_34279ead": "${aws_s3_bucket.b.bucket}", - "WING_FUNCTION_NAME": "Handler-c8457446", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8457446", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testputtinganddeletingfromabuckettotriggerbucketevents_Handler_IamRole_C2098456.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testputtinganddeletingfromabuckettotriggerbucketevents_Handler_S3Object_B00A26B2.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } } }, "aws_lambda_permission": { @@ -1084,17 +1025,6 @@ module.exports = function({ $b }) { "bucket": "${aws_s3_bucket.Code.bucket}", "key": "", "source": "" - }, - "testputtinganddeletingfromabuckettotriggerbucketevents_Handler_S3Object_B00A26B2": { - "//": { - "metadata": { - "path": "root/Default/Default/test:putting and deleting from a bucket to trigger bucket events/Handler/S3Object", - "uniqueId": "testputtinganddeletingfromabuckettotriggerbucketevents_Handler_S3Object_B00A26B2" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" } }, "aws_sns_topic": { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/bucket_keys.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/bucket_keys.w_compile_tf-aws.md index a884f59c0d6..3e2bac2f904 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/bucket_keys.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/bucket_keys.w_compile_tf-aws.md @@ -49,7 +49,7 @@ module.exports = function({ $b }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:test\",\"${aws_lambda_function.testtest_Handler_295107CC.arn}\"]]" + "value": "[]" } }, "provider": { @@ -58,83 +58,7 @@ module.exports = function({ $b }) { ] }, "resource": { - "aws_iam_role": { - "testtest_Handler_IamRole_15693C93": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRole", - "uniqueId": "testtest_Handler_IamRole_15693C93" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testtest_Handler_IamRolePolicy_AF0279BD": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRolePolicy", - "uniqueId": "testtest_Handler_IamRolePolicy_AF0279BD" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"s3:List*\",\"s3:PutObject*\",\"s3:Abort*\",\"s3:GetObject*\",\"s3:GetBucket*\"],\"Resource\":[\"${aws_s3_bucket.cloudBucket.arn}\",\"${aws_s3_bucket.cloudBucket.arn}/*\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testtest_Handler_IamRolePolicyAttachment_ADF4752D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRolePolicyAttachment", - "uniqueId": "testtest_Handler_IamRolePolicyAttachment_ADF4752D" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.name}" - } - }, - "aws_lambda_function": { - "testtest_Handler_295107CC": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/Default", - "uniqueId": "testtest_Handler_295107CC" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", - "WING_FUNCTION_NAME": "Handler-c8f4f2a1", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8f4f2a1", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testtest_Handler_S3Object_9F4E28A7.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - }, "cloudBucket": { "//": { "metadata": { @@ -163,19 +87,6 @@ module.exports = function({ $b }) { } ] } - }, - "aws_s3_object": { - "testtest_Handler_S3Object_9F4E28A7": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/S3Object", - "uniqueId": "testtest_Handler_S3Object_9F4E28A7" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } } } } diff --git a/tools/hangar/__snapshots__/test_corpus/valid/call_static_of_myself.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/call_static_of_myself.w_compile_tf-aws.md index ab82616d342..cc880cef4c0 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/call_static_of_myself.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/call_static_of_myself.w_compile_tf-aws.md @@ -86,105 +86,13 @@ module.exports = function({ }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:test\",\"${aws_lambda_function.testtest_Handler_295107CC.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testtest_Handler_IamRole_15693C93": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRole", - "uniqueId": "testtest_Handler_IamRole_15693C93" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testtest_Handler_IamRolePolicy_AF0279BD": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRolePolicy", - "uniqueId": "testtest_Handler_IamRolePolicy_AF0279BD" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testtest_Handler_IamRolePolicyAttachment_ADF4752D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRolePolicyAttachment", - "uniqueId": "testtest_Handler_IamRolePolicyAttachment_ADF4752D" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.name}" - } - }, - "aws_lambda_function": { - "testtest_Handler_295107CC": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/Default", - "uniqueId": "testtest_Handler_295107CC" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8f4f2a1", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8f4f2a1", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testtest_Handler_S3Object_9F4E28A7.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testtest_Handler_S3Object_9F4E28A7": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/S3Object", - "uniqueId": "testtest_Handler_S3Object_9F4E28A7" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/valid/calling_inflight_variants.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/calling_inflight_variants.w_compile_tf-aws.md index 32509e0f39c..318a431d69f 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/calling_inflight_variants.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/calling_inflight_variants.w_compile_tf-aws.md @@ -98,105 +98,13 @@ module.exports = function({ }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:calling different types of inflights\",\"${aws_lambda_function.testcallingdifferenttypesofinflights_Handler_F0BAE661.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testcallingdifferenttypesofinflights_Handler_IamRole_3D2D3E24": { - "//": { - "metadata": { - "path": "root/Default/Default/test:calling different types of inflights/Handler/IamRole", - "uniqueId": "testcallingdifferenttypesofinflights_Handler_IamRole_3D2D3E24" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testcallingdifferenttypesofinflights_Handler_IamRolePolicy_150C3E36": { - "//": { - "metadata": { - "path": "root/Default/Default/test:calling different types of inflights/Handler/IamRolePolicy", - "uniqueId": "testcallingdifferenttypesofinflights_Handler_IamRolePolicy_150C3E36" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testcallingdifferenttypesofinflights_Handler_IamRole_3D2D3E24.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testcallingdifferenttypesofinflights_Handler_IamRolePolicyAttachment_6F365B35": { - "//": { - "metadata": { - "path": "root/Default/Default/test:calling different types of inflights/Handler/IamRolePolicyAttachment", - "uniqueId": "testcallingdifferenttypesofinflights_Handler_IamRolePolicyAttachment_6F365B35" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testcallingdifferenttypesofinflights_Handler_IamRole_3D2D3E24.name}" - } - }, - "aws_lambda_function": { - "testcallingdifferenttypesofinflights_Handler_F0BAE661": { - "//": { - "metadata": { - "path": "root/Default/Default/test:calling different types of inflights/Handler/Default", - "uniqueId": "testcallingdifferenttypesofinflights_Handler_F0BAE661" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8f324e0", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8f324e0", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testcallingdifferenttypesofinflights_Handler_IamRole_3D2D3E24.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testcallingdifferenttypesofinflights_Handler_S3Object_A64779ED.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testcallingdifferenttypesofinflights_Handler_S3Object_A64779ED": { - "//": { - "metadata": { - "path": "root/Default/Default/test:calling different types of inflights/Handler/S3Object", - "uniqueId": "testcallingdifferenttypesofinflights_Handler_S3Object_A64779ED" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/valid/capture_containers.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/capture_containers.w_compile_tf-aws.md index 18393a10947..b4aa907d122 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/capture_containers.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/capture_containers.w_compile_tf-aws.md @@ -47,105 +47,13 @@ module.exports = function({ $Object_keys_myMap__length, $__bang__in___arrOfMap_a }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:capture_containers\",\"${aws_lambda_function.testcapture_containers_Handler_C1B42BA9.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testcapture_containers_Handler_IamRole_F3F5FC11": { - "//": { - "metadata": { - "path": "root/Default/Default/test:capture_containers/Handler/IamRole", - "uniqueId": "testcapture_containers_Handler_IamRole_F3F5FC11" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testcapture_containers_Handler_IamRolePolicy_631AF9E4": { - "//": { - "metadata": { - "path": "root/Default/Default/test:capture_containers/Handler/IamRolePolicy", - "uniqueId": "testcapture_containers_Handler_IamRolePolicy_631AF9E4" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testcapture_containers_Handler_IamRole_F3F5FC11.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testcapture_containers_Handler_IamRolePolicyAttachment_8C9C0779": { - "//": { - "metadata": { - "path": "root/Default/Default/test:capture_containers/Handler/IamRolePolicyAttachment", - "uniqueId": "testcapture_containers_Handler_IamRolePolicyAttachment_8C9C0779" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testcapture_containers_Handler_IamRole_F3F5FC11.name}" - } - }, - "aws_lambda_function": { - "testcapture_containers_Handler_C1B42BA9": { - "//": { - "metadata": { - "path": "root/Default/Default/test:capture_containers/Handler/Default", - "uniqueId": "testcapture_containers_Handler_C1B42BA9" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c876b763", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c876b763", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testcapture_containers_Handler_IamRole_F3F5FC11.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testcapture_containers_Handler_S3Object_4CA88332.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testcapture_containers_Handler_S3Object_4CA88332": { - "//": { - "metadata": { - "path": "root/Default/Default/test:capture_containers/Handler/S3Object", - "uniqueId": "testcapture_containers_Handler_S3Object_4CA88332" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/valid/capture_in_binary.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/capture_in_binary.w_compile_tf-aws.md index ed826309036..28a7e955dac 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/capture_in_binary.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/capture_in_binary.w_compile_tf-aws.md @@ -41,7 +41,7 @@ module.exports = function({ $b, $x }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:binary expressions\",\"${aws_lambda_function.testbinaryexpressions_Handler_BDFD91F0.arn}\"]]" + "value": "[]" } }, "provider": { @@ -50,83 +50,7 @@ module.exports = function({ $b, $x }) { ] }, "resource": { - "aws_iam_role": { - "testbinaryexpressions_Handler_IamRole_175BD041": { - "//": { - "metadata": { - "path": "root/Default/Default/test:binary expressions/Handler/IamRole", - "uniqueId": "testbinaryexpressions_Handler_IamRole_175BD041" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testbinaryexpressions_Handler_IamRolePolicy_AB3DBB4A": { - "//": { - "metadata": { - "path": "root/Default/Default/test:binary expressions/Handler/IamRolePolicy", - "uniqueId": "testbinaryexpressions_Handler_IamRolePolicy_AB3DBB4A" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"s3:List*\",\"s3:PutObject*\",\"s3:Abort*\",\"s3:GetObject*\",\"s3:GetBucket*\"],\"Resource\":[\"${aws_s3_bucket.cloudBucket.arn}\",\"${aws_s3_bucket.cloudBucket.arn}/*\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testbinaryexpressions_Handler_IamRole_175BD041.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testbinaryexpressions_Handler_IamRolePolicyAttachment_C4496BC5": { - "//": { - "metadata": { - "path": "root/Default/Default/test:binary expressions/Handler/IamRolePolicyAttachment", - "uniqueId": "testbinaryexpressions_Handler_IamRolePolicyAttachment_C4496BC5" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testbinaryexpressions_Handler_IamRole_175BD041.name}" - } - }, - "aws_lambda_function": { - "testbinaryexpressions_Handler_BDFD91F0": { - "//": { - "metadata": { - "path": "root/Default/Default/test:binary expressions/Handler/Default", - "uniqueId": "testbinaryexpressions_Handler_BDFD91F0" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", - "WING_FUNCTION_NAME": "Handler-c89c8d69", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c89c8d69", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testbinaryexpressions_Handler_IamRole_175BD041.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testbinaryexpressions_Handler_S3Object_38824451.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - }, "cloudBucket": { "//": { "metadata": { @@ -155,19 +79,6 @@ module.exports = function({ $b, $x }) { } ] } - }, - "aws_s3_object": { - "testbinaryexpressions_Handler_S3Object_38824451": { - "//": { - "metadata": { - "path": "root/Default/Default/test:binary expressions/Handler/S3Object", - "uniqueId": "testbinaryexpressions_Handler_S3Object_38824451" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } } } } diff --git a/tools/hangar/__snapshots__/test_corpus/valid/capture_mutables.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/capture_mutables.w_compile_tf-aws.md index 1bbb98c7945..edb3038604c 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/capture_mutables.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/capture_mutables.w_compile_tf-aws.md @@ -60,105 +60,13 @@ module.exports = function({ $handler }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:main\",\"${aws_lambda_function.testmain_Handler_242B2607.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testmain_Handler_IamRole_0E2C4B8D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:main/Handler/IamRole", - "uniqueId": "testmain_Handler_IamRole_0E2C4B8D" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testmain_Handler_IamRolePolicy_A91080AC": { - "//": { - "metadata": { - "path": "root/Default/Default/test:main/Handler/IamRolePolicy", - "uniqueId": "testmain_Handler_IamRolePolicy_A91080AC" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testmain_Handler_IamRole_0E2C4B8D.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testmain_Handler_IamRolePolicyAttachment_4B878377": { - "//": { - "metadata": { - "path": "root/Default/Default/test:main/Handler/IamRolePolicyAttachment", - "uniqueId": "testmain_Handler_IamRolePolicyAttachment_4B878377" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testmain_Handler_IamRole_0E2C4B8D.name}" - } - }, - "aws_lambda_function": { - "testmain_Handler_242B2607": { - "//": { - "metadata": { - "path": "root/Default/Default/test:main/Handler/Default", - "uniqueId": "testmain_Handler_242B2607" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8d10438", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8d10438", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testmain_Handler_IamRole_0E2C4B8D.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testmain_Handler_S3Object_3FA67F7E.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testmain_Handler_S3Object_3FA67F7E": { - "//": { - "metadata": { - "path": "root/Default/Default/test:main/Handler/S3Object", - "uniqueId": "testmain_Handler_S3Object_3FA67F7E" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/valid/capture_reassigable_class_field.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/capture_reassigable_class_field.w_compile_tf-aws.md index eeec284046d..cafe89273e1 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/capture_reassigable_class_field.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/capture_reassigable_class_field.w_compile_tf-aws.md @@ -107,7 +107,7 @@ module.exports = function({ }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:main\",\"${aws_lambda_function.testmain_Handler_242B2607.arn}\"]]" + "value": "[]" } }, "provider": { @@ -135,84 +135,7 @@ module.exports = function({ }) { "name": "wing-counter-sasa-c8fc4cc8" } }, - "aws_iam_role": { - "testmain_Handler_IamRole_0E2C4B8D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:main/Handler/IamRole", - "uniqueId": "testmain_Handler_IamRole_0E2C4B8D" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testmain_Handler_IamRolePolicy_A91080AC": { - "//": { - "metadata": { - "path": "root/Default/Default/test:main/Handler/IamRolePolicy", - "uniqueId": "testmain_Handler_IamRolePolicy_A91080AC" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"s3:List*\",\"s3:PutObject*\",\"s3:Abort*\",\"s3:GetObject*\",\"s3:GetBucket*\"],\"Resource\":[\"${aws_s3_bucket.KeyValueStore_cloudBucket_D9D365FD.arn}\",\"${aws_s3_bucket.KeyValueStore_cloudBucket_D9D365FD.arn}/*\"],\"Effect\":\"Allow\"},{\"Action\":[\"dynamodb:UpdateItem\"],\"Resource\":[\"${aws_dynamodb_table.sasa.arn}\"],\"Effect\":\"Allow\"},{\"Action\":[\"dynamodb:GetItem\"],\"Resource\":[\"${aws_dynamodb_table.sasa.arn}\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testmain_Handler_IamRole_0E2C4B8D.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testmain_Handler_IamRolePolicyAttachment_4B878377": { - "//": { - "metadata": { - "path": "root/Default/Default/test:main/Handler/IamRolePolicyAttachment", - "uniqueId": "testmain_Handler_IamRolePolicyAttachment_4B878377" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testmain_Handler_IamRole_0E2C4B8D.name}" - } - }, - "aws_lambda_function": { - "testmain_Handler_242B2607": { - "//": { - "metadata": { - "path": "root/Default/Default/test:main/Handler/Default", - "uniqueId": "testmain_Handler_242B2607" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "BUCKET_NAME_ce72b88b": "${aws_s3_bucket.KeyValueStore_cloudBucket_D9D365FD.bucket}", - "DYNAMODB_TABLE_NAME_5a275103": "${aws_dynamodb_table.sasa.name}", - "WING_FUNCTION_NAME": "Handler-c8d10438", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8d10438", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testmain_Handler_IamRole_0E2C4B8D.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testmain_Handler_S3Object_3FA67F7E.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - }, "KeyValueStore_cloudBucket_D9D365FD": { "//": { "metadata": { @@ -241,19 +164,6 @@ module.exports = function({ }) { } ] } - }, - "aws_s3_object": { - "testmain_Handler_S3Object_3FA67F7E": { - "//": { - "metadata": { - "path": "root/Default/Default/test:main/Handler/S3Object", - "uniqueId": "testmain_Handler_S3Object_3FA67F7E" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } } } } diff --git a/tools/hangar/__snapshots__/test_corpus/valid/capture_reassignable.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/capture_reassignable.w_compile_tf-aws.md index 922fc0f3ce2..f8ddba91249 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/capture_reassignable.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/capture_reassignable.w_compile_tf-aws.md @@ -57,105 +57,13 @@ module.exports = function({ $handler }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:main\",\"${aws_lambda_function.testmain_Handler_242B2607.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testmain_Handler_IamRole_0E2C4B8D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:main/Handler/IamRole", - "uniqueId": "testmain_Handler_IamRole_0E2C4B8D" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testmain_Handler_IamRolePolicy_A91080AC": { - "//": { - "metadata": { - "path": "root/Default/Default/test:main/Handler/IamRolePolicy", - "uniqueId": "testmain_Handler_IamRolePolicy_A91080AC" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testmain_Handler_IamRole_0E2C4B8D.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testmain_Handler_IamRolePolicyAttachment_4B878377": { - "//": { - "metadata": { - "path": "root/Default/Default/test:main/Handler/IamRolePolicyAttachment", - "uniqueId": "testmain_Handler_IamRolePolicyAttachment_4B878377" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testmain_Handler_IamRole_0E2C4B8D.name}" - } - }, - "aws_lambda_function": { - "testmain_Handler_242B2607": { - "//": { - "metadata": { - "path": "root/Default/Default/test:main/Handler/Default", - "uniqueId": "testmain_Handler_242B2607" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8d10438", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8d10438", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testmain_Handler_IamRole_0E2C4B8D.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testmain_Handler_S3Object_3FA67F7E.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testmain_Handler_S3Object_3FA67F7E": { - "//": { - "metadata": { - "path": "root/Default/Default/test:main/Handler/S3Object", - "uniqueId": "testmain_Handler_S3Object_3FA67F7E" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/valid/capture_resource_and_data.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/capture_resource_and_data.w_compile_tf-aws.md index a33df762484..54f29d73c89 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/capture_resource_and_data.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/capture_resource_and_data.w_compile_tf-aws.md @@ -42,7 +42,7 @@ module.exports = function({ $data_size, $queue, $res }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:resource and data\",\"${aws_lambda_function.testresourceanddata_Handler_1086F74C.arn}\"]]" + "value": "[]" } }, "provider": { @@ -51,84 +51,7 @@ module.exports = function({ $data_size, $queue, $res }) { ] }, "resource": { - "aws_iam_role": { - "testresourceanddata_Handler_IamRole_A773BB6B": { - "//": { - "metadata": { - "path": "root/Default/Default/test:resource and data/Handler/IamRole", - "uniqueId": "testresourceanddata_Handler_IamRole_A773BB6B" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testresourceanddata_Handler_IamRolePolicy_2BF89C89": { - "//": { - "metadata": { - "path": "root/Default/Default/test:resource and data/Handler/IamRolePolicy", - "uniqueId": "testresourceanddata_Handler_IamRolePolicy_2BF89C89" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"s3:List*\",\"s3:PutObject*\",\"s3:Abort*\",\"s3:GetObject*\",\"s3:GetBucket*\"],\"Resource\":[\"${aws_s3_bucket.cloudBucket.arn}\",\"${aws_s3_bucket.cloudBucket.arn}/*\"],\"Effect\":\"Allow\"},{\"Action\":[\"sqs:SendMessage\"],\"Resource\":[\"${aws_sqs_queue.cloudQueue.arn}\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testresourceanddata_Handler_IamRole_A773BB6B.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testresourceanddata_Handler_IamRolePolicyAttachment_959A388F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:resource and data/Handler/IamRolePolicyAttachment", - "uniqueId": "testresourceanddata_Handler_IamRolePolicyAttachment_959A388F" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testresourceanddata_Handler_IamRole_A773BB6B.name}" - } - }, - "aws_lambda_function": { - "testresourceanddata_Handler_1086F74C": { - "//": { - "metadata": { - "path": "root/Default/Default/test:resource and data/Handler/Default", - "uniqueId": "testresourceanddata_Handler_1086F74C" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", - "QUEUE_URL_31e95cbd": "${aws_sqs_queue.cloudQueue.url}", - "WING_FUNCTION_NAME": "Handler-c8872ad1", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8872ad1", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testresourceanddata_Handler_IamRole_A773BB6B.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testresourceanddata_Handler_S3Object_F52B15CA.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - }, "cloudBucket": { "//": { "metadata": { @@ -158,19 +81,6 @@ module.exports = function({ $data_size, $queue, $res }) { ] } }, - "aws_s3_object": { - "testresourceanddata_Handler_S3Object_F52B15CA": { - "//": { - "metadata": { - "path": "root/Default/Default/test:resource and data/Handler/S3Object", - "uniqueId": "testresourceanddata_Handler_S3Object_F52B15CA" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - }, "aws_sqs_queue": { "cloudQueue": { "//": { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/capture_resource_with_no_inflight.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/capture_resource_with_no_inflight.w_compile_tf-aws.md index 97b4d11b7ac..df39b36b8b7 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/capture_resource_with_no_inflight.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/capture_resource_with_no_inflight.w_compile_tf-aws.md @@ -58,7 +58,7 @@ module.exports = function({ }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:test\",\"${aws_lambda_function.testtest_Handler_295107CC.arn}\"]]" + "value": "[]" } }, "provider": { @@ -85,97 +85,6 @@ module.exports = function({ }) { "hash_key": "id", "name": "wing-counter-cloud.Counter-c88d0b81" } - }, - "aws_iam_role": { - "testtest_Handler_IamRole_15693C93": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRole", - "uniqueId": "testtest_Handler_IamRole_15693C93" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testtest_Handler_IamRolePolicy_AF0279BD": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRolePolicy", - "uniqueId": "testtest_Handler_IamRolePolicy_AF0279BD" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testtest_Handler_IamRolePolicyAttachment_ADF4752D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRolePolicyAttachment", - "uniqueId": "testtest_Handler_IamRolePolicyAttachment_ADF4752D" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.name}" - } - }, - "aws_lambda_function": { - "testtest_Handler_295107CC": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/Default", - "uniqueId": "testtest_Handler_295107CC" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "DYNAMODB_TABLE_NAME_5b05aa10": "${aws_dynamodb_table.A_cloudCounter_1CAB7DAD.name}", - "WING_FUNCTION_NAME": "Handler-c8f4f2a1", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8f4f2a1", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testtest_Handler_S3Object_9F4E28A7.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testtest_Handler_S3Object_9F4E28A7": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/S3Object", - "uniqueId": "testtest_Handler_S3Object_9F4E28A7" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } } } } diff --git a/tools/hangar/__snapshots__/test_corpus/valid/capture_tokens.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/capture_tokens.w_compile_tf-aws.md index 67f5e5dc666..7b12b8c76a3 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/capture_tokens.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/capture_tokens.w_compile_tf-aws.md @@ -91,7 +91,7 @@ module.exports = function({ }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:inflight class\",\"${aws_lambda_function.testinflightclass_Handler_F51916C9.arn}\"],[\"root/Default/Default/test:inflight globals\",\"${aws_lambda_function.testinflightglobals_Handler_386DF115.arn}\"]]" + "value": "[]" } }, "provider": { @@ -177,167 +177,6 @@ module.exports = function({ }) { "rest_api_id": "${aws_api_gateway_rest_api.cloudApi_api_2B334D75.id}", "stage_name": "prod" } - }, - "aws_iam_role": { - "testinflightclass_Handler_IamRole_49C4923D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight class/Handler/IamRole", - "uniqueId": "testinflightclass_Handler_IamRole_49C4923D" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testinflightglobals_Handler_IamRole_09D0E2CB": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight globals/Handler/IamRole", - "uniqueId": "testinflightglobals_Handler_IamRole_09D0E2CB" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testinflightclass_Handler_IamRolePolicy_1427C4D0": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight class/Handler/IamRolePolicy", - "uniqueId": "testinflightclass_Handler_IamRolePolicy_1427C4D0" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testinflightclass_Handler_IamRole_49C4923D.name}" - }, - "testinflightglobals_Handler_IamRolePolicy_B2F53672": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight globals/Handler/IamRolePolicy", - "uniqueId": "testinflightglobals_Handler_IamRolePolicy_B2F53672" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testinflightglobals_Handler_IamRole_09D0E2CB.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testinflightclass_Handler_IamRolePolicyAttachment_D71572F9": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight class/Handler/IamRolePolicyAttachment", - "uniqueId": "testinflightclass_Handler_IamRolePolicyAttachment_D71572F9" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinflightclass_Handler_IamRole_49C4923D.name}" - }, - "testinflightglobals_Handler_IamRolePolicyAttachment_82A71498": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight globals/Handler/IamRolePolicyAttachment", - "uniqueId": "testinflightglobals_Handler_IamRolePolicyAttachment_82A71498" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinflightglobals_Handler_IamRole_09D0E2CB.name}" - } - }, - "aws_lambda_function": { - "testinflightclass_Handler_F51916C9": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight class/Handler/Default", - "uniqueId": "testinflightclass_Handler_F51916C9" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8ed8f29", - "WING_TARGET": "tf-aws", - "WING_TOKEN_TFTOKEN_TOKEN_8": "${jsonencode(aws_api_gateway_stage.MyResource_cloudApi_api_stage_A26656F9.invoke_url)}" - } - }, - "function_name": "Handler-c8ed8f29", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinflightclass_Handler_IamRole_49C4923D.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinflightclass_Handler_S3Object_6D43304B.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testinflightglobals_Handler_386DF115": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight globals/Handler/Default", - "uniqueId": "testinflightglobals_Handler_386DF115" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8ecc6d5", - "WING_TARGET": "tf-aws", - "WING_TOKEN_TFTOKEN_TOKEN_32": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" - } - }, - "function_name": "Handler-c8ecc6d5", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinflightglobals_Handler_IamRole_09D0E2CB.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinflightglobals_Handler_S3Object_943E1D01.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testinflightclass_Handler_S3Object_6D43304B": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight class/Handler/S3Object", - "uniqueId": "testinflightclass_Handler_S3Object_6D43304B" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testinflightglobals_Handler_S3Object_943E1D01": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight globals/Handler/S3Object", - "uniqueId": "testinflightglobals_Handler_S3Object_943E1D01" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } } } } diff --git a/tools/hangar/__snapshots__/test_corpus/valid/class.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/class.w_compile_tf-aws.md index b423cfe8b82..78141c60047 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/class.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/class.w_compile_tf-aws.md @@ -308,312 +308,13 @@ module.exports = function({ $PaidStudent }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:access inflight field\",\"${aws_lambda_function.testaccessinflightfield_Handler_39158E6E.arn}\"],[\"root/Default/Default/test:check derived class instance variables\",\"${aws_lambda_function.testcheckderivedclassinstancevariables_Handler_6847A085.arn}\"],[\"root/Default/Default/test:devived class init body happens after super\",\"${aws_lambda_function.testdevivedclassinitbodyhappensaftersuper_Handler_8CA21B73.arn}\"],[\"root/Default/Default/test:inflight super constructor\",\"${aws_lambda_function.testinflightsuperconstructor_Handler_C698F98B.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testaccessinflightfield_Handler_IamRole_E41B56EC": { - "//": { - "metadata": { - "path": "root/Default/Default/test:access inflight field/Handler/IamRole", - "uniqueId": "testaccessinflightfield_Handler_IamRole_E41B56EC" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testcheckderivedclassinstancevariables_Handler_IamRole_08180CD0": { - "//": { - "metadata": { - "path": "root/Default/Default/test:check derived class instance variables/Handler/IamRole", - "uniqueId": "testcheckderivedclassinstancevariables_Handler_IamRole_08180CD0" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testdevivedclassinitbodyhappensaftersuper_Handler_IamRole_030576ED": { - "//": { - "metadata": { - "path": "root/Default/Default/test:devived class init body happens after super/Handler/IamRole", - "uniqueId": "testdevivedclassinitbodyhappensaftersuper_Handler_IamRole_030576ED" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testinflightsuperconstructor_Handler_IamRole_60346B04": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight super constructor/Handler/IamRole", - "uniqueId": "testinflightsuperconstructor_Handler_IamRole_60346B04" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testaccessinflightfield_Handler_IamRolePolicy_A28923F7": { - "//": { - "metadata": { - "path": "root/Default/Default/test:access inflight field/Handler/IamRolePolicy", - "uniqueId": "testaccessinflightfield_Handler_IamRolePolicy_A28923F7" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testaccessinflightfield_Handler_IamRole_E41B56EC.name}" - }, - "testcheckderivedclassinstancevariables_Handler_IamRolePolicy_C63DC435": { - "//": { - "metadata": { - "path": "root/Default/Default/test:check derived class instance variables/Handler/IamRolePolicy", - "uniqueId": "testcheckderivedclassinstancevariables_Handler_IamRolePolicy_C63DC435" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testcheckderivedclassinstancevariables_Handler_IamRole_08180CD0.name}" - }, - "testdevivedclassinitbodyhappensaftersuper_Handler_IamRolePolicy_8A804AD5": { - "//": { - "metadata": { - "path": "root/Default/Default/test:devived class init body happens after super/Handler/IamRolePolicy", - "uniqueId": "testdevivedclassinitbodyhappensaftersuper_Handler_IamRolePolicy_8A804AD5" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testdevivedclassinitbodyhappensaftersuper_Handler_IamRole_030576ED.name}" - }, - "testinflightsuperconstructor_Handler_IamRolePolicy_D5A7F12D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight super constructor/Handler/IamRolePolicy", - "uniqueId": "testinflightsuperconstructor_Handler_IamRolePolicy_D5A7F12D" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testinflightsuperconstructor_Handler_IamRole_60346B04.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testaccessinflightfield_Handler_IamRolePolicyAttachment_EEB5426B": { - "//": { - "metadata": { - "path": "root/Default/Default/test:access inflight field/Handler/IamRolePolicyAttachment", - "uniqueId": "testaccessinflightfield_Handler_IamRolePolicyAttachment_EEB5426B" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testaccessinflightfield_Handler_IamRole_E41B56EC.name}" - }, - "testcheckderivedclassinstancevariables_Handler_IamRolePolicyAttachment_69A59231": { - "//": { - "metadata": { - "path": "root/Default/Default/test:check derived class instance variables/Handler/IamRolePolicyAttachment", - "uniqueId": "testcheckderivedclassinstancevariables_Handler_IamRolePolicyAttachment_69A59231" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testcheckderivedclassinstancevariables_Handler_IamRole_08180CD0.name}" - }, - "testdevivedclassinitbodyhappensaftersuper_Handler_IamRolePolicyAttachment_A84F5844": { - "//": { - "metadata": { - "path": "root/Default/Default/test:devived class init body happens after super/Handler/IamRolePolicyAttachment", - "uniqueId": "testdevivedclassinitbodyhappensaftersuper_Handler_IamRolePolicyAttachment_A84F5844" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testdevivedclassinitbodyhappensaftersuper_Handler_IamRole_030576ED.name}" - }, - "testinflightsuperconstructor_Handler_IamRolePolicyAttachment_E3548B22": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight super constructor/Handler/IamRolePolicyAttachment", - "uniqueId": "testinflightsuperconstructor_Handler_IamRolePolicyAttachment_E3548B22" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinflightsuperconstructor_Handler_IamRole_60346B04.name}" - } - }, - "aws_lambda_function": { - "testaccessinflightfield_Handler_39158E6E": { - "//": { - "metadata": { - "path": "root/Default/Default/test:access inflight field/Handler/Default", - "uniqueId": "testaccessinflightfield_Handler_39158E6E" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c84be49a", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c84be49a", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testaccessinflightfield_Handler_IamRole_E41B56EC.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testaccessinflightfield_Handler_S3Object_64789FEE.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testcheckderivedclassinstancevariables_Handler_6847A085": { - "//": { - "metadata": { - "path": "root/Default/Default/test:check derived class instance variables/Handler/Default", - "uniqueId": "testcheckderivedclassinstancevariables_Handler_6847A085" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c87bcb74", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c87bcb74", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testcheckderivedclassinstancevariables_Handler_IamRole_08180CD0.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testcheckderivedclassinstancevariables_Handler_S3Object_858E151F.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testdevivedclassinitbodyhappensaftersuper_Handler_8CA21B73": { - "//": { - "metadata": { - "path": "root/Default/Default/test:devived class init body happens after super/Handler/Default", - "uniqueId": "testdevivedclassinitbodyhappensaftersuper_Handler_8CA21B73" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8edbb48", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8edbb48", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testdevivedclassinitbodyhappensaftersuper_Handler_IamRole_030576ED.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testdevivedclassinitbodyhappensaftersuper_Handler_S3Object_A5246F5E.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testinflightsuperconstructor_Handler_C698F98B": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight super constructor/Handler/Default", - "uniqueId": "testinflightsuperconstructor_Handler_C698F98B" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c81ddf4a", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c81ddf4a", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinflightsuperconstructor_Handler_IamRole_60346B04.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinflightsuperconstructor_Handler_S3Object_178B986B.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testaccessinflightfield_Handler_S3Object_64789FEE": { - "//": { - "metadata": { - "path": "root/Default/Default/test:access inflight field/Handler/S3Object", - "uniqueId": "testaccessinflightfield_Handler_S3Object_64789FEE" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testcheckderivedclassinstancevariables_Handler_S3Object_858E151F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:check derived class instance variables/Handler/S3Object", - "uniqueId": "testcheckderivedclassinstancevariables_Handler_S3Object_858E151F" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testdevivedclassinitbodyhappensaftersuper_Handler_S3Object_A5246F5E": { - "//": { - "metadata": { - "path": "root/Default/Default/test:devived class init body happens after super/Handler/S3Object", - "uniqueId": "testdevivedclassinitbodyhappensaftersuper_Handler_S3Object_A5246F5E" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testinflightsuperconstructor_Handler_S3Object_178B986B": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight super constructor/Handler/S3Object", - "uniqueId": "testinflightsuperconstructor_Handler_S3Object_178B986B" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/valid/closure_class.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/closure_class.w_compile_tf-aws.md index 72da1b5af27..87e5d52f1e7 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/closure_class.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/closure_class.w_compile_tf-aws.md @@ -61,105 +61,13 @@ module.exports = function({ }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:test\",\"${aws_lambda_function.testtest_Handler_295107CC.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testtest_Handler_IamRole_15693C93": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRole", - "uniqueId": "testtest_Handler_IamRole_15693C93" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testtest_Handler_IamRolePolicy_AF0279BD": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRolePolicy", - "uniqueId": "testtest_Handler_IamRolePolicy_AF0279BD" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testtest_Handler_IamRolePolicyAttachment_ADF4752D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRolePolicyAttachment", - "uniqueId": "testtest_Handler_IamRolePolicyAttachment_ADF4752D" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.name}" - } - }, - "aws_lambda_function": { - "testtest_Handler_295107CC": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/Default", - "uniqueId": "testtest_Handler_295107CC" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8f4f2a1", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8f4f2a1", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testtest_Handler_S3Object_9F4E28A7.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testtest_Handler_S3Object_9F4E28A7": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/S3Object", - "uniqueId": "testtest_Handler_S3Object_9F4E28A7" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/valid/deep_equality.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/deep_equality.w_compile_tf-aws.md index 272f3db2b4d..7906cf1f16c 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/deep_equality.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/deep_equality.w_compile_tf-aws.md @@ -283,864 +283,13 @@ module.exports = function({ $arrayA, $arrayB }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:Primitive types with the same value\",\"${aws_lambda_function.testPrimitivetypeswiththesamevalue_Handler_E7430682.arn}\"],[\"root/Default/Default/test:Primitive types with different values\",\"${aws_lambda_function.testPrimitivetypeswithdifferentvalues_Handler_1CD5AE77.arn}\"],[\"root/Default/Default/test:Json with the same value\",\"${aws_lambda_function.testJsonwiththesamevalue_Handler_0A930AF7.arn}\"],[\"root/Default/Default/test:Json with different values\",\"${aws_lambda_function.testJsonwithdifferentvalues_Handler_7CBC98A6.arn}\"],[\"root/Default/Default/test:Set types with the same value\",\"${aws_lambda_function.testSettypeswiththesamevalue_Handler_16147212.arn}\"],[\"root/Default/Default/test:Set types with different values\",\"${aws_lambda_function.testSettypeswithdifferentvalues_Handler_827F38F3.arn}\"],[\"root/Default/Default/test:Map with the same value\",\"${aws_lambda_function.testMapwiththesamevalue_Handler_74DC4830.arn}\"],[\"root/Default/Default/test:Map with different values\",\"${aws_lambda_function.testMapwithdifferentvalues_Handler_E889ADD0.arn}\"],[\"root/Default/Default/test:Array with the same value\",\"${aws_lambda_function.testArraywiththesamevalue_Handler_7A26272F.arn}\"],[\"root/Default/Default/test:Array with different values\",\"${aws_lambda_function.testArraywithdifferentvalues_Handler_2422390C.arn}\"],[\"root/Default/Default/test:Struct with the same value\",\"${aws_lambda_function.testStructwiththesamevalue_Handler_4436CF3A.arn}\"],[\"root/Default/Default/test:Struct with different values\",\"${aws_lambda_function.testStructwithdifferentvalues_Handler_A8DC5651.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testArraywithdifferentvalues_Handler_IamRole_FC5BD6E2": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Array with different values/Handler/IamRole", - "uniqueId": "testArraywithdifferentvalues_Handler_IamRole_FC5BD6E2" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testArraywiththesamevalue_Handler_IamRole_4E0921A0": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Array with the same value/Handler/IamRole", - "uniqueId": "testArraywiththesamevalue_Handler_IamRole_4E0921A0" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testJsonwithdifferentvalues_Handler_IamRole_12575809": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Json with different values/Handler/IamRole", - "uniqueId": "testJsonwithdifferentvalues_Handler_IamRole_12575809" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testJsonwiththesamevalue_Handler_IamRole_BC676995": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Json with the same value/Handler/IamRole", - "uniqueId": "testJsonwiththesamevalue_Handler_IamRole_BC676995" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testMapwithdifferentvalues_Handler_IamRole_CF7CC596": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Map with different values/Handler/IamRole", - "uniqueId": "testMapwithdifferentvalues_Handler_IamRole_CF7CC596" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testMapwiththesamevalue_Handler_IamRole_CC9D639C": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Map with the same value/Handler/IamRole", - "uniqueId": "testMapwiththesamevalue_Handler_IamRole_CC9D639C" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testPrimitivetypeswithdifferentvalues_Handler_IamRole_486896F1": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Primitive types with different values/Handler/IamRole", - "uniqueId": "testPrimitivetypeswithdifferentvalues_Handler_IamRole_486896F1" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testPrimitivetypeswiththesamevalue_Handler_IamRole_AAB321E6": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Primitive types with the same value/Handler/IamRole", - "uniqueId": "testPrimitivetypeswiththesamevalue_Handler_IamRole_AAB321E6" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testSettypeswithdifferentvalues_Handler_IamRole_170B7079": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Set types with different values/Handler/IamRole", - "uniqueId": "testSettypeswithdifferentvalues_Handler_IamRole_170B7079" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testSettypeswiththesamevalue_Handler_IamRole_058FC879": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Set types with the same value/Handler/IamRole", - "uniqueId": "testSettypeswiththesamevalue_Handler_IamRole_058FC879" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testStructwithdifferentvalues_Handler_IamRole_A1B66D3F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Struct with different values/Handler/IamRole", - "uniqueId": "testStructwithdifferentvalues_Handler_IamRole_A1B66D3F" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testStructwiththesamevalue_Handler_IamRole_705BC42B": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Struct with the same value/Handler/IamRole", - "uniqueId": "testStructwiththesamevalue_Handler_IamRole_705BC42B" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testArraywithdifferentvalues_Handler_IamRolePolicy_A345D9E8": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Array with different values/Handler/IamRolePolicy", - "uniqueId": "testArraywithdifferentvalues_Handler_IamRolePolicy_A345D9E8" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testArraywithdifferentvalues_Handler_IamRole_FC5BD6E2.name}" - }, - "testArraywiththesamevalue_Handler_IamRolePolicy_190CF3C3": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Array with the same value/Handler/IamRolePolicy", - "uniqueId": "testArraywiththesamevalue_Handler_IamRolePolicy_190CF3C3" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testArraywiththesamevalue_Handler_IamRole_4E0921A0.name}" - }, - "testJsonwithdifferentvalues_Handler_IamRolePolicy_E3159C67": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Json with different values/Handler/IamRolePolicy", - "uniqueId": "testJsonwithdifferentvalues_Handler_IamRolePolicy_E3159C67" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testJsonwithdifferentvalues_Handler_IamRole_12575809.name}" - }, - "testJsonwiththesamevalue_Handler_IamRolePolicy_8086FDCB": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Json with the same value/Handler/IamRolePolicy", - "uniqueId": "testJsonwiththesamevalue_Handler_IamRolePolicy_8086FDCB" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testJsonwiththesamevalue_Handler_IamRole_BC676995.name}" - }, - "testMapwithdifferentvalues_Handler_IamRolePolicy_A49668FF": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Map with different values/Handler/IamRolePolicy", - "uniqueId": "testMapwithdifferentvalues_Handler_IamRolePolicy_A49668FF" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testMapwithdifferentvalues_Handler_IamRole_CF7CC596.name}" - }, - "testMapwiththesamevalue_Handler_IamRolePolicy_6A901007": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Map with the same value/Handler/IamRolePolicy", - "uniqueId": "testMapwiththesamevalue_Handler_IamRolePolicy_6A901007" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testMapwiththesamevalue_Handler_IamRole_CC9D639C.name}" - }, - "testPrimitivetypeswithdifferentvalues_Handler_IamRolePolicy_E319096A": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Primitive types with different values/Handler/IamRolePolicy", - "uniqueId": "testPrimitivetypeswithdifferentvalues_Handler_IamRolePolicy_E319096A" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testPrimitivetypeswithdifferentvalues_Handler_IamRole_486896F1.name}" - }, - "testPrimitivetypeswiththesamevalue_Handler_IamRolePolicy_57C12442": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Primitive types with the same value/Handler/IamRolePolicy", - "uniqueId": "testPrimitivetypeswiththesamevalue_Handler_IamRolePolicy_57C12442" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testPrimitivetypeswiththesamevalue_Handler_IamRole_AAB321E6.name}" - }, - "testSettypeswithdifferentvalues_Handler_IamRolePolicy_6B0161E6": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Set types with different values/Handler/IamRolePolicy", - "uniqueId": "testSettypeswithdifferentvalues_Handler_IamRolePolicy_6B0161E6" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testSettypeswithdifferentvalues_Handler_IamRole_170B7079.name}" - }, - "testSettypeswiththesamevalue_Handler_IamRolePolicy_85C3A094": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Set types with the same value/Handler/IamRolePolicy", - "uniqueId": "testSettypeswiththesamevalue_Handler_IamRolePolicy_85C3A094" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testSettypeswiththesamevalue_Handler_IamRole_058FC879.name}" - }, - "testStructwithdifferentvalues_Handler_IamRolePolicy_B2AB1519": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Struct with different values/Handler/IamRolePolicy", - "uniqueId": "testStructwithdifferentvalues_Handler_IamRolePolicy_B2AB1519" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testStructwithdifferentvalues_Handler_IamRole_A1B66D3F.name}" - }, - "testStructwiththesamevalue_Handler_IamRolePolicy_475F7032": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Struct with the same value/Handler/IamRolePolicy", - "uniqueId": "testStructwiththesamevalue_Handler_IamRolePolicy_475F7032" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testStructwiththesamevalue_Handler_IamRole_705BC42B.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testArraywithdifferentvalues_Handler_IamRolePolicyAttachment_E439E7EC": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Array with different values/Handler/IamRolePolicyAttachment", - "uniqueId": "testArraywithdifferentvalues_Handler_IamRolePolicyAttachment_E439E7EC" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testArraywithdifferentvalues_Handler_IamRole_FC5BD6E2.name}" - }, - "testArraywiththesamevalue_Handler_IamRolePolicyAttachment_4871F563": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Array with the same value/Handler/IamRolePolicyAttachment", - "uniqueId": "testArraywiththesamevalue_Handler_IamRolePolicyAttachment_4871F563" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testArraywiththesamevalue_Handler_IamRole_4E0921A0.name}" - }, - "testJsonwithdifferentvalues_Handler_IamRolePolicyAttachment_4450F623": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Json with different values/Handler/IamRolePolicyAttachment", - "uniqueId": "testJsonwithdifferentvalues_Handler_IamRolePolicyAttachment_4450F623" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testJsonwithdifferentvalues_Handler_IamRole_12575809.name}" - }, - "testJsonwiththesamevalue_Handler_IamRolePolicyAttachment_690FEA7C": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Json with the same value/Handler/IamRolePolicyAttachment", - "uniqueId": "testJsonwiththesamevalue_Handler_IamRolePolicyAttachment_690FEA7C" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testJsonwiththesamevalue_Handler_IamRole_BC676995.name}" - }, - "testMapwithdifferentvalues_Handler_IamRolePolicyAttachment_9C810FF6": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Map with different values/Handler/IamRolePolicyAttachment", - "uniqueId": "testMapwithdifferentvalues_Handler_IamRolePolicyAttachment_9C810FF6" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testMapwithdifferentvalues_Handler_IamRole_CF7CC596.name}" - }, - "testMapwiththesamevalue_Handler_IamRolePolicyAttachment_F9DC04FA": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Map with the same value/Handler/IamRolePolicyAttachment", - "uniqueId": "testMapwiththesamevalue_Handler_IamRolePolicyAttachment_F9DC04FA" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testMapwiththesamevalue_Handler_IamRole_CC9D639C.name}" - }, - "testPrimitivetypeswithdifferentvalues_Handler_IamRolePolicyAttachment_D3647122": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Primitive types with different values/Handler/IamRolePolicyAttachment", - "uniqueId": "testPrimitivetypeswithdifferentvalues_Handler_IamRolePolicyAttachment_D3647122" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testPrimitivetypeswithdifferentvalues_Handler_IamRole_486896F1.name}" - }, - "testPrimitivetypeswiththesamevalue_Handler_IamRolePolicyAttachment_5BE812C7": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Primitive types with the same value/Handler/IamRolePolicyAttachment", - "uniqueId": "testPrimitivetypeswiththesamevalue_Handler_IamRolePolicyAttachment_5BE812C7" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testPrimitivetypeswiththesamevalue_Handler_IamRole_AAB321E6.name}" - }, - "testSettypeswithdifferentvalues_Handler_IamRolePolicyAttachment_6D8FBB2A": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Set types with different values/Handler/IamRolePolicyAttachment", - "uniqueId": "testSettypeswithdifferentvalues_Handler_IamRolePolicyAttachment_6D8FBB2A" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testSettypeswithdifferentvalues_Handler_IamRole_170B7079.name}" - }, - "testSettypeswiththesamevalue_Handler_IamRolePolicyAttachment_C5010D5B": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Set types with the same value/Handler/IamRolePolicyAttachment", - "uniqueId": "testSettypeswiththesamevalue_Handler_IamRolePolicyAttachment_C5010D5B" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testSettypeswiththesamevalue_Handler_IamRole_058FC879.name}" - }, - "testStructwithdifferentvalues_Handler_IamRolePolicyAttachment_1EA2F024": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Struct with different values/Handler/IamRolePolicyAttachment", - "uniqueId": "testStructwithdifferentvalues_Handler_IamRolePolicyAttachment_1EA2F024" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testStructwithdifferentvalues_Handler_IamRole_A1B66D3F.name}" - }, - "testStructwiththesamevalue_Handler_IamRolePolicyAttachment_1E4F5BA8": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Struct with the same value/Handler/IamRolePolicyAttachment", - "uniqueId": "testStructwiththesamevalue_Handler_IamRolePolicyAttachment_1E4F5BA8" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testStructwiththesamevalue_Handler_IamRole_705BC42B.name}" - } - }, - "aws_lambda_function": { - "testArraywithdifferentvalues_Handler_2422390C": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Array with different values/Handler/Default", - "uniqueId": "testArraywithdifferentvalues_Handler_2422390C" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c804987d", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c804987d", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testArraywithdifferentvalues_Handler_IamRole_FC5BD6E2.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testArraywithdifferentvalues_Handler_S3Object_82EC75EC.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testArraywiththesamevalue_Handler_7A26272F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Array with the same value/Handler/Default", - "uniqueId": "testArraywiththesamevalue_Handler_7A26272F" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c85bde80", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c85bde80", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testArraywiththesamevalue_Handler_IamRole_4E0921A0.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testArraywiththesamevalue_Handler_S3Object_4588D096.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testJsonwithdifferentvalues_Handler_7CBC98A6": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Json with different values/Handler/Default", - "uniqueId": "testJsonwithdifferentvalues_Handler_7CBC98A6" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c81ffded", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c81ffded", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testJsonwithdifferentvalues_Handler_IamRole_12575809.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testJsonwithdifferentvalues_Handler_S3Object_5F4A5EDA.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testJsonwiththesamevalue_Handler_0A930AF7": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Json with the same value/Handler/Default", - "uniqueId": "testJsonwiththesamevalue_Handler_0A930AF7" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8a70f75", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8a70f75", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testJsonwiththesamevalue_Handler_IamRole_BC676995.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testJsonwiththesamevalue_Handler_S3Object_E25D109B.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testMapwithdifferentvalues_Handler_E889ADD0": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Map with different values/Handler/Default", - "uniqueId": "testMapwithdifferentvalues_Handler_E889ADD0" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8bfa9fd", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8bfa9fd", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testMapwithdifferentvalues_Handler_IamRole_CF7CC596.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testMapwithdifferentvalues_Handler_S3Object_07E13478.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testMapwiththesamevalue_Handler_74DC4830": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Map with the same value/Handler/Default", - "uniqueId": "testMapwiththesamevalue_Handler_74DC4830" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8e1f849", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8e1f849", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testMapwiththesamevalue_Handler_IamRole_CC9D639C.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testMapwiththesamevalue_Handler_S3Object_B4857ED0.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testPrimitivetypeswithdifferentvalues_Handler_1CD5AE77": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Primitive types with different values/Handler/Default", - "uniqueId": "testPrimitivetypeswithdifferentvalues_Handler_1CD5AE77" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8339af6", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8339af6", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testPrimitivetypeswithdifferentvalues_Handler_IamRole_486896F1.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testPrimitivetypeswithdifferentvalues_Handler_S3Object_9C3AA605.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testPrimitivetypeswiththesamevalue_Handler_E7430682": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Primitive types with the same value/Handler/Default", - "uniqueId": "testPrimitivetypeswiththesamevalue_Handler_E7430682" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8c80713", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8c80713", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testPrimitivetypeswiththesamevalue_Handler_IamRole_AAB321E6.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testPrimitivetypeswiththesamevalue_Handler_S3Object_C824F26A.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testSettypeswithdifferentvalues_Handler_827F38F3": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Set types with different values/Handler/Default", - "uniqueId": "testSettypeswithdifferentvalues_Handler_827F38F3" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8f9b754", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8f9b754", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testSettypeswithdifferentvalues_Handler_IamRole_170B7079.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testSettypeswithdifferentvalues_Handler_S3Object_727747E2.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testSettypeswiththesamevalue_Handler_16147212": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Set types with the same value/Handler/Default", - "uniqueId": "testSettypeswiththesamevalue_Handler_16147212" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c80c25d8", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c80c25d8", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testSettypeswiththesamevalue_Handler_IamRole_058FC879.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testSettypeswiththesamevalue_Handler_S3Object_E7A37201.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testStructwithdifferentvalues_Handler_A8DC5651": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Struct with different values/Handler/Default", - "uniqueId": "testStructwithdifferentvalues_Handler_A8DC5651" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8546ffd", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8546ffd", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testStructwithdifferentvalues_Handler_IamRole_A1B66D3F.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testStructwithdifferentvalues_Handler_S3Object_29250ADD.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testStructwiththesamevalue_Handler_4436CF3A": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Struct with the same value/Handler/Default", - "uniqueId": "testStructwiththesamevalue_Handler_4436CF3A" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8c23fc1", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8c23fc1", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testStructwiththesamevalue_Handler_IamRole_705BC42B.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testStructwiththesamevalue_Handler_S3Object_4846898F.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testArraywithdifferentvalues_Handler_S3Object_82EC75EC": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Array with different values/Handler/S3Object", - "uniqueId": "testArraywithdifferentvalues_Handler_S3Object_82EC75EC" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testArraywiththesamevalue_Handler_S3Object_4588D096": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Array with the same value/Handler/S3Object", - "uniqueId": "testArraywiththesamevalue_Handler_S3Object_4588D096" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testJsonwithdifferentvalues_Handler_S3Object_5F4A5EDA": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Json with different values/Handler/S3Object", - "uniqueId": "testJsonwithdifferentvalues_Handler_S3Object_5F4A5EDA" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testJsonwiththesamevalue_Handler_S3Object_E25D109B": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Json with the same value/Handler/S3Object", - "uniqueId": "testJsonwiththesamevalue_Handler_S3Object_E25D109B" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testMapwithdifferentvalues_Handler_S3Object_07E13478": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Map with different values/Handler/S3Object", - "uniqueId": "testMapwithdifferentvalues_Handler_S3Object_07E13478" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testMapwiththesamevalue_Handler_S3Object_B4857ED0": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Map with the same value/Handler/S3Object", - "uniqueId": "testMapwiththesamevalue_Handler_S3Object_B4857ED0" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testPrimitivetypeswithdifferentvalues_Handler_S3Object_9C3AA605": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Primitive types with different values/Handler/S3Object", - "uniqueId": "testPrimitivetypeswithdifferentvalues_Handler_S3Object_9C3AA605" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testPrimitivetypeswiththesamevalue_Handler_S3Object_C824F26A": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Primitive types with the same value/Handler/S3Object", - "uniqueId": "testPrimitivetypeswiththesamevalue_Handler_S3Object_C824F26A" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testSettypeswithdifferentvalues_Handler_S3Object_727747E2": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Set types with different values/Handler/S3Object", - "uniqueId": "testSettypeswithdifferentvalues_Handler_S3Object_727747E2" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testSettypeswiththesamevalue_Handler_S3Object_E7A37201": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Set types with the same value/Handler/S3Object", - "uniqueId": "testSettypeswiththesamevalue_Handler_S3Object_E7A37201" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testStructwithdifferentvalues_Handler_S3Object_29250ADD": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Struct with different values/Handler/S3Object", - "uniqueId": "testStructwithdifferentvalues_Handler_S3Object_29250ADD" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testStructwiththesamevalue_Handler_S3Object_4846898F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Struct with the same value/Handler/S3Object", - "uniqueId": "testStructwiththesamevalue_Handler_S3Object_4846898F" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/valid/double_reference.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/double_reference.w_compile_tf-aws.md index 2b19817c032..a7f411f9ff7 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/double_reference.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/double_reference.w_compile_tf-aws.md @@ -74,7 +74,7 @@ module.exports = function({ $initCount }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:hello\",\"${aws_lambda_function.testhello_Handler_549C38EE.arn}\"]]" + "value": "[]" } }, "provider": { @@ -101,97 +101,6 @@ module.exports = function({ $initCount }) { "hash_key": "id", "name": "wing-counter-cloud.Counter-c866f225" } - }, - "aws_iam_role": { - "testhello_Handler_IamRole_84258FE3": { - "//": { - "metadata": { - "path": "root/Default/Default/test:hello/Handler/IamRole", - "uniqueId": "testhello_Handler_IamRole_84258FE3" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testhello_Handler_IamRolePolicy_152A5EC1": { - "//": { - "metadata": { - "path": "root/Default/Default/test:hello/Handler/IamRolePolicy", - "uniqueId": "testhello_Handler_IamRolePolicy_152A5EC1" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"dynamodb:UpdateItem\"],\"Resource\":[\"${aws_dynamodb_table.cloudCounter.arn}\"],\"Effect\":\"Allow\"},{\"Action\":[\"dynamodb:GetItem\"],\"Resource\":[\"${aws_dynamodb_table.cloudCounter.arn}\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testhello_Handler_IamRole_84258FE3.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testhello_Handler_IamRolePolicyAttachment_7372FC74": { - "//": { - "metadata": { - "path": "root/Default/Default/test:hello/Handler/IamRolePolicyAttachment", - "uniqueId": "testhello_Handler_IamRolePolicyAttachment_7372FC74" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testhello_Handler_IamRole_84258FE3.name}" - } - }, - "aws_lambda_function": { - "testhello_Handler_549C38EE": { - "//": { - "metadata": { - "path": "root/Default/Default/test:hello/Handler/Default", - "uniqueId": "testhello_Handler_549C38EE" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", - "WING_FUNCTION_NAME": "Handler-c85df1b4", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c85df1b4", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testhello_Handler_IamRole_84258FE3.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testhello_Handler_S3Object_CD1BAB13.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testhello_Handler_S3Object_CD1BAB13": { - "//": { - "metadata": { - "path": "root/Default/Default/test:hello/Handler/S3Object", - "uniqueId": "testhello_Handler_S3Object_CD1BAB13" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } } } } diff --git a/tools/hangar/__snapshots__/test_corpus/valid/doubler.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/doubler.w_compile_tf-aws.md index bcca563ad66..ddf772541b1 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/doubler.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/doubler.w_compile_tf-aws.md @@ -126,7 +126,7 @@ module.exports = function({ }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:f(2) == 8\",\"${aws_lambda_function.testf28_Handler_DBBFD2BC.arn}\"]]" + "value": "[]" } }, "provider": { @@ -144,15 +144,6 @@ module.exports = function({ }) { } }, "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testf28_Handler_IamRole_20743714": { - "//": { - "metadata": { - "path": "root/Default/Default/test:f(2) == 8/Handler/IamRole", - "uniqueId": "testf28_Handler_IamRole_20743714" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" } }, "aws_iam_role_policy": { @@ -165,16 +156,6 @@ module.exports = function({ }) { }, "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", "role": "${aws_iam_role.Doubler2_cloudFunction_IamRole_3E4BED38.name}" - }, - "testf28_Handler_IamRolePolicy_29B7D085": { - "//": { - "metadata": { - "path": "root/Default/Default/test:f(2) == 8/Handler/IamRolePolicy", - "uniqueId": "testf28_Handler_IamRolePolicy_29B7D085" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"lambda:InvokeFunction\"],\"Resource\":[\"${aws_lambda_function.Doubler2_cloudFunction_402CDAA3.arn}\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testf28_Handler_IamRole_20743714.name}" } }, "aws_iam_role_policy_attachment": { @@ -187,16 +168,6 @@ module.exports = function({ }) { }, "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", "role": "${aws_iam_role.Doubler2_cloudFunction_IamRole_3E4BED38.name}" - }, - "testf28_Handler_IamRolePolicyAttachment_259C103C": { - "//": { - "metadata": { - "path": "root/Default/Default/test:f(2) == 8/Handler/IamRolePolicyAttachment", - "uniqueId": "testf28_Handler_IamRolePolicyAttachment_259C103C" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testf28_Handler_IamRole_20743714.name}" } }, "aws_lambda_function": { @@ -228,36 +199,6 @@ module.exports = function({ }) { "security_group_ids": [], "subnet_ids": [] } - }, - "testf28_Handler_DBBFD2BC": { - "//": { - "metadata": { - "path": "root/Default/Default/test:f(2) == 8/Handler/Default", - "uniqueId": "testf28_Handler_DBBFD2BC" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "FUNCTION_NAME_f7db7b1d": "${aws_lambda_function.Doubler2_cloudFunction_402CDAA3.arn}", - "WING_FUNCTION_NAME": "Handler-c8914de5", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8914de5", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testf28_Handler_IamRole_20743714.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testf28_Handler_S3Object_79FCC5B9.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } } }, "aws_s3_bucket": { @@ -282,17 +223,6 @@ module.exports = function({ }) { "bucket": "${aws_s3_bucket.Code.bucket}", "key": "", "source": "" - }, - "testf28_Handler_S3Object_79FCC5B9": { - "//": { - "metadata": { - "path": "root/Default/Default/test:f(2) == 8/Handler/S3Object", - "uniqueId": "testf28_Handler_S3Object_79FCC5B9" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" } } } diff --git a/tools/hangar/__snapshots__/test_corpus/valid/enums.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/enums.w_compile_tf-aws.md index 0ed939988d8..2eb223ead8f 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/enums.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/enums.w_compile_tf-aws.md @@ -40,105 +40,13 @@ module.exports = function({ $SomeEnum, $one, $two }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:inflight\",\"${aws_lambda_function.testinflight_Handler_93A83C5E.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testinflight_Handler_IamRole_15C4E048": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight/Handler/IamRole", - "uniqueId": "testinflight_Handler_IamRole_15C4E048" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testinflight_Handler_IamRolePolicy_DB97CD66": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight/Handler/IamRolePolicy", - "uniqueId": "testinflight_Handler_IamRolePolicy_DB97CD66" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testinflight_Handler_IamRole_15C4E048.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testinflight_Handler_IamRolePolicyAttachment_576C539A": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight/Handler/IamRolePolicyAttachment", - "uniqueId": "testinflight_Handler_IamRolePolicyAttachment_576C539A" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinflight_Handler_IamRole_15C4E048.name}" - } - }, - "aws_lambda_function": { - "testinflight_Handler_93A83C5E": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight/Handler/Default", - "uniqueId": "testinflight_Handler_93A83C5E" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c85726ab", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c85726ab", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinflight_Handler_IamRole_15C4E048.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinflight_Handler_S3Object_57D0B6F1.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testinflight_Handler_S3Object_57D0B6F1": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight/Handler/S3Object", - "uniqueId": "testinflight_Handler_S3Object_57D0B6F1" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/valid/extern_implementation.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/extern_implementation.w_compile_tf-aws.md index b536e130438..e1cae915bcb 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/extern_implementation.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/extern_implementation.w_compile_tf-aws.md @@ -87,174 +87,13 @@ module.exports = function({ }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:call\",\"${aws_lambda_function.testcall_Handler_7902F7E6.arn}\"],[\"root/Default/Default/test:console\",\"${aws_lambda_function.testconsole_Handler_057D9B4E.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testcall_Handler_IamRole_1805137E": { - "//": { - "metadata": { - "path": "root/Default/Default/test:call/Handler/IamRole", - "uniqueId": "testcall_Handler_IamRole_1805137E" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testconsole_Handler_IamRole_8E32F17A": { - "//": { - "metadata": { - "path": "root/Default/Default/test:console/Handler/IamRole", - "uniqueId": "testconsole_Handler_IamRole_8E32F17A" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testcall_Handler_IamRolePolicy_36120113": { - "//": { - "metadata": { - "path": "root/Default/Default/test:call/Handler/IamRolePolicy", - "uniqueId": "testcall_Handler_IamRolePolicy_36120113" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testcall_Handler_IamRole_1805137E.name}" - }, - "testconsole_Handler_IamRolePolicy_1B35ECBA": { - "//": { - "metadata": { - "path": "root/Default/Default/test:console/Handler/IamRolePolicy", - "uniqueId": "testconsole_Handler_IamRolePolicy_1B35ECBA" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testconsole_Handler_IamRole_8E32F17A.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testcall_Handler_IamRolePolicyAttachment_5D02ABBD": { - "//": { - "metadata": { - "path": "root/Default/Default/test:call/Handler/IamRolePolicyAttachment", - "uniqueId": "testcall_Handler_IamRolePolicyAttachment_5D02ABBD" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testcall_Handler_IamRole_1805137E.name}" - }, - "testconsole_Handler_IamRolePolicyAttachment_2468EE7E": { - "//": { - "metadata": { - "path": "root/Default/Default/test:console/Handler/IamRolePolicyAttachment", - "uniqueId": "testconsole_Handler_IamRolePolicyAttachment_2468EE7E" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testconsole_Handler_IamRole_8E32F17A.name}" - } - }, - "aws_lambda_function": { - "testcall_Handler_7902F7E6": { - "//": { - "metadata": { - "path": "root/Default/Default/test:call/Handler/Default", - "uniqueId": "testcall_Handler_7902F7E6" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8074088", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8074088", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testcall_Handler_IamRole_1805137E.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testcall_Handler_S3Object_5E5ED905.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testconsole_Handler_057D9B4E": { - "//": { - "metadata": { - "path": "root/Default/Default/test:console/Handler/Default", - "uniqueId": "testconsole_Handler_057D9B4E" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8fb077d", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8fb077d", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testconsole_Handler_IamRole_8E32F17A.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testconsole_Handler_S3Object_8A485397.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testcall_Handler_S3Object_5E5ED905": { - "//": { - "metadata": { - "path": "root/Default/Default/test:call/Handler/S3Object", - "uniqueId": "testcall_Handler_S3Object_5E5ED905" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testconsole_Handler_S3Object_8A485397": { - "//": { - "metadata": { - "path": "root/Default/Default/test:console/Handler/S3Object", - "uniqueId": "testconsole_Handler_S3Object_8A485397" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/valid/function_returns_function.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/function_returns_function.w_compile_tf-aws.md index 516583eb529..6d7e8e6c787 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/function_returns_function.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/function_returns_function.w_compile_tf-aws.md @@ -49,105 +49,13 @@ module.exports = function({ }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:inflight functions can return other inflight functions\",\"${aws_lambda_function.testinflightfunctionscanreturnotherinflightfunctions_Handler_7EBEFDAA.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testinflightfunctionscanreturnotherinflightfunctions_Handler_IamRole_4EB0A887": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight functions can return other inflight functions/Handler/IamRole", - "uniqueId": "testinflightfunctionscanreturnotherinflightfunctions_Handler_IamRole_4EB0A887" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testinflightfunctionscanreturnotherinflightfunctions_Handler_IamRolePolicy_7F73A8AD": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight functions can return other inflight functions/Handler/IamRolePolicy", - "uniqueId": "testinflightfunctionscanreturnotherinflightfunctions_Handler_IamRolePolicy_7F73A8AD" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testinflightfunctionscanreturnotherinflightfunctions_Handler_IamRole_4EB0A887.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testinflightfunctionscanreturnotherinflightfunctions_Handler_IamRolePolicyAttachment_E544C997": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight functions can return other inflight functions/Handler/IamRolePolicyAttachment", - "uniqueId": "testinflightfunctionscanreturnotherinflightfunctions_Handler_IamRolePolicyAttachment_E544C997" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinflightfunctionscanreturnotherinflightfunctions_Handler_IamRole_4EB0A887.name}" - } - }, - "aws_lambda_function": { - "testinflightfunctionscanreturnotherinflightfunctions_Handler_7EBEFDAA": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight functions can return other inflight functions/Handler/Default", - "uniqueId": "testinflightfunctionscanreturnotherinflightfunctions_Handler_7EBEFDAA" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8801592", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8801592", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinflightfunctionscanreturnotherinflightfunctions_Handler_IamRole_4EB0A887.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinflightfunctionscanreturnotherinflightfunctions_Handler_S3Object_CA1E98C2.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testinflightfunctionscanreturnotherinflightfunctions_Handler_S3Object_CA1E98C2": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight functions can return other inflight functions/Handler/S3Object", - "uniqueId": "testinflightfunctionscanreturnotherinflightfunctions_Handler_S3Object_CA1E98C2" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inflight_capture_static.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inflight_capture_static.w_compile_tf-aws.md index 2454182260f..a87d67dcf66 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inflight_capture_static.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inflight_capture_static.w_compile_tf-aws.md @@ -135,312 +135,13 @@ module.exports = function({ }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:call static method of preflight\",\"${aws_lambda_function.testcallstaticmethodofpreflight_Handler_8B40B9DA.arn}\"],[\"root/Default/Default/test:call static method of an outer inflight class\",\"${aws_lambda_function.testcallstaticmethodofanouterinflightclass_Handler_2DD5B79F.arn}\"],[\"root/Default/Default/test:call static method of an inner inflight class\",\"${aws_lambda_function.testcallstaticmethodofaninnerinflightclass_Handler_2C5AF32C.arn}\"],[\"root/Default/Default/test:call static method of a namespaced type\",\"${aws_lambda_function.testcallstaticmethodofanamespacedtype_Handler_482915F1.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testcallstaticmethodofanamespacedtype_Handler_IamRole_25705033": { - "//": { - "metadata": { - "path": "root/Default/Default/test:call static method of a namespaced type/Handler/IamRole", - "uniqueId": "testcallstaticmethodofanamespacedtype_Handler_IamRole_25705033" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testcallstaticmethodofaninnerinflightclass_Handler_IamRole_CDAA9C7A": { - "//": { - "metadata": { - "path": "root/Default/Default/test:call static method of an inner inflight class/Handler/IamRole", - "uniqueId": "testcallstaticmethodofaninnerinflightclass_Handler_IamRole_CDAA9C7A" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testcallstaticmethodofanouterinflightclass_Handler_IamRole_0FC1D765": { - "//": { - "metadata": { - "path": "root/Default/Default/test:call static method of an outer inflight class/Handler/IamRole", - "uniqueId": "testcallstaticmethodofanouterinflightclass_Handler_IamRole_0FC1D765" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testcallstaticmethodofpreflight_Handler_IamRole_E8EA54F9": { - "//": { - "metadata": { - "path": "root/Default/Default/test:call static method of preflight/Handler/IamRole", - "uniqueId": "testcallstaticmethodofpreflight_Handler_IamRole_E8EA54F9" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testcallstaticmethodofanamespacedtype_Handler_IamRolePolicy_12949151": { - "//": { - "metadata": { - "path": "root/Default/Default/test:call static method of a namespaced type/Handler/IamRolePolicy", - "uniqueId": "testcallstaticmethodofanamespacedtype_Handler_IamRolePolicy_12949151" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testcallstaticmethodofanamespacedtype_Handler_IamRole_25705033.name}" - }, - "testcallstaticmethodofaninnerinflightclass_Handler_IamRolePolicy_C6A53FA8": { - "//": { - "metadata": { - "path": "root/Default/Default/test:call static method of an inner inflight class/Handler/IamRolePolicy", - "uniqueId": "testcallstaticmethodofaninnerinflightclass_Handler_IamRolePolicy_C6A53FA8" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testcallstaticmethodofaninnerinflightclass_Handler_IamRole_CDAA9C7A.name}" - }, - "testcallstaticmethodofanouterinflightclass_Handler_IamRolePolicy_38ABBE2B": { - "//": { - "metadata": { - "path": "root/Default/Default/test:call static method of an outer inflight class/Handler/IamRolePolicy", - "uniqueId": "testcallstaticmethodofanouterinflightclass_Handler_IamRolePolicy_38ABBE2B" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testcallstaticmethodofanouterinflightclass_Handler_IamRole_0FC1D765.name}" - }, - "testcallstaticmethodofpreflight_Handler_IamRolePolicy_D3497043": { - "//": { - "metadata": { - "path": "root/Default/Default/test:call static method of preflight/Handler/IamRolePolicy", - "uniqueId": "testcallstaticmethodofpreflight_Handler_IamRolePolicy_D3497043" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testcallstaticmethodofpreflight_Handler_IamRole_E8EA54F9.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testcallstaticmethodofanamespacedtype_Handler_IamRolePolicyAttachment_ECE71D89": { - "//": { - "metadata": { - "path": "root/Default/Default/test:call static method of a namespaced type/Handler/IamRolePolicyAttachment", - "uniqueId": "testcallstaticmethodofanamespacedtype_Handler_IamRolePolicyAttachment_ECE71D89" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testcallstaticmethodofanamespacedtype_Handler_IamRole_25705033.name}" - }, - "testcallstaticmethodofaninnerinflightclass_Handler_IamRolePolicyAttachment_41BCA0B2": { - "//": { - "metadata": { - "path": "root/Default/Default/test:call static method of an inner inflight class/Handler/IamRolePolicyAttachment", - "uniqueId": "testcallstaticmethodofaninnerinflightclass_Handler_IamRolePolicyAttachment_41BCA0B2" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testcallstaticmethodofaninnerinflightclass_Handler_IamRole_CDAA9C7A.name}" - }, - "testcallstaticmethodofanouterinflightclass_Handler_IamRolePolicyAttachment_8D3E1518": { - "//": { - "metadata": { - "path": "root/Default/Default/test:call static method of an outer inflight class/Handler/IamRolePolicyAttachment", - "uniqueId": "testcallstaticmethodofanouterinflightclass_Handler_IamRolePolicyAttachment_8D3E1518" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testcallstaticmethodofanouterinflightclass_Handler_IamRole_0FC1D765.name}" - }, - "testcallstaticmethodofpreflight_Handler_IamRolePolicyAttachment_65F94B62": { - "//": { - "metadata": { - "path": "root/Default/Default/test:call static method of preflight/Handler/IamRolePolicyAttachment", - "uniqueId": "testcallstaticmethodofpreflight_Handler_IamRolePolicyAttachment_65F94B62" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testcallstaticmethodofpreflight_Handler_IamRole_E8EA54F9.name}" - } - }, - "aws_lambda_function": { - "testcallstaticmethodofanamespacedtype_Handler_482915F1": { - "//": { - "metadata": { - "path": "root/Default/Default/test:call static method of a namespaced type/Handler/Default", - "uniqueId": "testcallstaticmethodofanamespacedtype_Handler_482915F1" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c808c556", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c808c556", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testcallstaticmethodofanamespacedtype_Handler_IamRole_25705033.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testcallstaticmethodofanamespacedtype_Handler_S3Object_F7E5940D.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testcallstaticmethodofaninnerinflightclass_Handler_2C5AF32C": { - "//": { - "metadata": { - "path": "root/Default/Default/test:call static method of an inner inflight class/Handler/Default", - "uniqueId": "testcallstaticmethodofaninnerinflightclass_Handler_2C5AF32C" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8d913d8", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8d913d8", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testcallstaticmethodofaninnerinflightclass_Handler_IamRole_CDAA9C7A.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testcallstaticmethodofaninnerinflightclass_Handler_S3Object_054F3843.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testcallstaticmethodofanouterinflightclass_Handler_2DD5B79F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:call static method of an outer inflight class/Handler/Default", - "uniqueId": "testcallstaticmethodofanouterinflightclass_Handler_2DD5B79F" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8dbdf1b", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8dbdf1b", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testcallstaticmethodofanouterinflightclass_Handler_IamRole_0FC1D765.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testcallstaticmethodofanouterinflightclass_Handler_S3Object_1DB15ACB.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testcallstaticmethodofpreflight_Handler_8B40B9DA": { - "//": { - "metadata": { - "path": "root/Default/Default/test:call static method of preflight/Handler/Default", - "uniqueId": "testcallstaticmethodofpreflight_Handler_8B40B9DA" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8e286c0", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8e286c0", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testcallstaticmethodofpreflight_Handler_IamRole_E8EA54F9.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testcallstaticmethodofpreflight_Handler_S3Object_4DFBB09F.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testcallstaticmethodofanamespacedtype_Handler_S3Object_F7E5940D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:call static method of a namespaced type/Handler/S3Object", - "uniqueId": "testcallstaticmethodofanamespacedtype_Handler_S3Object_F7E5940D" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testcallstaticmethodofaninnerinflightclass_Handler_S3Object_054F3843": { - "//": { - "metadata": { - "path": "root/Default/Default/test:call static method of an inner inflight class/Handler/S3Object", - "uniqueId": "testcallstaticmethodofaninnerinflightclass_Handler_S3Object_054F3843" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testcallstaticmethodofanouterinflightclass_Handler_S3Object_1DB15ACB": { - "//": { - "metadata": { - "path": "root/Default/Default/test:call static method of an outer inflight class/Handler/S3Object", - "uniqueId": "testcallstaticmethodofanouterinflightclass_Handler_S3Object_1DB15ACB" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testcallstaticmethodofpreflight_Handler_S3Object_4DFBB09F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:call static method of preflight/Handler/S3Object", - "uniqueId": "testcallstaticmethodofpreflight_Handler_S3Object_4DFBB09F" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_as_struct_members.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_as_struct_members.w_compile_tf-aws.md index 53025596fb4..f48d966055f 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_as_struct_members.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_as_struct_members.w_compile_tf-aws.md @@ -102,105 +102,13 @@ module.exports = function({ }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:test\",\"${aws_lambda_function.testtest_Handler_295107CC.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testtest_Handler_IamRole_15693C93": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRole", - "uniqueId": "testtest_Handler_IamRole_15693C93" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testtest_Handler_IamRolePolicy_AF0279BD": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRolePolicy", - "uniqueId": "testtest_Handler_IamRolePolicy_AF0279BD" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testtest_Handler_IamRolePolicyAttachment_ADF4752D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRolePolicyAttachment", - "uniqueId": "testtest_Handler_IamRolePolicyAttachment_ADF4752D" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.name}" - } - }, - "aws_lambda_function": { - "testtest_Handler_295107CC": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/Default", - "uniqueId": "testtest_Handler_295107CC" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8f4f2a1", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8f4f2a1", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testtest_Handler_S3Object_9F4E28A7.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testtest_Handler_S3Object_9F4E28A7": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/S3Object", - "uniqueId": "testtest_Handler_S3Object_9F4E28A7" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_capture_const.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_capture_const.w_compile_tf-aws.md index 0fc5f10af3f..c90e29686e0 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_capture_const.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_capture_const.w_compile_tf-aws.md @@ -53,105 +53,13 @@ module.exports = function({ $myConst }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:inflight class captures const\",\"${aws_lambda_function.testinflightclasscapturesconst_Handler_17207FA8.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testinflightclasscapturesconst_Handler_IamRole_1218DA8A": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight class captures const/Handler/IamRole", - "uniqueId": "testinflightclasscapturesconst_Handler_IamRole_1218DA8A" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testinflightclasscapturesconst_Handler_IamRolePolicy_7A96DC9C": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight class captures const/Handler/IamRolePolicy", - "uniqueId": "testinflightclasscapturesconst_Handler_IamRolePolicy_7A96DC9C" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testinflightclasscapturesconst_Handler_IamRole_1218DA8A.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testinflightclasscapturesconst_Handler_IamRolePolicyAttachment_C7CD4A0F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight class captures const/Handler/IamRolePolicyAttachment", - "uniqueId": "testinflightclasscapturesconst_Handler_IamRolePolicyAttachment_C7CD4A0F" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinflightclasscapturesconst_Handler_IamRole_1218DA8A.name}" - } - }, - "aws_lambda_function": { - "testinflightclasscapturesconst_Handler_17207FA8": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight class captures const/Handler/Default", - "uniqueId": "testinflightclasscapturesconst_Handler_17207FA8" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8e53a58", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8e53a58", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinflightclasscapturesconst_Handler_IamRole_1218DA8A.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinflightclasscapturesconst_Handler_S3Object_30E91D8B.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testinflightclasscapturesconst_Handler_S3Object_30E91D8B": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight class captures const/Handler/S3Object", - "uniqueId": "testinflightclasscapturesconst_Handler_S3Object_30E91D8B" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_definitions.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_definitions.w_compile_tf-aws.md index a18e3ee251f..ec2ab289572 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_definitions.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_definitions.w_compile_tf-aws.md @@ -155,105 +155,13 @@ module.exports = function({ }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:test\",\"${aws_lambda_function.testtest_Handler_295107CC.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testtest_Handler_IamRole_15693C93": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRole", - "uniqueId": "testtest_Handler_IamRole_15693C93" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testtest_Handler_IamRolePolicy_AF0279BD": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRolePolicy", - "uniqueId": "testtest_Handler_IamRolePolicy_AF0279BD" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testtest_Handler_IamRolePolicyAttachment_ADF4752D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRolePolicyAttachment", - "uniqueId": "testtest_Handler_IamRolePolicyAttachment_ADF4752D" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.name}" - } - }, - "aws_lambda_function": { - "testtest_Handler_295107CC": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/Default", - "uniqueId": "testtest_Handler_295107CC" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8f4f2a1", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8f4f2a1", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testtest_Handler_S3Object_9F4E28A7.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testtest_Handler_S3Object_9F4E28A7": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/S3Object", - "uniqueId": "testtest_Handler_S3Object_9F4E28A7" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_inner_capture_mutable.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_inner_capture_mutable.w_compile_tf-aws.md index 6428870090f..d656ae862a0 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_inner_capture_mutable.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_inner_capture_mutable.w_compile_tf-aws.md @@ -50,105 +50,13 @@ module.exports = function({ }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:inner inflight class capture immutable\",\"${aws_lambda_function.testinnerinflightclasscaptureimmutable_Handler_8A6A0444.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testinnerinflightclasscaptureimmutable_Handler_IamRole_A23BAF06": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inner inflight class capture immutable/Handler/IamRole", - "uniqueId": "testinnerinflightclasscaptureimmutable_Handler_IamRole_A23BAF06" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testinnerinflightclasscaptureimmutable_Handler_IamRolePolicy_64E9740C": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inner inflight class capture immutable/Handler/IamRolePolicy", - "uniqueId": "testinnerinflightclasscaptureimmutable_Handler_IamRolePolicy_64E9740C" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testinnerinflightclasscaptureimmutable_Handler_IamRole_A23BAF06.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testinnerinflightclasscaptureimmutable_Handler_IamRolePolicyAttachment_333DB9F1": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inner inflight class capture immutable/Handler/IamRolePolicyAttachment", - "uniqueId": "testinnerinflightclasscaptureimmutable_Handler_IamRolePolicyAttachment_333DB9F1" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinnerinflightclasscaptureimmutable_Handler_IamRole_A23BAF06.name}" - } - }, - "aws_lambda_function": { - "testinnerinflightclasscaptureimmutable_Handler_8A6A0444": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inner inflight class capture immutable/Handler/Default", - "uniqueId": "testinnerinflightclasscaptureimmutable_Handler_8A6A0444" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c88a8b71", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c88a8b71", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinnerinflightclasscaptureimmutable_Handler_IamRole_A23BAF06.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinnerinflightclasscaptureimmutable_Handler_S3Object_9B7C45EF.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testinnerinflightclasscaptureimmutable_Handler_S3Object_9B7C45EF": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inner inflight class capture immutable/Handler/S3Object", - "uniqueId": "testinnerinflightclasscaptureimmutable_Handler_S3Object_9B7C45EF" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_inside_inflight_closure.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_inside_inflight_closure.w_compile_tf-aws.md index a32686deac1..00f831affff 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_inside_inflight_closure.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_inside_inflight_closure.w_compile_tf-aws.md @@ -105,7 +105,7 @@ module.exports = function({ }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:it works\",\"${aws_lambda_function.testitworks_Handler_FCB0C220.arn}\"],[\"root/Default/Default/test:inflight class inside closure captures from closure\",\"${aws_lambda_function.testinflightclassinsideclosurecapturesfromclosure_Handler_9491D6BF.arn}\"]]" + "value": "[]" } }, "provider": { @@ -123,24 +123,6 @@ module.exports = function({ }) { } }, "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testinflightclassinsideclosurecapturesfromclosure_Handler_IamRole_64F90E13": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight class inside closure captures from closure/Handler/IamRole", - "uniqueId": "testinflightclassinsideclosurecapturesfromclosure_Handler_IamRole_64F90E13" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testitworks_Handler_IamRole_D05BB31A": { - "//": { - "metadata": { - "path": "root/Default/Default/test:it works/Handler/IamRole", - "uniqueId": "testitworks_Handler_IamRole_D05BB31A" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" } }, "aws_iam_role_policy": { @@ -153,26 +135,6 @@ module.exports = function({ }) { }, "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"s3:PutObject*\",\"s3:Abort*\"],\"Resource\":[\"${aws_s3_bucket.PreflightClass_cloudBucket_05421049.arn}\",\"${aws_s3_bucket.PreflightClass_cloudBucket_05421049.arn}/*\"],\"Effect\":\"Allow\"}]}", "role": "${aws_iam_role.PreflightClass_cloudFunction_IamRole_60AD4A3B.name}" - }, - "testinflightclassinsideclosurecapturesfromclosure_Handler_IamRolePolicy_BE5614D6": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight class inside closure captures from closure/Handler/IamRolePolicy", - "uniqueId": "testinflightclassinsideclosurecapturesfromclosure_Handler_IamRolePolicy_BE5614D6" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testinflightclassinsideclosurecapturesfromclosure_Handler_IamRole_64F90E13.name}" - }, - "testitworks_Handler_IamRolePolicy_266A722B": { - "//": { - "metadata": { - "path": "root/Default/Default/test:it works/Handler/IamRolePolicy", - "uniqueId": "testitworks_Handler_IamRolePolicy_266A722B" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"lambda:InvokeFunction\"],\"Resource\":[\"${aws_lambda_function.PreflightClass_cloudFunction_9F7C6688.arn}\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testitworks_Handler_IamRole_D05BB31A.name}" } }, "aws_iam_role_policy_attachment": { @@ -185,26 +147,6 @@ module.exports = function({ }) { }, "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", "role": "${aws_iam_role.PreflightClass_cloudFunction_IamRole_60AD4A3B.name}" - }, - "testinflightclassinsideclosurecapturesfromclosure_Handler_IamRolePolicyAttachment_E9CAC6A2": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight class inside closure captures from closure/Handler/IamRolePolicyAttachment", - "uniqueId": "testinflightclassinsideclosurecapturesfromclosure_Handler_IamRolePolicyAttachment_E9CAC6A2" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinflightclassinsideclosurecapturesfromclosure_Handler_IamRole_64F90E13.name}" - }, - "testitworks_Handler_IamRolePolicyAttachment_D4A532DA": { - "//": { - "metadata": { - "path": "root/Default/Default/test:it works/Handler/IamRolePolicyAttachment", - "uniqueId": "testitworks_Handler_IamRolePolicyAttachment_D4A532DA" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testitworks_Handler_IamRole_D05BB31A.name}" } }, "aws_lambda_function": { @@ -237,65 +179,6 @@ module.exports = function({ }) { "security_group_ids": [], "subnet_ids": [] } - }, - "testinflightclassinsideclosurecapturesfromclosure_Handler_9491D6BF": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight class inside closure captures from closure/Handler/Default", - "uniqueId": "testinflightclassinsideclosurecapturesfromclosure_Handler_9491D6BF" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c866c5da", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c866c5da", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinflightclassinsideclosurecapturesfromclosure_Handler_IamRole_64F90E13.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinflightclassinsideclosurecapturesfromclosure_Handler_S3Object_73ACC1FD.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testitworks_Handler_FCB0C220": { - "//": { - "metadata": { - "path": "root/Default/Default/test:it works/Handler/Default", - "uniqueId": "testitworks_Handler_FCB0C220" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "FUNCTION_NAME_31bff872": "${aws_lambda_function.PreflightClass_cloudFunction_9F7C6688.arn}", - "WING_FUNCTION_NAME": "Handler-c834f611", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c834f611", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testitworks_Handler_IamRole_D05BB31A.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testitworks_Handler_S3Object_0FB5D970.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } } }, "aws_s3_bucket": { @@ -348,28 +231,6 @@ module.exports = function({ }) { "bucket": "${aws_s3_bucket.Code.bucket}", "key": "", "source": "" - }, - "testinflightclassinsideclosurecapturesfromclosure_Handler_S3Object_73ACC1FD": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight class inside closure captures from closure/Handler/S3Object", - "uniqueId": "testinflightclassinsideclosurecapturesfromclosure_Handler_S3Object_73ACC1FD" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testitworks_Handler_S3Object_0FB5D970": { - "//": { - "metadata": { - "path": "root/Default/Default/test:it works/Handler/S3Object", - "uniqueId": "testitworks_Handler_S3Object_0FB5D970" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" } } } diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_outside_inflight_closure.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_outside_inflight_closure.w_compile_tf-aws.md index 2afbab3cf9f..acb991e39e7 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_outside_inflight_closure.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_outside_inflight_closure.w_compile_tf-aws.md @@ -57,105 +57,13 @@ module.exports = function({ }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:inflight class outside inflight closure\",\"${aws_lambda_function.testinflightclassoutsideinflightclosure_Handler_D7A68A3D.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testinflightclassoutsideinflightclosure_Handler_IamRole_3F60361C": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight class outside inflight closure/Handler/IamRole", - "uniqueId": "testinflightclassoutsideinflightclosure_Handler_IamRole_3F60361C" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testinflightclassoutsideinflightclosure_Handler_IamRolePolicy_A961D2D3": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight class outside inflight closure/Handler/IamRolePolicy", - "uniqueId": "testinflightclassoutsideinflightclosure_Handler_IamRolePolicy_A961D2D3" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testinflightclassoutsideinflightclosure_Handler_IamRole_3F60361C.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testinflightclassoutsideinflightclosure_Handler_IamRolePolicyAttachment_1B756D9D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight class outside inflight closure/Handler/IamRolePolicyAttachment", - "uniqueId": "testinflightclassoutsideinflightclosure_Handler_IamRolePolicyAttachment_1B756D9D" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinflightclassoutsideinflightclosure_Handler_IamRole_3F60361C.name}" - } - }, - "aws_lambda_function": { - "testinflightclassoutsideinflightclosure_Handler_D7A68A3D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight class outside inflight closure/Handler/Default", - "uniqueId": "testinflightclassoutsideinflightclosure_Handler_D7A68A3D" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8046c38", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8046c38", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinflightclassoutsideinflightclosure_Handler_IamRole_3F60361C.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinflightclassoutsideinflightclosure_Handler_S3Object_4AFDD6EF.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testinflightclassoutsideinflightclosure_Handler_S3Object_4AFDD6EF": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight class outside inflight closure/Handler/S3Object", - "uniqueId": "testinflightclassoutsideinflightclosure_Handler_S3Object_4AFDD6EF" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_structural_interace_handler.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_structural_interace_handler.w_compile_tf-aws.md index 724e254091a..dca74e14d29 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_structural_interace_handler.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_structural_interace_handler.w_compile_tf-aws.md @@ -63,105 +63,13 @@ module.exports = function({ }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:structure interface types for 'handle'\",\"${aws_lambda_function.teststructureinterfacetypesforhandle_Handler_2DA6D9F8.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "teststructureinterfacetypesforhandle_Handler_IamRole_12602AE7": { - "//": { - "metadata": { - "path": "root/Default/Default/test:structure interface types for 'handle'/Handler/IamRole", - "uniqueId": "teststructureinterfacetypesforhandle_Handler_IamRole_12602AE7" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "teststructureinterfacetypesforhandle_Handler_IamRolePolicy_AD8B964E": { - "//": { - "metadata": { - "path": "root/Default/Default/test:structure interface types for 'handle'/Handler/IamRolePolicy", - "uniqueId": "teststructureinterfacetypesforhandle_Handler_IamRolePolicy_AD8B964E" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.teststructureinterfacetypesforhandle_Handler_IamRole_12602AE7.name}" - } - }, - "aws_iam_role_policy_attachment": { - "teststructureinterfacetypesforhandle_Handler_IamRolePolicyAttachment_B1D53B86": { - "//": { - "metadata": { - "path": "root/Default/Default/test:structure interface types for 'handle'/Handler/IamRolePolicyAttachment", - "uniqueId": "teststructureinterfacetypesforhandle_Handler_IamRolePolicyAttachment_B1D53B86" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.teststructureinterfacetypesforhandle_Handler_IamRole_12602AE7.name}" - } - }, - "aws_lambda_function": { - "teststructureinterfacetypesforhandle_Handler_2DA6D9F8": { - "//": { - "metadata": { - "path": "root/Default/Default/test:structure interface types for 'handle'/Handler/Default", - "uniqueId": "teststructureinterfacetypesforhandle_Handler_2DA6D9F8" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c83718d0", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c83718d0", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.teststructureinterfacetypesforhandle_Handler_IamRole_12602AE7.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.teststructureinterfacetypesforhandle_Handler_S3Object_9308866C.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "teststructureinterfacetypesforhandle_Handler_S3Object_9308866C": { - "//": { - "metadata": { - "path": "root/Default/Default/test:structure interface types for 'handle'/Handler/S3Object", - "uniqueId": "teststructureinterfacetypesforhandle_Handler_S3Object_9308866C" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_without_init.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_without_init.w_compile_tf-aws.md index 02262ecf1a4..28e0097de98 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_without_init.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inflight_class_without_init.w_compile_tf-aws.md @@ -49,105 +49,13 @@ module.exports = function({ }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:inflight class without init\",\"${aws_lambda_function.testinflightclasswithoutinit_Handler_26AF0424.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testinflightclasswithoutinit_Handler_IamRole_9FC8A111": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight class without init/Handler/IamRole", - "uniqueId": "testinflightclasswithoutinit_Handler_IamRole_9FC8A111" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testinflightclasswithoutinit_Handler_IamRolePolicy_19D5500F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight class without init/Handler/IamRolePolicy", - "uniqueId": "testinflightclasswithoutinit_Handler_IamRolePolicy_19D5500F" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testinflightclasswithoutinit_Handler_IamRole_9FC8A111.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testinflightclasswithoutinit_Handler_IamRolePolicyAttachment_786F6217": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight class without init/Handler/IamRolePolicyAttachment", - "uniqueId": "testinflightclasswithoutinit_Handler_IamRolePolicyAttachment_786F6217" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinflightclasswithoutinit_Handler_IamRole_9FC8A111.name}" - } - }, - "aws_lambda_function": { - "testinflightclasswithoutinit_Handler_26AF0424": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight class without init/Handler/Default", - "uniqueId": "testinflightclasswithoutinit_Handler_26AF0424" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8459d32", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8459d32", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinflightclasswithoutinit_Handler_IamRole_9FC8A111.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinflightclasswithoutinit_Handler_S3Object_A750DD17.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testinflightclasswithoutinit_Handler_S3Object_A750DD17": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight class without init/Handler/S3Object", - "uniqueId": "testinflightclasswithoutinit_Handler_S3Object_A750DD17" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/valid/inflights_calling_inflights.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/inflights_calling_inflights.w_compile_tf-aws.md index d4f206ab7f5..fcf530744e0 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/inflights_calling_inflights.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/inflights_calling_inflights.w_compile_tf-aws.md @@ -130,7 +130,7 @@ module.exports = function({ }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:inflights can call other inflights\",\"${aws_lambda_function.testinflightscancallotherinflights_Handler_90705AE1.arn}\"],[\"root/Default/Default/test:variable can be an inflight closure\",\"${aws_lambda_function.testvariablecanbeaninflightclosure_Handler_E55D136A.arn}\"]]" + "value": "[]" } }, "provider": { @@ -148,24 +148,6 @@ module.exports = function({ }) { } }, "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testinflightscancallotherinflights_Handler_IamRole_30D96E98": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflights can call other inflights/Handler/IamRole", - "uniqueId": "testinflightscancallotherinflights_Handler_IamRole_30D96E98" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testvariablecanbeaninflightclosure_Handler_IamRole_12408457": { - "//": { - "metadata": { - "path": "root/Default/Default/test:variable can be an inflight closure/Handler/IamRole", - "uniqueId": "testvariablecanbeaninflightclosure_Handler_IamRole_12408457" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" } }, "aws_iam_role_policy": { @@ -178,26 +160,6 @@ module.exports = function({ }) { }, "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"s3:PutObject*\",\"s3:Abort*\"],\"Resource\":[\"${aws_s3_bucket.cloudBucket.arn}\",\"${aws_s3_bucket.cloudBucket.arn}/*\"],\"Effect\":\"Allow\"}]}", "role": "${aws_iam_role.func1_IamRole_31EC29DC.name}" - }, - "testinflightscancallotherinflights_Handler_IamRolePolicy_1E6CC29C": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflights can call other inflights/Handler/IamRolePolicy", - "uniqueId": "testinflightscancallotherinflights_Handler_IamRolePolicy_1E6CC29C" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"s3:List*\",\"s3:GetObject*\",\"s3:GetBucket*\"],\"Resource\":[\"${aws_s3_bucket.cloudBucket.arn}\",\"${aws_s3_bucket.cloudBucket.arn}/*\"],\"Effect\":\"Allow\"},{\"Action\":[\"lambda:InvokeFunction\"],\"Resource\":[\"${aws_lambda_function.func1.arn}\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testinflightscancallotherinflights_Handler_IamRole_30D96E98.name}" - }, - "testvariablecanbeaninflightclosure_Handler_IamRolePolicy_B1660864": { - "//": { - "metadata": { - "path": "root/Default/Default/test:variable can be an inflight closure/Handler/IamRolePolicy", - "uniqueId": "testvariablecanbeaninflightclosure_Handler_IamRolePolicy_B1660864" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"s3:List*\",\"s3:GetObject*\",\"s3:GetBucket*\"],\"Resource\":[\"${aws_s3_bucket.cloudBucket.arn}\",\"${aws_s3_bucket.cloudBucket.arn}/*\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testvariablecanbeaninflightclosure_Handler_IamRole_12408457.name}" } }, "aws_iam_role_policy_attachment": { @@ -210,26 +172,6 @@ module.exports = function({ }) { }, "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", "role": "${aws_iam_role.func1_IamRole_31EC29DC.name}" - }, - "testinflightscancallotherinflights_Handler_IamRolePolicyAttachment_C2809755": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflights can call other inflights/Handler/IamRolePolicyAttachment", - "uniqueId": "testinflightscancallotherinflights_Handler_IamRolePolicyAttachment_C2809755" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinflightscancallotherinflights_Handler_IamRole_30D96E98.name}" - }, - "testvariablecanbeaninflightclosure_Handler_IamRolePolicyAttachment_3CD3586A": { - "//": { - "metadata": { - "path": "root/Default/Default/test:variable can be an inflight closure/Handler/IamRolePolicyAttachment", - "uniqueId": "testvariablecanbeaninflightclosure_Handler_IamRolePolicyAttachment_3CD3586A" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testvariablecanbeaninflightclosure_Handler_IamRole_12408457.name}" } }, "aws_lambda_function": { @@ -262,67 +204,6 @@ module.exports = function({ }) { "security_group_ids": [], "subnet_ids": [] } - }, - "testinflightscancallotherinflights_Handler_90705AE1": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflights can call other inflights/Handler/Default", - "uniqueId": "testinflightscancallotherinflights_Handler_90705AE1" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", - "FUNCTION_NAME_c79d5cd4": "${aws_lambda_function.func1.arn}", - "WING_FUNCTION_NAME": "Handler-c8ad4c02", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8ad4c02", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinflightscancallotherinflights_Handler_IamRole_30D96E98.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinflightscancallotherinflights_Handler_S3Object_D58857F2.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testvariablecanbeaninflightclosure_Handler_E55D136A": { - "//": { - "metadata": { - "path": "root/Default/Default/test:variable can be an inflight closure/Handler/Default", - "uniqueId": "testvariablecanbeaninflightclosure_Handler_E55D136A" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", - "WING_FUNCTION_NAME": "Handler-c8210662", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8210662", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testvariablecanbeaninflightclosure_Handler_IamRole_12408457.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testvariablecanbeaninflightclosure_Handler_S3Object_11B4C449.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } } }, "aws_s3_bucket": { @@ -375,28 +256,6 @@ module.exports = function({ }) { "bucket": "${aws_s3_bucket.Code.bucket}", "key": "", "source": "" - }, - "testinflightscancallotherinflights_Handler_S3Object_D58857F2": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflights can call other inflights/Handler/S3Object", - "uniqueId": "testinflightscancallotherinflights_Handler_S3Object_D58857F2" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testvariablecanbeaninflightclosure_Handler_S3Object_11B4C449": { - "//": { - "metadata": { - "path": "root/Default/Default/test:variable can be an inflight closure/Handler/S3Object", - "uniqueId": "testvariablecanbeaninflightclosure_Handler_S3Object_11B4C449" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" } } } diff --git a/tools/hangar/__snapshots__/test_corpus/valid/issue_2889.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/issue_2889.w_compile_tf-aws.md index 19a370efafd..e601bd17dd1 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/issue_2889.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/issue_2889.w_compile_tf-aws.md @@ -73,7 +73,7 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:api should return a valid stringified json\",\"${aws_lambda_function.testapishouldreturnavalidstringifiedjson_Handler_DCAABCD2.arn}\"]]" + "value": "[]" } }, "provider": { @@ -133,15 +133,6 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { } }, "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testapishouldreturnavalidstringifiedjson_Handler_IamRole_E8773827": { - "//": { - "metadata": { - "path": "root/Default/Default/test:api should return a valid stringified json/Handler/IamRole", - "uniqueId": "testapishouldreturnavalidstringifiedjson_Handler_IamRole_E8773827" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" } }, "aws_iam_role_policy": { @@ -154,16 +145,6 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { }, "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.name}" - }, - "testapishouldreturnavalidstringifiedjson_Handler_IamRolePolicy_69F9735C": { - "//": { - "metadata": { - "path": "root/Default/Default/test:api should return a valid stringified json/Handler/IamRolePolicy", - "uniqueId": "testapishouldreturnavalidstringifiedjson_Handler_IamRolePolicy_69F9735C" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testapishouldreturnavalidstringifiedjson_Handler_IamRole_E8773827.name}" } }, "aws_iam_role_policy_attachment": { @@ -176,16 +157,6 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { }, "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.name}" - }, - "testapishouldreturnavalidstringifiedjson_Handler_IamRolePolicyAttachment_FB8B230A": { - "//": { - "metadata": { - "path": "root/Default/Default/test:api should return a valid stringified json/Handler/IamRolePolicyAttachment", - "uniqueId": "testapishouldreturnavalidstringifiedjson_Handler_IamRolePolicyAttachment_FB8B230A" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testapishouldreturnavalidstringifiedjson_Handler_IamRole_E8773827.name}" } }, "aws_lambda_function": { @@ -217,36 +188,6 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { "security_group_ids": [], "subnet_ids": [] } - }, - "testapishouldreturnavalidstringifiedjson_Handler_DCAABCD2": { - "//": { - "metadata": { - "path": "root/Default/Default/test:api should return a valid stringified json/Handler/Default", - "uniqueId": "testapishouldreturnavalidstringifiedjson_Handler_DCAABCD2" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c88c3aa2", - "WING_TARGET": "tf-aws", - "WING_TOKEN_TFTOKEN_TOKEN_8": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" - } - }, - "function_name": "Handler-c88c3aa2", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testapishouldreturnavalidstringifiedjson_Handler_IamRole_E8773827.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testapishouldreturnavalidstringifiedjson_Handler_S3Object_9A6D7041.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } } }, "aws_lambda_permission": { @@ -286,17 +227,6 @@ module.exports = function({ $api_url, $http_Util, $std_Json }) { "bucket": "${aws_s3_bucket.Code.bucket}", "key": "", "source": "" - }, - "testapishouldreturnavalidstringifiedjson_Handler_S3Object_9A6D7041": { - "//": { - "metadata": { - "path": "root/Default/Default/test:api should return a valid stringified json/Handler/S3Object", - "uniqueId": "testapishouldreturnavalidstringifiedjson_Handler_S3Object_9A6D7041" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" } } } diff --git a/tools/hangar/__snapshots__/test_corpus/valid/json_bucket.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/json_bucket.w_compile_tf-aws.md index e8811603a2e..76c91d93c24 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/json_bucket.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/json_bucket.w_compile_tf-aws.md @@ -59,7 +59,7 @@ module.exports = function({ $b, $fileName, $getJson, $j }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:put\",\"${aws_lambda_function.testput_Handler_724F92D5.arn}\"]]" + "value": "[]" } }, "provider": { @@ -77,15 +77,6 @@ module.exports = function({ $b, $fileName, $getJson, $j }) { } }, "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testput_Handler_IamRole_0914AA2F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:put/Handler/IamRole", - "uniqueId": "testput_Handler_IamRole_0914AA2F" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" } }, "aws_iam_role_policy": { @@ -98,16 +89,6 @@ module.exports = function({ $b, $fileName, $getJson, $j }) { }, "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"s3:List*\",\"s3:GetObject*\",\"s3:GetBucket*\"],\"Resource\":[\"${aws_s3_bucket.cloudBucket.arn}\",\"${aws_s3_bucket.cloudBucket.arn}/*\"],\"Effect\":\"Allow\"}]}", "role": "${aws_iam_role.cloudFunction_IamRole_5A4430DC.name}" - }, - "testput_Handler_IamRolePolicy_CB5C72C0": { - "//": { - "metadata": { - "path": "root/Default/Default/test:put/Handler/IamRolePolicy", - "uniqueId": "testput_Handler_IamRolePolicy_CB5C72C0" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"s3:PutObject*\",\"s3:Abort*\"],\"Resource\":[\"${aws_s3_bucket.cloudBucket.arn}\",\"${aws_s3_bucket.cloudBucket.arn}/*\"],\"Effect\":\"Allow\"},{\"Action\":[\"lambda:InvokeFunction\"],\"Resource\":[\"${aws_lambda_function.cloudFunction.arn}\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testput_Handler_IamRole_0914AA2F.name}" } }, "aws_iam_role_policy_attachment": { @@ -120,16 +101,6 @@ module.exports = function({ $b, $fileName, $getJson, $j }) { }, "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", "role": "${aws_iam_role.cloudFunction_IamRole_5A4430DC.name}" - }, - "testput_Handler_IamRolePolicyAttachment_B3A1DDC2": { - "//": { - "metadata": { - "path": "root/Default/Default/test:put/Handler/IamRolePolicyAttachment", - "uniqueId": "testput_Handler_IamRolePolicyAttachment_B3A1DDC2" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testput_Handler_IamRole_0914AA2F.name}" } }, "aws_lambda_function": { @@ -162,37 +133,6 @@ module.exports = function({ $b, $fileName, $getJson, $j }) { "security_group_ids": [], "subnet_ids": [] } - }, - "testput_Handler_724F92D5": { - "//": { - "metadata": { - "path": "root/Default/Default/test:put/Handler/Default", - "uniqueId": "testput_Handler_724F92D5" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", - "FUNCTION_NAME_5bb84dfa": "${aws_lambda_function.cloudFunction.arn}", - "WING_FUNCTION_NAME": "Handler-c8a253bd", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8a253bd", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testput_Handler_IamRole_0914AA2F.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testput_Handler_S3Object_920402A2.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } } }, "aws_s3_bucket": { @@ -245,17 +185,6 @@ module.exports = function({ $b, $fileName, $getJson, $j }) { "bucket": "${aws_s3_bucket.Code.bucket}", "key": "", "source": "" - }, - "testput_Handler_S3Object_920402A2": { - "//": { - "metadata": { - "path": "root/Default/Default/test:put/Handler/S3Object", - "uniqueId": "testput_Handler_S3Object_920402A2" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" } } } diff --git a/tools/hangar/__snapshots__/test_corpus/valid/json_static.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/json_static.w_compile_tf-aws.md index 16ff988fae8..7c44ec62c58 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/json_static.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/json_static.w_compile_tf-aws.md @@ -60,174 +60,13 @@ module.exports = function({ $std_Json }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:Access Json static inflight\",\"${aws_lambda_function.testAccessJsonstaticinflight_Handler_E1606978.arn}\"],[\"root/Default/Default/test:has key or not\",\"${aws_lambda_function.testhaskeyornot_Handler_3209D975.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testAccessJsonstaticinflight_Handler_IamRole_6795B755": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Access Json static inflight/Handler/IamRole", - "uniqueId": "testAccessJsonstaticinflight_Handler_IamRole_6795B755" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testhaskeyornot_Handler_IamRole_FF296EDB": { - "//": { - "metadata": { - "path": "root/Default/Default/test:has key or not/Handler/IamRole", - "uniqueId": "testhaskeyornot_Handler_IamRole_FF296EDB" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testAccessJsonstaticinflight_Handler_IamRolePolicy_CFF7FBF9": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Access Json static inflight/Handler/IamRolePolicy", - "uniqueId": "testAccessJsonstaticinflight_Handler_IamRolePolicy_CFF7FBF9" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testAccessJsonstaticinflight_Handler_IamRole_6795B755.name}" - }, - "testhaskeyornot_Handler_IamRolePolicy_404B63EB": { - "//": { - "metadata": { - "path": "root/Default/Default/test:has key or not/Handler/IamRolePolicy", - "uniqueId": "testhaskeyornot_Handler_IamRolePolicy_404B63EB" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testhaskeyornot_Handler_IamRole_FF296EDB.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testAccessJsonstaticinflight_Handler_IamRolePolicyAttachment_2F2705A9": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Access Json static inflight/Handler/IamRolePolicyAttachment", - "uniqueId": "testAccessJsonstaticinflight_Handler_IamRolePolicyAttachment_2F2705A9" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testAccessJsonstaticinflight_Handler_IamRole_6795B755.name}" - }, - "testhaskeyornot_Handler_IamRolePolicyAttachment_59A47DBB": { - "//": { - "metadata": { - "path": "root/Default/Default/test:has key or not/Handler/IamRolePolicyAttachment", - "uniqueId": "testhaskeyornot_Handler_IamRolePolicyAttachment_59A47DBB" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testhaskeyornot_Handler_IamRole_FF296EDB.name}" - } - }, - "aws_lambda_function": { - "testAccessJsonstaticinflight_Handler_E1606978": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Access Json static inflight/Handler/Default", - "uniqueId": "testAccessJsonstaticinflight_Handler_E1606978" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8867497", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8867497", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testAccessJsonstaticinflight_Handler_IamRole_6795B755.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testAccessJsonstaticinflight_Handler_S3Object_554923C4.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testhaskeyornot_Handler_3209D975": { - "//": { - "metadata": { - "path": "root/Default/Default/test:has key or not/Handler/Default", - "uniqueId": "testhaskeyornot_Handler_3209D975" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8ecbdc2", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8ecbdc2", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testhaskeyornot_Handler_IamRole_FF296EDB.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testhaskeyornot_Handler_S3Object_C65EDA62.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testAccessJsonstaticinflight_Handler_S3Object_554923C4": { - "//": { - "metadata": { - "path": "root/Default/Default/test:Access Json static inflight/Handler/S3Object", - "uniqueId": "testAccessJsonstaticinflight_Handler_S3Object_554923C4" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testhaskeyornot_Handler_S3Object_C65EDA62": { - "//": { - "metadata": { - "path": "root/Default/Default/test:has key or not/Handler/S3Object", - "uniqueId": "testhaskeyornot_Handler_S3Object_C65EDA62" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/valid/lift_expr_with_this.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/lift_expr_with_this.w_compile_tf-aws.md index 9533d3389c0..04125e73238 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/lift_expr_with_this.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/lift_expr_with_this.w_compile_tf-aws.md @@ -52,105 +52,13 @@ module.exports = function({ }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:test\",\"${aws_lambda_function.testtest_Handler_295107CC.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testtest_Handler_IamRole_15693C93": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRole", - "uniqueId": "testtest_Handler_IamRole_15693C93" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testtest_Handler_IamRolePolicy_AF0279BD": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRolePolicy", - "uniqueId": "testtest_Handler_IamRolePolicy_AF0279BD" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testtest_Handler_IamRolePolicyAttachment_ADF4752D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRolePolicyAttachment", - "uniqueId": "testtest_Handler_IamRolePolicyAttachment_ADF4752D" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.name}" - } - }, - "aws_lambda_function": { - "testtest_Handler_295107CC": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/Default", - "uniqueId": "testtest_Handler_295107CC" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8f4f2a1", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8f4f2a1", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testtest_Handler_S3Object_9F4E28A7.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testtest_Handler_S3Object_9F4E28A7": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/S3Object", - "uniqueId": "testtest_Handler_S3Object_9F4E28A7" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/valid/lift_redefinition.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/lift_redefinition.w_compile_tf-aws.md index b319f3781d0..68fac7978c1 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/lift_redefinition.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/lift_redefinition.w_compile_tf-aws.md @@ -41,105 +41,13 @@ module.exports = function({ $y }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:test\",\"${aws_lambda_function.testtest_Handler_295107CC.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testtest_Handler_IamRole_15693C93": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRole", - "uniqueId": "testtest_Handler_IamRole_15693C93" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testtest_Handler_IamRolePolicy_AF0279BD": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRolePolicy", - "uniqueId": "testtest_Handler_IamRolePolicy_AF0279BD" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testtest_Handler_IamRolePolicyAttachment_ADF4752D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRolePolicyAttachment", - "uniqueId": "testtest_Handler_IamRolePolicyAttachment_ADF4752D" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.name}" - } - }, - "aws_lambda_function": { - "testtest_Handler_295107CC": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/Default", - "uniqueId": "testtest_Handler_295107CC" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8f4f2a1", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8f4f2a1", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testtest_Handler_S3Object_9F4E28A7.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testtest_Handler_S3Object_9F4E28A7": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/S3Object", - "uniqueId": "testtest_Handler_S3Object_9F4E28A7" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/valid/lift_this.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/lift_this.w_compile_tf-aws.md index 26e8accc873..b6aeee3bf49 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/lift_this.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/lift_this.w_compile_tf-aws.md @@ -60,105 +60,13 @@ module.exports = function({ }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:test\",\"${aws_lambda_function.testtest_Handler_295107CC.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testtest_Handler_IamRole_15693C93": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRole", - "uniqueId": "testtest_Handler_IamRole_15693C93" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testtest_Handler_IamRolePolicy_AF0279BD": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRolePolicy", - "uniqueId": "testtest_Handler_IamRolePolicy_AF0279BD" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testtest_Handler_IamRolePolicyAttachment_ADF4752D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRolePolicyAttachment", - "uniqueId": "testtest_Handler_IamRolePolicyAttachment_ADF4752D" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.name}" - } - }, - "aws_lambda_function": { - "testtest_Handler_295107CC": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/Default", - "uniqueId": "testtest_Handler_295107CC" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8f4f2a1", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8f4f2a1", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testtest_Handler_S3Object_9F4E28A7.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testtest_Handler_S3Object_9F4E28A7": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/S3Object", - "uniqueId": "testtest_Handler_S3Object_9F4E28A7" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/valid/lift_via_closure.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/lift_via_closure.w_compile_tf-aws.md index 00d7268b02c..40f4a91feef 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/lift_via_closure.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/lift_via_closure.w_compile_tf-aws.md @@ -106,7 +106,7 @@ module.exports = function({ $bucket2 }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:call synthetic closure class as a function\",\"${aws_lambda_function.testcallsyntheticclosureclassasafunction_Handler_577F53A9.arn}\"],[\"root/Default/Default/test:call non-synthetic closure as a function\",\"${aws_lambda_function.testcallnon-syntheticclosureasafunction_Handler_8C8F5E97.arn}\"]]" + "value": "[]" } }, "provider": { @@ -115,143 +115,7 @@ module.exports = function({ $bucket2 }) { ] }, "resource": { - "aws_iam_role": { - "testcallnon-syntheticclosureasafunction_Handler_IamRole_A06F3749": { - "//": { - "metadata": { - "path": "root/Default/Default/test:call non-synthetic closure as a function/Handler/IamRole", - "uniqueId": "testcallnon-syntheticclosureasafunction_Handler_IamRole_A06F3749" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testcallsyntheticclosureclassasafunction_Handler_IamRole_75DB8DE1": { - "//": { - "metadata": { - "path": "root/Default/Default/test:call synthetic closure class as a function/Handler/IamRole", - "uniqueId": "testcallsyntheticclosureclassasafunction_Handler_IamRole_75DB8DE1" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testcallnon-syntheticclosureasafunction_Handler_IamRolePolicy_3CCA75F8": { - "//": { - "metadata": { - "path": "root/Default/Default/test:call non-synthetic closure as a function/Handler/IamRolePolicy", - "uniqueId": "testcallnon-syntheticclosureasafunction_Handler_IamRolePolicy_3CCA75F8" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"s3:List*\",\"s3:PutObject*\",\"s3:Abort*\",\"s3:GetObject*\",\"s3:GetBucket*\"],\"Resource\":[\"${aws_s3_bucket.cloudBucket.arn}\",\"${aws_s3_bucket.cloudBucket.arn}/*\"],\"Effect\":\"Allow\"},{\"Action\":[\"s3:List*\",\"s3:PutObject*\",\"s3:Abort*\",\"s3:GetObject*\",\"s3:GetBucket*\"],\"Resource\":[\"${aws_s3_bucket.MyClosure_cloudBucket_4DAD12C0.arn}\",\"${aws_s3_bucket.MyClosure_cloudBucket_4DAD12C0.arn}/*\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testcallnon-syntheticclosureasafunction_Handler_IamRole_A06F3749.name}" - }, - "testcallsyntheticclosureclassasafunction_Handler_IamRolePolicy_64E9CC96": { - "//": { - "metadata": { - "path": "root/Default/Default/test:call synthetic closure class as a function/Handler/IamRolePolicy", - "uniqueId": "testcallsyntheticclosureclassasafunction_Handler_IamRolePolicy_64E9CC96" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"s3:PutObject*\",\"s3:Abort*\"],\"Resource\":[\"${aws_s3_bucket.cloudBucket.arn}\",\"${aws_s3_bucket.cloudBucket.arn}/*\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testcallsyntheticclosureclassasafunction_Handler_IamRole_75DB8DE1.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testcallnon-syntheticclosureasafunction_Handler_IamRolePolicyAttachment_228ED90F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:call non-synthetic closure as a function/Handler/IamRolePolicyAttachment", - "uniqueId": "testcallnon-syntheticclosureasafunction_Handler_IamRolePolicyAttachment_228ED90F" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testcallnon-syntheticclosureasafunction_Handler_IamRole_A06F3749.name}" - }, - "testcallsyntheticclosureclassasafunction_Handler_IamRolePolicyAttachment_8F878B5F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:call synthetic closure class as a function/Handler/IamRolePolicyAttachment", - "uniqueId": "testcallsyntheticclosureclassasafunction_Handler_IamRolePolicyAttachment_8F878B5F" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testcallsyntheticclosureclassasafunction_Handler_IamRole_75DB8DE1.name}" - } - }, - "aws_lambda_function": { - "testcallnon-syntheticclosureasafunction_Handler_8C8F5E97": { - "//": { - "metadata": { - "path": "root/Default/Default/test:call non-synthetic closure as a function/Handler/Default", - "uniqueId": "testcallnon-syntheticclosureasafunction_Handler_8C8F5E97" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "BUCKET_NAME_bbe94f63": "${aws_s3_bucket.MyClosure_cloudBucket_4DAD12C0.bucket}", - "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", - "WING_FUNCTION_NAME": "Handler-c88b1fea", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c88b1fea", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testcallnon-syntheticclosureasafunction_Handler_IamRole_A06F3749.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testcallnon-syntheticclosureasafunction_Handler_S3Object_F2F52456.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testcallsyntheticclosureclassasafunction_Handler_577F53A9": { - "//": { - "metadata": { - "path": "root/Default/Default/test:call synthetic closure class as a function/Handler/Default", - "uniqueId": "testcallsyntheticclosureclassasafunction_Handler_577F53A9" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", - "WING_FUNCTION_NAME": "Handler-c822e354", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c822e354", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testcallsyntheticclosureclassasafunction_Handler_IamRole_75DB8DE1.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testcallsyntheticclosureclassasafunction_Handler_S3Object_CBB724B2.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - }, "MyClosure_cloudBucket_4DAD12C0": { "//": { "metadata": { @@ -306,30 +170,6 @@ module.exports = function({ $bucket2 }) { } ] } - }, - "aws_s3_object": { - "testcallnon-syntheticclosureasafunction_Handler_S3Object_F2F52456": { - "//": { - "metadata": { - "path": "root/Default/Default/test:call non-synthetic closure as a function/Handler/S3Object", - "uniqueId": "testcallnon-syntheticclosureasafunction_Handler_S3Object_F2F52456" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testcallsyntheticclosureclassasafunction_Handler_S3Object_CBB724B2": { - "//": { - "metadata": { - "path": "root/Default/Default/test:call synthetic closure class as a function/Handler/S3Object", - "uniqueId": "testcallsyntheticclosureclassasafunction_Handler_S3Object_CBB724B2" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } } } } diff --git a/tools/hangar/__snapshots__/test_corpus/valid/lift_via_closure_explicit.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/lift_via_closure_explicit.w_compile_tf-aws.md index 081bfcdc06c..7398404c8c3 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/lift_via_closure_explicit.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/lift_via_closure_explicit.w_compile_tf-aws.md @@ -58,7 +58,7 @@ module.exports = function({ }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:test\",\"${aws_lambda_function.testtest_Handler_295107CC.arn}\"]]" + "value": "[]" } }, "provider": { @@ -67,97 +67,6 @@ module.exports = function({ }) { ] }, "resource": { - "aws_iam_role": { - "testtest_Handler_IamRole_15693C93": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRole", - "uniqueId": "testtest_Handler_IamRole_15693C93" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testtest_Handler_IamRolePolicy_AF0279BD": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRolePolicy", - "uniqueId": "testtest_Handler_IamRolePolicy_AF0279BD" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"sqs:SendMessage\"],\"Resource\":[\"${aws_sqs_queue.MyClosure_cloudQueue_465FD228.arn}\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testtest_Handler_IamRolePolicyAttachment_ADF4752D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRolePolicyAttachment", - "uniqueId": "testtest_Handler_IamRolePolicyAttachment_ADF4752D" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.name}" - } - }, - "aws_lambda_function": { - "testtest_Handler_295107CC": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/Default", - "uniqueId": "testtest_Handler_295107CC" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "QUEUE_URL_6ec5b2e4": "${aws_sqs_queue.MyClosure_cloudQueue_465FD228.url}", - "WING_FUNCTION_NAME": "Handler-c8f4f2a1", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8f4f2a1", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testtest_Handler_S3Object_9F4E28A7.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testtest_Handler_S3Object_9F4E28A7": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/S3Object", - "uniqueId": "testtest_Handler_S3Object_9F4E28A7" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - }, "aws_sqs_queue": { "MyClosure_cloudQueue_465FD228": { "//": { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/nil.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/nil.w_compile_tf-aws.md index 9a4cf40a78d..2fade556626 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/nil.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/nil.w_compile_tf-aws.md @@ -91,174 +91,13 @@ module.exports = function({ }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:nil return\",\"${aws_lambda_function.testnilreturn_Handler_C1CE87DB.arn}\"],[\"root/Default/Default/test:optional instance variable\",\"${aws_lambda_function.testoptionalinstancevariable_Handler_CA8A00DB.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testnilreturn_Handler_IamRole_FC194663": { - "//": { - "metadata": { - "path": "root/Default/Default/test:nil return/Handler/IamRole", - "uniqueId": "testnilreturn_Handler_IamRole_FC194663" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testoptionalinstancevariable_Handler_IamRole_CF882930": { - "//": { - "metadata": { - "path": "root/Default/Default/test:optional instance variable/Handler/IamRole", - "uniqueId": "testoptionalinstancevariable_Handler_IamRole_CF882930" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testnilreturn_Handler_IamRolePolicy_90B0B661": { - "//": { - "metadata": { - "path": "root/Default/Default/test:nil return/Handler/IamRolePolicy", - "uniqueId": "testnilreturn_Handler_IamRolePolicy_90B0B661" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testnilreturn_Handler_IamRole_FC194663.name}" - }, - "testoptionalinstancevariable_Handler_IamRolePolicy_9EEF9C64": { - "//": { - "metadata": { - "path": "root/Default/Default/test:optional instance variable/Handler/IamRolePolicy", - "uniqueId": "testoptionalinstancevariable_Handler_IamRolePolicy_9EEF9C64" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testoptionalinstancevariable_Handler_IamRole_CF882930.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testnilreturn_Handler_IamRolePolicyAttachment_53CE8059": { - "//": { - "metadata": { - "path": "root/Default/Default/test:nil return/Handler/IamRolePolicyAttachment", - "uniqueId": "testnilreturn_Handler_IamRolePolicyAttachment_53CE8059" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testnilreturn_Handler_IamRole_FC194663.name}" - }, - "testoptionalinstancevariable_Handler_IamRolePolicyAttachment_9A7EB140": { - "//": { - "metadata": { - "path": "root/Default/Default/test:optional instance variable/Handler/IamRolePolicyAttachment", - "uniqueId": "testoptionalinstancevariable_Handler_IamRolePolicyAttachment_9A7EB140" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testoptionalinstancevariable_Handler_IamRole_CF882930.name}" - } - }, - "aws_lambda_function": { - "testnilreturn_Handler_C1CE87DB": { - "//": { - "metadata": { - "path": "root/Default/Default/test:nil return/Handler/Default", - "uniqueId": "testnilreturn_Handler_C1CE87DB" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8668556", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8668556", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testnilreturn_Handler_IamRole_FC194663.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testnilreturn_Handler_S3Object_74809085.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testoptionalinstancevariable_Handler_CA8A00DB": { - "//": { - "metadata": { - "path": "root/Default/Default/test:optional instance variable/Handler/Default", - "uniqueId": "testoptionalinstancevariable_Handler_CA8A00DB" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8a1de9c", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8a1de9c", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testoptionalinstancevariable_Handler_IamRole_CF882930.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testoptionalinstancevariable_Handler_S3Object_6CA58018.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testnilreturn_Handler_S3Object_74809085": { - "//": { - "metadata": { - "path": "root/Default/Default/test:nil return/Handler/S3Object", - "uniqueId": "testnilreturn_Handler_S3Object_74809085" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testoptionalinstancevariable_Handler_S3Object_6CA58018": { - "//": { - "metadata": { - "path": "root/Default/Default/test:optional instance variable/Handler/S3Object", - "uniqueId": "testoptionalinstancevariable_Handler_S3Object_6CA58018" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/valid/optionals.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/optionals.w_compile_tf-aws.md index 34db0068be0..d05fe4f30b7 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/optionals.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/optionals.w_compile_tf-aws.md @@ -156,7 +156,7 @@ module.exports = function({ }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:t\",\"${aws_lambda_function.testt_Handler_FF112F5E.arn}\"]]" + "value": "[]" } }, "provider": { @@ -165,83 +165,7 @@ module.exports = function({ }) { ] }, "resource": { - "aws_iam_role": { - "testt_Handler_IamRole_BF49E95A": { - "//": { - "metadata": { - "path": "root/Default/Default/test:t/Handler/IamRole", - "uniqueId": "testt_Handler_IamRole_BF49E95A" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testt_Handler_IamRolePolicy_F429CB90": { - "//": { - "metadata": { - "path": "root/Default/Default/test:t/Handler/IamRolePolicy", - "uniqueId": "testt_Handler_IamRolePolicy_F429CB90" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"s3:PutObject*\",\"s3:Abort*\"],\"Resource\":[\"${aws_s3_bucket.orangebucket.arn}\",\"${aws_s3_bucket.orangebucket.arn}/*\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testt_Handler_IamRole_BF49E95A.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testt_Handler_IamRolePolicyAttachment_16BB0DB0": { - "//": { - "metadata": { - "path": "root/Default/Default/test:t/Handler/IamRolePolicyAttachment", - "uniqueId": "testt_Handler_IamRolePolicyAttachment_16BB0DB0" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testt_Handler_IamRole_BF49E95A.name}" - } - }, - "aws_lambda_function": { - "testt_Handler_FF112F5E": { - "//": { - "metadata": { - "path": "root/Default/Default/test:t/Handler/Default", - "uniqueId": "testt_Handler_FF112F5E" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "BUCKET_NAME_c1491ba5": "${aws_s3_bucket.orangebucket.bucket}", - "WING_FUNCTION_NAME": "Handler-c83c24f9", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c83c24f9", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testt_Handler_IamRole_BF49E95A.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testt_Handler_S3Object_572CA425.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - }, "orangebucket": { "//": { "metadata": { @@ -270,19 +194,6 @@ module.exports = function({ }) { } ] } - }, - "aws_s3_object": { - "testt_Handler_S3Object_572CA425": { - "//": { - "metadata": { - "path": "root/Default/Default/test:t/Handler/S3Object", - "uniqueId": "testt_Handler_S3Object_572CA425" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } } } } diff --git a/tools/hangar/__snapshots__/test_corpus/valid/print.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/print.w_compile_tf-aws.md index 4627e706598..10f54e4eff6 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/print.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/print.w_compile_tf-aws.md @@ -59,174 +59,13 @@ module.exports = function({ }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:log1\",\"${aws_lambda_function.testlog1_Handler_EDBEC34F.arn}\"],[\"root/Default/Default/test:log2\",\"${aws_lambda_function.testlog2_Handler_C5C192A7.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testlog1_Handler_IamRole_CE69AC85": { - "//": { - "metadata": { - "path": "root/Default/Default/test:log1/Handler/IamRole", - "uniqueId": "testlog1_Handler_IamRole_CE69AC85" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testlog2_Handler_IamRole_6FE521B8": { - "//": { - "metadata": { - "path": "root/Default/Default/test:log2/Handler/IamRole", - "uniqueId": "testlog2_Handler_IamRole_6FE521B8" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testlog1_Handler_IamRolePolicy_2880E1B2": { - "//": { - "metadata": { - "path": "root/Default/Default/test:log1/Handler/IamRolePolicy", - "uniqueId": "testlog1_Handler_IamRolePolicy_2880E1B2" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testlog1_Handler_IamRole_CE69AC85.name}" - }, - "testlog2_Handler_IamRolePolicy_DAC2FD7E": { - "//": { - "metadata": { - "path": "root/Default/Default/test:log2/Handler/IamRolePolicy", - "uniqueId": "testlog2_Handler_IamRolePolicy_DAC2FD7E" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testlog2_Handler_IamRole_6FE521B8.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testlog1_Handler_IamRolePolicyAttachment_41E9A840": { - "//": { - "metadata": { - "path": "root/Default/Default/test:log1/Handler/IamRolePolicyAttachment", - "uniqueId": "testlog1_Handler_IamRolePolicyAttachment_41E9A840" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testlog1_Handler_IamRole_CE69AC85.name}" - }, - "testlog2_Handler_IamRolePolicyAttachment_9531650E": { - "//": { - "metadata": { - "path": "root/Default/Default/test:log2/Handler/IamRolePolicyAttachment", - "uniqueId": "testlog2_Handler_IamRolePolicyAttachment_9531650E" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testlog2_Handler_IamRole_6FE521B8.name}" - } - }, - "aws_lambda_function": { - "testlog1_Handler_EDBEC34F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:log1/Handler/Default", - "uniqueId": "testlog1_Handler_EDBEC34F" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c82c13b7", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c82c13b7", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testlog1_Handler_IamRole_CE69AC85.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testlog1_Handler_S3Object_65FEFB6D.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testlog2_Handler_C5C192A7": { - "//": { - "metadata": { - "path": "root/Default/Default/test:log2/Handler/Default", - "uniqueId": "testlog2_Handler_C5C192A7" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c87c0241", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c87c0241", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testlog2_Handler_IamRole_6FE521B8.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testlog2_Handler_S3Object_E10F24B2.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testlog1_Handler_S3Object_65FEFB6D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:log1/Handler/S3Object", - "uniqueId": "testlog1_Handler_S3Object_65FEFB6D" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testlog2_Handler_S3Object_E10F24B2": { - "//": { - "metadata": { - "path": "root/Default/Default/test:log2/Handler/S3Object", - "uniqueId": "testlog2_Handler_S3Object_E10F24B2" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/valid/redis.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/redis.w_compile_tf-aws.md index 995fcd28188..eb1b8c934ca 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/redis.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/redis.w_compile_tf-aws.md @@ -69,7 +69,7 @@ module.exports = function({ $queue, $r, $r2, $util_Util }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:testing Redis\",\"${aws_lambda_function.testtestingRedis_Handler_7678DD27.arn}\"]]" + "value": "[]" } }, "provider": { @@ -163,15 +163,6 @@ module.exports = function({ $queue, $r, $r2, $util_Util }) { } }, "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testtestingRedis_Handler_IamRole_8B9140DE": { - "//": { - "metadata": { - "path": "root/Default/Default/test:testing Redis/Handler/IamRole", - "uniqueId": "testtestingRedis_Handler_IamRole_8B9140DE" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" } }, "aws_iam_role_policy": { @@ -184,16 +175,6 @@ module.exports = function({ $queue, $r, $r2, $util_Util }) { }, "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"sqs:ReceiveMessage\",\"sqs:ChangeMessageVisibility\",\"sqs:GetQueueUrl\",\"sqs:DeleteMessage\",\"sqs:GetQueueAttributes\"],\"Resource\":[\"${aws_sqs_queue.cloudQueue.arn}\"],\"Effect\":\"Allow\"},{\"Action\":[\"elasticache:Describe*\"],\"Resource\":[\"${aws_elasticache_cluster.exRedis_RedisCluster_3C9A5882.arn}\"],\"Effect\":\"Allow\"},{\"Effect\":\"Allow\",\"Action\":[\"ec2:CreateNetworkInterface\",\"ec2:DescribeNetworkInterfaces\",\"ec2:DeleteNetworkInterface\",\"ec2:DescribeSubnets\",\"ec2:DescribeSecurityGroups\"],\"Resource\":\"*\"},{\"Effect\":\"Allow\",\"Action\":[\"ec2:CreateNetworkInterface\",\"ec2:DescribeNetworkInterfaces\",\"ec2:DeleteNetworkInterface\",\"ec2:DescribeSubnets\",\"ec2:DescribeSecurityGroups\"],\"Resource\":\"*\"}]}", "role": "${aws_iam_role.cloudQueue-SetConsumer-cdafee6e_IamRole_2548D828.name}" - }, - "testtestingRedis_Handler_IamRolePolicy_21FBAD46": { - "//": { - "metadata": { - "path": "root/Default/Default/test:testing Redis/Handler/IamRolePolicy", - "uniqueId": "testtestingRedis_Handler_IamRolePolicy_21FBAD46" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"elasticache:Describe*\"],\"Resource\":[\"${aws_elasticache_cluster.exRedis_RedisCluster_3C9A5882.arn}\"],\"Effect\":\"Allow\"},{\"Action\":[\"elasticache:Describe*\"],\"Resource\":[\"${aws_elasticache_cluster.r2_RedisCluster_C6087F40.arn}\"],\"Effect\":\"Allow\"},{\"Action\":[\"sqs:SendMessage\"],\"Resource\":[\"${aws_sqs_queue.cloudQueue.arn}\"],\"Effect\":\"Allow\"},{\"Effect\":\"Allow\",\"Action\":[\"ec2:CreateNetworkInterface\",\"ec2:DescribeNetworkInterfaces\",\"ec2:DeleteNetworkInterface\",\"ec2:DescribeSubnets\",\"ec2:DescribeSecurityGroups\"],\"Resource\":\"*\"},{\"Effect\":\"Allow\",\"Action\":[\"ec2:CreateNetworkInterface\",\"ec2:DescribeNetworkInterfaces\",\"ec2:DeleteNetworkInterface\",\"ec2:DescribeSubnets\",\"ec2:DescribeSecurityGroups\"],\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testtestingRedis_Handler_IamRole_8B9140DE.name}" } }, "aws_iam_role_policy_attachment": { @@ -206,16 +187,6 @@ module.exports = function({ $queue, $r, $r2, $util_Util }) { }, "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", "role": "${aws_iam_role.cloudQueue-SetConsumer-cdafee6e_IamRole_2548D828.name}" - }, - "testtestingRedis_Handler_IamRolePolicyAttachment_4A5E3F4E": { - "//": { - "metadata": { - "path": "root/Default/Default/test:testing Redis/Handler/IamRolePolicyAttachment", - "uniqueId": "testtestingRedis_Handler_IamRolePolicyAttachment_4A5E3F4E" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testtestingRedis_Handler_IamRole_8B9140DE.name}" } }, "aws_internet_gateway": { @@ -279,44 +250,6 @@ module.exports = function({ $queue, $r, $r2, $util_Util }) { "${aws_subnet.PrivateSubnet.id}" ] } - }, - "testtestingRedis_Handler_7678DD27": { - "//": { - "metadata": { - "path": "root/Default/Default/test:testing Redis/Handler/Default", - "uniqueId": "testtestingRedis_Handler_7678DD27" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "QUEUE_URL_31e95cbd": "${aws_sqs_queue.cloudQueue.url}", - "REDIS_CLUSTER_ID_30c8c4ae": "${aws_elasticache_cluster.r2_RedisCluster_C6087F40.cluster_id}", - "REDIS_CLUSTER_ID_89baf91f": "${aws_elasticache_cluster.exRedis_RedisCluster_3C9A5882.cluster_id}", - "WING_FUNCTION_NAME": "Handler-c8775e77", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8775e77", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testtestingRedis_Handler_IamRole_8B9140DE.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testtestingRedis_Handler_S3Object_3AE6E27A.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [ - "${aws_security_group.exRedis_securityGroup_3948C3F2.id}", - "${aws_security_group.r2_securityGroup_35A75C2E.id}" - ], - "subnet_ids": [ - "${aws_subnet.PrivateSubnet.id}", - "${aws_subnet.PrivateSubnet.id}" - ] - } } }, "aws_nat_gateway": { @@ -440,17 +373,6 @@ module.exports = function({ $queue, $r, $r2, $util_Util }) { "bucket": "${aws_s3_bucket.Code.bucket}", "key": "", "source": "" - }, - "testtestingRedis_Handler_S3Object_3AE6E27A": { - "//": { - "metadata": { - "path": "root/Default/Default/test:testing Redis/Handler/S3Object", - "uniqueId": "testtestingRedis_Handler_S3Object_3AE6E27A" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" } }, "aws_security_group": { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/resource.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/resource.w_compile_tf-aws.md index e4edf2f63a2..3c714d704d8 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/resource.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/resource.w_compile_tf-aws.md @@ -223,7 +223,7 @@ module.exports = function({ }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:test\",\"${aws_lambda_function.testtest_Handler_295107CC.arn}\"],[\"root/Default/Default/test:dependency cycles\",\"${aws_lambda_function.testdependencycycles_Handler_2DD0D3F7.arn}\"]]" + "value": "[]" } }, "provider": { @@ -278,24 +278,6 @@ module.exports = function({ }) { } }, "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testdependencycycles_Handler_IamRole_F8C18B08": { - "//": { - "metadata": { - "path": "root/Default/Default/test:dependency cycles/Handler/IamRole", - "uniqueId": "testdependencycycles_Handler_IamRole_F8C18B08" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testtest_Handler_IamRole_15693C93": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRole", - "uniqueId": "testtest_Handler_IamRole_15693C93" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" } }, "aws_iam_role_policy": { @@ -328,26 +310,6 @@ module.exports = function({ }) { }, "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"s3:PutObject*\",\"s3:Abort*\"],\"Resource\":[\"${aws_s3_bucket.BigPublisher_cloudBucket_ABF95118.arn}\",\"${aws_s3_bucket.BigPublisher_cloudBucket_ABF95118.arn}/*\"],\"Effect\":\"Allow\"}]}", "role": "${aws_iam_role.BigPublisher_cloudTopic-OnMessage-113c9059_IamRole_1067F50A.name}" - }, - "testdependencycycles_Handler_IamRolePolicy_A8D5A9DF": { - "//": { - "metadata": { - "path": "root/Default/Default/test:dependency cycles/Handler/IamRolePolicy", - "uniqueId": "testdependencycycles_Handler_IamRolePolicy_A8D5A9DF" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"s3:List*\",\"s3:GetObject*\",\"s3:GetBucket*\"],\"Resource\":[\"${aws_s3_bucket.BigPublisher_cloudBucket_ABF95118.arn}\",\"${aws_s3_bucket.BigPublisher_cloudBucket_ABF95118.arn}/*\"],\"Effect\":\"Allow\"},{\"Action\":[\"s3:PutObject*\",\"s3:Abort*\"],\"Resource\":[\"${aws_s3_bucket.BigPublisher_b2_702AC841.arn}\",\"${aws_s3_bucket.BigPublisher_b2_702AC841.arn}/*\"],\"Effect\":\"Allow\"},{\"Action\":[\"sqs:SendMessage\"],\"Resource\":[\"${aws_sqs_queue.BigPublisher_cloudQueue_2EE8871A.arn}\"],\"Effect\":\"Allow\"},{\"Action\":[\"sns:Publish\"],\"Resource\":[\"${aws_sns_topic.BigPublisher_cloudTopic_61DC7B63.arn}\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testdependencycycles_Handler_IamRole_F8C18B08.name}" - }, - "testtest_Handler_IamRolePolicy_AF0279BD": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRolePolicy", - "uniqueId": "testtest_Handler_IamRolePolicy_AF0279BD" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"s3:List*\",\"s3:PutObject*\",\"s3:Abort*\",\"s3:GetObject*\",\"s3:GetBucket*\"],\"Resource\":[\"${aws_s3_bucket.cloudBucket.arn}\",\"${aws_s3_bucket.cloudBucket.arn}/*\"],\"Effect\":\"Allow\"},{\"Action\":[\"dynamodb:UpdateItem\"],\"Resource\":[\"${aws_dynamodb_table.Bar_Foo_cloudCounter_DF879883.arn}\"],\"Effect\":\"Allow\"},{\"Action\":[\"dynamodb:GetItem\"],\"Resource\":[\"${aws_dynamodb_table.Bar_Foo_cloudCounter_DF879883.arn}\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.name}" } }, "aws_iam_role_policy_attachment": { @@ -380,26 +342,6 @@ module.exports = function({ }) { }, "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", "role": "${aws_iam_role.BigPublisher_cloudTopic-OnMessage-113c9059_IamRole_1067F50A.name}" - }, - "testdependencycycles_Handler_IamRolePolicyAttachment_2F3D0611": { - "//": { - "metadata": { - "path": "root/Default/Default/test:dependency cycles/Handler/IamRolePolicyAttachment", - "uniqueId": "testdependencycycles_Handler_IamRolePolicyAttachment_2F3D0611" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testdependencycycles_Handler_IamRole_F8C18B08.name}" - }, - "testtest_Handler_IamRolePolicyAttachment_ADF4752D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRolePolicyAttachment", - "uniqueId": "testtest_Handler_IamRolePolicyAttachment_ADF4752D" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.name}" } }, "aws_lambda_event_source_mapping": { @@ -505,70 +447,6 @@ module.exports = function({ }) { "security_group_ids": [], "subnet_ids": [] } - }, - "testdependencycycles_Handler_2DD0D3F7": { - "//": { - "metadata": { - "path": "root/Default/Default/test:dependency cycles/Handler/Default", - "uniqueId": "testdependencycycles_Handler_2DD0D3F7" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "BUCKET_NAME_584271ad": "${aws_s3_bucket.BigPublisher_b2_702AC841.bucket}", - "BUCKET_NAME_7ef741f5": "${aws_s3_bucket.BigPublisher_cloudBucket_ABF95118.bucket}", - "QUEUE_URL_b0ba884c": "${aws_sqs_queue.BigPublisher_cloudQueue_2EE8871A.url}", - "TOPIC_ARN_eb0072ec": "${aws_sns_topic.BigPublisher_cloudTopic_61DC7B63.arn}", - "WING_FUNCTION_NAME": "Handler-c893ad83", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c893ad83", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testdependencycycles_Handler_IamRole_F8C18B08.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testdependencycycles_Handler_S3Object_04D975F4.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testtest_Handler_295107CC": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/Default", - "uniqueId": "testtest_Handler_295107CC" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", - "DYNAMODB_TABLE_NAME_c7446906": "${aws_dynamodb_table.Bar_Foo_cloudCounter_DF879883.name}", - "WING_FUNCTION_NAME": "Handler-c8f4f2a1", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8f4f2a1", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testtest_Handler_S3Object_9F4E28A7.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } } }, "aws_lambda_permission": { @@ -744,28 +622,6 @@ module.exports = function({ }) { "bucket": "${aws_s3_bucket.Code.bucket}", "key": "", "source": "" - }, - "testdependencycycles_Handler_S3Object_04D975F4": { - "//": { - "metadata": { - "path": "root/Default/Default/test:dependency cycles/Handler/S3Object", - "uniqueId": "testdependencycycles_Handler_S3Object_04D975F4" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testtest_Handler_S3Object_9F4E28A7": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/S3Object", - "uniqueId": "testtest_Handler_S3Object_9F4E28A7" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" } }, "aws_sns_topic": { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/resource_as_inflight_literal.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/resource_as_inflight_literal.w_compile_tf-aws.md index 732846c3593..290b0a8f303 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/resource_as_inflight_literal.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/resource_as_inflight_literal.w_compile_tf-aws.md @@ -57,7 +57,7 @@ module.exports = function({ }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:test\",\"${aws_lambda_function.testtest_Handler_295107CC.arn}\"]]" + "value": "[]" } }, "provider": { @@ -75,15 +75,6 @@ module.exports = function({ }) { } }, "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testtest_Handler_IamRole_15693C93": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRole", - "uniqueId": "testtest_Handler_IamRole_15693C93" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" } }, "aws_iam_role_policy": { @@ -96,16 +87,6 @@ module.exports = function({ }) { }, "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", "role": "${aws_iam_role.cloudFunction_IamRole_5A4430DC.name}" - }, - "testtest_Handler_IamRolePolicy_AF0279BD": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRolePolicy", - "uniqueId": "testtest_Handler_IamRolePolicy_AF0279BD" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"lambda:InvokeFunction\"],\"Resource\":[\"${aws_lambda_function.cloudFunction.arn}\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.name}" } }, "aws_iam_role_policy_attachment": { @@ -118,16 +99,6 @@ module.exports = function({ }) { }, "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", "role": "${aws_iam_role.cloudFunction_IamRole_5A4430DC.name}" - }, - "testtest_Handler_IamRolePolicyAttachment_ADF4752D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRolePolicyAttachment", - "uniqueId": "testtest_Handler_IamRolePolicyAttachment_ADF4752D" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.name}" } }, "aws_lambda_function": { @@ -159,36 +130,6 @@ module.exports = function({ }) { "security_group_ids": [], "subnet_ids": [] } - }, - "testtest_Handler_295107CC": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/Default", - "uniqueId": "testtest_Handler_295107CC" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "FUNCTION_NAME_5bb84dfa": "${aws_lambda_function.cloudFunction.arn}", - "WING_FUNCTION_NAME": "Handler-c8f4f2a1", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8f4f2a1", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testtest_Handler_S3Object_9F4E28A7.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } } }, "aws_s3_bucket": { @@ -213,17 +154,6 @@ module.exports = function({ }) { "bucket": "${aws_s3_bucket.Code.bucket}", "key": "", "source": "" - }, - "testtest_Handler_S3Object_9F4E28A7": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/S3Object", - "uniqueId": "testtest_Handler_S3Object_9F4E28A7" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" } } } diff --git a/tools/hangar/__snapshots__/test_corpus/valid/resource_call_static.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/resource_call_static.w_compile_tf-aws.md index 19ecdbb0750..3be763f9019 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/resource_call_static.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/resource_call_static.w_compile_tf-aws.md @@ -54,7 +54,7 @@ module.exports = function({ $globalCounter }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:access cloud resource through static methods only\",\"${aws_lambda_function.testaccesscloudresourcethroughstaticmethodsonly_Handler_BC0E7705.arn}\"]]" + "value": "[]" } }, "provider": { @@ -81,97 +81,6 @@ module.exports = function({ $globalCounter }) { "hash_key": "id", "name": "wing-counter-cloud.Counter-c866f225" } - }, - "aws_iam_role": { - "testaccesscloudresourcethroughstaticmethodsonly_Handler_IamRole_1B04D5D0": { - "//": { - "metadata": { - "path": "root/Default/Default/test:access cloud resource through static methods only/Handler/IamRole", - "uniqueId": "testaccesscloudresourcethroughstaticmethodsonly_Handler_IamRole_1B04D5D0" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testaccesscloudresourcethroughstaticmethodsonly_Handler_IamRolePolicy_A6861688": { - "//": { - "metadata": { - "path": "root/Default/Default/test:access cloud resource through static methods only/Handler/IamRolePolicy", - "uniqueId": "testaccesscloudresourcethroughstaticmethodsonly_Handler_IamRolePolicy_A6861688" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"dynamodb:GetItem\"],\"Resource\":[\"${aws_dynamodb_table.cloudCounter.arn}\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testaccesscloudresourcethroughstaticmethodsonly_Handler_IamRole_1B04D5D0.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testaccesscloudresourcethroughstaticmethodsonly_Handler_IamRolePolicyAttachment_842C871D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:access cloud resource through static methods only/Handler/IamRolePolicyAttachment", - "uniqueId": "testaccesscloudresourcethroughstaticmethodsonly_Handler_IamRolePolicyAttachment_842C871D" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testaccesscloudresourcethroughstaticmethodsonly_Handler_IamRole_1B04D5D0.name}" - } - }, - "aws_lambda_function": { - "testaccesscloudresourcethroughstaticmethodsonly_Handler_BC0E7705": { - "//": { - "metadata": { - "path": "root/Default/Default/test:access cloud resource through static methods only/Handler/Default", - "uniqueId": "testaccesscloudresourcethroughstaticmethodsonly_Handler_BC0E7705" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", - "WING_FUNCTION_NAME": "Handler-c8de1ef1", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8de1ef1", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testaccesscloudresourcethroughstaticmethodsonly_Handler_IamRole_1B04D5D0.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testaccesscloudresourcethroughstaticmethodsonly_Handler_S3Object_57D98226.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testaccesscloudresourcethroughstaticmethodsonly_Handler_S3Object_57D98226": { - "//": { - "metadata": { - "path": "root/Default/Default/test:access cloud resource through static methods only/Handler/S3Object", - "uniqueId": "testaccesscloudresourcethroughstaticmethodsonly_Handler_S3Object_57D98226" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } } } } diff --git a/tools/hangar/__snapshots__/test_corpus/valid/resource_captures.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/resource_captures.w_compile_tf-aws.md index 1141ce6705b..9ca15744e2e 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/resource_captures.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/resource_captures.w_compile_tf-aws.md @@ -164,7 +164,7 @@ module.exports = function({ }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:test\",\"${aws_lambda_function.testtest_Handler_295107CC.arn}\"]]" + "value": "[]" } }, "provider": { @@ -192,86 +192,7 @@ module.exports = function({ }) { "name": "wing-counter-cloud.Counter-c87187fa" } }, - "aws_iam_role": { - "testtest_Handler_IamRole_15693C93": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRole", - "uniqueId": "testtest_Handler_IamRole_15693C93" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testtest_Handler_IamRolePolicy_AF0279BD": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRolePolicy", - "uniqueId": "testtest_Handler_IamRolePolicy_AF0279BD" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"s3:List*\",\"s3:GetObject*\",\"s3:GetBucket*\"],\"Resource\":[\"${aws_s3_bucket.cloudBucket.arn}\",\"${aws_s3_bucket.cloudBucket.arn}/*\"],\"Effect\":\"Allow\"},{\"Action\":[\"s3:List*\",\"s3:PutObject*\",\"s3:Abort*\",\"s3:GetObject*\",\"s3:GetBucket*\"],\"Resource\":[\"${aws_s3_bucket.MyResource_cloudBucket_B5E6C951.arn}\",\"${aws_s3_bucket.MyResource_cloudBucket_B5E6C951.arn}/*\"],\"Effect\":\"Allow\"},{\"Action\":[\"s3:List*\",\"s3:PutObject*\",\"s3:Abort*\",\"s3:GetObject*\",\"s3:GetBucket*\"],\"Resource\":[\"${aws_s3_bucket.MyResource_Another_First_cloudBucket_5C44A510.arn}\",\"${aws_s3_bucket.MyResource_Another_First_cloudBucket_5C44A510.arn}/*\"],\"Effect\":\"Allow\"},{\"Action\":[\"sqs:SendMessage\"],\"Resource\":[\"${aws_sqs_queue.MyResource_cloudQueue_E7A2C0F4.arn}\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testtest_Handler_IamRolePolicyAttachment_ADF4752D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRolePolicyAttachment", - "uniqueId": "testtest_Handler_IamRolePolicyAttachment_ADF4752D" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.name}" - } - }, - "aws_lambda_function": { - "testtest_Handler_295107CC": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/Default", - "uniqueId": "testtest_Handler_295107CC" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "BUCKET_NAME_51ee81c0": "${aws_s3_bucket.MyResource_cloudBucket_B5E6C951.bucket}", - "BUCKET_NAME_830bf023": "${aws_s3_bucket.MyResource_Another_First_cloudBucket_5C44A510.bucket}", - "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", - "QUEUE_URL_ea9f63d6": "${aws_sqs_queue.MyResource_cloudQueue_E7A2C0F4.url}", - "WING_FUNCTION_NAME": "Handler-c8f4f2a1", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8f4f2a1", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testtest_Handler_S3Object_9F4E28A7.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - }, "MyResource_Another_First_cloudBucket_5C44A510": { "//": { "metadata": { @@ -353,19 +274,6 @@ module.exports = function({ }) { ] } }, - "aws_s3_object": { - "testtest_Handler_S3Object_9F4E28A7": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/S3Object", - "uniqueId": "testtest_Handler_S3Object_9F4E28A7" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - }, "aws_sqs_queue": { "MyResource_cloudQueue_E7A2C0F4": { "//": { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/resource_captures_globals.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/resource_captures_globals.w_compile_tf-aws.md index 42bfe43527d..31af2cb0cf7 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/resource_captures_globals.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/resource_captures_globals.w_compile_tf-aws.md @@ -137,7 +137,7 @@ module.exports = function({ $_parentThis_localCounter, $globalCounter }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:test\",\"${aws_lambda_function.testtest_Handler_295107CC.arn}\"],[\"root/Default/Default/test:access cloud resource through static methods only\",\"${aws_lambda_function.testaccesscloudresourcethroughstaticmethodsonly_Handler_BC0E7705.arn}\"]]" + "value": "[]" } }, "provider": { @@ -191,24 +191,6 @@ module.exports = function({ $_parentThis_localCounter, $globalCounter }) { } }, "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testaccesscloudresourcethroughstaticmethodsonly_Handler_IamRole_1B04D5D0": { - "//": { - "metadata": { - "path": "root/Default/Default/test:access cloud resource through static methods only/Handler/IamRole", - "uniqueId": "testaccesscloudresourcethroughstaticmethodsonly_Handler_IamRole_1B04D5D0" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testtest_Handler_IamRole_15693C93": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRole", - "uniqueId": "testtest_Handler_IamRole_15693C93" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" } }, "aws_iam_role_policy": { @@ -221,26 +203,6 @@ module.exports = function({ $_parentThis_localCounter, $globalCounter }) { }, "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"dynamodb:UpdateItem\"],\"Resource\":[\"${aws_dynamodb_table.cloudCounter.arn}\"],\"Effect\":\"Allow\"},{\"Action\":[\"dynamodb:UpdateItem\"],\"Resource\":[\"${aws_dynamodb_table.MyResource_cloudCounter_0782991D.arn}\"],\"Effect\":\"Allow\"}]}", "role": "${aws_iam_role.MyResource_cloudTopic-OnMessage-f10eb240_IamRole_C06EFF5D.name}" - }, - "testaccesscloudresourcethroughstaticmethodsonly_Handler_IamRolePolicy_A6861688": { - "//": { - "metadata": { - "path": "root/Default/Default/test:access cloud resource through static methods only/Handler/IamRolePolicy", - "uniqueId": "testaccesscloudresourcethroughstaticmethodsonly_Handler_IamRolePolicy_A6861688" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"dynamodb:GetItem\"],\"Resource\":[\"${aws_dynamodb_table.cloudCounter.arn}\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testaccesscloudresourcethroughstaticmethodsonly_Handler_IamRole_1B04D5D0.name}" - }, - "testtest_Handler_IamRolePolicy_AF0279BD": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRolePolicy", - "uniqueId": "testtest_Handler_IamRolePolicy_AF0279BD" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"s3:PutObject*\",\"s3:Abort*\"],\"Resource\":[\"${aws_s3_bucket.cloudBucket.arn}\",\"${aws_s3_bucket.cloudBucket.arn}/*\"],\"Effect\":\"Allow\"},{\"Action\":[\"dynamodb:UpdateItem\"],\"Resource\":[\"${aws_dynamodb_table.cloudCounter.arn}\"],\"Effect\":\"Allow\"},{\"Action\":[\"dynamodb:GetItem\"],\"Resource\":[\"${aws_dynamodb_table.cloudCounter.arn}\"],\"Effect\":\"Allow\"},{\"Action\":[\"s3:PutObject*\",\"s3:Abort*\"],\"Resource\":[\"${aws_s3_bucket.Another_First_cloudBucket_DB822B7C.arn}\",\"${aws_s3_bucket.Another_First_cloudBucket_DB822B7C.arn}/*\"],\"Effect\":\"Allow\"},{\"Action\":[\"sns:Publish\"],\"Resource\":[\"${aws_sns_topic.MyResource_cloudTopic_1F3310C3.arn}\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.name}" } }, "aws_iam_role_policy_attachment": { @@ -253,26 +215,6 @@ module.exports = function({ $_parentThis_localCounter, $globalCounter }) { }, "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", "role": "${aws_iam_role.MyResource_cloudTopic-OnMessage-f10eb240_IamRole_C06EFF5D.name}" - }, - "testaccesscloudresourcethroughstaticmethodsonly_Handler_IamRolePolicyAttachment_842C871D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:access cloud resource through static methods only/Handler/IamRolePolicyAttachment", - "uniqueId": "testaccesscloudresourcethroughstaticmethodsonly_Handler_IamRolePolicyAttachment_842C871D" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testaccesscloudresourcethroughstaticmethodsonly_Handler_IamRole_1B04D5D0.name}" - }, - "testtest_Handler_IamRolePolicyAttachment_ADF4752D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRolePolicyAttachment", - "uniqueId": "testtest_Handler_IamRolePolicyAttachment_ADF4752D" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.name}" } }, "aws_lambda_function": { @@ -306,69 +248,6 @@ module.exports = function({ $_parentThis_localCounter, $globalCounter }) { "security_group_ids": [], "subnet_ids": [] } - }, - "testaccesscloudresourcethroughstaticmethodsonly_Handler_BC0E7705": { - "//": { - "metadata": { - "path": "root/Default/Default/test:access cloud resource through static methods only/Handler/Default", - "uniqueId": "testaccesscloudresourcethroughstaticmethodsonly_Handler_BC0E7705" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", - "WING_FUNCTION_NAME": "Handler-c8de1ef1", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8de1ef1", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testaccesscloudresourcethroughstaticmethodsonly_Handler_IamRole_1B04D5D0.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testaccesscloudresourcethroughstaticmethodsonly_Handler_S3Object_57D98226.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testtest_Handler_295107CC": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/Default", - "uniqueId": "testtest_Handler_295107CC" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "BUCKET_NAME_ae5b06c6": "${aws_s3_bucket.Another_First_cloudBucket_DB822B7C.bucket}", - "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", - "DYNAMODB_TABLE_NAME_49baa65c": "${aws_dynamodb_table.cloudCounter.name}", - "TOPIC_ARN_53de52bf": "${aws_sns_topic.MyResource_cloudTopic_1F3310C3.arn}", - "WING_FUNCTION_NAME": "Handler-c8f4f2a1", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8f4f2a1", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testtest_Handler_S3Object_9F4E28A7.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } } }, "aws_lambda_permission": { @@ -461,28 +340,6 @@ module.exports = function({ $_parentThis_localCounter, $globalCounter }) { "bucket": "${aws_s3_bucket.Code.bucket}", "key": "", "source": "" - }, - "testaccesscloudresourcethroughstaticmethodsonly_Handler_S3Object_57D98226": { - "//": { - "metadata": { - "path": "root/Default/Default/test:access cloud resource through static methods only/Handler/S3Object", - "uniqueId": "testaccesscloudresourcethroughstaticmethodsonly_Handler_S3Object_57D98226" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testtest_Handler_S3Object_9F4E28A7": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/S3Object", - "uniqueId": "testtest_Handler_S3Object_9F4E28A7" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" } }, "aws_sns_topic": { diff --git a/tools/hangar/__snapshots__/test_corpus/valid/shadowing.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/shadowing.w_compile_tf-aws.md index 62b6339908a..59834fce278 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/shadowing.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/shadowing.w_compile_tf-aws.md @@ -69,105 +69,13 @@ module.exports = function({ $fn }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:capture shadow interaction\",\"${aws_lambda_function.testcaptureshadowinteraction_Handler_9B768E38.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testcaptureshadowinteraction_Handler_IamRole_7A8AB102": { - "//": { - "metadata": { - "path": "root/Default/Default/test:capture shadow interaction/Handler/IamRole", - "uniqueId": "testcaptureshadowinteraction_Handler_IamRole_7A8AB102" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testcaptureshadowinteraction_Handler_IamRolePolicy_E2199BB8": { - "//": { - "metadata": { - "path": "root/Default/Default/test:capture shadow interaction/Handler/IamRolePolicy", - "uniqueId": "testcaptureshadowinteraction_Handler_IamRolePolicy_E2199BB8" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testcaptureshadowinteraction_Handler_IamRole_7A8AB102.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testcaptureshadowinteraction_Handler_IamRolePolicyAttachment_51CBDE42": { - "//": { - "metadata": { - "path": "root/Default/Default/test:capture shadow interaction/Handler/IamRolePolicyAttachment", - "uniqueId": "testcaptureshadowinteraction_Handler_IamRolePolicyAttachment_51CBDE42" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testcaptureshadowinteraction_Handler_IamRole_7A8AB102.name}" - } - }, - "aws_lambda_function": { - "testcaptureshadowinteraction_Handler_9B768E38": { - "//": { - "metadata": { - "path": "root/Default/Default/test:capture shadow interaction/Handler/Default", - "uniqueId": "testcaptureshadowinteraction_Handler_9B768E38" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8807c1f", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8807c1f", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testcaptureshadowinteraction_Handler_IamRole_7A8AB102.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testcaptureshadowinteraction_Handler_S3Object_ACDDE567.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testcaptureshadowinteraction_Handler_S3Object_ACDDE567": { - "//": { - "metadata": { - "path": "root/Default/Default/test:capture shadow interaction/Handler/S3Object", - "uniqueId": "testcaptureshadowinteraction_Handler_S3Object_ACDDE567" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/valid/statements_if.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/statements_if.w_compile_tf-aws.md index 4185a82859c..aafe3d82b2d 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/statements_if.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/statements_if.w_compile_tf-aws.md @@ -58,105 +58,13 @@ module.exports = function({ }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:test\",\"${aws_lambda_function.testtest_Handler_295107CC.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testtest_Handler_IamRole_15693C93": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRole", - "uniqueId": "testtest_Handler_IamRole_15693C93" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testtest_Handler_IamRolePolicy_AF0279BD": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRolePolicy", - "uniqueId": "testtest_Handler_IamRolePolicy_AF0279BD" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testtest_Handler_IamRolePolicyAttachment_ADF4752D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRolePolicyAttachment", - "uniqueId": "testtest_Handler_IamRolePolicyAttachment_ADF4752D" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.name}" - } - }, - "aws_lambda_function": { - "testtest_Handler_295107CC": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/Default", - "uniqueId": "testtest_Handler_295107CC" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8f4f2a1", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8f4f2a1", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testtest_Handler_S3Object_9F4E28A7.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testtest_Handler_S3Object_9F4E28A7": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/S3Object", - "uniqueId": "testtest_Handler_S3Object_9F4E28A7" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/valid/static_members.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/static_members.w_compile_tf-aws.md index 81eef5564a5..06b52786abd 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/static_members.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/static_members.w_compile_tf-aws.md @@ -64,105 +64,13 @@ module.exports = function({ }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:test\",\"${aws_lambda_function.testtest_Handler_295107CC.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testtest_Handler_IamRole_15693C93": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRole", - "uniqueId": "testtest_Handler_IamRole_15693C93" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testtest_Handler_IamRolePolicy_AF0279BD": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRolePolicy", - "uniqueId": "testtest_Handler_IamRolePolicy_AF0279BD" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testtest_Handler_IamRolePolicyAttachment_ADF4752D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/IamRolePolicyAttachment", - "uniqueId": "testtest_Handler_IamRolePolicyAttachment_ADF4752D" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.name}" - } - }, - "aws_lambda_function": { - "testtest_Handler_295107CC": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/Default", - "uniqueId": "testtest_Handler_295107CC" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8f4f2a1", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8f4f2a1", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testtest_Handler_IamRole_15693C93.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testtest_Handler_S3Object_9F4E28A7.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testtest_Handler_S3Object_9F4E28A7": { - "//": { - "metadata": { - "path": "root/Default/Default/test:test/Handler/S3Object", - "uniqueId": "testtest_Handler_S3Object_9F4E28A7" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/valid/std_string.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/std_string.w_compile_tf-aws.md index 1b38050966b..35c30ddae89 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/std_string.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/std_string.w_compile_tf-aws.md @@ -41,105 +41,13 @@ module.exports = function({ $__s1_split_______at_1__, $_s1_concat_s2__, $s1_inde }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:string\",\"${aws_lambda_function.teststring_Handler_2FEE704D.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "teststring_Handler_IamRole_4BEC53AF": { - "//": { - "metadata": { - "path": "root/Default/Default/test:string/Handler/IamRole", - "uniqueId": "teststring_Handler_IamRole_4BEC53AF" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "teststring_Handler_IamRolePolicy_A9C266F9": { - "//": { - "metadata": { - "path": "root/Default/Default/test:string/Handler/IamRolePolicy", - "uniqueId": "teststring_Handler_IamRolePolicy_A9C266F9" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.teststring_Handler_IamRole_4BEC53AF.name}" - } - }, - "aws_iam_role_policy_attachment": { - "teststring_Handler_IamRolePolicyAttachment_5EFE3004": { - "//": { - "metadata": { - "path": "root/Default/Default/test:string/Handler/IamRolePolicyAttachment", - "uniqueId": "teststring_Handler_IamRolePolicyAttachment_5EFE3004" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.teststring_Handler_IamRole_4BEC53AF.name}" - } - }, - "aws_lambda_function": { - "teststring_Handler_2FEE704D": { - "//": { - "metadata": { - "path": "root/Default/Default/test:string/Handler/Default", - "uniqueId": "teststring_Handler_2FEE704D" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8a1f7f0", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8a1f7f0", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.teststring_Handler_IamRole_4BEC53AF.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.teststring_Handler_S3Object_F47B31DA.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "teststring_Handler_S3Object_F47B31DA": { - "//": { - "metadata": { - "path": "root/Default/Default/test:string/Handler/S3Object", - "uniqueId": "teststring_Handler_S3Object_F47B31DA" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/valid/struct_from_json.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/struct_from_json.w_compile_tf-aws.md index e000a2c409d..c2272075dc1 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/struct_from_json.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/struct_from_json.w_compile_tf-aws.md @@ -450,174 +450,13 @@ module.exports = function({ $Student, $jStudent1 }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:flight school student :)\",\"${aws_lambda_function.testflightschoolstudent_Handler_8BE7AA78.arn}\"],[\"root/Default/Default/test:lifting a student\",\"${aws_lambda_function.testliftingastudent_Handler_30A43B55.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testflightschoolstudent_Handler_IamRole_5F1C920A": { - "//": { - "metadata": { - "path": "root/Default/Default/test:flight school student :)/Handler/IamRole", - "uniqueId": "testflightschoolstudent_Handler_IamRole_5F1C920A" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testliftingastudent_Handler_IamRole_66279A05": { - "//": { - "metadata": { - "path": "root/Default/Default/test:lifting a student/Handler/IamRole", - "uniqueId": "testliftingastudent_Handler_IamRole_66279A05" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testflightschoolstudent_Handler_IamRolePolicy_942EA77E": { - "//": { - "metadata": { - "path": "root/Default/Default/test:flight school student :)/Handler/IamRolePolicy", - "uniqueId": "testflightschoolstudent_Handler_IamRolePolicy_942EA77E" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testflightschoolstudent_Handler_IamRole_5F1C920A.name}" - }, - "testliftingastudent_Handler_IamRolePolicy_13D30A25": { - "//": { - "metadata": { - "path": "root/Default/Default/test:lifting a student/Handler/IamRolePolicy", - "uniqueId": "testliftingastudent_Handler_IamRolePolicy_13D30A25" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testliftingastudent_Handler_IamRole_66279A05.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testflightschoolstudent_Handler_IamRolePolicyAttachment_57666E60": { - "//": { - "metadata": { - "path": "root/Default/Default/test:flight school student :)/Handler/IamRolePolicyAttachment", - "uniqueId": "testflightschoolstudent_Handler_IamRolePolicyAttachment_57666E60" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testflightschoolstudent_Handler_IamRole_5F1C920A.name}" - }, - "testliftingastudent_Handler_IamRolePolicyAttachment_4843B297": { - "//": { - "metadata": { - "path": "root/Default/Default/test:lifting a student/Handler/IamRolePolicyAttachment", - "uniqueId": "testliftingastudent_Handler_IamRolePolicyAttachment_4843B297" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testliftingastudent_Handler_IamRole_66279A05.name}" - } - }, - "aws_lambda_function": { - "testflightschoolstudent_Handler_8BE7AA78": { - "//": { - "metadata": { - "path": "root/Default/Default/test:flight school student :)/Handler/Default", - "uniqueId": "testflightschoolstudent_Handler_8BE7AA78" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c85c011b", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c85c011b", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testflightschoolstudent_Handler_IamRole_5F1C920A.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testflightschoolstudent_Handler_S3Object_1D59FBCC.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testliftingastudent_Handler_30A43B55": { - "//": { - "metadata": { - "path": "root/Default/Default/test:lifting a student/Handler/Default", - "uniqueId": "testliftingastudent_Handler_30A43B55" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c82f8661", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c82f8661", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testliftingastudent_Handler_IamRole_66279A05.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testliftingastudent_Handler_S3Object_51C773C7.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testflightschoolstudent_Handler_S3Object_1D59FBCC": { - "//": { - "metadata": { - "path": "root/Default/Default/test:flight school student :)/Handler/S3Object", - "uniqueId": "testflightschoolstudent_Handler_S3Object_1D59FBCC" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testliftingastudent_Handler_S3Object_51C773C7": { - "//": { - "metadata": { - "path": "root/Default/Default/test:lifting a student/Handler/S3Object", - "uniqueId": "testliftingastudent_Handler_S3Object_51C773C7" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/valid/structs.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/structs.w_compile_tf-aws.md index 7f7670eb191..6c4cd44fe08 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/structs.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/structs.w_compile_tf-aws.md @@ -261,105 +261,13 @@ module.exports = function(stdStruct) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:struct definitions are phase independant\",\"${aws_lambda_function.teststructdefinitionsarephaseindependant_Handler_F8CACE9E.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "teststructdefinitionsarephaseindependant_Handler_IamRole_4609E5D7": { - "//": { - "metadata": { - "path": "root/Default/Default/test:struct definitions are phase independant/Handler/IamRole", - "uniqueId": "teststructdefinitionsarephaseindependant_Handler_IamRole_4609E5D7" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "teststructdefinitionsarephaseindependant_Handler_IamRolePolicy_25856004": { - "//": { - "metadata": { - "path": "root/Default/Default/test:struct definitions are phase independant/Handler/IamRolePolicy", - "uniqueId": "teststructdefinitionsarephaseindependant_Handler_IamRolePolicy_25856004" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.teststructdefinitionsarephaseindependant_Handler_IamRole_4609E5D7.name}" - } - }, - "aws_iam_role_policy_attachment": { - "teststructdefinitionsarephaseindependant_Handler_IamRolePolicyAttachment_E9A6A66B": { - "//": { - "metadata": { - "path": "root/Default/Default/test:struct definitions are phase independant/Handler/IamRolePolicyAttachment", - "uniqueId": "teststructdefinitionsarephaseindependant_Handler_IamRolePolicyAttachment_E9A6A66B" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.teststructdefinitionsarephaseindependant_Handler_IamRole_4609E5D7.name}" - } - }, - "aws_lambda_function": { - "teststructdefinitionsarephaseindependant_Handler_F8CACE9E": { - "//": { - "metadata": { - "path": "root/Default/Default/test:struct definitions are phase independant/Handler/Default", - "uniqueId": "teststructdefinitionsarephaseindependant_Handler_F8CACE9E" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8158c42", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8158c42", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.teststructdefinitionsarephaseindependant_Handler_IamRole_4609E5D7.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.teststructdefinitionsarephaseindependant_Handler_S3Object_9394B2A7.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "teststructdefinitionsarephaseindependant_Handler_S3Object_9394B2A7": { - "//": { - "metadata": { - "path": "root/Default/Default/test:struct definitions are phase independant/Handler/S3Object", - "uniqueId": "teststructdefinitionsarephaseindependant_Handler_S3Object_9394B2A7" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/valid/super_call.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/super_call.w_compile_tf-aws.md index 512aab2c956..caefbf32a36 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/super_call.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/super_call.w_compile_tf-aws.md @@ -180,7 +180,7 @@ module.exports = function({ $InflightA }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:super call inflight\",\"${aws_lambda_function.testsupercallinflight_Handler_8BA833E3.arn}\"],[\"root/Default/Default/test:super call sets binding permissions\",\"${aws_lambda_function.testsupercallsetsbindingpermissions_Handler_094D9398.arn}\"]]" + "value": "[]" } }, "provider": { @@ -189,141 +189,7 @@ module.exports = function({ $InflightA }) { ] }, "resource": { - "aws_iam_role": { - "testsupercallinflight_Handler_IamRole_BFD5186E": { - "//": { - "metadata": { - "path": "root/Default/Default/test:super call inflight/Handler/IamRole", - "uniqueId": "testsupercallinflight_Handler_IamRole_BFD5186E" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testsupercallsetsbindingpermissions_Handler_IamRole_64C69931": { - "//": { - "metadata": { - "path": "root/Default/Default/test:super call sets binding permissions/Handler/IamRole", - "uniqueId": "testsupercallsetsbindingpermissions_Handler_IamRole_64C69931" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testsupercallinflight_Handler_IamRolePolicy_657A4ED2": { - "//": { - "metadata": { - "path": "root/Default/Default/test:super call inflight/Handler/IamRolePolicy", - "uniqueId": "testsupercallinflight_Handler_IamRolePolicy_657A4ED2" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testsupercallinflight_Handler_IamRole_BFD5186E.name}" - }, - "testsupercallsetsbindingpermissions_Handler_IamRolePolicy_58870805": { - "//": { - "metadata": { - "path": "root/Default/Default/test:super call sets binding permissions/Handler/IamRolePolicy", - "uniqueId": "testsupercallsetsbindingpermissions_Handler_IamRolePolicy_58870805" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"s3:List*\",\"s3:PutObject*\",\"s3:Abort*\",\"s3:GetObject*\",\"s3:GetBucket*\"],\"Resource\":[\"${aws_s3_bucket.cloudBucket.arn}\",\"${aws_s3_bucket.cloudBucket.arn}/*\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testsupercallsetsbindingpermissions_Handler_IamRole_64C69931.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testsupercallinflight_Handler_IamRolePolicyAttachment_74E493C1": { - "//": { - "metadata": { - "path": "root/Default/Default/test:super call inflight/Handler/IamRolePolicyAttachment", - "uniqueId": "testsupercallinflight_Handler_IamRolePolicyAttachment_74E493C1" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testsupercallinflight_Handler_IamRole_BFD5186E.name}" - }, - "testsupercallsetsbindingpermissions_Handler_IamRolePolicyAttachment_FB4798F3": { - "//": { - "metadata": { - "path": "root/Default/Default/test:super call sets binding permissions/Handler/IamRolePolicyAttachment", - "uniqueId": "testsupercallsetsbindingpermissions_Handler_IamRolePolicyAttachment_FB4798F3" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testsupercallsetsbindingpermissions_Handler_IamRole_64C69931.name}" - } - }, - "aws_lambda_function": { - "testsupercallinflight_Handler_8BA833E3": { - "//": { - "metadata": { - "path": "root/Default/Default/test:super call inflight/Handler/Default", - "uniqueId": "testsupercallinflight_Handler_8BA833E3" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c83c6423", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c83c6423", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testsupercallinflight_Handler_IamRole_BFD5186E.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testsupercallinflight_Handler_S3Object_83823694.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testsupercallsetsbindingpermissions_Handler_094D9398": { - "//": { - "metadata": { - "path": "root/Default/Default/test:super call sets binding permissions/Handler/Default", - "uniqueId": "testsupercallsetsbindingpermissions_Handler_094D9398" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", - "WING_FUNCTION_NAME": "Handler-c8c1dd55", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8c1dd55", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testsupercallsetsbindingpermissions_Handler_IamRole_64C69931.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testsupercallsetsbindingpermissions_Handler_S3Object_6D280664.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - }, "cloudBucket": { "//": { "metadata": { @@ -352,30 +218,6 @@ module.exports = function({ $InflightA }) { } ] } - }, - "aws_s3_object": { - "testsupercallinflight_Handler_S3Object_83823694": { - "//": { - "metadata": { - "path": "root/Default/Default/test:super call inflight/Handler/S3Object", - "uniqueId": "testsupercallinflight_Handler_S3Object_83823694" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testsupercallsetsbindingpermissions_Handler_S3Object_6D280664": { - "//": { - "metadata": { - "path": "root/Default/Default/test:super call sets binding permissions/Handler/S3Object", - "uniqueId": "testsupercallsetsbindingpermissions_Handler_S3Object_6D280664" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } } } } diff --git a/tools/hangar/__snapshots__/test_corpus/valid/symbol_shadow.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/symbol_shadow.w_compile_tf-aws.md index 4e20e984c0f..fd0001709a3 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/symbol_shadow.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/symbol_shadow.w_compile_tf-aws.md @@ -106,312 +106,13 @@ module.exports = function({ }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:inflight nested should not capture the shadowed var\",\"${aws_lambda_function.testinflightnestedshouldnotcapturetheshadowedvar_Handler_B6B64A92.arn}\"],[\"root/Default/Default/A/test:inflight in resource should capture the right scoped var\",\"${aws_lambda_function.A_testinflightinresourceshouldcapturetherightscopedvar_Handler_B24941AC.arn}\"],[\"root/Default/Default/test:inflight on top should capture top\",\"${aws_lambda_function.testinflightontopshouldcapturetop_Handler_2FA69946.arn}\"],[\"root/Default/Default/test:insideInflight should capture the right scope\",\"${aws_lambda_function.testinsideInflightshouldcapturetherightscope_Handler_B6CD7A27.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "A_testinflightinresourceshouldcapturetherightscopedvar_Handler_IamRole_1B8C5D92": { - "//": { - "metadata": { - "path": "root/Default/Default/A/test:inflight in resource should capture the right scoped var/Handler/IamRole", - "uniqueId": "A_testinflightinresourceshouldcapturetherightscopedvar_Handler_IamRole_1B8C5D92" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testinflightnestedshouldnotcapturetheshadowedvar_Handler_IamRole_4E805AD6": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight nested should not capture the shadowed var/Handler/IamRole", - "uniqueId": "testinflightnestedshouldnotcapturetheshadowedvar_Handler_IamRole_4E805AD6" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testinflightontopshouldcapturetop_Handler_IamRole_3F6ED89E": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight on top should capture top/Handler/IamRole", - "uniqueId": "testinflightontopshouldcapturetop_Handler_IamRole_3F6ED89E" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testinsideInflightshouldcapturetherightscope_Handler_IamRole_68806A2A": { - "//": { - "metadata": { - "path": "root/Default/Default/test:insideInflight should capture the right scope/Handler/IamRole", - "uniqueId": "testinsideInflightshouldcapturetherightscope_Handler_IamRole_68806A2A" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "A_testinflightinresourceshouldcapturetherightscopedvar_Handler_IamRolePolicy_7ED77FBA": { - "//": { - "metadata": { - "path": "root/Default/Default/A/test:inflight in resource should capture the right scoped var/Handler/IamRolePolicy", - "uniqueId": "A_testinflightinresourceshouldcapturetherightscopedvar_Handler_IamRolePolicy_7ED77FBA" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.A_testinflightinresourceshouldcapturetherightscopedvar_Handler_IamRole_1B8C5D92.name}" - }, - "testinflightnestedshouldnotcapturetheshadowedvar_Handler_IamRolePolicy_D1F0410E": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight nested should not capture the shadowed var/Handler/IamRolePolicy", - "uniqueId": "testinflightnestedshouldnotcapturetheshadowedvar_Handler_IamRolePolicy_D1F0410E" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testinflightnestedshouldnotcapturetheshadowedvar_Handler_IamRole_4E805AD6.name}" - }, - "testinflightontopshouldcapturetop_Handler_IamRolePolicy_CE46FF27": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight on top should capture top/Handler/IamRolePolicy", - "uniqueId": "testinflightontopshouldcapturetop_Handler_IamRolePolicy_CE46FF27" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testinflightontopshouldcapturetop_Handler_IamRole_3F6ED89E.name}" - }, - "testinsideInflightshouldcapturetherightscope_Handler_IamRolePolicy_8063B708": { - "//": { - "metadata": { - "path": "root/Default/Default/test:insideInflight should capture the right scope/Handler/IamRolePolicy", - "uniqueId": "testinsideInflightshouldcapturetherightscope_Handler_IamRolePolicy_8063B708" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testinsideInflightshouldcapturetherightscope_Handler_IamRole_68806A2A.name}" - } - }, - "aws_iam_role_policy_attachment": { - "A_testinflightinresourceshouldcapturetherightscopedvar_Handler_IamRolePolicyAttachment_88515E85": { - "//": { - "metadata": { - "path": "root/Default/Default/A/test:inflight in resource should capture the right scoped var/Handler/IamRolePolicyAttachment", - "uniqueId": "A_testinflightinresourceshouldcapturetherightscopedvar_Handler_IamRolePolicyAttachment_88515E85" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.A_testinflightinresourceshouldcapturetherightscopedvar_Handler_IamRole_1B8C5D92.name}" - }, - "testinflightnestedshouldnotcapturetheshadowedvar_Handler_IamRolePolicyAttachment_275CF4CA": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight nested should not capture the shadowed var/Handler/IamRolePolicyAttachment", - "uniqueId": "testinflightnestedshouldnotcapturetheshadowedvar_Handler_IamRolePolicyAttachment_275CF4CA" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinflightnestedshouldnotcapturetheshadowedvar_Handler_IamRole_4E805AD6.name}" - }, - "testinflightontopshouldcapturetop_Handler_IamRolePolicyAttachment_06A23599": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight on top should capture top/Handler/IamRolePolicyAttachment", - "uniqueId": "testinflightontopshouldcapturetop_Handler_IamRolePolicyAttachment_06A23599" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinflightontopshouldcapturetop_Handler_IamRole_3F6ED89E.name}" - }, - "testinsideInflightshouldcapturetherightscope_Handler_IamRolePolicyAttachment_BC3E6BBC": { - "//": { - "metadata": { - "path": "root/Default/Default/test:insideInflight should capture the right scope/Handler/IamRolePolicyAttachment", - "uniqueId": "testinsideInflightshouldcapturetherightscope_Handler_IamRolePolicyAttachment_BC3E6BBC" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testinsideInflightshouldcapturetherightscope_Handler_IamRole_68806A2A.name}" - } - }, - "aws_lambda_function": { - "A_testinflightinresourceshouldcapturetherightscopedvar_Handler_B24941AC": { - "//": { - "metadata": { - "path": "root/Default/Default/A/test:inflight in resource should capture the right scoped var/Handler/Default", - "uniqueId": "A_testinflightinresourceshouldcapturetherightscopedvar_Handler_B24941AC" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c83cf74f", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c83cf74f", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.A_testinflightinresourceshouldcapturetherightscopedvar_Handler_IamRole_1B8C5D92.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.A_testinflightinresourceshouldcapturetherightscopedvar_Handler_S3Object_4A934D35.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testinflightnestedshouldnotcapturetheshadowedvar_Handler_B6B64A92": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight nested should not capture the shadowed var/Handler/Default", - "uniqueId": "testinflightnestedshouldnotcapturetheshadowedvar_Handler_B6B64A92" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c85de384", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c85de384", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinflightnestedshouldnotcapturetheshadowedvar_Handler_IamRole_4E805AD6.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinflightnestedshouldnotcapturetheshadowedvar_Handler_S3Object_0B718409.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testinflightontopshouldcapturetop_Handler_2FA69946": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight on top should capture top/Handler/Default", - "uniqueId": "testinflightontopshouldcapturetop_Handler_2FA69946" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c859340a", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c859340a", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinflightontopshouldcapturetop_Handler_IamRole_3F6ED89E.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinflightontopshouldcapturetop_Handler_S3Object_BEFBAAC0.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testinsideInflightshouldcapturetherightscope_Handler_B6CD7A27": { - "//": { - "metadata": { - "path": "root/Default/Default/test:insideInflight should capture the right scope/Handler/Default", - "uniqueId": "testinsideInflightshouldcapturetherightscope_Handler_B6CD7A27" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c83ad462", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c83ad462", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testinsideInflightshouldcapturetherightscope_Handler_IamRole_68806A2A.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testinsideInflightshouldcapturetherightscope_Handler_S3Object_C92529CD.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "A_testinflightinresourceshouldcapturetherightscopedvar_Handler_S3Object_4A934D35": { - "//": { - "metadata": { - "path": "root/Default/Default/A/test:inflight in resource should capture the right scoped var/Handler/S3Object", - "uniqueId": "A_testinflightinresourceshouldcapturetherightscopedvar_Handler_S3Object_4A934D35" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testinflightnestedshouldnotcapturetheshadowedvar_Handler_S3Object_0B718409": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight nested should not capture the shadowed var/Handler/S3Object", - "uniqueId": "testinflightnestedshouldnotcapturetheshadowedvar_Handler_S3Object_0B718409" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testinflightontopshouldcapturetop_Handler_S3Object_BEFBAAC0": { - "//": { - "metadata": { - "path": "root/Default/Default/test:inflight on top should capture top/Handler/S3Object", - "uniqueId": "testinflightontopshouldcapturetop_Handler_S3Object_BEFBAAC0" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testinsideInflightshouldcapturetherightscope_Handler_S3Object_C92529CD": { - "//": { - "metadata": { - "path": "root/Default/Default/test:insideInflight should capture the right scope/Handler/S3Object", - "uniqueId": "testinsideInflightshouldcapturetherightscope_Handler_S3Object_C92529CD" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/valid/test_bucket.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/test_bucket.w_compile_tf-aws.md index 5da2834ed20..5d20ea1a0c0 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/test_bucket.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/test_bucket.w_compile_tf-aws.md @@ -60,7 +60,7 @@ module.exports = function({ $b }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:put\",\"${aws_lambda_function.testput_Handler_724F92D5.arn}\"],[\"root/Default/Default/test:get\",\"${aws_lambda_function.testget_Handler_67989B36.arn}\"]]" + "value": "[]" } }, "provider": { @@ -69,142 +69,7 @@ module.exports = function({ $b }) { ] }, "resource": { - "aws_iam_role": { - "testget_Handler_IamRole_AA97A8BA": { - "//": { - "metadata": { - "path": "root/Default/Default/test:get/Handler/IamRole", - "uniqueId": "testget_Handler_IamRole_AA97A8BA" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testput_Handler_IamRole_0914AA2F": { - "//": { - "metadata": { - "path": "root/Default/Default/test:put/Handler/IamRole", - "uniqueId": "testput_Handler_IamRole_0914AA2F" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testget_Handler_IamRolePolicy_393F6CAD": { - "//": { - "metadata": { - "path": "root/Default/Default/test:get/Handler/IamRolePolicy", - "uniqueId": "testget_Handler_IamRolePolicy_393F6CAD" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"s3:List*\",\"s3:PutObject*\",\"s3:Abort*\",\"s3:GetObject*\",\"s3:GetBucket*\"],\"Resource\":[\"${aws_s3_bucket.cloudBucket.arn}\",\"${aws_s3_bucket.cloudBucket.arn}/*\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testget_Handler_IamRole_AA97A8BA.name}" - }, - "testput_Handler_IamRolePolicy_CB5C72C0": { - "//": { - "metadata": { - "path": "root/Default/Default/test:put/Handler/IamRolePolicy", - "uniqueId": "testput_Handler_IamRolePolicy_CB5C72C0" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"s3:List*\",\"s3:PutObject*\",\"s3:Abort*\",\"s3:GetObject*\",\"s3:GetBucket*\"],\"Resource\":[\"${aws_s3_bucket.cloudBucket.arn}\",\"${aws_s3_bucket.cloudBucket.arn}/*\"],\"Effect\":\"Allow\"}]}", - "role": "${aws_iam_role.testput_Handler_IamRole_0914AA2F.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testget_Handler_IamRolePolicyAttachment_CF094E80": { - "//": { - "metadata": { - "path": "root/Default/Default/test:get/Handler/IamRolePolicyAttachment", - "uniqueId": "testget_Handler_IamRolePolicyAttachment_CF094E80" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testget_Handler_IamRole_AA97A8BA.name}" - }, - "testput_Handler_IamRolePolicyAttachment_B3A1DDC2": { - "//": { - "metadata": { - "path": "root/Default/Default/test:put/Handler/IamRolePolicyAttachment", - "uniqueId": "testput_Handler_IamRolePolicyAttachment_B3A1DDC2" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testput_Handler_IamRole_0914AA2F.name}" - } - }, - "aws_lambda_function": { - "testget_Handler_67989B36": { - "//": { - "metadata": { - "path": "root/Default/Default/test:get/Handler/Default", - "uniqueId": "testget_Handler_67989B36" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", - "WING_FUNCTION_NAME": "Handler-c89a33bd", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c89a33bd", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testget_Handler_IamRole_AA97A8BA.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testget_Handler_S3Object_991F0EC4.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testput_Handler_724F92D5": { - "//": { - "metadata": { - "path": "root/Default/Default/test:put/Handler/Default", - "uniqueId": "testput_Handler_724F92D5" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "BUCKET_NAME_d755b447": "${aws_s3_bucket.cloudBucket.bucket}", - "WING_FUNCTION_NAME": "Handler-c8a253bd", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8a253bd", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testput_Handler_IamRole_0914AA2F.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testput_Handler_S3Object_920402A2.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - }, "cloudBucket": { "//": { "metadata": { @@ -233,30 +98,6 @@ module.exports = function({ $b }) { } ] } - }, - "aws_s3_object": { - "testget_Handler_S3Object_991F0EC4": { - "//": { - "metadata": { - "path": "root/Default/Default/test:get/Handler/S3Object", - "uniqueId": "testget_Handler_S3Object_991F0EC4" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testput_Handler_S3Object_920402A2": { - "//": { - "metadata": { - "path": "root/Default/Default/test:put/Handler/S3Object", - "uniqueId": "testput_Handler_S3Object_920402A2" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } } } } diff --git a/tools/hangar/__snapshots__/test_corpus/valid/test_without_bring.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/test_without_bring.w_compile_tf-aws.md index 36d40bb1e56..188346f82ad 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/test_without_bring.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/test_without_bring.w_compile_tf-aws.md @@ -39,105 +39,13 @@ module.exports = function({ }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:hello test\",\"${aws_lambda_function.testhellotest_Handler_388AC021.arn}\"]]" + "value": "[]" } }, "provider": { "aws": [ {} ] - }, - "resource": { - "aws_iam_role": { - "testhellotest_Handler_IamRole_CAF7D6BC": { - "//": { - "metadata": { - "path": "root/Default/Default/test:hello test/Handler/IamRole", - "uniqueId": "testhellotest_Handler_IamRole_CAF7D6BC" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - } - }, - "aws_iam_role_policy": { - "testhellotest_Handler_IamRolePolicy_CD1018B8": { - "//": { - "metadata": { - "path": "root/Default/Default/test:hello test/Handler/IamRolePolicy", - "uniqueId": "testhellotest_Handler_IamRolePolicy_CD1018B8" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testhellotest_Handler_IamRole_CAF7D6BC.name}" - } - }, - "aws_iam_role_policy_attachment": { - "testhellotest_Handler_IamRolePolicyAttachment_E69D859C": { - "//": { - "metadata": { - "path": "root/Default/Default/test:hello test/Handler/IamRolePolicyAttachment", - "uniqueId": "testhellotest_Handler_IamRolePolicyAttachment_E69D859C" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testhellotest_Handler_IamRole_CAF7D6BC.name}" - } - }, - "aws_lambda_function": { - "testhellotest_Handler_388AC021": { - "//": { - "metadata": { - "path": "root/Default/Default/test:hello test/Handler/Default", - "uniqueId": "testhellotest_Handler_388AC021" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8123dd7", - "WING_TARGET": "tf-aws" - } - }, - "function_name": "Handler-c8123dd7", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testhellotest_Handler_IamRole_CAF7D6BC.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testhellotest_Handler_S3Object_57438463.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - } - }, - "aws_s3_bucket": { - "Code": { - "//": { - "metadata": { - "path": "root/Default/Code", - "uniqueId": "Code" - } - }, - "bucket_prefix": "code-c84a50b1-" - } - }, - "aws_s3_object": { - "testhellotest_Handler_S3Object_57438463": { - "//": { - "metadata": { - "path": "root/Default/Default/test:hello test/Handler/S3Object", - "uniqueId": "testhellotest_Handler_S3Object_57438463" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - } - } } } ``` diff --git a/tools/hangar/__snapshots__/test_corpus/valid/website_with_api.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/valid/website_with_api.w_compile_tf-aws.md index c95419f312e..6f33cd9d9ad 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/website_with_api.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/website_with_api.w_compile_tf-aws.md @@ -197,7 +197,7 @@ module.exports = function({ }) { }, "output": { "WING_TEST_RUNNER_FUNCTION_ARNS": { - "value": "[[\"root/Default/Default/test:GET --users\",\"${aws_lambda_function.testGET--users_Handler_5E592AA6.arn}\"],[\"root/Default/Default/test:OPTIONS --users\",\"${aws_lambda_function.testOPTIONS--users_Handler_01361C41.arn}\"]]" + "value": "[]" } }, "provider": { @@ -350,24 +350,6 @@ module.exports = function({ }) { } }, "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testGET--users_Handler_IamRole_3C6B1A52": { - "//": { - "metadata": { - "path": "root/Default/Default/test:GET --users/Handler/IamRole", - "uniqueId": "testGET--users_Handler_IamRole_3C6B1A52" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" - }, - "testOPTIONS--users_Handler_IamRole_F9362AB0": { - "//": { - "metadata": { - "path": "root/Default/Default/test:OPTIONS --users/Handler/IamRole", - "uniqueId": "testOPTIONS--users_Handler_IamRole_F9362AB0" - } - }, - "assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":\"sts:AssumeRole\",\"Principal\":{\"Service\":\"lambda.amazonaws.com\"},\"Effect\":\"Allow\"}]}" } }, "aws_iam_role_policy": { @@ -390,26 +372,6 @@ module.exports = function({ }) { }, "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Action\":[\"dynamodb:Scan\"],\"Resource\":[\"${aws_dynamodb_table.exTable.arn}\"],\"Effect\":\"Allow\"}]}", "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.name}" - }, - "testGET--users_Handler_IamRolePolicy_70F076F2": { - "//": { - "metadata": { - "path": "root/Default/Default/test:GET --users/Handler/IamRolePolicy", - "uniqueId": "testGET--users_Handler_IamRolePolicy_70F076F2" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testGET--users_Handler_IamRole_3C6B1A52.name}" - }, - "testOPTIONS--users_Handler_IamRolePolicy_E1FFA7C9": { - "//": { - "metadata": { - "path": "root/Default/Default/test:OPTIONS --users/Handler/IamRolePolicy", - "uniqueId": "testOPTIONS--users_Handler_IamRolePolicy_E1FFA7C9" - } - }, - "policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":\"none:null\",\"Resource\":\"*\"}]}", - "role": "${aws_iam_role.testOPTIONS--users_Handler_IamRole_F9362AB0.name}" } }, "aws_iam_role_policy_attachment": { @@ -432,26 +394,6 @@ module.exports = function({ }) { }, "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", "role": "${aws_iam_role.cloudApi_cloudApi-OnRequest-cdafee6e_IamRole_4382C442.name}" - }, - "testGET--users_Handler_IamRolePolicyAttachment_CE57C035": { - "//": { - "metadata": { - "path": "root/Default/Default/test:GET --users/Handler/IamRolePolicyAttachment", - "uniqueId": "testGET--users_Handler_IamRolePolicyAttachment_CE57C035" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testGET--users_Handler_IamRole_3C6B1A52.name}" - }, - "testOPTIONS--users_Handler_IamRolePolicyAttachment_41F75288": { - "//": { - "metadata": { - "path": "root/Default/Default/test:OPTIONS --users/Handler/IamRolePolicyAttachment", - "uniqueId": "testOPTIONS--users_Handler_IamRolePolicyAttachment_41F75288" - } - }, - "policy_arn": "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole", - "role": "${aws_iam_role.testOPTIONS--users_Handler_IamRole_F9362AB0.name}" } }, "aws_lambda_function": { @@ -518,66 +460,6 @@ module.exports = function({ }) { "security_group_ids": [], "subnet_ids": [] } - }, - "testGET--users_Handler_5E592AA6": { - "//": { - "metadata": { - "path": "root/Default/Default/test:GET --users/Handler/Default", - "uniqueId": "testGET--users_Handler_5E592AA6" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c86bda55", - "WING_TARGET": "tf-aws", - "WING_TOKEN_TFTOKEN_TOKEN_8": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" - } - }, - "function_name": "Handler-c86bda55", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testGET--users_Handler_IamRole_3C6B1A52.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testGET--users_Handler_S3Object_8248DE4B.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } - }, - "testOPTIONS--users_Handler_01361C41": { - "//": { - "metadata": { - "path": "root/Default/Default/test:OPTIONS --users/Handler/Default", - "uniqueId": "testOPTIONS--users_Handler_01361C41" - } - }, - "architectures": [ - "arm64" - ], - "environment": { - "variables": { - "WING_FUNCTION_NAME": "Handler-c8b7642e", - "WING_TARGET": "tf-aws", - "WING_TOKEN_TFTOKEN_TOKEN_8": "${jsonencode(aws_api_gateway_stage.cloudApi_api_stage_BBB283E4.invoke_url)}" - } - }, - "function_name": "Handler-c8b7642e", - "handler": "index.handler", - "publish": true, - "role": "${aws_iam_role.testOPTIONS--users_Handler_IamRole_F9362AB0.arn}", - "runtime": "nodejs18.x", - "s3_bucket": "${aws_s3_bucket.Code.bucket}", - "s3_key": "${aws_s3_object.testOPTIONS--users_Handler_S3Object_C0C4A75C.key}", - "timeout": 30, - "vpc_config": { - "security_group_ids": [], - "subnet_ids": [] - } } }, "aws_lambda_permission": { @@ -726,28 +608,6 @@ module.exports = function({ }) { "aws_s3_bucket.cloudWebsite_WebsiteBucket_EB03D355" ], "key": "config.json" - }, - "testGET--users_Handler_S3Object_8248DE4B": { - "//": { - "metadata": { - "path": "root/Default/Default/test:GET --users/Handler/S3Object", - "uniqueId": "testGET--users_Handler_S3Object_8248DE4B" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" - }, - "testOPTIONS--users_Handler_S3Object_C0C4A75C": { - "//": { - "metadata": { - "path": "root/Default/Default/test:OPTIONS --users/Handler/S3Object", - "uniqueId": "testOPTIONS--users_Handler_S3Object_C0C4A75C" - } - }, - "bucket": "${aws_s3_bucket.Code.bucket}", - "key": "", - "source": "" } } } diff --git a/tools/hangar/__snapshots__/tree_json.ts.snap b/tools/hangar/__snapshots__/tree_json.ts.snap index 514acf16ef8..e246ce0f1bd 100644 --- a/tools/hangar/__snapshots__/tree_json.ts.snap +++ b/tools/hangar/__snapshots__/tree_json.ts.snap @@ -620,70 +620,6 @@ exports[`tree.json for an app with many resources 1`] = ` "path": "root/Default/Default/cloud.Bucket", }, "test:dependency cycles": { - "children": { - "Handler": { - "children": { - "Asset": { - "constructInfo": { - "fqn": "cdktf.TerraformAsset", - "version": "0.17.0", - }, - "id": "Asset", - "path": "root/Default/Default/test:dependency cycles/Handler/Asset", - }, - "Default": { - "constructInfo": { - "fqn": "cdktf.TerraformResource", - "version": "0.17.0", - }, - "id": "Default", - "path": "root/Default/Default/test:dependency cycles/Handler/Default", - }, - "IamRole": { - "constructInfo": { - "fqn": "cdktf.TerraformResource", - "version": "0.17.0", - }, - "id": "IamRole", - "path": "root/Default/Default/test:dependency cycles/Handler/IamRole", - }, - "IamRolePolicy": { - "constructInfo": { - "fqn": "cdktf.TerraformResource", - "version": "0.17.0", - }, - "id": "IamRolePolicy", - "path": "root/Default/Default/test:dependency cycles/Handler/IamRolePolicy", - }, - "IamRolePolicyAttachment": { - "constructInfo": { - "fqn": "cdktf.TerraformResource", - "version": "0.17.0", - }, - "id": "IamRolePolicyAttachment", - "path": "root/Default/Default/test:dependency cycles/Handler/IamRolePolicyAttachment", - }, - "S3Object": { - "constructInfo": { - "fqn": "cdktf.TerraformResource", - "version": "0.17.0", - }, - "id": "S3Object", - "path": "root/Default/Default/test:dependency cycles/Handler/S3Object", - }, - }, - "constructInfo": { - "fqn": "@winglang/sdk.cloud.Function", - "version": "0.0.0", - }, - "display": { - "description": "A cloud function (FaaS)", - "title": "Function", - }, - "id": "Handler", - "path": "root/Default/Default/test:dependency cycles/Handler", - }, - }, "constructInfo": { "fqn": "@winglang/sdk.std.Test", "version": "0.0.0", @@ -696,70 +632,6 @@ exports[`tree.json for an app with many resources 1`] = ` "path": "root/Default/Default/test:dependency cycles", }, "test:test": { - "children": { - "Handler": { - "children": { - "Asset": { - "constructInfo": { - "fqn": "cdktf.TerraformAsset", - "version": "0.17.0", - }, - "id": "Asset", - "path": "root/Default/Default/test:test/Handler/Asset", - }, - "Default": { - "constructInfo": { - "fqn": "cdktf.TerraformResource", - "version": "0.17.0", - }, - "id": "Default", - "path": "root/Default/Default/test:test/Handler/Default", - }, - "IamRole": { - "constructInfo": { - "fqn": "cdktf.TerraformResource", - "version": "0.17.0", - }, - "id": "IamRole", - "path": "root/Default/Default/test:test/Handler/IamRole", - }, - "IamRolePolicy": { - "constructInfo": { - "fqn": "cdktf.TerraformResource", - "version": "0.17.0", - }, - "id": "IamRolePolicy", - "path": "root/Default/Default/test:test/Handler/IamRolePolicy", - }, - "IamRolePolicyAttachment": { - "constructInfo": { - "fqn": "cdktf.TerraformResource", - "version": "0.17.0", - }, - "id": "IamRolePolicyAttachment", - "path": "root/Default/Default/test:test/Handler/IamRolePolicyAttachment", - }, - "S3Object": { - "constructInfo": { - "fqn": "cdktf.TerraformResource", - "version": "0.17.0", - }, - "id": "S3Object", - "path": "root/Default/Default/test:test/Handler/S3Object", - }, - }, - "constructInfo": { - "fqn": "@winglang/sdk.cloud.Function", - "version": "0.0.0", - }, - "display": { - "description": "A cloud function (FaaS)", - "title": "Function", - }, - "id": "Handler", - "path": "root/Default/Default/test:test/Handler", - }, - }, "constructInfo": { "fqn": "@winglang/sdk.std.Test", "version": "0.0.0",