Remove remaining references to TerraformJSON feature flag

This commit is contained in:
Peter Rifel 2021-12-25 07:49:19 -06:00
parent e0555bb431
commit 1772d0e39d
No known key found for this signature in database
GPG Key ID: BC6469E5B16DB2B6
3 changed files with 8 additions and 21 deletions

View File

@ -17,6 +17,5 @@ The following experimental features are currently available:
* `+SpotinstHybrid` - Toggles between hybrid and full instance group implementations
* `-SpotinstController` - Toggles the installation of the Spot controller addon off
* `+SkipEtcdVersionCheck` - Bypasses the check that etcd-manager is using a supported etcd version
* `+TerraformJSON` - Produce kubernetes.tf.json file instead of writing HCLv2 syntax. Can be consumed by terraform 0.12+
* `+VFSVaultSupport` - Enables setting Vault as secret/keystore
* `+APIServerNodes` - Enables support for dedicated API server nodes

View File

@ -9,13 +9,13 @@ The Terraform output should be reasonably stable (i.e. the text files should onl
Note that if you modify the Terraform files that kOps spits out, it will override your changes with the configuration state defined by its own configs. In other terms, kOps's own state is the ultimate source of truth (as far as kOps is concerned), and Terraform is a representation of that state for your convenience.
### Terraform Version Compatibility
| kOps Version | Terraform Version | Feature Flag Notes |
|--------------|-------------------|--------------------|
| >= 1.19 | >= 0.12.26, >= 0.13 | HCL2 supported by default <br>`KOPS_FEATURE_FLAGS=Terraform-0.12` is now deprecated |
| >= 1.18 | >= 0.12 | HCL2 supported by default |
| >= 1.18 | < 0.12 | `KOPS_FEATURE_FLAGS=-Terraform-0.12` |
| >= 1.17 | >= 0.12 | `KOPS_FEATURE_FLAGS=TerraformJSON` outputs JSON |
| <= 1.17 | < 0.12 | Supported by default |
| kOps Version | Terraform Version | Feature Flag Notes |
|-----------------|-------------------|--------------------|
| >= 1.19 | >= 0.12.26, >= 0.13 | HCL2 supported by default <br>`KOPS_FEATURE_FLAGS=Terraform-0.12` is now deprecated |
| >= 1.18 | >= 0.12 | HCL2 supported by default |
| >= 1.18 | < 0.12 | `KOPS_FEATURE_FLAGS=-Terraform-0.12` |
| >= 1.17, < 1.23 | >= 0.12 | `KOPS_FEATURE_FLAGS=TerraformJSON` outputs JSON |
| <= 1.17 | < 0.12 | Supported by default |
### Using Terraform
@ -137,14 +137,3 @@ Ps: You don't have to `kops delete cluster` if you just want to recreate from sc
Changes made with `kops edit` (like enabling RBAC and / or feature gates) will result in changes to the LaunchTemplate of your cluster nodes. After a `terraform apply`, they won't be applied right away since terraform will not launch new instances as part of that.
To see your changes applied to the cluster you'll also need to run `kops rolling-update` after running `terraform apply`. This will ensure that all nodes' changes have the desired settings configured with `kops edit`.
#### Terraform JSON output
With terraform 0.12 JSON is now officially supported as configuration language. To enable JSON output instead of HCLv2 output you need to enable it through a feature flag.
```
export KOPS_FEATURE_FLAGS=TerraformJSON
kops update cluster .....
```
This is an alternative to of using terraforms own configuration syntax HCL. Be sure to delete the existing kubernetes.tf file. Terraform will otherwise use both and then complain.

View File

@ -27,8 +27,7 @@ import (
// Literal represents a literal in terraform syntax
type Literal struct {
// Value is only used in JSON output via the TerraformJSON feature flag
// "${}" interpolation is supported.
// Value is used to support Terraform's "${}" interpolation
Value string `cty:"value"`
// Tokens are portions of a literal reference joined by periods.