-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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: Complete-k8s output & add try to prometheus policy element index #1195
Conversation
@@ -109,7 +109,7 @@ module "irsa_amp_ingest" { | |||
kubernetes_namespace = local.namespace | |||
|
|||
kubernetes_service_account = local.ingest_service_account | |||
irsa_iam_policies = [aws_iam_policy.ingest[0].arn] | |||
irsa_iam_policies = [try(aws_iam_policy.ingest[0].arn, "")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure I understand this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if this is the best solution, but right now if you are trying to cleanup the complete-k8s addon for example, you'll face the failure explained in the details of the PR where aws_iam_policy.ingest is empty tuple
, when you try to the delete the resource (that was already deleted), because it's under a condition (if mng prometheus is enabled), this was the cleanest workaround I found. Terraform is trying to use the resource because it's also being used in the rest of the prometheus module and because it has that count condition
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it fixes an error so for now we'll go with it - we can revisit later to see if there is a better or more idiomatic way to resolve this
…aws-ia#1195) Co-authored-by: Apoorva Kulkarni <kuapoorv@amazon.com>
…aws-ia#1195) Co-authored-by: Apoorva Kulkarni <kuapoorv@amazon.com>
fyi: This still happens in 4.22 |
What does this PR do?
🛑 Please open an issue first to discuss any significant work and flesh out details/direction - we would hate for your time to be wasted.
Consult the CONTRIBUTING guide for submitting pull-requests.
Motivation
Even after cleaning up the log group manually it seems the workload itself is creating the log group again, therefore for the example disabling Terraform from managing the CW log group
More
pre-commit run -a
with this PRNote: Not all the PRs require a new example and/or doc page. In general:
docs/add-ons/*
is required for new a new addonFor Moderators
Additional Notes