Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move field roleInstance from Function to CallbackFunction #2645

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions provider/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -6827,11 +6827,6 @@ func Provider() *tfbridge.ProviderInfo {
"s3Mixins.ts",
},
},
"serverless": {
DestFiles: []string{
"function.ts",
},
},
"sns": {
DestFiles: []string{
"snsMixins.ts",
Expand Down
2 changes: 0 additions & 2 deletions sdk/nodejs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,6 @@ import * as scheduler from "./scheduler";
import * as schemas from "./schemas";
import * as secretsmanager from "./secretsmanager";
import * as securityhub from "./securityhub";
import * as serverless from "./serverless";
import * as serverlessrepository from "./serverlessrepository";
import * as servicecatalog from "./servicecatalog";
import * as servicediscovery from "./servicediscovery";
Expand Down Expand Up @@ -428,7 +427,6 @@ export {
schemas,
secretsmanager,
securityhub,
serverless,
serverlessrepository,
servicecatalog,
servicediscovery,
Expand Down
17 changes: 6 additions & 11 deletions sdk/nodejs/lambda/lambdaMixins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,12 @@ export function createFunctionFromEventHandler<E, R>(
* `AWSXrayWriteOnlyAccess`
*/
export class CallbackFunction<E, R> extends LambdaFunction {
/**
* Actual Role instance value for this Function. Will only be set if this function was
* created from [createFunction]
*/
public readonly roleInstance?: iam.Role;

public constructor(name: string, args: CallbackFunctionArgs<E, R>, opts: pulumi.CustomResourceOptions = {}) {
if (!name) {
throw new Error("Missing required resource name");
Expand Down Expand Up @@ -436,14 +442,3 @@ const lambdaRolePolicy = {
},
],
};
// Mixin the Role we potentially create into the Function instances we return.

declare module "./function" {
interface Function {
/**
* Actual Role instance value for this Function. Will only be set if this function was
* created from [createFunction]
*/
roleInstance?: iam.Role;
}
}
127 changes: 0 additions & 127 deletions sdk/nodejs/serverless/function.ts

This file was deleted.

5 changes: 0 additions & 5 deletions sdk/nodejs/serverless/index.ts

This file was deleted.

2 changes: 0 additions & 2 deletions sdk/nodejs/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -1723,8 +1723,6 @@
"securityhub/productSubscription.ts",
"securityhub/standardsControl.ts",
"securityhub/standardsSubscription.ts",
"serverless/function.ts",
"serverless/index.ts",
"serverlessrepository/cloudFormationStack.ts",
"serverlessrepository/getApplication.ts",
"serverlessrepository/index.ts",
Expand Down
Loading