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

Config without NAT - use if no free tier #3

Merged
merged 6 commits into from
Feb 7, 2024

Conversation

Thomas-mcinally
Copy link
Owner

@Thomas-mcinally Thomas-mcinally commented Jun 1, 2023

If no free tier than EC2 is expensive.

Without NAT then lambda no longer has static IP address to be used for IP whitelisting.

Should still be safe as long as other security measures are taken.

@github-actions
Copy link

github-actions bot commented Jun 1, 2023

Terraform plan in terraform

Plan: 1 to add, 3 to change, 1 to destroy.
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
  ~ update in-place
-/+ destroy and then create replacement

Terraform will perform the following actions:

  # aws_cloudwatch_event_rule.kraken_dca_lambda_event_rule will be updated in-place
  ~ resource "aws_cloudwatch_event_rule" "kraken_dca_lambda_event_rule" {
      ~ description         = "Buy BTC every day at 08:00 UTC" -> "Buy BTC every day at 08:30 UTC"
        id                  = "kraken_dca_lambda_event_rule"
        name                = "kraken_dca_lambda_event_rule"
      ~ schedule_expression = "cron(0 8 * * ? *)" -> "cron(30 8 * * ? *)"
        tags                = {}
        # (4 unchanged attributes hidden)
    }

  # aws_lambda_function.kraken-dca-lambda will be updated in-place
  ~ resource "aws_lambda_function" "kraken-dca-lambda" {
        id                             = "kraken-dca-lambda"
      ~ layers                         = [
          - "arn:aws:lambda:eu-west-2:194627472784:layer:kraken_dca_dependencies:97",
        ] -> (known after apply)
        tags                           = {}
        # (20 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # aws_lambda_function.kraken-withdraw-lambda will be updated in-place
  ~ resource "aws_lambda_function" "kraken-withdraw-lambda" {
        id                             = "kraken-withdraw-lambda"
      ~ layers                         = [
          - "arn:aws:lambda:eu-west-2:194627472784:layer:kraken_dca_dependencies:97",
        ] -> (known after apply)
        tags                           = {}
        # (20 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

  # aws_lambda_layer_version.kraken_dca_dependencies must be replaced
-/+ resource "aws_lambda_layer_version" "kraken_dca_dependencies" {
      ~ arn                         = "arn:aws:lambda:eu-west-2:194627472784:layer:kraken_dca_dependencies:97" -> (known after apply)
      - compatible_architectures    = [] -> null
      - compatible_runtimes         = [] -> null
      ~ created_date                = "2024-02-06T20:45:36.287+0000" -> (known after apply)
      ~ id                          = "**********************************************************************" -> (known after apply)
      ~ layer_arn                   = "arn:aws:lambda:eu-west-2:194627472784:layer:kraken_dca_dependencies" -> (known after apply)
      + signing_job_arn             = (known after apply)
      + signing_profile_version_arn = (known after apply)
      ~ source_code_hash            = "2ezoJ8GxOhW9e0mnVSuMlTncs/iRgCTeVgfG8o/fVk8=" -> "fEF37YtVE15Dz+5YPsCuKm0mBwH7/3RbF2i1KoCauw0=" # forces replacement
      ~ source_code_size            = 12337358 -> (known after apply)
      ~ version                     = "97" -> (known after apply)
        # (3 unchanged attributes hidden)
    }

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

📝 Plan generated in Terraform plan #10

@Thomas-mcinally Thomas-mcinally changed the title remove NAT and keep lambdas in public subnet instead of private remove NAT - use if not free tier Feb 4, 2024
@Thomas-mcinally Thomas-mcinally changed the title remove NAT - use if not free tier Config without NAT - use if not free tier Feb 4, 2024
@Thomas-mcinally Thomas-mcinally changed the title Config without NAT - use if not free tier Config without NAT - use if no free tier Feb 4, 2024
@Thomas-mcinally Thomas-mcinally marked this pull request as ready for review February 6, 2024 20:33
@Thomas-mcinally Thomas-mcinally merged commit 88ce987 into main Feb 7, 2024
3 checks passed
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.

None yet

1 participant