diff --git a/plan/ci.go b/plan/ci.go index a376f57f8..9457e161e 100644 --- a/plan/ci.go +++ b/plan/ci.go @@ -401,7 +401,7 @@ func (p *Plan) buildAtlantisConfig(c *v2.Config) AtlantisConfig { uniqueModuleSources = append(uniqueModuleSources, *m.Source) } } - whenModified := []string{} + whenModified := []string{"*.tf"} if d.AutoplanRelativeGlobs != nil { whenModified = append(whenModified, d.AutoplanRelativeGlobs...) } diff --git a/testdata/v2_atlantis_depends_on/atlantis.yaml b/testdata/v2_atlantis_depends_on/atlantis.yaml index 59a09c303..21454d835 100644 --- a/testdata/v2_atlantis_depends_on/atlantis.yaml +++ b/testdata/v2_atlantis_depends_on/atlantis.yaml @@ -9,6 +9,7 @@ projects: terraform_version: 0.100.0 autoplan: when_modified: + - '*.tf' - ../../foo.yaml - ../../../modules/my_module/**/*.tf - ../../../modules/my_module/**/*.tf.json @@ -21,6 +22,7 @@ projects: terraform_version: 0.100.0 autoplan: when_modified: + - '*.tf' - '!remote-states.tf' - ../../../../foo_modules/parent_module/**/*.tf - ../../../../foo_modules/parent_module/**/*.tf.json @@ -39,6 +41,7 @@ projects: terraform_version: 0.100.0 autoplan: when_modified: + - '*.tf' - '!remote-states.tf' - ../../../modules/my_module/**/*.tf - ../../../modules/my_module/**/*.tf.json diff --git a/testdata/v2_tf_registry_module_atlantis/atlantis.yaml b/testdata/v2_tf_registry_module_atlantis/atlantis.yaml index e722a80ae..76961aa0e 100644 --- a/testdata/v2_tf_registry_module_atlantis/atlantis.yaml +++ b/testdata/v2_tf_registry_module_atlantis/atlantis.yaml @@ -9,6 +9,7 @@ projects: terraform_version: 0.100.0 autoplan: when_modified: + - '*.tf' - '!remote-states.tf' - ../../../modules/my_module/**/*.tf - ../../../modules/my_module/**/*.tf.json diff --git a/testdata/v2_tf_registry_module_atlantis_dup_module/atlantis.yaml b/testdata/v2_tf_registry_module_atlantis_dup_module/atlantis.yaml index 1a11ffad0..51138fc55 100644 --- a/testdata/v2_tf_registry_module_atlantis_dup_module/atlantis.yaml +++ b/testdata/v2_tf_registry_module_atlantis_dup_module/atlantis.yaml @@ -9,6 +9,7 @@ projects: terraform_version: 0.100.0 autoplan: when_modified: + - '*.tf' - '!remote-states.tf' - ../../../modules/my_module/**/*.tf - ../../../modules/my_module/**/*.tf.json