Skip to content

Added non-null constraint to terraform state name

Emily Ring requested to merge 300302-db-constraint-terraform-name into master

What does this MR do?

The Terraform::State model already validates :name, presence: true, from a previous MR

This MR will add a db constraint for null names.

Migrations

up

== 20210223143405 AddNullConstraintToTerraformStateName: migrating ============
-- change_column_null(:terraform_states, :name, false)
   -> 0.0038s
== 20210223143405 AddNullConstraintToTerraformStateName: migrated (0.0039s) ===

down

== 20210223143405 AddNullConstraintToTerraformStateName: reverting ============
-- change_column_null(:terraform_states, :name, true)
   -> 0.0021s
== 20210223143405 AddNullConstraintToTerraformStateName: reverted (0.0047s) ===

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Related to #300302 (closed)

Edited by Emily Ring

Merge request reports