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
How to create multi region certonid functions (with AWS KMS encryption, eu-central-1 and us-east-1 in example)
terraform {
required_version=">= 0.12"
}
provider"aws" {
region="eu-central-1"
}
provider"aws" {
alias="useast1"region="us-east-1"
}
provider"archive" {}
data"archive_file""serverless_function_eu-central-1" {
type="zip"source_dir="./serverless-eu-central-1/"output_path="./build/serverless-eu-central-1.zip"
}
data"archive_file""serverless_function_us-east-1" {
type="zip"source_dir="./serverless-us-east-1/"output_path="./build/serverless-us-east-1.zip"
}
module"terraform-aws-certonid-eu-central-1" {
source="certonid/certonid/aws"providers={
aws = aws
}
function_zip_file=data.archive_file.serverless_function_eu-central-1.output_pathfunction_iam_role_name="certonid-lambda-role-eu-central-1"# you need provide uniq name for function IAM rolefunction_iam_general_policy_name="certonid-lambda-policy-eu-central-1"# you need provide uniq name for function general IAM policyfunction_iam_kms_policy_name="certonid-lambda-kms-policy-eu-central-1"# you need provide uniq name for function KMS IAM policyclients_iam_policy_name="certonid-clients-policy-eu-central-1"# you need provide uniq name for clients IAM policyclients_names=[
"certonid-test-user"
]
}
module"terraform-aws-certonid-us-east-1" {
source="certonid/certonid/aws"providers={
aws = aws.useast1
}
function_zip_file=data.archive_file.serverless_function_us-east-1.output_pathfunction_iam_role_name="certonid-lambda-role-us-east-1"# you need provide uniq name for function IAM rolefunction_iam_general_policy_name="certonid-lambda-policy-eu-central-1"# you need provide uniq name for function general IAM policyfunction_iam_kms_policy_name="certonid-lambda-kms-policy-eu-central-1"# you need provide uniq name for function KMS IAM policyclients_iam_policy_name="certonid-clients-policy-us-east-1"# you need provide uniq name for clients IAM policyis_group_for_clients_exists=true# users managed in another function by 'clients_names' variable
}
How to create multi region certonid functions with kmsauth (with AWS KMS encryption, eu-central-1 and us-east-1 in example)
terraform {
required_version=">= 0.12"
}
provider"aws" {
region="eu-central-1"
}
provider"aws" {
alias="useast1"region="us-east-1"
}
provider"archive" {}
data"archive_file""serverless_function_eu-central-1" {
type="zip"source_dir="./serverless-eu-central-1/"output_path="./build/serverless-eu-central-1.zip"
}
data"archive_file""serverless_function_us-east-1" {
type="zip"source_dir="./serverless-us-east-1/"output_path="./build/serverless-us-east-1.zip"
}
module"terraform-aws-certonid-eu-central-1" {
source="certonid/certonid/aws"providers={
aws = aws
}
function_zip_file=data.archive_file.serverless_function_eu-central-1.output_pathfunction_iam_role_name="certonid-lambda-role-eu-central-1"# you need provide uniq name for function IAM rolefunction_iam_general_policy_name="certonid-lambda-policy-eu-central-1"# you need provide uniq name for function general IAM policyfunction_iam_kms_policy_name="certonid-lambda-kms-policy-eu-central-1"# you need provide uniq name for function KMS IAM policyclients_iam_policy_name="certonid-clients-policy-eu-central-1"# you need provide uniq name for clients IAM policyis_kmsauth_enabled=true# activate kmsauthfunction_iam_kmsauth_policy_name="certonid-kmsauth-lambda-policy-eu-central-1"# you need provide uniq name for kmsauth IAM policyclients_names=[
"certonid-test-user"
]
}
module"terraform-aws-certonid-us-east-1" {
source="certonid/certonid/aws"providers={
aws = aws.useast1
}
function_zip_file=data.archive_file.serverless_function_us-east-1.output_pathfunction_iam_role_name="certonid-lambda-role-us-east-1"# you need provide uniq name for function IAM rolefunction_iam_general_policy_name="certonid-lambda-policy-eu-central-1"# you need provide uniq name for function general IAM policyfunction_iam_kms_policy_name="certonid-lambda-kms-policy-eu-central-1"# you need provide uniq name for function KMS IAM policyclients_iam_policy_name="certonid-clients-policy-us-east-1"# you need provide uniq name for clients IAM policyis_kmsauth_enabled=true# activate kmsauthfunction_iam_kmsauth_policy_name="certonid-kmsauth-lambda-policy-us-east-1"# you need provide uniq name for kmsauth IAM policyis_group_for_clients_exists=true# users managed in another function by 'clients_names' variableclients_iam_group_name=module.terraform-aws-certonid-eu-central-1.clients_iam_group_name
}