-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Creating CloudWatch Log Group failed: ResourceAlreadyExistsException #411
Comments
Yes it's a new resource that will clash with the one that already exists if you have logging already enabled. You can just import the resource to resolve the issue:
|
Whenever I run this import, I see a message for "Import complete!" and then during the refresh that runs as the second step of the import I run into #402 where I see in the output |
I am also facing similar issue. this issue is mostly related to the resources log groups created by AWS. Since terraform has no control on these resources it fails stating log group already exists. I am facing an issues with /aws/lamda/xxxxx |
@bagarYas what was the resolution? I'm facing this issue with Lambda LogGroups created automatically by the AWS API when a Lambda Function is created, trying to manage them after they were created outside of terraform. I see the message, I import them, I try again and I see the message again. |
If you are providing This does mean you need to explicitly create the correct log group in Terraform, but this is already being done, otherwise you wouldn't be seeing the error! |
I tried to do the import, but it always asking the env var, and the cli has no option to add --var-file, any idea ? |
@bilalbayasut that is a slightly annoying import feature - having to provide variable values because you can't include .tfvars files etc! All you can do here is know what they should be, and when prompted, type the missing values You could add a temporary .tf file with the missing vars preset just to get you past the import Ideally you should let Terraform create the resource, so you could delete the log group and then apply quickly - which isn't ideal.... |
I've solved this by removing the log groups in aws console, and renaming the name property in log_groups resource in terraform, and then applied it |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
In current version of module (and few back) it is handled by creating a cloudwatch log group before creating a EKS so this should avoid such situations so closing this issue. Code is here: Line 51 in 1d848b5
|
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
This problem should be related to hashicorp/terraform-provider-aws#7406, but this problem makes the update impossible.
With the version v5.0.0 I can't apply the changes because:
I'm submitting a...
What is the current behavior?
If this is a bug, how to reproduce? Please include a code sample if relevant.
What's the expected behavior?
Are you able to fix this problem and submit a PR? Link here if you have already.
Environment details
Terraform v0.12.2
provider.aws v2.16.0
Any other relevant info
The text was updated successfully, but these errors were encountered: