Terraform

Terraform

Made by DeepSource
AWS instance with invalid AMI ID TF-L0015
Bug risk
Critical

The AMI ID provided in the source_ami is not valid.

AWS launch configuration with invalid AMI ID TF-L0021
Bug risk
Critical

The AMI ID provided in the image_id field of AWS launch configuration resource is not valid.

Detected a git or mercurial repository as a module source without pinning to a version TF-L0044
Bug risk
Major

Terraform allows you to source modules from source control repositories. If you do not pin the revision to use, the dependency you require may introduce unexpected breaking changes. To prevent this, always specify an explicit version to check out. Pinning to a mutable reference, such as a branch, still allows for unintended breaking changes. Semver style can help avoid this.

Invalid excess_capacity_termination_policy TF-L0053
Bug risk
Critical

excess_capacity_termination_policy value provided for Amazon EC2 SpotFleetRequestConfigData is not valid. This field indicates whether running Spot Instances should be terminated if you decrease the target capacity of the Spot Fleet request below the current size of the Spot Fleet.

Invalid AWS Load Banancer subnet ID TF-L0002
Bug risk
Critical

When you create an Application Load Balancer, you must specify one of the following types of subnets: Availability Zone, Local Zone, or Outpost. Here, the ALB subnet id is not valid. Ref: https://docs.aws.amazon.com/elasticloadbalancing/latest/application/application-load-balancers.html#subnets-load-balancer

Invalid AWS DB subnet group name TF-L0003
Bug risk
Critical

AWS DB subnet groups must contain at least one subnet in at least two AZs in the AWS Region. The requirements for a valid DBSubnetGroupName are:

Invalid AWS DB OptionGroupName TF-L0004
Bug risk
Major

The OptionGroupName provided is not valid. Here are the constraints: - Must be 1 to 255 letters, numbers, or hyphens

Invalid AWS VPC Security Group TF-L0007
Bug risk
Major

Each Virtual Private Cloud security group rule enables a specific source to access a DB instance in a VPC that is associated with that VPC security group. The security group provided in the configuration doesn't look valid here. Ref: https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html

Deprecated interpolation TF-L0037
Bug risk
Major

Terraform v0.12 introduces a new interpolation syntax, but continues to support the old 0.11-style interpolation syntax for compatibility. Terraform will currently print diagnostic warnings when deprecated interpolations are used. Consistent with its deprecation policy, they will raise errors in the next major release (v0.13). It is recommended to switch to the new interpolation syntax.

Legacy dot index syntax TF-L0038
Bug risk
Major

Terraform v0.12 supports traditional square brackets for accessing list items by index. However, for backward compatibility with v0.11, Terraform continues to support accessing list items with the dot syntax normally used for attributes. While Terraform does not print warnings for this syntax, it is no longer documented and its use is discouraged.

Unused declaration TF-L0039
Bug risk
Major

Terraform will ignore variables and locals that are not used. It will refresh declared data sources regardless of usage. However, unreferenced variables likely indicate either a bug (and should be referenced) or removed code (and should be removed).

terraform declarations without require_version TF-L0046
Bug risk
Major

The required_version setting can be used to constrain which versions of the Terraform CLI can be used with your configuration. If the running version of Terraform doesn't match the constraints specified, Terraform will produce an error and exit without taking any further actions. It is recommended to add the required_version attribute to the terraform configuration block.

Provider doesn't have version constraint TF-L0047
Bug risk
Major

All providers should have version constraints through required_providers. Providers are plugins released on a separate rhythm from Terraform itself, and so they have their own version numbers.

Invalid ACL value for AWS S3 bucket TF-L0051
Bug risk
Critical

Amazon S3 access control lists (ACLs) enable you to manage access to buckets and objects. Each bucket and object has an ACL attached to it as a subresource. It defines which AWS accounts or groups are granted access and the type of access.

Invalid AWS S3 bucket region TF-L0052
Bug risk
Critical

An invalid region has been provided to AWS S3 bucket resource. The available regions are: - EU

Invalid AWS Application Load Balancer security group TF-L0001
Bug risk
Critical

In a Virtual Private Cloud, you provide the security group for your load balancer, which enables you to choose the ports and protocols to allow. Here, the security group provided is not valid.

Invalid ParameterGroupName for AWS DB instance TF-L0005
Bug risk
Critical

The ParameterGroupName provided is not valid. Here are the constraints: - Must be 1 to 255 letters, numbers, or hyphens.

Missing routing target in aws_route resource TF-L0030
Bug risk
Major

The routing target is not specified for the aws_route resource. Each aws_route must contain either of these: - egress_only_gateway_id