Skip to content

Commit

Permalink
Merge pull request #10106 from johngmyers/tf-json
Browse files Browse the repository at this point in the history
Remove dependency of TerraformJSON feature flag
  • Loading branch information
k8s-ci-robot committed Oct 26, 2020
2 parents ca39ece + f92d486 commit d739bae
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cmd/kops/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion upup/pkg/fi/cloudup/apply_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d739bae

Please sign in to comment.