Skip to content
This repository has been archived by the owner on Oct 17, 2024. It is now read-only.

[WIP][Feature] add Serverless FileSystemConfigs #286

Closed
Closed
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: 5 additions & 0 deletions cloudformation/serverless/aws-serverless-function.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ type Function struct {
// See: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction
Events map[string]Function_EventSource `json:"Events,omitempty"`

// FileSystemConfigs AWS CloudFormation Property
// Required: false
// See: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-resource-function.html
FileSystemConfigs []Function_FileSystemConfig `json:"FileSystemConfigs,omitempty"`

// FunctionName AWS CloudFormation Property
// Required: false
// See: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package serverless

import (
"github.com/awslabs/goformation/v4/cloudformation/policies"
)

// Function_FileSystemConfig AWS CloudFormation Resource (AWS::Serverless::Function.FileSystemConfig)
// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-filesystemconfig.html#cfn-lambda-function-filesystemconfig-localmountpath
type Function_FileSystemConfig struct {

// Arn AWS CloudFormation Property
// Required: false
// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-filesystemconfig.html#cfn-lambda-function-filesystemconfig-localmountpath
Arn string `json:"Arn,omitempty"`

// LocalMountPath AWS CloudFormation Property
// Required: false
// See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-filesystemconfig.html#cfn-lambda-function-filesystemconfig-localmountpath
LocalMountPath string `json:"LocalMountPath,omitempty"`

// AWSCloudFormationDeletionPolicy represents a CloudFormation DeletionPolicy
AWSCloudFormationDeletionPolicy policies.DeletionPolicy `json:"-"`

// AWSCloudFormationUpdateReplacePolicy represents a CloudFormation UpdateReplacePolicy
AWSCloudFormationUpdateReplacePolicy policies.UpdateReplacePolicy `json:"-"`

// AWSCloudFormationDependsOn stores the logical ID of the resources to be created before this resource
AWSCloudFormationDependsOn []string `json:"-"`

// AWSCloudFormationMetadata stores structured data associated with this resource
AWSCloudFormationMetadata map[string]interface{} `json:"-"`

// AWSCloudFormationCondition stores the logical ID of the condition that must be satisfied for this resource to be created
AWSCloudFormationCondition string `json:"-"`
}

// AWSCloudFormationType returns the AWS CloudFormation resource type
func (r *Function_FileSystemConfig) AWSCloudFormationType() string {
return "AWS::Serverless::Function.FileSystemConfig"
}
24 changes: 24 additions & 0 deletions generate/sam-2016-10-31.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@
"PrimitiveType": "String",
"UpdateType": "Immutable"
},
"FileSystemConfigs": {
"Documentation": "https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-resource-function.html",
"Required": false,
"Type": "List",
"ItemType": "FileSystemConfig",
"UpdateType": "Immutable"
},
"Description": {
"Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction",
"Required": false,
Expand Down Expand Up @@ -424,6 +431,23 @@
}
}
},
"AWS::Serverless::Function.FileSystemConfig": {
"Documentation": "https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-filesystemconfig.html#cfn-lambda-function-filesystemconfig-localmountpath",
"Properties": {
"Arn": {
"Documentation": "https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-filesystemconfig.html#cfn-lambda-function-filesystemconfig-localmountpath",
"Required": false,
"PrimitiveType": "String",
"UpdateType": "Immutable"
},
"LocalMountPath": {
"Documentation": "https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lambda-function-filesystemconfig.html#cfn-lambda-function-filesystemconfig-localmountpath",
"Required": false,
"PrimitiveType": "String",
"UpdateType": "Immutable"
}
}
},
"AWS::Serverless::Function.EventSource": {
"Documentation": "https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#event-source-object",
"Properties": {
Expand Down
18 changes: 18 additions & 0 deletions schema/sam.go
Original file line number Diff line number Diff line change
Expand Up @@ -63405,6 +63405,12 @@ var SamSchema = `{
},
"type": "object"
},
"FileSystemConfigs": {
"items": {
"$ref": "#/definitions/AWS::Serverless::Function.FileSystemConfig"
},
"type": "array"
},
"FunctionName": {
"type": "string"
},
Expand Down Expand Up @@ -63739,6 +63745,18 @@ var SamSchema = `{
],
"type": "object"
},
"AWS::Serverless::Function.FileSystemConfig": {
"additionalProperties": false,
"properties": {
"Arn": {
"type": "string"
},
"LocalMountPath": {
"type": "string"
}
},
"type": "object"
},
"AWS::Serverless::Function.FunctionEnvironment": {
"additionalProperties": false,
"properties": {
Expand Down
18 changes: 18 additions & 0 deletions schema/sam.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -63402,6 +63402,12 @@
},
"type": "object"
},
"FileSystemConfigs": {
"items": {
"$ref": "#/definitions/AWS::Serverless::Function.FileSystemConfig"
},
"type": "array"
},
"FunctionName": {
"type": "string"
},
Expand Down Expand Up @@ -63736,6 +63742,18 @@
],
"type": "object"
},
"AWS::Serverless::Function.FileSystemConfig": {
"additionalProperties": false,
"properties": {
"Arn": {
"type": "string"
},
"LocalMountPath": {
"type": "string"
}
},
"type": "object"
},
"AWS::Serverless::Function.FunctionEnvironment": {
"additionalProperties": false,
"properties": {
Expand Down