You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: allow KMS encryption of token environment variable (#83)
This commit adds support for encrypting the `OBSERVE_TOKEN` environment
variable in transit.
Previously, this module accepted a `kms_key_arn` variable which affected
all environment variables _at rest_. However, this still exposed the
token in different contexts (e.g. AWS Config). We now allow reusing the
KMS key to encrypt the variable, which gets decrypted by our lambda as
of version `v1.0.20240501`.
This commit also introduces a subtle API change to the module. We pass
in an object, `kms_key`, rather than a string, `kms_key_arn`. This is
more friendly to the `count` operator, which cannot determine the value
of an attribute until apply time.
|[aws_region.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/region)| data source |
64
67
@@ -69,7 +72,8 @@ No modules.
69
72
| <aname="input_dead_letter_queue_destination"></a> [dead\_letter\_queue\_destination](#input\_dead\_letter\_queue\_destination)| Send failed events/function executions to a dead letter queue arn sns or sqs |`string`|`null`| no |
70
73
| <aname="input_description"></a> [description](#input\_description)| Lambda description |`string`|`"Lambda function to forward events towards Observe"`| no |
71
74
| <aname="input_iam_name_prefix"></a> [iam\_name\_prefix](#input\_iam\_name\_prefix)| Prefix used for all created IAM roles and policies |`string`|`"observe-lambda-"`| no |
72
-
| <aname="input_kms_key_arn"></a> [kms\_key\_arn](#input\_kms\_key\_arn)| The ARN of the AWS Key Management Service (AWS KMS) key that's used to encrypt your function's environment variables.<br>If it's not provided, AWS Lambda uses a default service key. |`string`|`""`| no |
75
+
| <aname="input_kms_key"></a> [kms\_key](#input\_kms\_key)| The AWS Key Management Service (AWS KMS) key that's used to encrypt your<br>function's environment variables at rest. Additionally, the Observe Token<br>will be encrypted in transit. |`object({ arn = string })`|`null`| no |
76
+
| <aname="input_kms_key_arn"></a> [kms\_key\_arn](#input\_kms\_key\_arn)| The ARN of the AWS Key Management Service (AWS KMS) key that's used to encrypt your function's environment variables.<br>If it's not provided, AWS Lambda uses a default service key. Deprecated, please use kms\_key instead" |`string`|`""`| no |
73
77
| <aname="input_lambda_envvars"></a> [lambda\_envvars](#input\_lambda\_envvars)| Environment variables |`map(any)`|`{}`| no |
74
78
| <aname="input_lambda_iam_role_arn"></a> [lambda\_iam\_role\_arn](#input\_lambda\_iam\_role\_arn)| ARN of IAM role to use for Lambda |`string`|`""`| no |
75
79
| <aname="input_lambda_s3_custom_rules"></a> [lambda\_s3\_custom\_rules](#input\_lambda\_s3\_custom\_rules)| List of rules to evaluate how to upload a given S3 object to Observe | <pre>list(object({<br> pattern = string<br> headers = map(string)<br> }))</pre> |`[]`| no |
0 commit comments