Revert "json-output: Release format version 1.0"

This commit is contained in:
Alisdair McDiarmid 2021-09-09 11:25:35 -04:00 committed by GitHub
parent a819d7db3a
commit cd29c3e5fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
38 changed files with 57 additions and 86 deletions

View File

@ -22,7 +22,7 @@ import (
// FormatVersion represents the version of the json format and will be
// incremented for any change to this format that requires changes to a
// consuming parser.
const FormatVersion = "1.0"
const FormatVersion = "0.2"
// Plan is the top-level representation of the json format of a plan. It includes
// the complete config and current state.

View File

@ -9,7 +9,7 @@ import (
// FormatVersion represents the version of the json format and will be
// incremented for any change to this format that requires changes to a
// consuming parser.
const FormatVersion = "1.0"
const FormatVersion = "0.2"
// providers is the top-level object returned when exporting provider schemas
type providers struct {

View File

@ -18,7 +18,7 @@ import (
// FormatVersion represents the version of the json format and will be
// incremented for any change to this format that requires changes to a
// consuming parser.
const FormatVersion = "1.0"
const FormatVersion = "0.2"
// state is the top-level representation of the json format of a terraform
// state.

View File

@ -1,5 +1,5 @@
{
"format_version": "1.0",
"format_version": "0.2",
"provider_schemas": {
"registry.terraform.io/hashicorp/test": {
"provider": {

View File

@ -1,3 +1,3 @@
{
"format_version": "1.0"
"format_version": "0.2"
}

View File

@ -1,5 +1,5 @@
{
"format_version": "1.0",
"format_version": "0.2",
"provider_schemas": {
"registry.terraform.io/hashicorp/test": {
"provider": {

View File

@ -1,5 +1,5 @@
{
"format_version": "1.0",
"format_version": "0.2",
"variables": {
"test_var": {
"value": "bar"
@ -66,7 +66,7 @@
}
},
"prior_state": {
"format_version": "1.0",
"format_version": "0.2",
"values": {
"outputs": {
"test": {

View File

@ -1,5 +1,5 @@
{
"format_version": "1.0",
"format_version": "0.2",
"terraform_version": "0.12.0",
"values": {
"root_module": {

View File

@ -1,3 +1,3 @@
{
"format_version": "1.0"
"format_version": "0.2"
}

View File

@ -1,5 +1,5 @@
{
"format_version": "1.0",
"format_version": "0.2",
"terraform_version": "0.12.0",
"values": {
"outputs": {

View File

@ -1,5 +1,5 @@
{
"format_version": "1.0",
"format_version": "0.2",
"terraform_version": "0.14.0",
"values": {
"root_module": {

View File

@ -1,5 +1,5 @@
{
"format_version": "1.0",
"format_version": "0.2",
"variables": {
"test_var": {
"value": "bar"
@ -57,7 +57,7 @@
}
},
"prior_state": {
"format_version": "1.0",
"format_version": "0.2",
"values": {
"outputs": {
"test": {

View File

@ -1,5 +1,5 @@
{
"format_version": "1.0",
"format_version": "0.2",
"variables": {
"test_var": {
"value": "bar"
@ -88,7 +88,7 @@
}
},
"prior_state": {
"format_version": "1.0",
"format_version": "0.2",
"values": {
"outputs": {
"test": {

View File

@ -1,5 +1,5 @@
{
"format_version": "1.0",
"format_version": "0.2",
"variables": {
"test_var": {
"value": "bar"
@ -68,7 +68,7 @@
}
},
"prior_state": {
"format_version": "1.0",
"format_version": "0.2",
"values": {
"outputs": {
"test": {

View File

@ -1,5 +1,5 @@
{
"format_version": "1.0",
"format_version": "0.2",
"planned_values": {
"root_module": {
"resources": [
@ -105,7 +105,7 @@
}
],
"prior_state": {
"format_version": "1.0",
"format_version": "0.2",
"values": {
"root_module": {
"resources": [

View File

@ -1,5 +1,5 @@
{
"format_version": "1.0",
"format_version": "0.2",
"terraform_version": "0.13.1-dev",
"planned_values": {
"root_module": {

View File

@ -1,5 +1,5 @@
{
"format_version": "1.0",
"format_version": "0.2",
"planned_values": {
"outputs": {
"test": {
@ -74,7 +74,7 @@
}
},
"prior_state": {
"format_version": "1.0",
"format_version": "0.2",
"values": {
"outputs": {
"test": {

View File

@ -1,5 +1,5 @@
{
"format_version": "1.0",
"format_version": "0.2",
"terraform_version": "0.13.0",
"variables": {
"test_var": {
@ -127,7 +127,7 @@
}
},
"prior_state": {
"format_version": "1.0",
"format_version": "0.2",
"terraform_version": "0.13.0",
"values": {
"outputs": {

View File

@ -1,5 +1,5 @@
{
"format_version": "1.0",
"format_version": "0.2",
"planned_values": {
"root_module": {
"child_modules": [

View File

@ -1,5 +1,5 @@
{
"format_version": "1.0",
"format_version": "0.2",
"variables": {
"test_var": {
"value": "bar"
@ -57,7 +57,7 @@
}
},
"prior_state": {
"format_version": "1.0",
"format_version": "0.2",
"values": {
"outputs": {
"test": {

View File

@ -1,5 +1,5 @@
{
"format_version": "1.0",
"format_version": "0.2",
"variables": {
"test_var": {
"value": "bar"
@ -57,7 +57,7 @@
}
},
"prior_state": {
"format_version": "1.0",
"format_version": "0.2",
"values": {
"outputs": {
"test": {

View File

@ -1,5 +1,5 @@
{
"format_version": "1.0",
"format_version": "0.2",
"planned_values": {
"root_module": {
"resources": [
@ -48,7 +48,7 @@
}
],
"prior_state": {
"format_version": "1.0",
"format_version": "0.2",
"values": {
"root_module": {
"resources": [

View File

@ -1,5 +1,5 @@
{
"format_version": "1.0",
"format_version": "0.2",
"variables": {
"test_var": {
"value": "boop"
@ -69,7 +69,7 @@
}
},
"prior_state": {
"format_version": "1.0",
"format_version": "0.2",
"values": {
"outputs": {
"test": {

View File

@ -1,5 +1,5 @@
{
"format_version": "1.0",
"format_version": "0.1",
"valid": false,
"error_count": 4,
"warning_count": 0,

View File

@ -1,5 +1,5 @@
{
"format_version": "1.0",
"format_version": "0.1",
"valid": false,
"error_count": 2,
"warning_count": 0,

View File

@ -1,5 +1,5 @@
{
"format_version": "1.0",
"format_version": "0.1",
"valid": true,
"error_count": 0,
"warning_count": 0,

View File

@ -1,5 +1,5 @@
{
"format_version": "1.0",
"format_version": "0.1",
"valid": false,
"error_count": 1,
"warning_count": 0,

View File

@ -1,5 +1,5 @@
{
"format_version": "1.0",
"format_version": "0.1",
"valid": false,
"error_count": 1,
"warning_count": 0,

View File

@ -1,5 +1,5 @@
{
"format_version": "1.0",
"format_version": "0.1",
"valid": false,
"error_count": 1,
"warning_count": 0,

View File

@ -1,5 +1,5 @@
{
"format_version": "1.0",
"format_version": "0.1",
"valid": false,
"error_count": 1,
"warning_count": 0,

View File

@ -1,5 +1,5 @@
{
"format_version": "1.0",
"format_version": "0.1",
"valid": false,
"error_count": 1,
"warning_count": 0,

View File

@ -1,5 +1,5 @@
{
"format_version": "1.0",
"format_version": "0.1",
"valid": false,
"error_count": 1,
"warning_count": 0,

View File

@ -1,5 +1,5 @@
{
"format_version": "1.0",
"format_version": "0.1",
"valid": false,
"error_count": 2,
"warning_count": 0,

View File

@ -1,5 +1,5 @@
{
"format_version": "1.0",
"format_version": "0.1",
"valid": true,
"error_count": 0,
"warning_count": 0,

View File

@ -81,7 +81,7 @@ func (v *ValidateJSON) Results(diags tfdiags.Diagnostics) int {
// FormatVersion represents the version of the json format and will be
// incremented for any change to this format that requires changes to a
// consuming parser.
const FormatVersion = "1.0"
const FormatVersion = "0.1"
type Output struct {
FormatVersion string `json:"format_version"`

View File

@ -23,18 +23,7 @@ The list of available flags are:
Please note that, at this time, the `-json` flag is a _required_ option. In future releases, this command will be extended to allow for additional options.
The output includes a `format_version` key, which as of Terraform 1.1.0 has
value `"1.0"`. The semantics of this version are:
- We will increment the minor version, e.g. `"1.1"`, for backward-compatible
changes or additions. Ignore any object properties with unrecognized names to
remain forward-compatible with future minor versions.
- We will increment the major version, e.g. `"2.0"`, for changes that are not
backward-compatible. Reject any input which reports an unsupported major
version.
We will introduce new major versions only within the bounds of
[the Terraform 1.0 Compatibility Promises](https://www.terraform.io/docs/language/v1-compatibility-promises.html).
-> **Note:** The output includes a `format_version` key, which currently has major version zero to indicate that the format is experimental and subject to change. A future version will assign a non-zero major version and make stronger promises about compatibility. We do not anticipate any significant breaking changes to the format before its first major version, however.
## Format Summary
@ -52,7 +41,7 @@ The JSON output format consists of the following objects and sub-objects:
```javascript
{
"format_version": "1.0",
"format_version": "0.1",
// "provider_schemas" describes the provider schemas for all
// providers throughout the configuration tree.

View File

@ -57,18 +57,11 @@ to the JSON output setting. For that reason, external software consuming
Terraform's output should be prepared to find data on stdout that _isn't_ valid
JSON, which it should then treat as a generic error case.
The output includes a `format_version` key, which as of Terraform 1.1.0 has
value `"1.0"`. The semantics of this version are:
- We will increment the minor version, e.g. `"1.1"`, for backward-compatible
changes or additions. Ignore any object properties with unrecognized names to
remain forward-compatible with future minor versions.
- We will increment the major version, e.g. `"2.0"`, for changes that are not
backward-compatible. Reject any input which reports an unsupported major
version.
We will introduce new major versions only within the bounds of
[the Terraform 1.0 Compatibility Promises](https://www.terraform.io/docs/language/v1-compatibility-promises.html).
**Note:** The output includes a `format_version` key, which currently has major
version zero to indicate that the format is experimental and subject to change.
A future version will assign a non-zero major version and make stronger
promises about compatibility. We do not anticipate any significant breaking
changes to the format before its first major version, however.
In the normal case, Terraform will print a JSON object to the standard output
stream. The top-level JSON object will have the following properties:

View File

@ -16,18 +16,7 @@ Since the format of plan files isn't suited for use with external tools (and lik
Use `terraform show -json <FILE>` to generate a JSON representation of a plan or state file. See [the `terraform show` documentation](/docs/cli/commands/show.html) for more details.
The output includes a `format_version` key, which as of Terraform 1.1.0 has
value `"1.0"`. The semantics of this version are:
- We will increment the minor version, e.g. `"1.1"`, for backward-compatible
changes or additions. Ignore any object properties with unrecognized names to
remain forward-compatible with future minor versions.
- We will increment the major version, e.g. `"2.0"`, for changes that are not
backward-compatible. Reject any input which reports an unsupported major
version.
We will introduce new major versions only within the bounds of
[the Terraform 1.0 Compatibility Promises](https://www.terraform.io/docs/language/v1-compatibility-promises.html).
-> **Note:** The output includes a `format_version` key, which currently has major version zero to indicate that the format is experimental and subject to change. A future version will assign a non-zero major version and make stronger promises about compatibility. We do not anticipate any significant breaking changes to the format before its first major version, however.
## Format Summary
@ -71,7 +60,7 @@ For ease of consumption by callers, the plan representation includes a partial r
```javascript
{
"format_version": "1.0",
"format_version": "0.2",
// "prior_state" is a representation of the state that the configuration is
// being applied to, using the state representation described above.