Skip to content
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

Add dependency on module.lambda_function_container_image in aws_lambd… #3

Merged
merged 1 commit into from
Jan 26, 2024

Conversation

FloRul
Copy link
Owner

@FloRul FloRul commented Jan 26, 2024

…a_event_source_mapping

@FloRul FloRul merged commit 582640d into main Jan 26, 2024
1 check passed
Copy link

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Validation 🤖success

Validation Output

Success! The configuration is valid.


Terraform Plan 📖success

Show Plan

terraform
random_password.master: Refreshing state... [id=none]
random_pet.secret_name: Refreshing state... [id=strangely-steady-monkfish]
module.memory.module.lambda_function_container_image.data.aws_region.current: Reading...
module.ingestion.aws_sqs_queue.dead_letter_queue: Refreshing state... [id=https://sqs.us-east-1.amazonaws.com/446872271111/levio-demo-fev-ingestion-queue-dev_dead_letter]
module.ingestion.module.lambda_function_container_image.data.aws_iam_policy_document.assume_role[0]: Reading...
aws_secretsmanager_secret.password: Refreshing state... [id=arn:aws:secretsmanager:us-east-1:446872271111:secret:vectordb-password-main-strangely-steady-monkfish-dKgTZD]
module.memory.module.lambda_function_container_image.data.aws_region.current: Read complete after 0s [id=us-east-1]
module.memory.module.lambda_function_container_image.data.aws_partition.current: Reading...
module.ingestion.aws_s3_bucket.ingestion_source_storage: Refreshing state... [id=levio-demo-fev-storage-dev]
module.memory.module.lambda_function_container_image.data.aws_partition.current: Read complete after 0s [id=aws]
module.inference.module.lambda_function_container_image.data.aws_region.current: Reading...
module.inference.module.lambda_function_container_image.data.aws_caller_identity.current: Reading...
module.ingestion.module.lambda_function_container_image.data.aws_iam_policy_document.assume_role[0]: Read complete after 0s [id=2690255455]
module.ingestion.module.lambda_function_container_image.data.aws_region.current: Reading...
module.ingestion.module.lambda_function_container_image.data.aws_region.current: Read complete after 0s [id=us-east-1]
module.inference.module.lambda_function_container_image.data.aws_iam_policy_document.assume_role[0]: Reading...
module.inference.module.lambda_function_container_image.data.aws_region.current: Read complete after 0s [id=us-east-1]
module.memory.module.lambda_function_container_image.aws_cloudwatch_log_group.lambda[0]: Refreshing state... [id=/aws/lambda/levio-demo-fev-memory-dev]
module.vpc.aws_vpc.this[0]: Refreshing state... [id=vpc-00fb300ee2d2f7b3b]
module.inference.module.lambda_function_container_image.data.aws_iam_policy_document.assume_role[0]: Read complete after 0s [id=2690255455]
module.memory.module.lambda_function_container_image.data.aws_iam_policy_document.assume_role[0]: Reading...
module.ingestion.module.lambda_function_container_image.data.aws_partition.current: Reading...
module.inference.module.lambda_function_container_image.data.aws_caller_identity.current: Read complete after 0s [id=446872271111]
module.ingestion.module.lambda_function_container_image.data.aws_partition.current: Read complete after 0s [id=aws]
module.ingestion.module.lambda_function_container_image.aws_cloudwatch_log_group.lambda[0]: Refreshing state... [id=/aws/lambda/levio-demo-fev-ingestion-dev]
aws_db_parameter_group.default: Refreshing state... [id=rds-pg]
module.memory.module.lambda_function_container_image.data.aws_iam_policy_document.assume_role[0]: Read complete after 0s [id=2690255455]
module.memory.aws_dynamodb_table.basic-conversation_memory_table-table: Refreshing state... [id=levio-demo-fev-chat-history-dev]
data.aws_availability_zones.available: Reading...
module.inference.module.lambda_function_container_image.aws_cloudwatch_log_group.lambda[0]: Refreshing state... [id=/aws/lambda/levio-demo-fev-inference-dev]
module.ingestion.module.lambda_function_container_image.data.aws_caller_identity.current: Reading...
module.ingestion.module.lambda_function_container_image.data.aws_caller_identity.current: Read complete after 0s [id=446872271111]
module.memory.module.lambda_function_container_image.data.aws_iam_policy_document.additional_inline[0]: Reading...
module.memory.module.lambda_function_container_image.data.aws_caller_identity.current: Reading...
module.inference.module.lambda_function_container_image.data.aws_partition.current: Reading...
module.memory.module.lambda_function_container_image.data.aws_iam_policy_document.additional_inline[0]: Read complete after 0s [id=3277652423]
module.inference.module.lambda_function_container_image.data.aws_partition.current: Read complete after 0s [id=aws]
data.aws_ami.latest_amazon_linux: Reading...
module.memory.module.lambda_function_container_image.data.aws_caller_identity.current: Read complete after 0s [id=446872271111]
module.ingestion.module.lambda_function_container_image.aws_iam_role.lambda[0]: Refreshing state... [id=levio-demo-fev-ingestion-dev-role]
module.inference.module.lambda_function_container_image.aws_iam_role.lambda[0]: Refreshing state... [id=levio-demo-fev-inference-dev-role]
module.memory.module.lambda_function_container_image.aws_iam_role.lambda[0]: Refreshing state... [id=levio-demo-fev-memory-dev-role]
data.aws_availability_zones.available: Read complete after 0s [id=us-east-1]
data.aws_secretsmanager_secret.password: Reading...
data.aws_secretsmanager_secret.password: Read complete after 0s [id=arn:aws:secretsmanager:us-east-1:446872271111:secret:vectordb-password-main-strangely-steady-monkfish-dKgTZD]
aws_secretsmanager_secret_version.password: Refreshing state... [id=arn:aws:secretsmanager:us-east-1:446872271111:secret:vectordb-password-main-strangely-steady-monkfish-dKgTZD|terraform-20240126151709956800000002]
module.memory.module.lambda_function_container_image.aws_iam_policy.additional_inline[0]: Refreshing state... [id=arn:aws:iam::446872271111:policy/levio-demo-fev-memory-dev-role-inline]
data.aws_secretsmanager_secret_version.password: Reading...
module.ingestion.aws_sqs_queue.queue: Refreshing state... [id=https://sqs.us-east-1.amazonaws.com/446872271111/levio-demo-fev-ingestion-queue-dev]
module.memory.module.lambda_function_container_image.data.aws_iam_policy_document.logs[0]: Reading...
module.memory.module.lambda_function_container_image.data.aws_iam_policy_document.logs[0]: Read complete after 0s [id=3522429600]
module.inference.module.lambda_function_container_image.data.aws_iam_policy_document.logs[0]: Reading...
module.inference.module.lambda_function_container_image.data.aws_iam_policy_document.logs[0]: Read complete after 0s [id=2926739739]
module.ingestion.module.lambda_function_container_image.data.aws_iam_policy_document.logs[0]: Reading...
module.ingestion.module.lambda_function_container_image.data.aws_iam_policy_document.logs[0]: Read complete after 0s [id=52771042]
module.memory.module.lambda_function_container_image.aws_iam_policy.logs[0]: Refreshing state... [id=arn:aws:iam::446872271111:policy/levio-demo-fev-memory-dev-role-logs]
module.inference.module.lambda_function_container_image.aws_iam_policy.logs[0]: Refreshing state... [id=arn:aws:iam::446872271111:policy/levio-demo-fev-inference-dev-role-logs]
module.ingestion.module.lambda_function_container_image.aws_iam_policy.logs[0]: Refreshing state... [id=arn:aws:iam::446872271111:policy/levio-demo-fev-ingestion-dev-role-logs]
data.aws_secretsmanager_secret_version.password: Read complete after 0s [id=arn:aws:secretsmanager:us-east-1:446872271111:secret:vectordb-password-main-strangely-steady-monkfish-dKgTZD|AWSCURRENT]
module.memory.module.lambda_function_container_image.aws_iam_role_policy_attachment.additional_inline[0]: Refreshing state... [id=levio-demo-fev-memory-dev-role-20240126151710029800000004]
module.ingestion.data.aws_iam_policy_document.sqs_policy: Reading...
module.ingestion.data.aws_iam_policy_document.sqs_policy: Read complete after 0s [id=1366123725]
module.ingestion.aws_sqs_queue_policy.sqs_policy: Refreshing state... [id=https://sqs.us-east-1.amazonaws.com/446872271111/levio-demo-fev-ingestion-queue-dev]
module.memory.module.lambda_function_container_image.aws_iam_role_policy_attachment.logs[0]: Refreshing state... [id=levio-demo-fev-memory-dev-role-20240126151710095500000006]
module.inference.module.lambda_function_container_image.aws_iam_role_policy_attachment.logs[0]: Refreshing state... [id=levio-demo-fev-inference-dev-role-20240126151710029200000003]
module.ingestion.module.lambda_function_container_image.aws_iam_role_policy_attachment.logs[0]: Refreshing state... [id=levio-demo-fev-ingestion-dev-role-20240126151710031000000005]
data.aws_ami.latest_amazon_linux: Read complete after 1s [id=ami-046eeba8a7f7bbefd]
module.vpc.aws_default_route_table.default[0]: Refreshing state... [id=rtb-0b9066ddfe118437e]
module.vpc.aws_default_network_acl.this[0]: Refreshing state... [id=acl-086b3e733d88fa370]
module.vpc.aws_subnet.public[1]: Refreshing state... [id=subnet-0bbe5e0845bba1093]
module.vpc.aws_default_security_group.this[0]: Refreshing state... [id=sg-0d7ddd92ffe7cad50]
aws_security_group.jumpbox_sg: Refreshing state... [id=sg-0b9900b5db426c576]
aws_security_group.lambda_ingestion_sg: Refreshing state... [id=sg-05f52007bac6950c2]
aws_security_group.lambda_memory_sg: Refreshing state... [id=sg-095dd1eeeaae3278f]
module.vpc.aws_route_table.public[0]: Refreshing state... [id=rtb-02f9981846a152b24]
module.vpc.aws_internet_gateway.this[0]: Refreshing state... [id=igw-04aae6346ab85dfe5]
module.vpc.aws_subnet.public[0]: Refreshing state... [id=subnet-09be498e3f465bbb5]
module.vpc.aws_route_table.database[1]: Refreshing state... [id=rtb-00ef44a2d775aaa99]
module.vpc.aws_route_table.database[0]: Refreshing state... [id=rtb-0f03a46a772c6a571]
module.vpc.aws_subnet.database[1]: Refreshing state... [id=subnet-0d1f5f95132e695a6]
module.vpc.aws_subnet.database[0]: Refreshing state... [id=subnet-03f5acb4bc8b5d586]
aws_security_group.lambda_inference_sg: Refreshing state... [id=sg-0b0ddc171bf5034b3]
module.vpc.aws_route_table_association.public[1]: Refreshing state... [id=rtbassoc-066d9aa6005ec7c94]
aws_vpc_endpoint.s3_endpoint: Refreshing state... [id=vpce-071e9585e30063b9a]
module.vpc.aws_route.public_internet_gateway[0]: Refreshing state... [id=r-rtb-02f9981846a152b241080289494]
aws_vpc_endpoint.dynamo_db_endpoint: Refreshing state... [id=vpce-02f500d8488580664]
module.vpc.aws_route_table_association.public[0]: Refreshing state... [id=rtbassoc-0db0a8005c04ca4f2]
aws_vpc_endpoint.lambda_endpoint: Refreshing state... [id=vpce-0baeb867effb860d7]
aws_security_group.dynamo_db_sg: Refreshing state... [id=sg-064b222fa41adf8a4]
module.vpc.aws_route_table_association.database[0]: Refreshing state... [id=rtbassoc-044bfd1713e1c30ec]
module.vpc.aws_route_table_association.database[1]: Refreshing state... [id=rtbassoc-0d7135c7f623e06f8]
module.vpc.aws_db_subnet_group.database[0]: Refreshing state... [id=ex-terraform-dev]
module.memory.module.lambda_function_container_image.aws_lambda_function.this[0]: Refreshing state... [id=levio-demo-fev-memory-dev]
aws_security_group.database_sg: Refreshing state... [id=sg-02511ace313a817bd]
aws_security_group.sm_sg: Refreshing state... [id=sg-0420257bd72285220]
aws_security_group.bedrock_sg: Refreshing state... [id=sg-05fee5c54d8dd836b]
aws_vpc_endpoint.secrets_manager_endpoint: Refreshing state... [id=vpce-0b92742de93a2719b]
aws_vpc_endpoint.bedrock_endpoint: Refreshing state... [id=vpce-0a68a0d1d041b083e]
aws_db_instance.vector_db: Refreshing state... [id=db-KTG3TDKXH3C3BOXFTTIFJ5SASY]
module.inference.module.lambda_function_container_image.data.aws_iam_policy_document.additional_inline[0]: Reading...
module.ingestion.module.lambda_function_container_image.data.aws_iam_policy_document.additional_inline[0]: Reading...
module.inference.module.lambda_function_container_image.data.aws_iam_policy_document.additional_inline[0]: Read complete after 0s [id=242001761]
module.ingestion.module.lambda_function_container_image.data.aws_iam_policy_document.additional_inline[0]: Read complete after 0s [id=2554341540]
module.inference.module.lambda_function_container_image.aws_iam_policy.additional_inline[0]: Refreshing state... [id=arn:aws:iam::446872271111:policy/levio-demo-fev-inference-dev-role-inline]
module.ingestion.module.lambda_function_container_image.aws_iam_policy.additional_inline[0]: Refreshing state... [id=arn:aws:iam::446872271111:policy/levio-demo-fev-ingestion-dev-role-inline]
module.ingestion.module.lambda_function_container_image.aws_iam_role_policy_attachment.additional_inline[0]: Refreshing state... [id=levio-demo-fev-ingestion-dev-role-2024012615222186470000000d]
module.inference.module.lambda_function_container_image.aws_iam_role_policy_attachment.additional_inline[0]: Refreshing state... [id=levio-demo-fev-inference-dev-role-2024012615222187350000000e]
module.inference.module.lambda_function_container_image.aws_lambda_function.this[0]: Refreshing state... [id=levio-demo-fev-inference-dev]
module.ingestion.module.lambda_function_container_image.aws_lambda_function.this[0]: Refreshing state... [id=levio-demo-fev-ingestion-dev]

Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # aws_instance.jumpbox will be created
  + resource "aws_instance" "jumpbox" {
      + ami                                  = "ami-046eeba8a7f7bbefd"
      + arn                                  = (known after apply)
      + associate_public_ip_address          = true
      + availability_zone                    = (known after apply)
      + cpu_core_count                       = (known after apply)
      + cpu_threads_per_core                 = (known after apply)
      + disable_api_stop                     = (known after apply)
      + disable_api_termination              = (known after apply)
      + ebs_optimized                        = (known after apply)
      + get_password_data                    = false
      + host_id                              = (known after apply)
      + host_resource_group_arn              = (known after apply)
      + iam_instance_profile                 = (known after apply)
      + id                                   = (known after apply)
      + instance_initiated_shutdown_behavior = (known after apply)
      + instance_lifecycle                   = (known after apply)
      + instance_state                       = (known after apply)
      + instance_type                        = "t2.micro"
      + ipv6_address_count                   = (known after apply)
      + ipv6_addresses                       = (known after apply)
      + key_name                             = "bastion-rds-dev"
      + monitoring                           = (known after apply)
      + outpost_arn                          = (known after apply)
      + password_data                        = (known after apply)
      + placement_group                      = (known after apply)
      + placement_partition_number           = (known after apply)
      + primary_network_interface_id         = (known after apply)
      + private_dns                          = (known after apply)
      + private_ip                           = (known after apply)
      + public_dns                           = (known after apply)
      + public_ip                            = (known after apply)
      + secondary_private_ips                = (known after apply)
      + security_groups                      = (known after apply)
      + source_dest_check                    = true
      + spot_instance_request_id             = (known after apply)
      + subnet_id                            = "subnet-09be498e3f465bbb5"
      + tags                                 = {
          + "Name" = "jumpbox-instance-dev"
        }
      + tags_all                             = {
          + "Environment" = "dev-dev"
          + "Name"        = "jumpbox-instance-dev"
          + "Project"     = "levio-aws-demo-fev-dev"
          + "Terraform"   = "true"
        }
      + tenancy                              = (known after apply)
      + user_data                            = (known after apply)
      + user_data_base64                     = (known after apply)
      + user_data_replace_on_change          = false
      + vpc_security_group_ids               = [
          + "sg-0b9900b5db426c576",
        ]
    }

  # module.ingestion.aws_lambda_event_source_mapping.event_source_mapping will be created
  + resource "aws_lambda_event_source_mapping" "event_source_mapping" {
      + batch_size                    = 1
      + enabled                       = true
      + event_source_arn              = "arn:aws:sqs:us-east-1:446872271111:levio-demo-fev-ingestion-queue-dev"
      + function_arn                  = (known after apply)
      + function_name                 = "levio-demo-fev-ingestion-dev"
      + id                            = (known after apply)
      + last_modified                 = (known after apply)
      + last_processing_result        = (known after apply)
      + maximum_record_age_in_seconds = (known after apply)
      + maximum_retry_attempts        = (known after apply)
      + parallelization_factor        = (known after apply)
      + state                         = (known after apply)
      + state_transition_reason       = (known after apply)
      + uuid                          = (known after apply)
    }

  # module.ingestion.aws_s3_bucket_notification.bucket_notification will be created
  + resource "aws_s3_bucket_notification" "bucket_notification" {
      + bucket      = "levio-demo-fev-storage-dev"
      + eventbridge = false
      + id          = (known after apply)

      + queue {
          + events        = [
              + "s3:ObjectCreated:*",
              + "s3:ObjectRemoved:*",
            ]
          + filter_suffix = ".pdf"
          + id            = (known after apply)
          + queue_arn     = "arn:aws:sqs:us-east-1:446872271111:levio-demo-fev-ingestion-queue-dev"
        }
    }

Plan: 3 to add, 0 to change, 0 to destroy.

Changes to Outputs:
  + instance_ip      = (known after apply)

─────────────────────────────────────────────────────────────────────────────

Note: You didn't use the -out option to save this plan, so Terraform can't
guarantee to take exactly these actions if you run "terraform apply" now.

Pusher: @FloRul, Action: pull_request, Workflow: Infrastructure planning and management

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant