Disallow TerraformJSON + TerraformManagedFiles and deprecate TerraformJSON

This commit is contained in:
Peter Rifel 2021-09-16 23:43:21 -05:00
parent ea5e302a84
commit eaea60ff07
No known key found for this signature in database
GPG Key ID: BC6469E5B16DB2B6
2 changed files with 7 additions and 0 deletions

View File

@ -136,6 +136,8 @@ For file assets, it means adding an explicit path as shown below:
* The `node-role.kubernetes.io/master` and `kubernetes.io/role` labels are deprecated and might be removed from control plane nodes in kOps 1.23.
* The `TerraformJSON` feature flag is deprecated and will be removed in kOps 1.23. Only native HCL2 Terraform output will be supported.
* Due to lack of maintainers, the Aliyun/Alibaba Cloud support has been deprecated. The current implementation will be left as-is until the implementation needs updates or otherwise becomes incompatible. At that point, it will be removed. We very much welcome anyone willing to contribute to this cloud provider.
* Due to lack of maintainers, the CloudFormation support has been deprecated. The current implementation will be left as-is until the implementation needs updates or otherwise becomes incompatible. At that point, it will be removed. We very much welcome anyone willing to contribute to this target.

View File

@ -17,6 +17,7 @@ limitations under the License.
package terraform
import (
"errors"
"fmt"
"io/ioutil"
"os"
@ -83,6 +84,10 @@ func tfGetProviderExtraConfig(c *kops.TargetSpec) map[string]string {
func (t *TerraformTarget) Finish(taskMap map[string]fi.Task) error {
var err error
if featureflag.TerraformJSON.Enabled() {
if featureflag.TerraformManagedFiles.Enabled() {
// Terraform's JSON representation doesn't support provider aliases which are required for managed files
return errors.New("TerraformJSON cannot be used with TerraformManagedFiles")
}
err = t.finishJSON()
} else {
err = t.finishHCL2()