-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
[Bug]: aws_inspector2_enabler does not work in ca-central-1 region #34039
Comments
Community NoteVoting for Prioritization
Volunteering to Work on This Issue
|
This same issue also occurs with provider version 5.23.1 for the
We get this error (obfuscated values with
|
Also happens with provider v The following is the only terraform resources we're trying to deploy
Terraform apply output
|
This issue still happens. |
AWS provider version 5.5 was the last provider where The resource This behavior can be reproduced with the following steps:
terraform {
required_version = "1.7.0"
required_providers {
aws = {
source = "hashicorp/aws"
version = "5.5"
# version = "> 5.5"
configuration_aliases = []
}
}
}
provider "aws" {
region = "eu-central-2"
}
data "aws_caller_identity" "current" {}
resource "aws_inspector2_enabler" "example" {
account_ids = [data.aws_caller_identity.current.account_id]
resource_types = ["ECR", "EC2", "LAMBDA"]
} This will affect regions not listed under "Lambda code scanning Regions": This issue could be avoided by not explicitly deactivating resource types that are already deactivated by default. {
"accounts": [
{
"accountId": "111111111111",
"resourceState": {
"ec2": {
"status": "ENABLED"
},
"ecr": {
"status": "ENABLED"
},
"lambda": {
"status": "ENABLED"
},
"lambdaCode": {
"status": "DISABLED" # LAMBDA_CODE is already disabled -> DO NOT DISABLE AGAIN
}
},
"state": {
"status": "ENABLED"
}
}
],
"failedAccounts": []
} |
Any update on this issue on the latest aws provider also 5.47.0 for ex. |
The workaround from @stefano-franco is not applicable if the inspector2 is enabled in the region earlier with other provider, and not disabling with latest providers. Need support on this. |
This issues only works with 5.5 provider, but it's not with latest version of provider. When it will be fixed and closed any deadline or plan. Kindly share it will be helpful. |
Hello, I have same problem in eu-west-3 region. Only works with 5.5.0 AWS Provider and not with last version at this time (5.56.1). Could you provide soon a quick fix ? That is very impacting in our production deployment. |
same issue in ap-south-1 for me, trying to enable only EC2 and ECR scanning but getting error that Lambda scanning is not supported in the region (we don't need lambda scanning, just to enable aws inspector on the organization for EC2 and ECR)
error
strangely when I remove the resource after this failure it tries to destroy it and fails with the same error :
|
Any progress on that? I'm encountering similar issue in the following regions:
|
Warning This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them. Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed. |
This functionality has been released in v5.69.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
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. |
Terraform Core Version
1.6.2
AWS Provider Version
5.22.0
Affected Resource(s)
aws_inspector2_enabler
Expected Behavior
I would expect
aws_inspector2_enabler
to work in theca-central-1
region.Actual Behavior
aws_inspector2_enabler
does not work in theca-central-1
region.Relevant Error/Panic Output Snippet
Error: updating Amazon Inspector Enabler (769954110362-EC2): operation error Inspector2: Disable, https response error StatusCode: 403, RequestID: dfeb4791-b3c3-4ceb-ada4-8021518def55, AccessDeniedException: Lambda code scanning is not supported in ca-central-1
Terraform Configuration Files
Steps to Reproduce
Try to
terraform apply
the above Terraform configuration and observe that it errors.Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
The following page documents the regions where Inspector Lambda code scanning is supported: https://docs.aws.amazon.com/inspector/latest/user/inspector_regions.html#ins-regional-feature-availability. This does not include
ca-central-1
and many other regions.Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered: