Skip to content

Conversation

@zoonage
Copy link
Contributor

@zoonage zoonage commented May 17, 2021

We had an issue where the JSON blob for the CloudWatch events config was >8192 bytes causing CloudWatch to reject the change.

To get around this we used this module multiple times with the same team name with a smaller list of repositories.

We got a name collision on the Lambda permissions. To resolve this we would like to use prefixes.

@zoonage zoonage requested a review from a team as a code owner May 17, 2021 10:59
@zoonage
Copy link
Contributor Author

zoonage commented Jun 24, 2021

@itsdalmo

@zoonage
Copy link
Contributor Author

zoonage commented Aug 11, 2021

Apologies, going to tag everyone in the telia-oss org as itsdalmo no longer appears to be in it.

@mahe54 @manitua @mhadaily @mhd999 @Natanande @rickardl is it possible to get a review on this please?

@larstobi
Copy link

larstobi commented Dec 5, 2022

@zoonage In order not to force changes on existing uses of this, a conditional enablement of the statement_id_prefix would be preferable.

May I suggest adding a bool input variable defaulting to false called something like use_sid_prefix and then using it to determine whether or not to use statement_id_prefix or statement_id.

i.e.
variables.tf

variable "use_sid_prefix" {
  type = bool
  default = false
}

main.tf

resource "aws_lambda_permission" "main" {
  statement_id  = var.use_sid_prefix ? null : "concourse-${var.name}-github-lambda-permission"
  statement_id_prefix = var.use_sid_prefix ? "concourse-${var.name}-github-lambda-permission-" : null
}

@zoonage zoonage closed this Feb 8, 2023
@zoonage zoonage reopened this Feb 8, 2023
@zoonage
Copy link
Contributor Author

zoonage commented Feb 8, 2023

Hi @larstobi seems sensible for backwards compatibility, I've updated the PR accordingly

@larstobi larstobi merged commit 9002bd3 into telia-oss:master Feb 10, 2023
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