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

fix: Go 1.x runtime is deprecated #76

Merged
merged 1 commit into from
Oct 4, 2023
Merged

Conversation

obs-gh-colinhutchinson
Copy link
Contributor

@obs-gh-colinhutchinson obs-gh-colinhutchinson commented Sep 26, 2023

What does this PR do?

Migrates off of Go 1.x runtime

Motivation

Go 1.x is deprecated

image

Testing

Did a terraform apply and verified the Go runtime changed

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # module.observe_collection.module.observe_lambda.aws_lambda_function.this will be updated in-place
  ~ resource "aws_lambda_function" "this" {
      ~ architectures                  = [
          - "x86_64",
          + "arm64",
        ]
      ~ handler                        = "main" -> "bootstrap"
        id                             = "colin3"
      ~ last_modified                  = "2023-10-03T16:04:12.112+0000" -> (known after apply)
      ~ runtime                        = "go1.x" -> "provided.al2"
      ~ s3_key                         = "lambda/observer/latest.zip" -> "lambda/observer/arm64/latest.zip"
        tags                           = {}
        # (19 unchanged attributes hidden)

      ~ environment {
          ~ variables = {
              + "OBSERVE_COLLECTION_ENDPOINT" = "https://130348791288.collect.observe-eng.com"
              - "OBSERVE_URL"                 = "https://130348791288.collect.observe-eng.com/v1/http" -> null
                # (1 unchanged element hidden)
            }
        }

        # (2 unchanged blocks hidden)
    }

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

image

@obs-gh-colinhutchinson obs-gh-colinhutchinson marked this pull request as ready for review October 3, 2023 16:06
main.tf Outdated
strcontains(var.lambda_version, "/") ?
join("/", [var.s3_key_prefix, format("%s.zip", var.lambda_version)]) :
format("lambda/observer/arm64/%s.zip", var.lambda_version)
)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @bendrucker I had difficulty keeping this logic forward / backwards compatible. Would appreciate if you had a cleaner approach

@obs-gh-colinhutchinson obs-gh-colinhutchinson merged commit 8fd6b3f into main Oct 4, 2023
15 checks passed
@obs-gh-colinhutchinson obs-gh-colinhutchinson deleted the fix/OB-21998 branch October 4, 2023 16:01
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.

2 participants