-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Description
Description
It would be great if the provider would check if the provided value for security_groups is syntactically valid in the current context. For example, on aws_scheduler_schedule -> target -> ecs_parameters -> network_configuration, you can provide security groups. The AWS api accepts any value, but silently expects a security group ID not an ARN. You only realize this issue when you check why your scheduled task did not execute and see an error like this in CloudTrail:
Error retrieving security group information for [arn:aws:ec2:eu-central-1:000000000000:security-group/sg-123456, arn:aws:ec2:eu-central-1:000000000000:security-group/sg-abcdef]: Invalid id: "arn:aws:ec2:eu-central-1:000000000000:security-group/sg-123456" (expecting "sg-...") (ErrorCode: InvalidGroupId.Malformed)
Affected Resource(s) or Data Source(s)
aws_scheduler_schedule(when configuring a ECS RunTask target in thenetworkblock withinecs_parametersblock)aws_ecs_service(in thenetwork_configurationblock)
Probably everywhere where names.AttrSecurityGroups is used.
Potential Terraform Configuration
References
No response
Would you like to implement the enhancement?
Yes