-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feat/lambda module #232
Merged
Merged
Feat/lambda module #232
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 tasks
patheard
reviewed
Mar 8, 2023
patheard
reviewed
Mar 8, 2023
Production: ecr✅ Terraform Format: Plan: 0 to add, 0 to change, 0 to destroy Show planChanges to Outputs:
+ aws_ecr_repository_arn = "arn:aws:ecr:ca-central-1:414662622316:repository/privacy-statement-container"
+ aws_ecr_repository_url = "414662622316.dkr.ecr.ca-central-1.amazonaws.com/privacy-statement-container"
- ecr_url = "414662622316.dkr.ecr.ca-central-1.amazonaws.com/privacy-statement-container" -> null
You can apply this plan to save these new output values to the Terraform
state, without changing any real infrastructure.
─────────────────────────────────────────────────────────────────────────────
Saved the plan to: plan.tfplan
To perform exactly these actions, run the following command to apply:
terraform apply "plan.tfplan"
Show Conftest resultsWARN - plan.json - main - Missing Common Tags: ["aws_ecr_repository.privacy_statement_container"]
18 tests, 17 passed, 1 warning, 0 failures, 0 exceptions
|
Production: efs✅ Terraform Format: Plan: 1 to add, 0 to change, 0 to destroy Show planResource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# aws_efs_mount_target.efs_mount will be created
+ resource "aws_efs_mount_target" "efs_mount" {
+ availability_zone_id = (known after apply)
+ availability_zone_name = (known after apply)
+ dns_name = (known after apply)
+ file_system_arn = (known after apply)
+ file_system_id = "fs-02e417f65f0b93510"
+ id = (known after apply)
+ ip_address = (known after apply)
+ mount_target_dns_name = (known after apply)
+ network_interface_id = (known after apply)
+ owner_id = (known after apply)
+ security_groups = [
+ "sg-033c29e939a74c39b",
]
+ subnet_id = jsonencode(
[
+ "subnet-066c6b13009cc761a",
+ "subnet-0f0e20195a44b2a73",
+ "subnet-04892391188217b74",
]
)
}
Plan: 1 to add, 0 to change, 0 to destroy.
Changes to Outputs:
+ aws_efs_access_point = "arn:aws:elasticfilesystem:ca-central-1:414662622316:access-point/fsap-0f66b64c3791a5d33"
─────────────────────────────────────────────────────────────────────────────
Saved the plan to: plan.tfplan
To perform exactly these actions, run the following command to apply:
terraform apply "plan.tfplan"
Releasing state lock. This may take a few moments...
Show Conftest resultsWARN - plan.json - main - Missing Common Tags: ["aws_efs_access_point.efs_access_point"]
WARN - plan.json - main - Missing Common Tags: ["aws_efs_file_system.generated_statement_efs"]
19 tests, 17 passed, 2 warnings, 0 failures, 0 exceptions
|
Production: app✅ Terraform Format: Plan: 8 to add, 0 to change, 0 to destroy Show planResource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# aws_lambda_function_url.generated_statement_url will be created
+ resource "aws_lambda_function_url" "generated_statement_url" {
+ authorization_type = "NONE"
+ function_arn = (known after apply)
+ function_name = "generated_statement_lambda_function"
+ function_url = (known after apply)
+ id = (known after apply)
+ url_id = (known after apply)
}
# module.generated_statement_lambda.aws_cloudwatch_log_group.this will be created
+ resource "aws_cloudwatch_log_group" "this" {
+ arn = (known after apply)
+ id = (known after apply)
+ name = "/aws/lambda/generated_statement_lambda_function"
+ name_prefix = (known after apply)
+ retention_in_days = 14
+ skip_destroy = false
+ tags = {
+ "CostCentre" = "simplify-privacy-statements-production"
+ "Terraform" = "true"
}
+ tags_all = {
+ "CostCentre" = "simplify-privacy-statements-production"
+ "Terraform" = "true"
}
}
# module.generated_statement_lambda.aws_iam_policy.vpc_policies[0] will be created
+ resource "aws_iam_policy" "vpc_policies" {
+ arn = (known after apply)
+ id = (known after apply)
+ name = "generated_statement_lambda_function_vpc"
+ path = "/"
+ policy = jsonencode(
{
+ Statement = [
+ {
+ Action = [
+ "ecr:GetDownloadUrlForlayer",
+ "ecr:BatchGetImage",
]
+ Effect = "Allow"
+ Resource = ""
+ Sid = "ECRImageAccess"
},
]
+ Version = "2012-10-17"
}
)
+ policy_id = (known after apply)
+ tags = {
+ "CostCentre" = "simplify-privacy-statements-production"
+ "Terraform" = "true"
}
+ tags_all = {
+ "CostCentre" = "simplify-privacy-statements-production"
+ "Terraform" = "true"
}
}
# module.generated_statement_lambda.aws_iam_role.this will be created
+ resource "aws_iam_role" "this" {
+ arn = (known after apply)
+ assume_role_policy = jsonencode(
{
+ Statement = [
+ {
+ Action = "sts:AssumeRole"
+ Effect = "Allow"
+ Principal = {
+ Service = "lambda.amazonaws.com"
}
+ Sid = ""
},
]
+ Version = "2012-10-17"
}
)
+ create_date = (known after apply)
+ force_detach_policies = false
+ id = (known after apply)
+ managed_policy_arns = (known after apply)
+ max_session_duration = 3600
+ name = "generated_statement_lambda_function"
+ name_prefix = (known after apply)
+ path = "/"
+ tags = {
+ "CostCentre" = "simplify-privacy-statements-production"
+ "Terraform" = "true"
}
+ tags_all = {
+ "CostCentre" = "simplify-privacy-statements-production"
+ "Terraform" = "true"
}
+ unique_id = (known after apply)
+ inline_policy {
+ name = (known after apply)
+ policy = (known after apply)
}
}
# module.generated_statement_lambda.aws_iam_role_policy_attachment.AWSLambdaVPCAccessExecutionRole[0] will be created
+ resource "aws_iam_role_policy_attachment" "AWSLambdaVPCAccessExecutionRole" {
+ id = (known after apply)
+ policy_arn = "arn:aws:iam::aws:policy/service-role/AWSLambdaVPCAccessExecutionRole"
+ role = "generated_statement_lambda_function"
}
# module.generated_statement_lambda.aws_iam_role_policy_attachment.lambda_insights[0] will be created
+ resource "aws_iam_role_policy_attachment" "lambda_insights" {
+ id = (known after apply)
+ policy_arn = "arn:aws:iam::aws:policy/CloudWatchLambdaInsightsExecutionRolePolicy"
+ role = "generated_statement_lambda_function"
}
# module.generated_statement_lambda.aws_iam_role_policy_attachment.vpc_policies[0] will be created
+ resource "aws_iam_role_policy_attachment" "vpc_policies" {
+ id = (known after apply)
+ policy_arn = (known after apply)
+ role = "generated_statement_lambda_function"
}
# module.generated_statement_lambda.aws_lambda_function.this will be created
+ resource "aws_lambda_function" "this" {
+ architectures = [
+ "x86_64",
]
+ arn = (known after apply)
+ function_name = "generated_statement_lambda_function"
+ id = (known after apply)
+ image_uri = ":latest"
+ invoke_arn = (known after apply)
+ last_modified = (known after apply)
+ memory_size = 128
+ package_type = "Image"
+ publish = false
+ qualified_arn = (known after apply)
+ qualified_invoke_arn = (known after apply)
+ reserved_concurrent_executions = -1
+ role = (known after apply)
+ signing_job_arn = (known after apply)
+ signing_profile_version_arn = (known after apply)
+ skip_destroy = false
+ source_code_hash = (known after apply)
+ source_code_size = (known after apply)
+ tags = {
+ "CostCentre" = "simplify-privacy-statements-production"
+ "Terraform" = "true"
}
+ tags_all = {
+ "CostCentre" = "simplify-privacy-statements-production"
+ "Terraform" = "true"
}
+ timeout = 30
+ version = (known after apply)
+ environment {
+ variables = {
+ "BINARY_CONTENT_TYPES" = "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
}
}
+ ephemeral_storage {
+ size = 512
}
+ file_system_config {
+ local_mount_path = "/mnt/access"
}
+ tracing_config {
+ mode = "PassThrough"
}
+ vpc_config {
+ security_group_ids = [
+ "sg-033c29e939a74c39b",
]
+ subnet_ids = [
+ jsonencode(
[
+ "subnet-066c6b13009cc761a",
+ "subnet-0f0e20195a44b2a73",
+ "subnet-04892391188217b74",
]
),
]
+ vpc_id = (known after apply)
}
}
Plan: 8 to add, 0 to change, 0 to destroy.
─────────────────────────────────────────────────────────────────────────────
Saved the plan to: plan.tfplan
To perform exactly these actions, run the following command to apply:
terraform apply "plan.tfplan"
Releasing state lock. This may take a few moments...
Show Conftest results18 tests, 18 passed, 0 warnings, 0 failures, 0 exceptions
|
patheard
approved these changes
Mar 8, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary | Résumé
Added the Lambda Module, the function URL will serve as our endpoint