diff --git a/cmd/kops/integration_test.go b/cmd/kops/integration_test.go index 0ac9b26838294..b5de0b0fa267d 100644 --- a/cmd/kops/integration_test.go +++ b/cmd/kops/integration_test.go @@ -194,9 +194,9 @@ func TestBastionAdditionalUserData(t *testing.T) { // TestMinimalJSON runs the test on a minimal data set and outputs JSON func TestMinimalJSON(t *testing.T) { - featureflag.ParseFlags("+TerraformJSON,-Terraform-0.12") + featureflag.ParseFlags("+TerraformJSON") unsetFeaureFlag := func() { - featureflag.ParseFlags("-TerraformJSON,+Terraform-0.12") + featureflag.ParseFlags("-TerraformJSON") } defer unsetFeaureFlag() newIntegrationTest("minimal-json.example.com", "minimal-json").withJSONOutput().runTestTerraformAWS(t) diff --git a/upup/pkg/fi/cloudup/apply_cluster.go b/upup/pkg/fi/cloudup/apply_cluster.go index 8ca371e70059c..7e5ac2879fd83 100644 --- a/upup/pkg/fi/cloudup/apply_cluster.go +++ b/upup/pkg/fi/cloudup/apply_cluster.go @@ -724,7 +724,7 @@ func (c *ApplyClusterCmd) Run(ctx context.Context) error { checkExisting = false outDir := c.OutDir tfVersion := terraform.Version011 - if featureflag.Terraform012.Enabled() { + if featureflag.Terraform012.Enabled() && !featureflag.TerraformJSON.Enabled() { tfVersion = terraform.Version012 } tf := terraform.NewTerraformTarget(cloud, region, project, outDir, tfVersion, cluster.Spec.Target) diff --git a/upup/pkg/fi/cloudup/awstasks/launchtemplate_target_terraform.go b/upup/pkg/fi/cloudup/awstasks/launchtemplate_target_terraform.go index ac2af71c091d7..3de3674f432a2 100644 --- a/upup/pkg/fi/cloudup/awstasks/launchtemplate_target_terraform.go +++ b/upup/pkg/fi/cloudup/awstasks/launchtemplate_target_terraform.go @@ -216,7 +216,7 @@ func (t *LaunchTemplate) RenderTerraform(target *terraform.TerraformTarget, a, e return err } if d != nil { - if featureflag.Terraform012.Enabled() { + if featureflag.Terraform012.Enabled() && !featureflag.TerraformJSON.Enabled() { userDataResource := fi.WrapResource(fi.NewBytesResource(d)) tf.UserData, err = target.AddFile("aws_launch_template", fi.StringValue(e.Name), "user_data", userDataResource, true)