Skip to content

Commit

Permalink
Merge commit 'b54fe1b555e4f3449561a9940228b0dcef2d6037' into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
ewbankkit committed Mar 25, 2022
2 parents 0946589 + b54fe1b commit ed9fb39
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions internal/service/lambda/function.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,24 @@ func ResourceFunction() *schema.Resource {
Optional: true,
ValidateFunc: validation.StringInSlice(lambda.Runtime_Values(), false),
},
"ephemeral_storage": {
Type: schema.TypeList,
MaxItems: 1,
Optional: true,
Computed: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"size": {
Type: schema.TypeInt,
Required: true,
Default: 512,
ValidateFunc: validation.All(
validation.IntBetween(512, 10240),
),
},
},
},
},
"timeout": {
Type: schema.TypeInt,
Optional: true,
Expand Down Expand Up @@ -393,6 +411,7 @@ func hasConfigChanges(d verify.ResourceDiffer) bool {
d.HasChange("layers") ||
d.HasChange("dead_letter_config") ||
d.HasChange("tracing_config") ||
d.HasChange("ephemeral_storage") ||
d.HasChange("vpc_config.0.security_group_ids") ||
d.HasChange("vpc_config.0.subnet_ids") ||
d.HasChange("runtime") ||
Expand Down Expand Up @@ -530,6 +549,14 @@ func resourceFunctionCreate(d *schema.ResourceData, meta interface{}) error {
}
}

// if v, ok := d.GetOk("ephemeral_storage"); ok {
// ephemeralStorageConfig := v.([]interface{})
// ephemeralStorage := ephemeralStorageConfig[0].(map[string]interface{})
// params.EphemeralStorage = &lambda.EphemeralStorage{
// Size: aws.Int64(int64(ephemeralStorage["size"].(int))),
// }
// }

if v, ok := d.GetOk("environment"); ok {
environments := v.([]interface{})
environment, ok := environments[0].(map[string]interface{})
Expand Down

0 comments on commit ed9fb39

Please sign in to comment.