mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
Rollout equivalence testing during Terraform releases and builds (#31928)
* add some basic equivalence tests and execute them in the build pipeline * remove old file, now unused * update terraform-equivalence-testing to v0.2.0 * add separate action * make sure to read from hashicorp repo * remove elevated github token where possible * Don't need elevated token anymore * update with official mock provider * last change: don't need the authorization header for public repositories.
This commit is contained in:
parent
2b14670dfd
commit
37b88b33ce
234
.github/workflows/equivalence-test.yml
vendored
234
.github/workflows/equivalence-test.yml
vendored
@ -1,27 +1,235 @@
|
||||
name: Terraform Equivalence Tests
|
||||
|
||||
# This action will execute the suite of Terraform equivalence tests after a
|
||||
# tag has been pushed for a new version.
|
||||
#
|
||||
# For now, it is just a skeleton action that will be populated shortly.
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
terraform-version:
|
||||
type: string
|
||||
required: true
|
||||
description: "the Terraform version to equivalence test, eg. v1.3.1"
|
||||
run-id:
|
||||
description: "terraform-version: The Terraform version to test (eg. v1.3.1, 1.3.2)."
|
||||
build-run-id:
|
||||
type: string
|
||||
required: true
|
||||
description: "the run identifier of a successful `Build Terraform CLI Packages` action that contains artifacts for the target version"
|
||||
description: "build-run-id: The `Build Terraform CLI Packages` run to retrieve built Terraform binaries from."
|
||||
workflow_run:
|
||||
workflows: [Build Terraform CLI Packages]
|
||||
types:
|
||||
- completed
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
contents: write
|
||||
|
||||
env:
|
||||
terraform-equivalence-testing-version: v0.2.0
|
||||
target-os: linux
|
||||
target-arch: amd64
|
||||
|
||||
jobs:
|
||||
skeleton-job:
|
||||
name: "Temporary job to be released with real work"
|
||||
get-metadata:
|
||||
name: "Determine Terraform version and other metadata"
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
outputs:
|
||||
run-equivalence-tests: ${{ steps.metadata.outputs.run-equivalence-tests }}
|
||||
terraform-version: ${{ steps.metadata.outputs.terraform-version }}
|
||||
build-run-id: ${{ steps.metadata.outputs.build-run-id }}
|
||||
target-branch: ${{ steps.metadata.outputs.target-branch }}
|
||||
|
||||
steps:
|
||||
- run: echo "Hello, world!"
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ github.event.workflow_run.head_branch }}
|
||||
|
||||
- id: metadata
|
||||
run: |
|
||||
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
|
||||
# Then we map all our outputs from the user supplied inputs.
|
||||
RUN_EQUIVALENCE_TESTS=true
|
||||
TERRAFORM_VERSION=${{ inputs.terraform-version }}
|
||||
BUILD_RUN_ID=${{ inputs.build-run-id }}
|
||||
else
|
||||
# Quick sanity check, if the workflow_run that triggered this action
|
||||
# failed then we shouldn't carry on.
|
||||
if [[ "${{ github.event.workflow_run.conclusion }}" != "success" ]]; then
|
||||
echo "::set-output name=run-equivalence-tests::false"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Otherwise, we have to pull our outputs from the workflow_run event
|
||||
# information.
|
||||
TERRAFORM_VERSION=${{ github.event.workflow_run.head_branch }}
|
||||
|
||||
if git show-ref -q --verify refs/tags/$TERRAFORM_VERSION; then
|
||||
# Then our trigger was from a new tag being pushed, so we want to
|
||||
# run the equivalence tests and we need to work some things out.
|
||||
RUN_EQUIVALENCE_TESTS=true
|
||||
BUILD_RUN_ID=${{ github.event.workflow_run.id }}
|
||||
else
|
||||
# Then our trigger wasn't from a new tag being pushed, this is
|
||||
# easy as we just skip running the equivalence tests.
|
||||
RUN_EQUIVALENCE_TESTS=false
|
||||
fi
|
||||
fi
|
||||
|
||||
# One last thing to do is to work out which branch we want to operate
|
||||
# against. This could be `main` for an alpha build, or a release
|
||||
# branch (eg. v1.1, v1.2, v1.3) for any other kind of build.
|
||||
|
||||
# Trim the "v" prefix, if any.
|
||||
VERSION="${TERRAFORM_VERSION#v}"
|
||||
|
||||
# Split off the build metadata part, if any
|
||||
# (we won't actually include it in our final version, and handle it only for
|
||||
# compleness against semver syntax.)
|
||||
IFS='+' read -ra VERSION BUILD_META <<< "$VERSION"
|
||||
|
||||
# Separate out the prerelease part, if any
|
||||
IFS='-' read -r BASE_VERSION PRERELEASE <<< "$VERSION"
|
||||
|
||||
# Separate out major, minor and patch versions.
|
||||
IFS='.' read -r MAJOR_VERSION MINOR_VERSION PATCH_VERSION <<< "$BASE_VERSION"
|
||||
|
||||
if [[ "$PRERELEASE" == *"alpha"* ]]; then
|
||||
TARGET_BRANCH=main
|
||||
else
|
||||
TARGET_BRANCH=v${MAJOR_VERSION}.${MINOR_VERSION}
|
||||
fi
|
||||
|
||||
echo "::set-output name=target-branch::${TARGET_BRANCH}"
|
||||
echo "::set-output name=terraform-version::${TERRAFORM_VERSION}"
|
||||
echo "::set-output name=build-run-id::${BUILD_RUN_ID}"
|
||||
echo "::set-output name=run-equivalence-tests::${RUN_EQUIVALENCE_TESTS}"
|
||||
|
||||
prepare-equivalence-tests:
|
||||
name: "Prepare equivalence testing binary"
|
||||
if: ${{ needs.get-metadata.outputs.run-equivalence-tests == 'true' }}
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- get-metadata
|
||||
|
||||
steps:
|
||||
- name: "Download terraform-equivalence-testing binary"
|
||||
run: |
|
||||
curl \
|
||||
-H "Accept: application/vnd.github+json" \
|
||||
"https://api.github.com/repos/hashicorp/terraform-equivalence-testing/releases" > releases.json
|
||||
|
||||
VERSION="${{ env.terraform-equivalence-testing-version }}"
|
||||
ASSET="terraform-equivalence-testing_${VERSION}_${{ env.target-os }}_${{ env.target-arch }}.zip"
|
||||
ASSET_ID=$(jq -r --arg VERSION "$VERSION" --arg ASSET "$ASSET" '.[] | select(.name == $VERSION) | .assets[] | select(.name == $ASSET) | .id' releases.json)
|
||||
|
||||
curl -L \
|
||||
-H "Accept: application/octet-stream" \
|
||||
"https://api.github.com/repos/hashicorp/terraform-equivalence-testing/releases/assets/$ASSET_ID" > "$ASSET"
|
||||
|
||||
- name: "Unzip terraform-equivalence-testing binary"
|
||||
run: |
|
||||
ASSET="terraform-equivalence-testing_${{ env.terraform-equivalence-testing-version }}_${{ env.target-os }}_${{ env.target-arch }}.zip"
|
||||
unzip -p "$ASSET" terraform-equivalence-testing > terraform-equivalence-testing
|
||||
|
||||
- name: "Upload terraform-equivalence-testing binary"
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: terraform-equivalence-testing
|
||||
path: terraform-equivalence-testing
|
||||
|
||||
prepare-terraform:
|
||||
name: "Prepare Terraform binary"
|
||||
if: ${{ needs.get-metadata.outputs.run-equivalence-tests == 'true' }}
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- get-metadata
|
||||
|
||||
env:
|
||||
terraform-version: ${{ needs.get-metadata.outputs.terraform-version }}
|
||||
build-run-id: ${{ needs.get-metadata.outputs.build-run-id }}
|
||||
|
||||
steps:
|
||||
- name: "Download terraform binary"
|
||||
run: |
|
||||
curl \
|
||||
-H "Accept: application/vnd.github+json" \
|
||||
"https://api.github.com/repos/hashicorp/terraform/actions/runs/${{ env.build-run-id }}/artifacts" > artifacts.json
|
||||
|
||||
VERSION="${{ env.terraform-version }}" # The Terraform artifacts don't have the `v` prefix.
|
||||
ARTIFACT="terraform_${VERSION#v}_${{ env.target-os }}_${{ env.target-arch }}.zip"
|
||||
ARTIFACT_ID=$(jq -r --arg ARTIFACT "$ARTIFACT" '.artifacts | .[] | select(.name == $ARTIFACT) | .id' artifacts.json)
|
||||
|
||||
curl -L \
|
||||
-H "Accept: application/vnd.github+json" \
|
||||
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
|
||||
"https://api.github.com/repos/hashicorp/terraform/actions/artifacts/$ARTIFACT_ID/zip" > "$ARTIFACT.zip"
|
||||
|
||||
- name: "Unzip terraform binary"
|
||||
run: |
|
||||
VERSION="${{ env.terraform-version }}" # The Terraform artifacts don't have the `v` prefix.
|
||||
ARTIFACT="terraform_${VERSION#v}_${{ env.target-os }}_${{ env.target-arch }}.zip"
|
||||
|
||||
# We actually have nested zip files, as the Github API downloads the
|
||||
# artifacts in a zip file and the Terraform build action embeds the
|
||||
# terraform binary in a zip file also.
|
||||
|
||||
unzip $ARTIFACT.zip
|
||||
unzip $ARTIFACT
|
||||
|
||||
- name: "Upload terraform binary"
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: terraform
|
||||
path: terraform
|
||||
|
||||
run-equivalence-tests:
|
||||
name: "Run equivalence tests"
|
||||
if: ${{ needs.get-metadata.outputs.run-equivalence-tests == 'true' }}
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- get-metadata
|
||||
- prepare-terraform
|
||||
- prepare-equivalence-tests
|
||||
|
||||
env:
|
||||
target-branch: ${{ needs.get-metadata.outputs.target-branch }}
|
||||
terraform-version: ${{ needs.get-metadata.outputs.terraform-version }}
|
||||
|
||||
steps:
|
||||
- name: "Checkout repository at target branch ${{ env.target-branch }}"
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ env.target-branch }}
|
||||
|
||||
- name: "Download Terraform binary"
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: terraform
|
||||
path: .
|
||||
|
||||
- name: "Download terraform-equivalence-testing binary"
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: terraform-equivalence-testing
|
||||
path: .
|
||||
|
||||
- name: "Run and update equivalence tests"
|
||||
run: |
|
||||
chmod u+x ./terraform-equivalence-testing
|
||||
chmod u+x ./terraform
|
||||
|
||||
./terraform-equivalence-testing update \
|
||||
--tests=testing/equivalence-tests/tests \
|
||||
--goldens=testing/equivalence-tests/outputs \
|
||||
--binary=$(pwd)/terraform
|
||||
|
||||
changed=$(git diff --quiet -- testing/equivalence-tests/outputs || echo true)
|
||||
if [[ $changed == "true" ]]; then
|
||||
echo "found changes, and pushing new golden files into branch ${{ env.target-branch }}."
|
||||
|
||||
git config user.email "52939924+teamterraform@users.noreply.github.com"
|
||||
git config user.name "The Terraform Team"
|
||||
|
||||
git add ./testing/equivalence-tests/outputs
|
||||
git commit -m"Automated equivalence test golden file update for release ${{ env.terraform-version }}."
|
||||
git push
|
||||
else
|
||||
echo "found no changes, so not pushing any updates."
|
||||
fi
|
||||
|
@ -0,0 +1,78 @@
|
||||
[
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "local_file.local_file: Plan to create",
|
||||
"@module": "terraform.ui",
|
||||
"change": {
|
||||
"action": "create",
|
||||
"resource": {
|
||||
"addr": "local_file.local_file",
|
||||
"implied_provider": "local",
|
||||
"module": "",
|
||||
"resource": "local_file.local_file",
|
||||
"resource_key": null,
|
||||
"resource_name": "local_file",
|
||||
"resource_type": "local_file"
|
||||
}
|
||||
},
|
||||
"type": "planned_change"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "local_file.local_file: Creating...",
|
||||
"@module": "terraform.ui",
|
||||
"hook": {
|
||||
"action": "create",
|
||||
"resource": {
|
||||
"addr": "local_file.local_file",
|
||||
"implied_provider": "local",
|
||||
"module": "",
|
||||
"resource": "local_file.local_file",
|
||||
"resource_key": null,
|
||||
"resource_name": "local_file",
|
||||
"resource_type": "local_file"
|
||||
}
|
||||
},
|
||||
"type": "apply_start"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "local_file.local_file: Creation complete after 0s [id=2248ee2fa0aaaad99178531f924bf00b4b0a8f4e]",
|
||||
"@module": "terraform.ui",
|
||||
"hook": {
|
||||
"action": "create",
|
||||
"elapsed_seconds": 0,
|
||||
"id_key": "id",
|
||||
"id_value": "2248ee2fa0aaaad99178531f924bf00b4b0a8f4e",
|
||||
"resource": {
|
||||
"addr": "local_file.local_file",
|
||||
"implied_provider": "local",
|
||||
"module": "",
|
||||
"resource": "local_file.local_file",
|
||||
"resource_key": null,
|
||||
"resource_name": "local_file",
|
||||
"resource_type": "local_file"
|
||||
}
|
||||
},
|
||||
"type": "apply_complete"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "Apply complete! Resources: 1 added, 0 changed, 0 destroyed.",
|
||||
"@module": "terraform.ui",
|
||||
"changes": {
|
||||
"add": 1,
|
||||
"change": 0,
|
||||
"operation": "apply",
|
||||
"remove": 0
|
||||
},
|
||||
"type": "change_summary"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "Outputs: 0",
|
||||
"@module": "terraform.ui",
|
||||
"outputs": {},
|
||||
"type": "outputs"
|
||||
}
|
||||
]
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"hello": "world"
|
||||
}
|
28
testing/equivalence-tests/outputs/local_provider_basic/plan
Normal file
28
testing/equivalence-tests/outputs/local_provider_basic/plan
Normal file
@ -0,0 +1,28 @@
|
||||
|
||||
Terraform used the selected providers to generate the following execution
|
||||
plan. Resource actions are indicated with the following symbols:
|
||||
+ create
|
||||
|
||||
Terraform will perform the following actions:
|
||||
|
||||
# local_file.local_file will be created
|
||||
+ resource "local_file" "local_file" {
|
||||
+ content = jsonencode(
|
||||
{
|
||||
+ hello = "world"
|
||||
}
|
||||
)
|
||||
+ directory_permission = "0777"
|
||||
+ file_permission = "0777"
|
||||
+ filename = "output.json"
|
||||
+ id = (known after apply)
|
||||
}
|
||||
|
||||
Plan: 1 to add, 0 to change, 0 to destroy.
|
||||
|
||||
─────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Saved the plan to: equivalence_test_plan
|
||||
|
||||
To perform exactly these actions, run the following command to apply:
|
||||
terraform apply "equivalence_test_plan"
|
@ -0,0 +1,89 @@
|
||||
{
|
||||
"configuration": {
|
||||
"provider_config": {
|
||||
"local": {
|
||||
"full_name": "registry.terraform.io/hashicorp/local",
|
||||
"name": "local",
|
||||
"version_constraint": "2.2.3"
|
||||
}
|
||||
},
|
||||
"root_module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "local_file.local_file",
|
||||
"expressions": {
|
||||
"content": {
|
||||
"references": [
|
||||
"local.contents"
|
||||
]
|
||||
},
|
||||
"filename": {
|
||||
"constant_value": "output.json"
|
||||
}
|
||||
},
|
||||
"mode": "managed",
|
||||
"name": "local_file",
|
||||
"provider_config_key": "local",
|
||||
"schema_version": 0,
|
||||
"type": "local_file"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"format_version": "1.1",
|
||||
"planned_values": {
|
||||
"root_module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "local_file.local_file",
|
||||
"mode": "managed",
|
||||
"name": "local_file",
|
||||
"provider_name": "registry.terraform.io/hashicorp/local",
|
||||
"schema_version": 0,
|
||||
"sensitive_values": {},
|
||||
"type": "local_file",
|
||||
"values": {
|
||||
"content": "{\"hello\":\"world\"}",
|
||||
"content_base64": null,
|
||||
"directory_permission": "0777",
|
||||
"file_permission": "0777",
|
||||
"filename": "output.json",
|
||||
"sensitive_content": null,
|
||||
"source": null
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"resource_changes": [
|
||||
{
|
||||
"address": "local_file.local_file",
|
||||
"change": {
|
||||
"actions": [
|
||||
"create"
|
||||
],
|
||||
"after": {
|
||||
"content": "{\"hello\":\"world\"}",
|
||||
"content_base64": null,
|
||||
"directory_permission": "0777",
|
||||
"file_permission": "0777",
|
||||
"filename": "output.json",
|
||||
"sensitive_content": null,
|
||||
"source": null
|
||||
},
|
||||
"after_sensitive": {
|
||||
"sensitive_content": true
|
||||
},
|
||||
"after_unknown": {
|
||||
"id": true
|
||||
},
|
||||
"before": null,
|
||||
"before_sensitive": false
|
||||
},
|
||||
"mode": "managed",
|
||||
"name": "local_file",
|
||||
"provider_name": "registry.terraform.io/hashicorp/local",
|
||||
"type": "local_file"
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
{
|
||||
"format_version": "1.0",
|
||||
"values": {
|
||||
"root_module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "local_file.local_file",
|
||||
"mode": "managed",
|
||||
"name": "local_file",
|
||||
"provider_name": "registry.terraform.io/hashicorp/local",
|
||||
"schema_version": 0,
|
||||
"sensitive_values": {},
|
||||
"type": "local_file",
|
||||
"values": {
|
||||
"content": "{\"hello\":\"world\"}",
|
||||
"content_base64": null,
|
||||
"directory_permission": "0777",
|
||||
"file_permission": "0777",
|
||||
"filename": "output.json",
|
||||
"id": "2248ee2fa0aaaad99178531f924bf00b4b0a8f4e",
|
||||
"sensitive_content": null,
|
||||
"source": null
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
[
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "local_file.local_file: Plan to delete",
|
||||
"@module": "terraform.ui",
|
||||
"change": {
|
||||
"action": "delete",
|
||||
"reason": "delete_because_no_resource_config",
|
||||
"resource": {
|
||||
"addr": "local_file.local_file",
|
||||
"implied_provider": "local",
|
||||
"module": "",
|
||||
"resource": "local_file.local_file",
|
||||
"resource_key": null,
|
||||
"resource_name": "local_file",
|
||||
"resource_type": "local_file"
|
||||
}
|
||||
},
|
||||
"type": "planned_change"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "local_file.local_file: Destroying... [id=2248ee2fa0aaaad99178531f924bf00b4b0a8f4e]",
|
||||
"@module": "terraform.ui",
|
||||
"hook": {
|
||||
"action": "delete",
|
||||
"id_key": "id",
|
||||
"id_value": "2248ee2fa0aaaad99178531f924bf00b4b0a8f4e",
|
||||
"resource": {
|
||||
"addr": "local_file.local_file",
|
||||
"implied_provider": "local",
|
||||
"module": "",
|
||||
"resource": "local_file.local_file",
|
||||
"resource_key": null,
|
||||
"resource_name": "local_file",
|
||||
"resource_type": "local_file"
|
||||
}
|
||||
},
|
||||
"type": "apply_start"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "local_file.local_file: Destruction complete after 0s",
|
||||
"@module": "terraform.ui",
|
||||
"hook": {
|
||||
"action": "delete",
|
||||
"elapsed_seconds": 0,
|
||||
"resource": {
|
||||
"addr": "local_file.local_file",
|
||||
"implied_provider": "local",
|
||||
"module": "",
|
||||
"resource": "local_file.local_file",
|
||||
"resource_key": null,
|
||||
"resource_name": "local_file",
|
||||
"resource_type": "local_file"
|
||||
}
|
||||
},
|
||||
"type": "apply_complete"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "Apply complete! Resources: 0 added, 0 changed, 1 destroyed.",
|
||||
"@module": "terraform.ui",
|
||||
"changes": {
|
||||
"add": 0,
|
||||
"change": 0,
|
||||
"operation": "apply",
|
||||
"remove": 1
|
||||
},
|
||||
"type": "change_summary"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "Outputs: 0",
|
||||
"@module": "terraform.ui",
|
||||
"outputs": {},
|
||||
"type": "outputs"
|
||||
}
|
||||
]
|
30
testing/equivalence-tests/outputs/local_provider_delete/plan
Normal file
30
testing/equivalence-tests/outputs/local_provider_delete/plan
Normal file
@ -0,0 +1,30 @@
|
||||
local_file.local_file: Refreshing state... [id=2248ee2fa0aaaad99178531f924bf00b4b0a8f4e]
|
||||
|
||||
Terraform used the selected providers to generate the following execution
|
||||
plan. Resource actions are indicated with the following symbols:
|
||||
- destroy
|
||||
|
||||
Terraform will perform the following actions:
|
||||
|
||||
# local_file.local_file will be destroyed
|
||||
# (because local_file.local_file is not in configuration)
|
||||
- resource "local_file" "local_file" {
|
||||
- content = jsonencode(
|
||||
{
|
||||
- hello = "world"
|
||||
}
|
||||
) -> null
|
||||
- directory_permission = "0777" -> null
|
||||
- file_permission = "0777" -> null
|
||||
- filename = "output.json" -> null
|
||||
- id = "2248ee2fa0aaaad99178531f924bf00b4b0a8f4e" -> null
|
||||
}
|
||||
|
||||
Plan: 0 to add, 0 to change, 1 to destroy.
|
||||
|
||||
─────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Saved the plan to: equivalence_test_plan
|
||||
|
||||
To perform exactly these actions, run the following command to apply:
|
||||
terraform apply "equivalence_test_plan"
|
@ -0,0 +1,75 @@
|
||||
{
|
||||
"configuration": {
|
||||
"provider_config": {
|
||||
"local": {
|
||||
"full_name": "registry.terraform.io/hashicorp/local",
|
||||
"name": "local",
|
||||
"version_constraint": "2.2.3"
|
||||
}
|
||||
},
|
||||
"root_module": {}
|
||||
},
|
||||
"format_version": "1.1",
|
||||
"planned_values": {
|
||||
"root_module": {}
|
||||
},
|
||||
"prior_state": {
|
||||
"format_version": "1.0",
|
||||
"values": {
|
||||
"root_module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "local_file.local_file",
|
||||
"mode": "managed",
|
||||
"name": "local_file",
|
||||
"provider_name": "registry.terraform.io/hashicorp/local",
|
||||
"schema_version": 0,
|
||||
"sensitive_values": {},
|
||||
"type": "local_file",
|
||||
"values": {
|
||||
"content": "{\"hello\":\"world\"}",
|
||||
"content_base64": null,
|
||||
"directory_permission": "0777",
|
||||
"file_permission": "0777",
|
||||
"filename": "output.json",
|
||||
"id": "2248ee2fa0aaaad99178531f924bf00b4b0a8f4e",
|
||||
"sensitive_content": null,
|
||||
"source": null
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"resource_changes": [
|
||||
{
|
||||
"action_reason": "delete_because_no_resource_config",
|
||||
"address": "local_file.local_file",
|
||||
"change": {
|
||||
"actions": [
|
||||
"delete"
|
||||
],
|
||||
"after": null,
|
||||
"after_sensitive": false,
|
||||
"after_unknown": {},
|
||||
"before": {
|
||||
"content": "{\"hello\":\"world\"}",
|
||||
"content_base64": null,
|
||||
"directory_permission": "0777",
|
||||
"file_permission": "0777",
|
||||
"filename": "output.json",
|
||||
"id": "2248ee2fa0aaaad99178531f924bf00b4b0a8f4e",
|
||||
"sensitive_content": null,
|
||||
"source": null
|
||||
},
|
||||
"before_sensitive": {
|
||||
"sensitive_content": true
|
||||
}
|
||||
},
|
||||
"mode": "managed",
|
||||
"name": "local_file",
|
||||
"provider_name": "registry.terraform.io/hashicorp/local",
|
||||
"type": "local_file"
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"format_version": "1.0"
|
||||
}
|
@ -0,0 +1,118 @@
|
||||
[
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "local_file.local_file: Plan to replace",
|
||||
"@module": "terraform.ui",
|
||||
"change": {
|
||||
"action": "replace",
|
||||
"reason": "cannot_update",
|
||||
"resource": {
|
||||
"addr": "local_file.local_file",
|
||||
"implied_provider": "local",
|
||||
"module": "",
|
||||
"resource": "local_file.local_file",
|
||||
"resource_key": null,
|
||||
"resource_name": "local_file",
|
||||
"resource_type": "local_file"
|
||||
}
|
||||
},
|
||||
"type": "planned_change"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "local_file.local_file: Destroying... [id=2248ee2fa0aaaad99178531f924bf00b4b0a8f4e]",
|
||||
"@module": "terraform.ui",
|
||||
"hook": {
|
||||
"action": "delete",
|
||||
"id_key": "id",
|
||||
"id_value": "2248ee2fa0aaaad99178531f924bf00b4b0a8f4e",
|
||||
"resource": {
|
||||
"addr": "local_file.local_file",
|
||||
"implied_provider": "local",
|
||||
"module": "",
|
||||
"resource": "local_file.local_file",
|
||||
"resource_key": null,
|
||||
"resource_name": "local_file",
|
||||
"resource_type": "local_file"
|
||||
}
|
||||
},
|
||||
"type": "apply_start"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "local_file.local_file: Destruction complete after 0s",
|
||||
"@module": "terraform.ui",
|
||||
"hook": {
|
||||
"action": "delete",
|
||||
"elapsed_seconds": 0,
|
||||
"resource": {
|
||||
"addr": "local_file.local_file",
|
||||
"implied_provider": "local",
|
||||
"module": "",
|
||||
"resource": "local_file.local_file",
|
||||
"resource_key": null,
|
||||
"resource_name": "local_file",
|
||||
"resource_type": "local_file"
|
||||
}
|
||||
},
|
||||
"type": "apply_complete"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "local_file.local_file: Creating...",
|
||||
"@module": "terraform.ui",
|
||||
"hook": {
|
||||
"action": "create",
|
||||
"resource": {
|
||||
"addr": "local_file.local_file",
|
||||
"implied_provider": "local",
|
||||
"module": "",
|
||||
"resource": "local_file.local_file",
|
||||
"resource_key": null,
|
||||
"resource_name": "local_file",
|
||||
"resource_type": "local_file"
|
||||
}
|
||||
},
|
||||
"type": "apply_start"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "local_file.local_file: Creation complete after 0s [id=648a5452054fca119f95b07f9ea992cc6d9681df]",
|
||||
"@module": "terraform.ui",
|
||||
"hook": {
|
||||
"action": "create",
|
||||
"elapsed_seconds": 0,
|
||||
"id_key": "id",
|
||||
"id_value": "648a5452054fca119f95b07f9ea992cc6d9681df",
|
||||
"resource": {
|
||||
"addr": "local_file.local_file",
|
||||
"implied_provider": "local",
|
||||
"module": "",
|
||||
"resource": "local_file.local_file",
|
||||
"resource_key": null,
|
||||
"resource_name": "local_file",
|
||||
"resource_type": "local_file"
|
||||
}
|
||||
},
|
||||
"type": "apply_complete"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "Apply complete! Resources: 1 added, 0 changed, 1 destroyed.",
|
||||
"@module": "terraform.ui",
|
||||
"changes": {
|
||||
"add": 1,
|
||||
"change": 0,
|
||||
"operation": "apply",
|
||||
"remove": 1
|
||||
},
|
||||
"type": "change_summary"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "Outputs: 0",
|
||||
"@module": "terraform.ui",
|
||||
"outputs": {},
|
||||
"type": "outputs"
|
||||
}
|
||||
]
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"goodbye": "world"
|
||||
}
|
28
testing/equivalence-tests/outputs/local_provider_update/plan
Normal file
28
testing/equivalence-tests/outputs/local_provider_update/plan
Normal file
@ -0,0 +1,28 @@
|
||||
local_file.local_file: Refreshing state... [id=2248ee2fa0aaaad99178531f924bf00b4b0a8f4e]
|
||||
|
||||
Terraform used the selected providers to generate the following execution
|
||||
plan. Resource actions are indicated with the following symbols:
|
||||
-/+ destroy and then create replacement
|
||||
|
||||
Terraform will perform the following actions:
|
||||
|
||||
# local_file.local_file must be replaced
|
||||
-/+ resource "local_file" "local_file" {
|
||||
~ content = jsonencode(
|
||||
~ {
|
||||
+ goodbye = "world"
|
||||
- hello = "world" -> null
|
||||
} # forces replacement
|
||||
)
|
||||
~ id = "2248ee2fa0aaaad99178531f924bf00b4b0a8f4e" -> (known after apply)
|
||||
# (3 unchanged attributes hidden)
|
||||
}
|
||||
|
||||
Plan: 1 to add, 0 to change, 1 to destroy.
|
||||
|
||||
─────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Saved the plan to: equivalence_test_plan
|
||||
|
||||
To perform exactly these actions, run the following command to apply:
|
||||
terraform apply "equivalence_test_plan"
|
@ -0,0 +1,135 @@
|
||||
{
|
||||
"configuration": {
|
||||
"provider_config": {
|
||||
"local": {
|
||||
"full_name": "registry.terraform.io/hashicorp/local",
|
||||
"name": "local",
|
||||
"version_constraint": "2.2.3"
|
||||
}
|
||||
},
|
||||
"root_module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "local_file.local_file",
|
||||
"expressions": {
|
||||
"content": {
|
||||
"references": [
|
||||
"local.contents"
|
||||
]
|
||||
},
|
||||
"filename": {
|
||||
"constant_value": "output.json"
|
||||
}
|
||||
},
|
||||
"mode": "managed",
|
||||
"name": "local_file",
|
||||
"provider_config_key": "local",
|
||||
"schema_version": 0,
|
||||
"type": "local_file"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"format_version": "1.1",
|
||||
"planned_values": {
|
||||
"root_module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "local_file.local_file",
|
||||
"mode": "managed",
|
||||
"name": "local_file",
|
||||
"provider_name": "registry.terraform.io/hashicorp/local",
|
||||
"schema_version": 0,
|
||||
"sensitive_values": {},
|
||||
"type": "local_file",
|
||||
"values": {
|
||||
"content": "{\"goodbye\":\"world\"}",
|
||||
"content_base64": null,
|
||||
"directory_permission": "0777",
|
||||
"file_permission": "0777",
|
||||
"filename": "output.json",
|
||||
"sensitive_content": null,
|
||||
"source": null
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"prior_state": {
|
||||
"format_version": "1.0",
|
||||
"values": {
|
||||
"root_module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "local_file.local_file",
|
||||
"mode": "managed",
|
||||
"name": "local_file",
|
||||
"provider_name": "registry.terraform.io/hashicorp/local",
|
||||
"schema_version": 0,
|
||||
"sensitive_values": {},
|
||||
"type": "local_file",
|
||||
"values": {
|
||||
"content": "{\"hello\":\"world\"}",
|
||||
"content_base64": null,
|
||||
"directory_permission": "0777",
|
||||
"file_permission": "0777",
|
||||
"filename": "output.json",
|
||||
"id": "2248ee2fa0aaaad99178531f924bf00b4b0a8f4e",
|
||||
"sensitive_content": null,
|
||||
"source": null
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"resource_changes": [
|
||||
{
|
||||
"action_reason": "replace_because_cannot_update",
|
||||
"address": "local_file.local_file",
|
||||
"change": {
|
||||
"actions": [
|
||||
"delete",
|
||||
"create"
|
||||
],
|
||||
"after": {
|
||||
"content": "{\"goodbye\":\"world\"}",
|
||||
"content_base64": null,
|
||||
"directory_permission": "0777",
|
||||
"file_permission": "0777",
|
||||
"filename": "output.json",
|
||||
"sensitive_content": null,
|
||||
"source": null
|
||||
},
|
||||
"after_sensitive": {
|
||||
"sensitive_content": true
|
||||
},
|
||||
"after_unknown": {
|
||||
"id": true
|
||||
},
|
||||
"before": {
|
||||
"content": "{\"hello\":\"world\"}",
|
||||
"content_base64": null,
|
||||
"directory_permission": "0777",
|
||||
"file_permission": "0777",
|
||||
"filename": "output.json",
|
||||
"id": "2248ee2fa0aaaad99178531f924bf00b4b0a8f4e",
|
||||
"sensitive_content": null,
|
||||
"source": null
|
||||
},
|
||||
"before_sensitive": {
|
||||
"sensitive_content": true
|
||||
},
|
||||
"replace_paths": [
|
||||
[
|
||||
"content"
|
||||
]
|
||||
]
|
||||
},
|
||||
"mode": "managed",
|
||||
"name": "local_file",
|
||||
"provider_name": "registry.terraform.io/hashicorp/local",
|
||||
"type": "local_file"
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
{
|
||||
"format_version": "1.0",
|
||||
"values": {
|
||||
"root_module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "local_file.local_file",
|
||||
"mode": "managed",
|
||||
"name": "local_file",
|
||||
"provider_name": "registry.terraform.io/hashicorp/local",
|
||||
"schema_version": 0,
|
||||
"sensitive_values": {},
|
||||
"type": "local_file",
|
||||
"values": {
|
||||
"content": "{\"goodbye\":\"world\"}",
|
||||
"content_base64": null,
|
||||
"directory_permission": "0777",
|
||||
"file_permission": "0777",
|
||||
"filename": "output.json",
|
||||
"id": "648a5452054fca119f95b07f9ea992cc6d9681df",
|
||||
"sensitive_content": null,
|
||||
"source": null
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,78 @@
|
||||
[
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "tfcoremock_multiple_blocks.multiple_blocks: Plan to create",
|
||||
"@module": "terraform.ui",
|
||||
"change": {
|
||||
"action": "create",
|
||||
"resource": {
|
||||
"addr": "tfcoremock_multiple_blocks.multiple_blocks",
|
||||
"implied_provider": "tfcoremock",
|
||||
"module": "",
|
||||
"resource": "tfcoremock_multiple_blocks.multiple_blocks",
|
||||
"resource_key": null,
|
||||
"resource_name": "multiple_blocks",
|
||||
"resource_type": "tfcoremock_multiple_blocks"
|
||||
}
|
||||
},
|
||||
"type": "planned_change"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "tfcoremock_multiple_blocks.multiple_blocks: Creating...",
|
||||
"@module": "terraform.ui",
|
||||
"hook": {
|
||||
"action": "create",
|
||||
"resource": {
|
||||
"addr": "tfcoremock_multiple_blocks.multiple_blocks",
|
||||
"implied_provider": "tfcoremock",
|
||||
"module": "",
|
||||
"resource": "tfcoremock_multiple_blocks.multiple_blocks",
|
||||
"resource_key": null,
|
||||
"resource_name": "multiple_blocks",
|
||||
"resource_type": "tfcoremock_multiple_blocks"
|
||||
}
|
||||
},
|
||||
"type": "apply_start"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "tfcoremock_multiple_blocks.multiple_blocks: Creation complete after 0s [id=DA051126-BAD6-4EB2-92E5-F0250DAF0B92]",
|
||||
"@module": "terraform.ui",
|
||||
"hook": {
|
||||
"action": "create",
|
||||
"elapsed_seconds": 0,
|
||||
"id_key": "id",
|
||||
"id_value": "DA051126-BAD6-4EB2-92E5-F0250DAF0B92",
|
||||
"resource": {
|
||||
"addr": "tfcoremock_multiple_blocks.multiple_blocks",
|
||||
"implied_provider": "tfcoremock",
|
||||
"module": "",
|
||||
"resource": "tfcoremock_multiple_blocks.multiple_blocks",
|
||||
"resource_key": null,
|
||||
"resource_name": "multiple_blocks",
|
||||
"resource_type": "tfcoremock_multiple_blocks"
|
||||
}
|
||||
},
|
||||
"type": "apply_complete"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "Apply complete! Resources: 1 added, 0 changed, 0 destroyed.",
|
||||
"@module": "terraform.ui",
|
||||
"changes": {
|
||||
"add": 1,
|
||||
"change": 0,
|
||||
"operation": "apply",
|
||||
"remove": 0
|
||||
},
|
||||
"type": "change_summary"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "Outputs: 0",
|
||||
"@module": "terraform.ui",
|
||||
"outputs": {},
|
||||
"type": "outputs"
|
||||
}
|
||||
]
|
37
testing/equivalence-tests/outputs/multiple_block_types/plan
Normal file
37
testing/equivalence-tests/outputs/multiple_block_types/plan
Normal file
@ -0,0 +1,37 @@
|
||||
|
||||
Terraform used the selected providers to generate the following execution
|
||||
plan. Resource actions are indicated with the following symbols:
|
||||
+ create
|
||||
|
||||
Terraform will perform the following actions:
|
||||
|
||||
# tfcoremock_multiple_blocks.multiple_blocks will be created
|
||||
+ resource "tfcoremock_multiple_blocks" "multiple_blocks" {
|
||||
+ id = "DA051126-BAD6-4EB2-92E5-F0250DAF0B92"
|
||||
|
||||
+ first_block {
|
||||
+ id = "D35E88DA-BC3B-46D7-9E0B-4ED4582FA65A"
|
||||
}
|
||||
+ first_block {
|
||||
+ id = "E60148A2-04D1-4EF8-90A2-45CAFC02C60D"
|
||||
}
|
||||
+ first_block {
|
||||
+ id = "717C64FB-6A93-4763-A1EF-FE4C5B341488"
|
||||
}
|
||||
|
||||
+ second_block {
|
||||
+ id = "157660A9-D590-469E-BE28-83B8526428CA"
|
||||
}
|
||||
+ second_block {
|
||||
+ id = "D080F298-2BA4-4DFA-A367-2C5FB0EA7BFE"
|
||||
}
|
||||
}
|
||||
|
||||
Plan: 1 to add, 0 to change, 0 to destroy.
|
||||
|
||||
─────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Saved the plan to: equivalence_test_plan
|
||||
|
||||
To perform exactly these actions, run the following command to apply:
|
||||
terraform apply "equivalence_test_plan"
|
155
testing/equivalence-tests/outputs/multiple_block_types/plan.json
Normal file
155
testing/equivalence-tests/outputs/multiple_block_types/plan.json
Normal file
@ -0,0 +1,155 @@
|
||||
{
|
||||
"configuration": {
|
||||
"provider_config": {
|
||||
"tfcoremock": {
|
||||
"full_name": "registry.terraform.io/hashicorp/tfcoremock",
|
||||
"name": "tfcoremock",
|
||||
"version_constraint": "0.1.0"
|
||||
}
|
||||
},
|
||||
"root_module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "tfcoremock_multiple_blocks.multiple_blocks",
|
||||
"expressions": {
|
||||
"first_block": [
|
||||
{
|
||||
"id": {
|
||||
"constant_value": "D35E88DA-BC3B-46D7-9E0B-4ED4582FA65A"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": {
|
||||
"constant_value": "E60148A2-04D1-4EF8-90A2-45CAFC02C60D"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": {
|
||||
"constant_value": "717C64FB-6A93-4763-A1EF-FE4C5B341488"
|
||||
}
|
||||
}
|
||||
],
|
||||
"id": {
|
||||
"constant_value": "DA051126-BAD6-4EB2-92E5-F0250DAF0B92"
|
||||
},
|
||||
"second_block": [
|
||||
{
|
||||
"id": {
|
||||
"constant_value": "157660A9-D590-469E-BE28-83B8526428CA"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": {
|
||||
"constant_value": "D080F298-2BA4-4DFA-A367-2C5FB0EA7BFE"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"mode": "managed",
|
||||
"name": "multiple_blocks",
|
||||
"provider_config_key": "tfcoremock",
|
||||
"schema_version": 0,
|
||||
"type": "tfcoremock_multiple_blocks"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"format_version": "1.1",
|
||||
"planned_values": {
|
||||
"root_module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "tfcoremock_multiple_blocks.multiple_blocks",
|
||||
"mode": "managed",
|
||||
"name": "multiple_blocks",
|
||||
"provider_name": "registry.terraform.io/hashicorp/tfcoremock",
|
||||
"schema_version": 0,
|
||||
"sensitive_values": {
|
||||
"first_block": [
|
||||
{},
|
||||
{},
|
||||
{}
|
||||
],
|
||||
"second_block": [
|
||||
{},
|
||||
{}
|
||||
]
|
||||
},
|
||||
"type": "tfcoremock_multiple_blocks",
|
||||
"values": {
|
||||
"first_block": [
|
||||
{
|
||||
"id": "D35E88DA-BC3B-46D7-9E0B-4ED4582FA65A"
|
||||
},
|
||||
{
|
||||
"id": "E60148A2-04D1-4EF8-90A2-45CAFC02C60D"
|
||||
},
|
||||
{
|
||||
"id": "717C64FB-6A93-4763-A1EF-FE4C5B341488"
|
||||
}
|
||||
],
|
||||
"id": "DA051126-BAD6-4EB2-92E5-F0250DAF0B92",
|
||||
"second_block": [
|
||||
{
|
||||
"id": "157660A9-D590-469E-BE28-83B8526428CA"
|
||||
},
|
||||
{
|
||||
"id": "D080F298-2BA4-4DFA-A367-2C5FB0EA7BFE"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"resource_changes": [
|
||||
{
|
||||
"address": "tfcoremock_multiple_blocks.multiple_blocks",
|
||||
"change": {
|
||||
"actions": [
|
||||
"create"
|
||||
],
|
||||
"after": {
|
||||
"first_block": [
|
||||
{
|
||||
"id": "D35E88DA-BC3B-46D7-9E0B-4ED4582FA65A"
|
||||
},
|
||||
{
|
||||
"id": "E60148A2-04D1-4EF8-90A2-45CAFC02C60D"
|
||||
},
|
||||
{
|
||||
"id": "717C64FB-6A93-4763-A1EF-FE4C5B341488"
|
||||
}
|
||||
],
|
||||
"id": "DA051126-BAD6-4EB2-92E5-F0250DAF0B92",
|
||||
"second_block": [
|
||||
{
|
||||
"id": "157660A9-D590-469E-BE28-83B8526428CA"
|
||||
},
|
||||
{
|
||||
"id": "D080F298-2BA4-4DFA-A367-2C5FB0EA7BFE"
|
||||
}
|
||||
]
|
||||
},
|
||||
"after_sensitive": {
|
||||
"first_block": [
|
||||
{},
|
||||
{},
|
||||
{}
|
||||
],
|
||||
"second_block": [
|
||||
{},
|
||||
{}
|
||||
]
|
||||
},
|
||||
"after_unknown": {},
|
||||
"before": null,
|
||||
"before_sensitive": false
|
||||
},
|
||||
"mode": "managed",
|
||||
"name": "multiple_blocks",
|
||||
"provider_name": "registry.terraform.io/hashicorp/tfcoremock",
|
||||
"type": "tfcoremock_multiple_blocks"
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
{
|
||||
"format_version": "1.0",
|
||||
"values": {
|
||||
"root_module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "tfcoremock_multiple_blocks.multiple_blocks",
|
||||
"mode": "managed",
|
||||
"name": "multiple_blocks",
|
||||
"provider_name": "registry.terraform.io/hashicorp/tfcoremock",
|
||||
"schema_version": 0,
|
||||
"sensitive_values": {
|
||||
"first_block": [
|
||||
{},
|
||||
{},
|
||||
{}
|
||||
],
|
||||
"second_block": [
|
||||
{},
|
||||
{}
|
||||
]
|
||||
},
|
||||
"type": "tfcoremock_multiple_blocks",
|
||||
"values": {
|
||||
"first_block": [
|
||||
{
|
||||
"id": "D35E88DA-BC3B-46D7-9E0B-4ED4582FA65A"
|
||||
},
|
||||
{
|
||||
"id": "E60148A2-04D1-4EF8-90A2-45CAFC02C60D"
|
||||
},
|
||||
{
|
||||
"id": "717C64FB-6A93-4763-A1EF-FE4C5B341488"
|
||||
}
|
||||
],
|
||||
"id": "DA051126-BAD6-4EB2-92E5-F0250DAF0B92",
|
||||
"second_block": [
|
||||
{
|
||||
"id": "157660A9-D590-469E-BE28-83B8526428CA"
|
||||
},
|
||||
{
|
||||
"id": "D080F298-2BA4-4DFA-A367-2C5FB0EA7BFE"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,80 @@
|
||||
[
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "tfcoremock_multiple_blocks.multiple_blocks: Plan to update",
|
||||
"@module": "terraform.ui",
|
||||
"change": {
|
||||
"action": "update",
|
||||
"resource": {
|
||||
"addr": "tfcoremock_multiple_blocks.multiple_blocks",
|
||||
"implied_provider": "tfcoremock",
|
||||
"module": "",
|
||||
"resource": "tfcoremock_multiple_blocks.multiple_blocks",
|
||||
"resource_key": null,
|
||||
"resource_name": "multiple_blocks",
|
||||
"resource_type": "tfcoremock_multiple_blocks"
|
||||
}
|
||||
},
|
||||
"type": "planned_change"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "tfcoremock_multiple_blocks.multiple_blocks: Modifying... [id=DA051126-BAD6-4EB2-92E5-F0250DAF0B92]",
|
||||
"@module": "terraform.ui",
|
||||
"hook": {
|
||||
"action": "update",
|
||||
"id_key": "id",
|
||||
"id_value": "DA051126-BAD6-4EB2-92E5-F0250DAF0B92",
|
||||
"resource": {
|
||||
"addr": "tfcoremock_multiple_blocks.multiple_blocks",
|
||||
"implied_provider": "tfcoremock",
|
||||
"module": "",
|
||||
"resource": "tfcoremock_multiple_blocks.multiple_blocks",
|
||||
"resource_key": null,
|
||||
"resource_name": "multiple_blocks",
|
||||
"resource_type": "tfcoremock_multiple_blocks"
|
||||
}
|
||||
},
|
||||
"type": "apply_start"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "tfcoremock_multiple_blocks.multiple_blocks: Modifications complete after 0s [id=DA051126-BAD6-4EB2-92E5-F0250DAF0B92]",
|
||||
"@module": "terraform.ui",
|
||||
"hook": {
|
||||
"action": "update",
|
||||
"elapsed_seconds": 0,
|
||||
"id_key": "id",
|
||||
"id_value": "DA051126-BAD6-4EB2-92E5-F0250DAF0B92",
|
||||
"resource": {
|
||||
"addr": "tfcoremock_multiple_blocks.multiple_blocks",
|
||||
"implied_provider": "tfcoremock",
|
||||
"module": "",
|
||||
"resource": "tfcoremock_multiple_blocks.multiple_blocks",
|
||||
"resource_key": null,
|
||||
"resource_name": "multiple_blocks",
|
||||
"resource_type": "tfcoremock_multiple_blocks"
|
||||
}
|
||||
},
|
||||
"type": "apply_complete"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "Apply complete! Resources: 0 added, 1 changed, 0 destroyed.",
|
||||
"@module": "terraform.ui",
|
||||
"changes": {
|
||||
"add": 0,
|
||||
"change": 1,
|
||||
"operation": "apply",
|
||||
"remove": 0
|
||||
},
|
||||
"type": "change_summary"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "Outputs: 0",
|
||||
"@module": "terraform.ui",
|
||||
"outputs": {},
|
||||
"type": "outputs"
|
||||
}
|
||||
]
|
@ -0,0 +1,31 @@
|
||||
tfcoremock_multiple_blocks.multiple_blocks: Refreshing state... [id=DA051126-BAD6-4EB2-92E5-F0250DAF0B92]
|
||||
|
||||
Terraform used the selected providers to generate the following execution
|
||||
plan. Resource actions are indicated with the following symbols:
|
||||
~ update in-place
|
||||
|
||||
Terraform will perform the following actions:
|
||||
|
||||
# tfcoremock_multiple_blocks.multiple_blocks will be updated in-place
|
||||
~ resource "tfcoremock_multiple_blocks" "multiple_blocks" {
|
||||
id = "DA051126-BAD6-4EB2-92E5-F0250DAF0B92"
|
||||
|
||||
~ first_block {
|
||||
~ id = "D35E88DA-BC3B-46D7-9E0B-4ED4582FA65A" -> "B27FB8BE-52D4-4CEB-ACE9-5E7FB3968F2B"
|
||||
}
|
||||
|
||||
~ second_block {
|
||||
~ id = "157660A9-D590-469E-BE28-83B8526428CA" -> "91640A80-A65F-4BEF-925B-684E4517A04D"
|
||||
}
|
||||
|
||||
# (3 unchanged blocks hidden)
|
||||
}
|
||||
|
||||
Plan: 0 to add, 1 to change, 0 to destroy.
|
||||
|
||||
─────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Saved the plan to: equivalence_test_plan
|
||||
|
||||
To perform exactly these actions, run the following command to apply:
|
||||
terraform apply "equivalence_test_plan"
|
@ -0,0 +1,236 @@
|
||||
{
|
||||
"configuration": {
|
||||
"provider_config": {
|
||||
"tfcoremock": {
|
||||
"full_name": "registry.terraform.io/hashicorp/tfcoremock",
|
||||
"name": "tfcoremock",
|
||||
"version_constraint": "0.1.0"
|
||||
}
|
||||
},
|
||||
"root_module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "tfcoremock_multiple_blocks.multiple_blocks",
|
||||
"expressions": {
|
||||
"first_block": [
|
||||
{
|
||||
"id": {
|
||||
"constant_value": "B27FB8BE-52D4-4CEB-ACE9-5E7FB3968F2B"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": {
|
||||
"constant_value": "E60148A2-04D1-4EF8-90A2-45CAFC02C60D"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": {
|
||||
"constant_value": "717C64FB-6A93-4763-A1EF-FE4C5B341488"
|
||||
}
|
||||
}
|
||||
],
|
||||
"id": {
|
||||
"constant_value": "DA051126-BAD6-4EB2-92E5-F0250DAF0B92"
|
||||
},
|
||||
"second_block": [
|
||||
{
|
||||
"id": {
|
||||
"constant_value": "91640A80-A65F-4BEF-925B-684E4517A04D"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": {
|
||||
"constant_value": "D080F298-2BA4-4DFA-A367-2C5FB0EA7BFE"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"mode": "managed",
|
||||
"name": "multiple_blocks",
|
||||
"provider_config_key": "tfcoremock",
|
||||
"schema_version": 0,
|
||||
"type": "tfcoremock_multiple_blocks"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"format_version": "1.1",
|
||||
"planned_values": {
|
||||
"root_module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "tfcoremock_multiple_blocks.multiple_blocks",
|
||||
"mode": "managed",
|
||||
"name": "multiple_blocks",
|
||||
"provider_name": "registry.terraform.io/hashicorp/tfcoremock",
|
||||
"schema_version": 0,
|
||||
"sensitive_values": {
|
||||
"first_block": [
|
||||
{},
|
||||
{},
|
||||
{}
|
||||
],
|
||||
"second_block": [
|
||||
{},
|
||||
{}
|
||||
]
|
||||
},
|
||||
"type": "tfcoremock_multiple_blocks",
|
||||
"values": {
|
||||
"first_block": [
|
||||
{
|
||||
"id": "B27FB8BE-52D4-4CEB-ACE9-5E7FB3968F2B"
|
||||
},
|
||||
{
|
||||
"id": "E60148A2-04D1-4EF8-90A2-45CAFC02C60D"
|
||||
},
|
||||
{
|
||||
"id": "717C64FB-6A93-4763-A1EF-FE4C5B341488"
|
||||
}
|
||||
],
|
||||
"id": "DA051126-BAD6-4EB2-92E5-F0250DAF0B92",
|
||||
"second_block": [
|
||||
{
|
||||
"id": "91640A80-A65F-4BEF-925B-684E4517A04D"
|
||||
},
|
||||
{
|
||||
"id": "D080F298-2BA4-4DFA-A367-2C5FB0EA7BFE"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"prior_state": {
|
||||
"format_version": "1.0",
|
||||
"values": {
|
||||
"root_module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "tfcoremock_multiple_blocks.multiple_blocks",
|
||||
"mode": "managed",
|
||||
"name": "multiple_blocks",
|
||||
"provider_name": "registry.terraform.io/hashicorp/tfcoremock",
|
||||
"schema_version": 0,
|
||||
"sensitive_values": {
|
||||
"first_block": [
|
||||
{},
|
||||
{},
|
||||
{}
|
||||
],
|
||||
"second_block": [
|
||||
{},
|
||||
{}
|
||||
]
|
||||
},
|
||||
"type": "tfcoremock_multiple_blocks",
|
||||
"values": {
|
||||
"first_block": [
|
||||
{
|
||||
"id": "D35E88DA-BC3B-46D7-9E0B-4ED4582FA65A"
|
||||
},
|
||||
{
|
||||
"id": "E60148A2-04D1-4EF8-90A2-45CAFC02C60D"
|
||||
},
|
||||
{
|
||||
"id": "717C64FB-6A93-4763-A1EF-FE4C5B341488"
|
||||
}
|
||||
],
|
||||
"id": "DA051126-BAD6-4EB2-92E5-F0250DAF0B92",
|
||||
"second_block": [
|
||||
{
|
||||
"id": "157660A9-D590-469E-BE28-83B8526428CA"
|
||||
},
|
||||
{
|
||||
"id": "D080F298-2BA4-4DFA-A367-2C5FB0EA7BFE"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"resource_changes": [
|
||||
{
|
||||
"address": "tfcoremock_multiple_blocks.multiple_blocks",
|
||||
"change": {
|
||||
"actions": [
|
||||
"update"
|
||||
],
|
||||
"after": {
|
||||
"first_block": [
|
||||
{
|
||||
"id": "B27FB8BE-52D4-4CEB-ACE9-5E7FB3968F2B"
|
||||
},
|
||||
{
|
||||
"id": "E60148A2-04D1-4EF8-90A2-45CAFC02C60D"
|
||||
},
|
||||
{
|
||||
"id": "717C64FB-6A93-4763-A1EF-FE4C5B341488"
|
||||
}
|
||||
],
|
||||
"id": "DA051126-BAD6-4EB2-92E5-F0250DAF0B92",
|
||||
"second_block": [
|
||||
{
|
||||
"id": "91640A80-A65F-4BEF-925B-684E4517A04D"
|
||||
},
|
||||
{
|
||||
"id": "D080F298-2BA4-4DFA-A367-2C5FB0EA7BFE"
|
||||
}
|
||||
]
|
||||
},
|
||||
"after_sensitive": {
|
||||
"first_block": [
|
||||
{},
|
||||
{},
|
||||
{}
|
||||
],
|
||||
"second_block": [
|
||||
{},
|
||||
{}
|
||||
]
|
||||
},
|
||||
"after_unknown": {},
|
||||
"before": {
|
||||
"first_block": [
|
||||
{
|
||||
"id": "D35E88DA-BC3B-46D7-9E0B-4ED4582FA65A"
|
||||
},
|
||||
{
|
||||
"id": "E60148A2-04D1-4EF8-90A2-45CAFC02C60D"
|
||||
},
|
||||
{
|
||||
"id": "717C64FB-6A93-4763-A1EF-FE4C5B341488"
|
||||
}
|
||||
],
|
||||
"id": "DA051126-BAD6-4EB2-92E5-F0250DAF0B92",
|
||||
"second_block": [
|
||||
{
|
||||
"id": "157660A9-D590-469E-BE28-83B8526428CA"
|
||||
},
|
||||
{
|
||||
"id": "D080F298-2BA4-4DFA-A367-2C5FB0EA7BFE"
|
||||
}
|
||||
]
|
||||
},
|
||||
"before_sensitive": {
|
||||
"first_block": [
|
||||
{},
|
||||
{},
|
||||
{}
|
||||
],
|
||||
"second_block": [
|
||||
{},
|
||||
{}
|
||||
]
|
||||
}
|
||||
},
|
||||
"mode": "managed",
|
||||
"name": "multiple_blocks",
|
||||
"provider_name": "registry.terraform.io/hashicorp/tfcoremock",
|
||||
"type": "tfcoremock_multiple_blocks"
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
{
|
||||
"format_version": "1.0",
|
||||
"values": {
|
||||
"root_module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "tfcoremock_multiple_blocks.multiple_blocks",
|
||||
"mode": "managed",
|
||||
"name": "multiple_blocks",
|
||||
"provider_name": "registry.terraform.io/hashicorp/tfcoremock",
|
||||
"schema_version": 0,
|
||||
"sensitive_values": {
|
||||
"first_block": [
|
||||
{},
|
||||
{},
|
||||
{}
|
||||
],
|
||||
"second_block": [
|
||||
{},
|
||||
{}
|
||||
]
|
||||
},
|
||||
"type": "tfcoremock_multiple_blocks",
|
||||
"values": {
|
||||
"first_block": [
|
||||
{
|
||||
"id": "B27FB8BE-52D4-4CEB-ACE9-5E7FB3968F2B"
|
||||
},
|
||||
{
|
||||
"id": "E60148A2-04D1-4EF8-90A2-45CAFC02C60D"
|
||||
},
|
||||
{
|
||||
"id": "717C64FB-6A93-4763-A1EF-FE4C5B341488"
|
||||
}
|
||||
],
|
||||
"id": "DA051126-BAD6-4EB2-92E5-F0250DAF0B92",
|
||||
"second_block": [
|
||||
{
|
||||
"id": "91640A80-A65F-4BEF-925B-684E4517A04D"
|
||||
},
|
||||
{
|
||||
"id": "D080F298-2BA4-4DFA-A367-2C5FB0EA7BFE"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
78
testing/equivalence-tests/outputs/nested_list/apply.json
Normal file
78
testing/equivalence-tests/outputs/nested_list/apply.json
Normal file
@ -0,0 +1,78 @@
|
||||
[
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "tfcoremock_nested_list.nested_list: Plan to create",
|
||||
"@module": "terraform.ui",
|
||||
"change": {
|
||||
"action": "create",
|
||||
"resource": {
|
||||
"addr": "tfcoremock_nested_list.nested_list",
|
||||
"implied_provider": "tfcoremock",
|
||||
"module": "",
|
||||
"resource": "tfcoremock_nested_list.nested_list",
|
||||
"resource_key": null,
|
||||
"resource_name": "nested_list",
|
||||
"resource_type": "tfcoremock_nested_list"
|
||||
}
|
||||
},
|
||||
"type": "planned_change"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "tfcoremock_nested_list.nested_list: Creating...",
|
||||
"@module": "terraform.ui",
|
||||
"hook": {
|
||||
"action": "create",
|
||||
"resource": {
|
||||
"addr": "tfcoremock_nested_list.nested_list",
|
||||
"implied_provider": "tfcoremock",
|
||||
"module": "",
|
||||
"resource": "tfcoremock_nested_list.nested_list",
|
||||
"resource_key": null,
|
||||
"resource_name": "nested_list",
|
||||
"resource_type": "tfcoremock_nested_list"
|
||||
}
|
||||
},
|
||||
"type": "apply_start"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "tfcoremock_nested_list.nested_list: Creation complete after 0s [id=DA051126-BAD6-4EB2-92E5-F0250DAF0B92]",
|
||||
"@module": "terraform.ui",
|
||||
"hook": {
|
||||
"action": "create",
|
||||
"elapsed_seconds": 0,
|
||||
"id_key": "id",
|
||||
"id_value": "DA051126-BAD6-4EB2-92E5-F0250DAF0B92",
|
||||
"resource": {
|
||||
"addr": "tfcoremock_nested_list.nested_list",
|
||||
"implied_provider": "tfcoremock",
|
||||
"module": "",
|
||||
"resource": "tfcoremock_nested_list.nested_list",
|
||||
"resource_key": null,
|
||||
"resource_name": "nested_list",
|
||||
"resource_type": "tfcoremock_nested_list"
|
||||
}
|
||||
},
|
||||
"type": "apply_complete"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "Apply complete! Resources: 1 added, 0 changed, 0 destroyed.",
|
||||
"@module": "terraform.ui",
|
||||
"changes": {
|
||||
"add": 1,
|
||||
"change": 0,
|
||||
"operation": "apply",
|
||||
"remove": 0
|
||||
},
|
||||
"type": "change_summary"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "Outputs: 0",
|
||||
"@module": "terraform.ui",
|
||||
"outputs": {},
|
||||
"type": "outputs"
|
||||
}
|
||||
]
|
30
testing/equivalence-tests/outputs/nested_list/plan
Normal file
30
testing/equivalence-tests/outputs/nested_list/plan
Normal file
@ -0,0 +1,30 @@
|
||||
|
||||
Terraform used the selected providers to generate the following execution
|
||||
plan. Resource actions are indicated with the following symbols:
|
||||
+ create
|
||||
|
||||
Terraform will perform the following actions:
|
||||
|
||||
# tfcoremock_nested_list.nested_list will be created
|
||||
+ resource "tfcoremock_nested_list" "nested_list" {
|
||||
+ id = "DA051126-BAD6-4EB2-92E5-F0250DAF0B92"
|
||||
+ lists = [
|
||||
+ [],
|
||||
+ [
|
||||
+ "44E1C623-7B70-4D78-B4D3-D9CFE8A6D982",
|
||||
],
|
||||
+ [
|
||||
+ "13E3B154-7B85-4EAA-B3D0-E295E7D71D7F",
|
||||
+ "8B031CD1-01F7-422C-BBE6-FF8A0E18CDFD",
|
||||
],
|
||||
]
|
||||
}
|
||||
|
||||
Plan: 1 to add, 0 to change, 0 to destroy.
|
||||
|
||||
─────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Saved the plan to: equivalence_test_plan
|
||||
|
||||
To perform exactly these actions, run the following command to apply:
|
||||
terraform apply "equivalence_test_plan"
|
122
testing/equivalence-tests/outputs/nested_list/plan.json
Normal file
122
testing/equivalence-tests/outputs/nested_list/plan.json
Normal file
@ -0,0 +1,122 @@
|
||||
{
|
||||
"configuration": {
|
||||
"provider_config": {
|
||||
"tfcoremock": {
|
||||
"full_name": "registry.terraform.io/hashicorp/tfcoremock",
|
||||
"name": "tfcoremock",
|
||||
"version_constraint": "0.1.0"
|
||||
}
|
||||
},
|
||||
"root_module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "tfcoremock_nested_list.nested_list",
|
||||
"expressions": {
|
||||
"id": {
|
||||
"constant_value": "DA051126-BAD6-4EB2-92E5-F0250DAF0B92"
|
||||
},
|
||||
"lists": {
|
||||
"constant_value": [
|
||||
[],
|
||||
[
|
||||
"44E1C623-7B70-4D78-B4D3-D9CFE8A6D982"
|
||||
],
|
||||
[
|
||||
"13E3B154-7B85-4EAA-B3D0-E295E7D71D7F",
|
||||
"8B031CD1-01F7-422C-BBE6-FF8A0E18CDFD"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
"mode": "managed",
|
||||
"name": "nested_list",
|
||||
"provider_config_key": "tfcoremock",
|
||||
"schema_version": 0,
|
||||
"type": "tfcoremock_nested_list"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"format_version": "1.1",
|
||||
"planned_values": {
|
||||
"root_module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "tfcoremock_nested_list.nested_list",
|
||||
"mode": "managed",
|
||||
"name": "nested_list",
|
||||
"provider_name": "registry.terraform.io/hashicorp/tfcoremock",
|
||||
"schema_version": 0,
|
||||
"sensitive_values": {
|
||||
"lists": [
|
||||
[],
|
||||
[
|
||||
false
|
||||
],
|
||||
[
|
||||
false,
|
||||
false
|
||||
]
|
||||
]
|
||||
},
|
||||
"type": "tfcoremock_nested_list",
|
||||
"values": {
|
||||
"id": "DA051126-BAD6-4EB2-92E5-F0250DAF0B92",
|
||||
"lists": [
|
||||
[],
|
||||
[
|
||||
"44E1C623-7B70-4D78-B4D3-D9CFE8A6D982"
|
||||
],
|
||||
[
|
||||
"13E3B154-7B85-4EAA-B3D0-E295E7D71D7F",
|
||||
"8B031CD1-01F7-422C-BBE6-FF8A0E18CDFD"
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"resource_changes": [
|
||||
{
|
||||
"address": "tfcoremock_nested_list.nested_list",
|
||||
"change": {
|
||||
"actions": [
|
||||
"create"
|
||||
],
|
||||
"after": {
|
||||
"id": "DA051126-BAD6-4EB2-92E5-F0250DAF0B92",
|
||||
"lists": [
|
||||
[],
|
||||
[
|
||||
"44E1C623-7B70-4D78-B4D3-D9CFE8A6D982"
|
||||
],
|
||||
[
|
||||
"13E3B154-7B85-4EAA-B3D0-E295E7D71D7F",
|
||||
"8B031CD1-01F7-422C-BBE6-FF8A0E18CDFD"
|
||||
]
|
||||
]
|
||||
},
|
||||
"after_sensitive": {
|
||||
"lists": [
|
||||
[],
|
||||
[
|
||||
false
|
||||
],
|
||||
[
|
||||
false,
|
||||
false
|
||||
]
|
||||
]
|
||||
},
|
||||
"after_unknown": {},
|
||||
"before": null,
|
||||
"before_sensitive": false
|
||||
},
|
||||
"mode": "managed",
|
||||
"name": "nested_list",
|
||||
"provider_name": "registry.terraform.io/hashicorp/tfcoremock",
|
||||
"type": "tfcoremock_nested_list"
|
||||
}
|
||||
]
|
||||
}
|
42
testing/equivalence-tests/outputs/nested_list/state.json
Normal file
42
testing/equivalence-tests/outputs/nested_list/state.json
Normal file
@ -0,0 +1,42 @@
|
||||
{
|
||||
"format_version": "1.0",
|
||||
"values": {
|
||||
"root_module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "tfcoremock_nested_list.nested_list",
|
||||
"mode": "managed",
|
||||
"name": "nested_list",
|
||||
"provider_name": "registry.terraform.io/hashicorp/tfcoremock",
|
||||
"schema_version": 0,
|
||||
"sensitive_values": {
|
||||
"lists": [
|
||||
[],
|
||||
[
|
||||
false
|
||||
],
|
||||
[
|
||||
false,
|
||||
false
|
||||
]
|
||||
]
|
||||
},
|
||||
"type": "tfcoremock_nested_list",
|
||||
"values": {
|
||||
"id": "DA051126-BAD6-4EB2-92E5-F0250DAF0B92",
|
||||
"lists": [
|
||||
[],
|
||||
[
|
||||
"44E1C623-7B70-4D78-B4D3-D9CFE8A6D982"
|
||||
],
|
||||
[
|
||||
"13E3B154-7B85-4EAA-B3D0-E295E7D71D7F",
|
||||
"8B031CD1-01F7-422C-BBE6-FF8A0E18CDFD"
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,80 @@
|
||||
[
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "tfcoremock_nested_list.nested_list: Plan to update",
|
||||
"@module": "terraform.ui",
|
||||
"change": {
|
||||
"action": "update",
|
||||
"resource": {
|
||||
"addr": "tfcoremock_nested_list.nested_list",
|
||||
"implied_provider": "tfcoremock",
|
||||
"module": "",
|
||||
"resource": "tfcoremock_nested_list.nested_list",
|
||||
"resource_key": null,
|
||||
"resource_name": "nested_list",
|
||||
"resource_type": "tfcoremock_nested_list"
|
||||
}
|
||||
},
|
||||
"type": "planned_change"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "tfcoremock_nested_list.nested_list: Modifying... [id=DA051126-BAD6-4EB2-92E5-F0250DAF0B92]",
|
||||
"@module": "terraform.ui",
|
||||
"hook": {
|
||||
"action": "update",
|
||||
"id_key": "id",
|
||||
"id_value": "DA051126-BAD6-4EB2-92E5-F0250DAF0B92",
|
||||
"resource": {
|
||||
"addr": "tfcoremock_nested_list.nested_list",
|
||||
"implied_provider": "tfcoremock",
|
||||
"module": "",
|
||||
"resource": "tfcoremock_nested_list.nested_list",
|
||||
"resource_key": null,
|
||||
"resource_name": "nested_list",
|
||||
"resource_type": "tfcoremock_nested_list"
|
||||
}
|
||||
},
|
||||
"type": "apply_start"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "tfcoremock_nested_list.nested_list: Modifications complete after 0s [id=DA051126-BAD6-4EB2-92E5-F0250DAF0B92]",
|
||||
"@module": "terraform.ui",
|
||||
"hook": {
|
||||
"action": "update",
|
||||
"elapsed_seconds": 0,
|
||||
"id_key": "id",
|
||||
"id_value": "DA051126-BAD6-4EB2-92E5-F0250DAF0B92",
|
||||
"resource": {
|
||||
"addr": "tfcoremock_nested_list.nested_list",
|
||||
"implied_provider": "tfcoremock",
|
||||
"module": "",
|
||||
"resource": "tfcoremock_nested_list.nested_list",
|
||||
"resource_key": null,
|
||||
"resource_name": "nested_list",
|
||||
"resource_type": "tfcoremock_nested_list"
|
||||
}
|
||||
},
|
||||
"type": "apply_complete"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "Apply complete! Resources: 0 added, 1 changed, 0 destroyed.",
|
||||
"@module": "terraform.ui",
|
||||
"changes": {
|
||||
"add": 0,
|
||||
"change": 1,
|
||||
"operation": "apply",
|
||||
"remove": 0
|
||||
},
|
||||
"type": "change_summary"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "Outputs: 0",
|
||||
"@module": "terraform.ui",
|
||||
"outputs": {},
|
||||
"type": "outputs"
|
||||
}
|
||||
]
|
37
testing/equivalence-tests/outputs/nested_list_update/plan
Normal file
37
testing/equivalence-tests/outputs/nested_list_update/plan
Normal file
@ -0,0 +1,37 @@
|
||||
tfcoremock_nested_list.nested_list: Refreshing state... [id=DA051126-BAD6-4EB2-92E5-F0250DAF0B92]
|
||||
|
||||
Terraform used the selected providers to generate the following execution
|
||||
plan. Resource actions are indicated with the following symbols:
|
||||
~ update in-place
|
||||
|
||||
Terraform will perform the following actions:
|
||||
|
||||
# tfcoremock_nested_list.nested_list will be updated in-place
|
||||
~ resource "tfcoremock_nested_list" "nested_list" {
|
||||
id = "DA051126-BAD6-4EB2-92E5-F0250DAF0B92"
|
||||
~ lists = [
|
||||
- [],
|
||||
[
|
||||
"44E1C623-7B70-4D78-B4D3-D9CFE8A6D982",
|
||||
],
|
||||
- [
|
||||
- "13E3B154-7B85-4EAA-B3D0-E295E7D71D7F",
|
||||
- "8B031CD1-01F7-422C-BBE6-FF8A0E18CDFD",
|
||||
],
|
||||
+ [
|
||||
+ "8B031CD1-01F7-422C-BBE6-FF8A0E18CDFD",
|
||||
],
|
||||
+ [
|
||||
+ "13E3B154-7B85-4EAA-B3D0-E295E7D71D7F",
|
||||
],
|
||||
]
|
||||
}
|
||||
|
||||
Plan: 0 to add, 1 to change, 0 to destroy.
|
||||
|
||||
─────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Saved the plan to: equivalence_test_plan
|
||||
|
||||
To perform exactly these actions, run the following command to apply:
|
||||
terraform apply "equivalence_test_plan"
|
192
testing/equivalence-tests/outputs/nested_list_update/plan.json
Normal file
192
testing/equivalence-tests/outputs/nested_list_update/plan.json
Normal file
@ -0,0 +1,192 @@
|
||||
{
|
||||
"configuration": {
|
||||
"provider_config": {
|
||||
"tfcoremock": {
|
||||
"full_name": "registry.terraform.io/hashicorp/tfcoremock",
|
||||
"name": "tfcoremock",
|
||||
"version_constraint": "0.1.0"
|
||||
}
|
||||
},
|
||||
"root_module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "tfcoremock_nested_list.nested_list",
|
||||
"expressions": {
|
||||
"id": {
|
||||
"constant_value": "DA051126-BAD6-4EB2-92E5-F0250DAF0B92"
|
||||
},
|
||||
"lists": {
|
||||
"constant_value": [
|
||||
[
|
||||
"44E1C623-7B70-4D78-B4D3-D9CFE8A6D982"
|
||||
],
|
||||
[
|
||||
"8B031CD1-01F7-422C-BBE6-FF8A0E18CDFD"
|
||||
],
|
||||
[
|
||||
"13E3B154-7B85-4EAA-B3D0-E295E7D71D7F"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
"mode": "managed",
|
||||
"name": "nested_list",
|
||||
"provider_config_key": "tfcoremock",
|
||||
"schema_version": 0,
|
||||
"type": "tfcoremock_nested_list"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"format_version": "1.1",
|
||||
"planned_values": {
|
||||
"root_module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "tfcoremock_nested_list.nested_list",
|
||||
"mode": "managed",
|
||||
"name": "nested_list",
|
||||
"provider_name": "registry.terraform.io/hashicorp/tfcoremock",
|
||||
"schema_version": 0,
|
||||
"sensitive_values": {
|
||||
"lists": [
|
||||
[
|
||||
false
|
||||
],
|
||||
[
|
||||
false
|
||||
],
|
||||
[
|
||||
false
|
||||
]
|
||||
]
|
||||
},
|
||||
"type": "tfcoremock_nested_list",
|
||||
"values": {
|
||||
"id": "DA051126-BAD6-4EB2-92E5-F0250DAF0B92",
|
||||
"lists": [
|
||||
[
|
||||
"44E1C623-7B70-4D78-B4D3-D9CFE8A6D982"
|
||||
],
|
||||
[
|
||||
"8B031CD1-01F7-422C-BBE6-FF8A0E18CDFD"
|
||||
],
|
||||
[
|
||||
"13E3B154-7B85-4EAA-B3D0-E295E7D71D7F"
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"prior_state": {
|
||||
"format_version": "1.0",
|
||||
"values": {
|
||||
"root_module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "tfcoremock_nested_list.nested_list",
|
||||
"mode": "managed",
|
||||
"name": "nested_list",
|
||||
"provider_name": "registry.terraform.io/hashicorp/tfcoremock",
|
||||
"schema_version": 0,
|
||||
"sensitive_values": {
|
||||
"lists": [
|
||||
[],
|
||||
[
|
||||
false
|
||||
],
|
||||
[
|
||||
false,
|
||||
false
|
||||
]
|
||||
]
|
||||
},
|
||||
"type": "tfcoremock_nested_list",
|
||||
"values": {
|
||||
"id": "DA051126-BAD6-4EB2-92E5-F0250DAF0B92",
|
||||
"lists": [
|
||||
[],
|
||||
[
|
||||
"44E1C623-7B70-4D78-B4D3-D9CFE8A6D982"
|
||||
],
|
||||
[
|
||||
"13E3B154-7B85-4EAA-B3D0-E295E7D71D7F",
|
||||
"8B031CD1-01F7-422C-BBE6-FF8A0E18CDFD"
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"resource_changes": [
|
||||
{
|
||||
"address": "tfcoremock_nested_list.nested_list",
|
||||
"change": {
|
||||
"actions": [
|
||||
"update"
|
||||
],
|
||||
"after": {
|
||||
"id": "DA051126-BAD6-4EB2-92E5-F0250DAF0B92",
|
||||
"lists": [
|
||||
[
|
||||
"44E1C623-7B70-4D78-B4D3-D9CFE8A6D982"
|
||||
],
|
||||
[
|
||||
"8B031CD1-01F7-422C-BBE6-FF8A0E18CDFD"
|
||||
],
|
||||
[
|
||||
"13E3B154-7B85-4EAA-B3D0-E295E7D71D7F"
|
||||
]
|
||||
]
|
||||
},
|
||||
"after_sensitive": {
|
||||
"lists": [
|
||||
[
|
||||
false
|
||||
],
|
||||
[
|
||||
false
|
||||
],
|
||||
[
|
||||
false
|
||||
]
|
||||
]
|
||||
},
|
||||
"after_unknown": {},
|
||||
"before": {
|
||||
"id": "DA051126-BAD6-4EB2-92E5-F0250DAF0B92",
|
||||
"lists": [
|
||||
[],
|
||||
[
|
||||
"44E1C623-7B70-4D78-B4D3-D9CFE8A6D982"
|
||||
],
|
||||
[
|
||||
"13E3B154-7B85-4EAA-B3D0-E295E7D71D7F",
|
||||
"8B031CD1-01F7-422C-BBE6-FF8A0E18CDFD"
|
||||
]
|
||||
]
|
||||
},
|
||||
"before_sensitive": {
|
||||
"lists": [
|
||||
[],
|
||||
[
|
||||
false
|
||||
],
|
||||
[
|
||||
false,
|
||||
false
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
"mode": "managed",
|
||||
"name": "nested_list",
|
||||
"provider_name": "registry.terraform.io/hashicorp/tfcoremock",
|
||||
"type": "tfcoremock_nested_list"
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
{
|
||||
"format_version": "1.0",
|
||||
"values": {
|
||||
"root_module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "tfcoremock_nested_list.nested_list",
|
||||
"mode": "managed",
|
||||
"name": "nested_list",
|
||||
"provider_name": "registry.terraform.io/hashicorp/tfcoremock",
|
||||
"schema_version": 0,
|
||||
"sensitive_values": {
|
||||
"lists": [
|
||||
[
|
||||
false
|
||||
],
|
||||
[
|
||||
false
|
||||
],
|
||||
[
|
||||
false
|
||||
]
|
||||
]
|
||||
},
|
||||
"type": "tfcoremock_nested_list",
|
||||
"values": {
|
||||
"id": "DA051126-BAD6-4EB2-92E5-F0250DAF0B92",
|
||||
"lists": [
|
||||
[
|
||||
"44E1C623-7B70-4D78-B4D3-D9CFE8A6D982"
|
||||
],
|
||||
[
|
||||
"8B031CD1-01F7-422C-BBE6-FF8A0E18CDFD"
|
||||
],
|
||||
[
|
||||
"13E3B154-7B85-4EAA-B3D0-E295E7D71D7F"
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
78
testing/equivalence-tests/outputs/nested_map/apply.json
Normal file
78
testing/equivalence-tests/outputs/nested_map/apply.json
Normal file
@ -0,0 +1,78 @@
|
||||
[
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "tfcoremock_nested_map.nested_map: Plan to create",
|
||||
"@module": "terraform.ui",
|
||||
"change": {
|
||||
"action": "create",
|
||||
"resource": {
|
||||
"addr": "tfcoremock_nested_map.nested_map",
|
||||
"implied_provider": "tfcoremock",
|
||||
"module": "",
|
||||
"resource": "tfcoremock_nested_map.nested_map",
|
||||
"resource_key": null,
|
||||
"resource_name": "nested_map",
|
||||
"resource_type": "tfcoremock_nested_map"
|
||||
}
|
||||
},
|
||||
"type": "planned_change"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "tfcoremock_nested_map.nested_map: Creating...",
|
||||
"@module": "terraform.ui",
|
||||
"hook": {
|
||||
"action": "create",
|
||||
"resource": {
|
||||
"addr": "tfcoremock_nested_map.nested_map",
|
||||
"implied_provider": "tfcoremock",
|
||||
"module": "",
|
||||
"resource": "tfcoremock_nested_map.nested_map",
|
||||
"resource_key": null,
|
||||
"resource_name": "nested_map",
|
||||
"resource_type": "tfcoremock_nested_map"
|
||||
}
|
||||
},
|
||||
"type": "apply_start"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "tfcoremock_nested_map.nested_map: Creation complete after 0s [id=502B0348-B796-4F6A-8694-A5A397237B85]",
|
||||
"@module": "terraform.ui",
|
||||
"hook": {
|
||||
"action": "create",
|
||||
"elapsed_seconds": 0,
|
||||
"id_key": "id",
|
||||
"id_value": "502B0348-B796-4F6A-8694-A5A397237B85",
|
||||
"resource": {
|
||||
"addr": "tfcoremock_nested_map.nested_map",
|
||||
"implied_provider": "tfcoremock",
|
||||
"module": "",
|
||||
"resource": "tfcoremock_nested_map.nested_map",
|
||||
"resource_key": null,
|
||||
"resource_name": "nested_map",
|
||||
"resource_type": "tfcoremock_nested_map"
|
||||
}
|
||||
},
|
||||
"type": "apply_complete"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "Apply complete! Resources: 1 added, 0 changed, 0 destroyed.",
|
||||
"@module": "terraform.ui",
|
||||
"changes": {
|
||||
"add": 1,
|
||||
"change": 0,
|
||||
"operation": "apply",
|
||||
"remove": 0
|
||||
},
|
||||
"type": "change_summary"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "Outputs: 0",
|
||||
"@module": "terraform.ui",
|
||||
"outputs": {},
|
||||
"type": "outputs"
|
||||
}
|
||||
]
|
30
testing/equivalence-tests/outputs/nested_map/plan
Normal file
30
testing/equivalence-tests/outputs/nested_map/plan
Normal file
@ -0,0 +1,30 @@
|
||||
|
||||
Terraform used the selected providers to generate the following execution
|
||||
plan. Resource actions are indicated with the following symbols:
|
||||
+ create
|
||||
|
||||
Terraform will perform the following actions:
|
||||
|
||||
# tfcoremock_nested_map.nested_map will be created
|
||||
+ resource "tfcoremock_nested_map" "nested_map" {
|
||||
+ id = "502B0348-B796-4F6A-8694-A5A397237B85"
|
||||
+ maps = {
|
||||
+ "first_nested_map" = {
|
||||
+ "first_key" = "9E858021-953F-4DD3-8842-F2C782780422"
|
||||
+ "second_key" = "D55D0E1E-51D9-4BCE-9021-7D201906D3C0"
|
||||
}
|
||||
+ "second_nested_map" = {
|
||||
+ "first_key" = "6E80C701-A823-43FE-A520-699851EF9052"
|
||||
+ "second_key" = "79CBEBB1-1192-480A-B4A8-E816A1A9D2FC"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Plan: 1 to add, 0 to change, 0 to destroy.
|
||||
|
||||
─────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Saved the plan to: equivalence_test_plan
|
||||
|
||||
To perform exactly these actions, run the following command to apply:
|
||||
terraform apply "equivalence_test_plan"
|
110
testing/equivalence-tests/outputs/nested_map/plan.json
Normal file
110
testing/equivalence-tests/outputs/nested_map/plan.json
Normal file
@ -0,0 +1,110 @@
|
||||
{
|
||||
"configuration": {
|
||||
"provider_config": {
|
||||
"tfcoremock": {
|
||||
"full_name": "registry.terraform.io/hashicorp/tfcoremock",
|
||||
"name": "tfcoremock",
|
||||
"version_constraint": "0.1.0"
|
||||
}
|
||||
},
|
||||
"root_module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "tfcoremock_nested_map.nested_map",
|
||||
"expressions": {
|
||||
"id": {
|
||||
"constant_value": "502B0348-B796-4F6A-8694-A5A397237B85"
|
||||
},
|
||||
"maps": {
|
||||
"constant_value": {
|
||||
"first_nested_map": {
|
||||
"first_key": "9E858021-953F-4DD3-8842-F2C782780422",
|
||||
"second_key": "D55D0E1E-51D9-4BCE-9021-7D201906D3C0"
|
||||
},
|
||||
"second_nested_map": {
|
||||
"first_key": "6E80C701-A823-43FE-A520-699851EF9052",
|
||||
"second_key": "79CBEBB1-1192-480A-B4A8-E816A1A9D2FC"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"mode": "managed",
|
||||
"name": "nested_map",
|
||||
"provider_config_key": "tfcoremock",
|
||||
"schema_version": 0,
|
||||
"type": "tfcoremock_nested_map"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"format_version": "1.1",
|
||||
"planned_values": {
|
||||
"root_module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "tfcoremock_nested_map.nested_map",
|
||||
"mode": "managed",
|
||||
"name": "nested_map",
|
||||
"provider_name": "registry.terraform.io/hashicorp/tfcoremock",
|
||||
"schema_version": 0,
|
||||
"sensitive_values": {
|
||||
"maps": {
|
||||
"first_nested_map": {},
|
||||
"second_nested_map": {}
|
||||
}
|
||||
},
|
||||
"type": "tfcoremock_nested_map",
|
||||
"values": {
|
||||
"id": "502B0348-B796-4F6A-8694-A5A397237B85",
|
||||
"maps": {
|
||||
"first_nested_map": {
|
||||
"first_key": "9E858021-953F-4DD3-8842-F2C782780422",
|
||||
"second_key": "D55D0E1E-51D9-4BCE-9021-7D201906D3C0"
|
||||
},
|
||||
"second_nested_map": {
|
||||
"first_key": "6E80C701-A823-43FE-A520-699851EF9052",
|
||||
"second_key": "79CBEBB1-1192-480A-B4A8-E816A1A9D2FC"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"resource_changes": [
|
||||
{
|
||||
"address": "tfcoremock_nested_map.nested_map",
|
||||
"change": {
|
||||
"actions": [
|
||||
"create"
|
||||
],
|
||||
"after": {
|
||||
"id": "502B0348-B796-4F6A-8694-A5A397237B85",
|
||||
"maps": {
|
||||
"first_nested_map": {
|
||||
"first_key": "9E858021-953F-4DD3-8842-F2C782780422",
|
||||
"second_key": "D55D0E1E-51D9-4BCE-9021-7D201906D3C0"
|
||||
},
|
||||
"second_nested_map": {
|
||||
"first_key": "6E80C701-A823-43FE-A520-699851EF9052",
|
||||
"second_key": "79CBEBB1-1192-480A-B4A8-E816A1A9D2FC"
|
||||
}
|
||||
}
|
||||
},
|
||||
"after_sensitive": {
|
||||
"maps": {
|
||||
"first_nested_map": {},
|
||||
"second_nested_map": {}
|
||||
}
|
||||
},
|
||||
"after_unknown": {},
|
||||
"before": null,
|
||||
"before_sensitive": false
|
||||
},
|
||||
"mode": "managed",
|
||||
"name": "nested_map",
|
||||
"provider_name": "registry.terraform.io/hashicorp/tfcoremock",
|
||||
"type": "tfcoremock_nested_map"
|
||||
}
|
||||
]
|
||||
}
|
36
testing/equivalence-tests/outputs/nested_map/state.json
Normal file
36
testing/equivalence-tests/outputs/nested_map/state.json
Normal file
@ -0,0 +1,36 @@
|
||||
{
|
||||
"format_version": "1.0",
|
||||
"values": {
|
||||
"root_module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "tfcoremock_nested_map.nested_map",
|
||||
"mode": "managed",
|
||||
"name": "nested_map",
|
||||
"provider_name": "registry.terraform.io/hashicorp/tfcoremock",
|
||||
"schema_version": 0,
|
||||
"sensitive_values": {
|
||||
"maps": {
|
||||
"first_nested_map": {},
|
||||
"second_nested_map": {}
|
||||
}
|
||||
},
|
||||
"type": "tfcoremock_nested_map",
|
||||
"values": {
|
||||
"id": "502B0348-B796-4F6A-8694-A5A397237B85",
|
||||
"maps": {
|
||||
"first_nested_map": {
|
||||
"first_key": "9E858021-953F-4DD3-8842-F2C782780422",
|
||||
"second_key": "D55D0E1E-51D9-4BCE-9021-7D201906D3C0"
|
||||
},
|
||||
"second_nested_map": {
|
||||
"first_key": "6E80C701-A823-43FE-A520-699851EF9052",
|
||||
"second_key": "79CBEBB1-1192-480A-B4A8-E816A1A9D2FC"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,80 @@
|
||||
[
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "tfcoremock_nested_map.nested_map: Plan to update",
|
||||
"@module": "terraform.ui",
|
||||
"change": {
|
||||
"action": "update",
|
||||
"resource": {
|
||||
"addr": "tfcoremock_nested_map.nested_map",
|
||||
"implied_provider": "tfcoremock",
|
||||
"module": "",
|
||||
"resource": "tfcoremock_nested_map.nested_map",
|
||||
"resource_key": null,
|
||||
"resource_name": "nested_map",
|
||||
"resource_type": "tfcoremock_nested_map"
|
||||
}
|
||||
},
|
||||
"type": "planned_change"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "tfcoremock_nested_map.nested_map: Modifying... [id=502B0348-B796-4F6A-8694-A5A397237B85]",
|
||||
"@module": "terraform.ui",
|
||||
"hook": {
|
||||
"action": "update",
|
||||
"id_key": "id",
|
||||
"id_value": "502B0348-B796-4F6A-8694-A5A397237B85",
|
||||
"resource": {
|
||||
"addr": "tfcoremock_nested_map.nested_map",
|
||||
"implied_provider": "tfcoremock",
|
||||
"module": "",
|
||||
"resource": "tfcoremock_nested_map.nested_map",
|
||||
"resource_key": null,
|
||||
"resource_name": "nested_map",
|
||||
"resource_type": "tfcoremock_nested_map"
|
||||
}
|
||||
},
|
||||
"type": "apply_start"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "tfcoremock_nested_map.nested_map: Modifications complete after 0s [id=502B0348-B796-4F6A-8694-A5A397237B85]",
|
||||
"@module": "terraform.ui",
|
||||
"hook": {
|
||||
"action": "update",
|
||||
"elapsed_seconds": 0,
|
||||
"id_key": "id",
|
||||
"id_value": "502B0348-B796-4F6A-8694-A5A397237B85",
|
||||
"resource": {
|
||||
"addr": "tfcoremock_nested_map.nested_map",
|
||||
"implied_provider": "tfcoremock",
|
||||
"module": "",
|
||||
"resource": "tfcoremock_nested_map.nested_map",
|
||||
"resource_key": null,
|
||||
"resource_name": "nested_map",
|
||||
"resource_type": "tfcoremock_nested_map"
|
||||
}
|
||||
},
|
||||
"type": "apply_complete"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "Apply complete! Resources: 0 added, 1 changed, 0 destroyed.",
|
||||
"@module": "terraform.ui",
|
||||
"changes": {
|
||||
"add": 0,
|
||||
"change": 1,
|
||||
"operation": "apply",
|
||||
"remove": 0
|
||||
},
|
||||
"type": "change_summary"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "Outputs: 0",
|
||||
"@module": "terraform.ui",
|
||||
"outputs": {},
|
||||
"type": "outputs"
|
||||
}
|
||||
]
|
32
testing/equivalence-tests/outputs/nested_map_update/plan
Normal file
32
testing/equivalence-tests/outputs/nested_map_update/plan
Normal file
@ -0,0 +1,32 @@
|
||||
tfcoremock_nested_map.nested_map: Refreshing state... [id=502B0348-B796-4F6A-8694-A5A397237B85]
|
||||
|
||||
Terraform used the selected providers to generate the following execution
|
||||
plan. Resource actions are indicated with the following symbols:
|
||||
~ update in-place
|
||||
|
||||
Terraform will perform the following actions:
|
||||
|
||||
# tfcoremock_nested_map.nested_map will be updated in-place
|
||||
~ resource "tfcoremock_nested_map" "nested_map" {
|
||||
id = "502B0348-B796-4F6A-8694-A5A397237B85"
|
||||
~ maps = {
|
||||
~ "first_nested_map" = {
|
||||
~ "first_key" = "9E858021-953F-4DD3-8842-F2C782780422" -> "6E80C701-A823-43FE-A520-699851EF9052"
|
||||
+ "third_key" = "79CBEBB1-1192-480A-B4A8-E816A1A9D2FC"
|
||||
# (1 unchanged element hidden)
|
||||
}
|
||||
~ "second_nested_map" = {
|
||||
~ "first_key" = "6E80C701-A823-43FE-A520-699851EF9052" -> "9E858021-953F-4DD3-8842-F2C782780422"
|
||||
- "second_key" = "79CBEBB1-1192-480A-B4A8-E816A1A9D2FC" -> null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Plan: 0 to add, 1 to change, 0 to destroy.
|
||||
|
||||
─────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Saved the plan to: equivalence_test_plan
|
||||
|
||||
To perform exactly these actions, run the following command to apply:
|
||||
terraform apply "equivalence_test_plan"
|
163
testing/equivalence-tests/outputs/nested_map_update/plan.json
Normal file
163
testing/equivalence-tests/outputs/nested_map_update/plan.json
Normal file
@ -0,0 +1,163 @@
|
||||
{
|
||||
"configuration": {
|
||||
"provider_config": {
|
||||
"tfcoremock": {
|
||||
"full_name": "registry.terraform.io/hashicorp/tfcoremock",
|
||||
"name": "tfcoremock",
|
||||
"version_constraint": "0.1.0"
|
||||
}
|
||||
},
|
||||
"root_module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "tfcoremock_nested_map.nested_map",
|
||||
"expressions": {
|
||||
"id": {
|
||||
"constant_value": "502B0348-B796-4F6A-8694-A5A397237B85"
|
||||
},
|
||||
"maps": {
|
||||
"constant_value": {
|
||||
"first_nested_map": {
|
||||
"first_key": "6E80C701-A823-43FE-A520-699851EF9052",
|
||||
"second_key": "D55D0E1E-51D9-4BCE-9021-7D201906D3C0",
|
||||
"third_key": "79CBEBB1-1192-480A-B4A8-E816A1A9D2FC"
|
||||
},
|
||||
"second_nested_map": {
|
||||
"first_key": "9E858021-953F-4DD3-8842-F2C782780422"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"mode": "managed",
|
||||
"name": "nested_map",
|
||||
"provider_config_key": "tfcoremock",
|
||||
"schema_version": 0,
|
||||
"type": "tfcoremock_nested_map"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"format_version": "1.1",
|
||||
"planned_values": {
|
||||
"root_module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "tfcoremock_nested_map.nested_map",
|
||||
"mode": "managed",
|
||||
"name": "nested_map",
|
||||
"provider_name": "registry.terraform.io/hashicorp/tfcoremock",
|
||||
"schema_version": 0,
|
||||
"sensitive_values": {
|
||||
"maps": {
|
||||
"first_nested_map": {},
|
||||
"second_nested_map": {}
|
||||
}
|
||||
},
|
||||
"type": "tfcoremock_nested_map",
|
||||
"values": {
|
||||
"id": "502B0348-B796-4F6A-8694-A5A397237B85",
|
||||
"maps": {
|
||||
"first_nested_map": {
|
||||
"first_key": "6E80C701-A823-43FE-A520-699851EF9052",
|
||||
"second_key": "D55D0E1E-51D9-4BCE-9021-7D201906D3C0",
|
||||
"third_key": "79CBEBB1-1192-480A-B4A8-E816A1A9D2FC"
|
||||
},
|
||||
"second_nested_map": {
|
||||
"first_key": "9E858021-953F-4DD3-8842-F2C782780422"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"prior_state": {
|
||||
"format_version": "1.0",
|
||||
"values": {
|
||||
"root_module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "tfcoremock_nested_map.nested_map",
|
||||
"mode": "managed",
|
||||
"name": "nested_map",
|
||||
"provider_name": "registry.terraform.io/hashicorp/tfcoremock",
|
||||
"schema_version": 0,
|
||||
"sensitive_values": {
|
||||
"maps": {
|
||||
"first_nested_map": {},
|
||||
"second_nested_map": {}
|
||||
}
|
||||
},
|
||||
"type": "tfcoremock_nested_map",
|
||||
"values": {
|
||||
"id": "502B0348-B796-4F6A-8694-A5A397237B85",
|
||||
"maps": {
|
||||
"first_nested_map": {
|
||||
"first_key": "9E858021-953F-4DD3-8842-F2C782780422",
|
||||
"second_key": "D55D0E1E-51D9-4BCE-9021-7D201906D3C0"
|
||||
},
|
||||
"second_nested_map": {
|
||||
"first_key": "6E80C701-A823-43FE-A520-699851EF9052",
|
||||
"second_key": "79CBEBB1-1192-480A-B4A8-E816A1A9D2FC"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"resource_changes": [
|
||||
{
|
||||
"address": "tfcoremock_nested_map.nested_map",
|
||||
"change": {
|
||||
"actions": [
|
||||
"update"
|
||||
],
|
||||
"after": {
|
||||
"id": "502B0348-B796-4F6A-8694-A5A397237B85",
|
||||
"maps": {
|
||||
"first_nested_map": {
|
||||
"first_key": "6E80C701-A823-43FE-A520-699851EF9052",
|
||||
"second_key": "D55D0E1E-51D9-4BCE-9021-7D201906D3C0",
|
||||
"third_key": "79CBEBB1-1192-480A-B4A8-E816A1A9D2FC"
|
||||
},
|
||||
"second_nested_map": {
|
||||
"first_key": "9E858021-953F-4DD3-8842-F2C782780422"
|
||||
}
|
||||
}
|
||||
},
|
||||
"after_sensitive": {
|
||||
"maps": {
|
||||
"first_nested_map": {},
|
||||
"second_nested_map": {}
|
||||
}
|
||||
},
|
||||
"after_unknown": {},
|
||||
"before": {
|
||||
"id": "502B0348-B796-4F6A-8694-A5A397237B85",
|
||||
"maps": {
|
||||
"first_nested_map": {
|
||||
"first_key": "9E858021-953F-4DD3-8842-F2C782780422",
|
||||
"second_key": "D55D0E1E-51D9-4BCE-9021-7D201906D3C0"
|
||||
},
|
||||
"second_nested_map": {
|
||||
"first_key": "6E80C701-A823-43FE-A520-699851EF9052",
|
||||
"second_key": "79CBEBB1-1192-480A-B4A8-E816A1A9D2FC"
|
||||
}
|
||||
}
|
||||
},
|
||||
"before_sensitive": {
|
||||
"maps": {
|
||||
"first_nested_map": {},
|
||||
"second_nested_map": {}
|
||||
}
|
||||
}
|
||||
},
|
||||
"mode": "managed",
|
||||
"name": "nested_map",
|
||||
"provider_name": "registry.terraform.io/hashicorp/tfcoremock",
|
||||
"type": "tfcoremock_nested_map"
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
{
|
||||
"format_version": "1.0",
|
||||
"values": {
|
||||
"root_module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "tfcoremock_nested_map.nested_map",
|
||||
"mode": "managed",
|
||||
"name": "nested_map",
|
||||
"provider_name": "registry.terraform.io/hashicorp/tfcoremock",
|
||||
"schema_version": 0,
|
||||
"sensitive_values": {
|
||||
"maps": {
|
||||
"first_nested_map": {},
|
||||
"second_nested_map": {}
|
||||
}
|
||||
},
|
||||
"type": "tfcoremock_nested_map",
|
||||
"values": {
|
||||
"id": "502B0348-B796-4F6A-8694-A5A397237B85",
|
||||
"maps": {
|
||||
"first_nested_map": {
|
||||
"first_key": "6E80C701-A823-43FE-A520-699851EF9052",
|
||||
"second_key": "D55D0E1E-51D9-4BCE-9021-7D201906D3C0",
|
||||
"third_key": "79CBEBB1-1192-480A-B4A8-E816A1A9D2FC"
|
||||
},
|
||||
"second_nested_map": {
|
||||
"first_key": "9E858021-953F-4DD3-8842-F2C782780422"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
78
testing/equivalence-tests/outputs/nested_objects/apply.json
Normal file
78
testing/equivalence-tests/outputs/nested_objects/apply.json
Normal file
@ -0,0 +1,78 @@
|
||||
[
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "tfcoremock_nested_object.nested_object: Plan to create",
|
||||
"@module": "terraform.ui",
|
||||
"change": {
|
||||
"action": "create",
|
||||
"resource": {
|
||||
"addr": "tfcoremock_nested_object.nested_object",
|
||||
"implied_provider": "tfcoremock",
|
||||
"module": "",
|
||||
"resource": "tfcoremock_nested_object.nested_object",
|
||||
"resource_key": null,
|
||||
"resource_name": "nested_object",
|
||||
"resource_type": "tfcoremock_nested_object"
|
||||
}
|
||||
},
|
||||
"type": "planned_change"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "tfcoremock_nested_object.nested_object: Creating...",
|
||||
"@module": "terraform.ui",
|
||||
"hook": {
|
||||
"action": "create",
|
||||
"resource": {
|
||||
"addr": "tfcoremock_nested_object.nested_object",
|
||||
"implied_provider": "tfcoremock",
|
||||
"module": "",
|
||||
"resource": "tfcoremock_nested_object.nested_object",
|
||||
"resource_key": null,
|
||||
"resource_name": "nested_object",
|
||||
"resource_type": "tfcoremock_nested_object"
|
||||
}
|
||||
},
|
||||
"type": "apply_start"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "tfcoremock_nested_object.nested_object: Creation complete after 0s [id=B2491EF0-9361-40FD-B25A-0332A1A5E052]",
|
||||
"@module": "terraform.ui",
|
||||
"hook": {
|
||||
"action": "create",
|
||||
"elapsed_seconds": 0,
|
||||
"id_key": "id",
|
||||
"id_value": "B2491EF0-9361-40FD-B25A-0332A1A5E052",
|
||||
"resource": {
|
||||
"addr": "tfcoremock_nested_object.nested_object",
|
||||
"implied_provider": "tfcoremock",
|
||||
"module": "",
|
||||
"resource": "tfcoremock_nested_object.nested_object",
|
||||
"resource_key": null,
|
||||
"resource_name": "nested_object",
|
||||
"resource_type": "tfcoremock_nested_object"
|
||||
}
|
||||
},
|
||||
"type": "apply_complete"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "Apply complete! Resources: 1 added, 0 changed, 0 destroyed.",
|
||||
"@module": "terraform.ui",
|
||||
"changes": {
|
||||
"add": 1,
|
||||
"change": 0,
|
||||
"operation": "apply",
|
||||
"remove": 0
|
||||
},
|
||||
"type": "change_summary"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "Outputs: 0",
|
||||
"@module": "terraform.ui",
|
||||
"outputs": {},
|
||||
"type": "outputs"
|
||||
}
|
||||
]
|
30
testing/equivalence-tests/outputs/nested_objects/plan
Normal file
30
testing/equivalence-tests/outputs/nested_objects/plan
Normal file
@ -0,0 +1,30 @@
|
||||
|
||||
Terraform used the selected providers to generate the following execution
|
||||
plan. Resource actions are indicated with the following symbols:
|
||||
+ create
|
||||
|
||||
Terraform will perform the following actions:
|
||||
|
||||
# tfcoremock_nested_object.nested_object will be created
|
||||
+ resource "tfcoremock_nested_object" "nested_object" {
|
||||
+ id = "B2491EF0-9361-40FD-B25A-0332A1A5E052"
|
||||
+ parent_object = {
|
||||
+ first_nested_object = {
|
||||
+ attribute_one = "09AE7244-7BFB-476B-912C-D1AB4E7E9622"
|
||||
+ attribute_two = "5425587C-49EF-4C1E-A906-1DC923A12725"
|
||||
}
|
||||
+ second_nested_object = {
|
||||
+ attribute_one = "63712BFE-78F8-42D3-A074-A78249E5E25E"
|
||||
+ attribute_two = "FB350D92-4AAE-48C6-A408-BFFAFAD46B04"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Plan: 1 to add, 0 to change, 0 to destroy.
|
||||
|
||||
─────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Saved the plan to: equivalence_test_plan
|
||||
|
||||
To perform exactly these actions, run the following command to apply:
|
||||
terraform apply "equivalence_test_plan"
|
110
testing/equivalence-tests/outputs/nested_objects/plan.json
Normal file
110
testing/equivalence-tests/outputs/nested_objects/plan.json
Normal file
@ -0,0 +1,110 @@
|
||||
{
|
||||
"configuration": {
|
||||
"provider_config": {
|
||||
"tfcoremock": {
|
||||
"full_name": "registry.terraform.io/hashicorp/tfcoremock",
|
||||
"name": "tfcoremock",
|
||||
"version_constraint": "0.1.0"
|
||||
}
|
||||
},
|
||||
"root_module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "tfcoremock_nested_object.nested_object",
|
||||
"expressions": {
|
||||
"id": {
|
||||
"constant_value": "B2491EF0-9361-40FD-B25A-0332A1A5E052"
|
||||
},
|
||||
"parent_object": {
|
||||
"constant_value": {
|
||||
"first_nested_object": {
|
||||
"attribute_one": "09AE7244-7BFB-476B-912C-D1AB4E7E9622",
|
||||
"attribute_two": "5425587C-49EF-4C1E-A906-1DC923A12725"
|
||||
},
|
||||
"second_nested_object": {
|
||||
"attribute_one": "63712BFE-78F8-42D3-A074-A78249E5E25E",
|
||||
"attribute_two": "FB350D92-4AAE-48C6-A408-BFFAFAD46B04"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"mode": "managed",
|
||||
"name": "nested_object",
|
||||
"provider_config_key": "tfcoremock",
|
||||
"schema_version": 0,
|
||||
"type": "tfcoremock_nested_object"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"format_version": "1.1",
|
||||
"planned_values": {
|
||||
"root_module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "tfcoremock_nested_object.nested_object",
|
||||
"mode": "managed",
|
||||
"name": "nested_object",
|
||||
"provider_name": "registry.terraform.io/hashicorp/tfcoremock",
|
||||
"schema_version": 0,
|
||||
"sensitive_values": {
|
||||
"parent_object": {
|
||||
"first_nested_object": {},
|
||||
"second_nested_object": {}
|
||||
}
|
||||
},
|
||||
"type": "tfcoremock_nested_object",
|
||||
"values": {
|
||||
"id": "B2491EF0-9361-40FD-B25A-0332A1A5E052",
|
||||
"parent_object": {
|
||||
"first_nested_object": {
|
||||
"attribute_one": "09AE7244-7BFB-476B-912C-D1AB4E7E9622",
|
||||
"attribute_two": "5425587C-49EF-4C1E-A906-1DC923A12725"
|
||||
},
|
||||
"second_nested_object": {
|
||||
"attribute_one": "63712BFE-78F8-42D3-A074-A78249E5E25E",
|
||||
"attribute_two": "FB350D92-4AAE-48C6-A408-BFFAFAD46B04"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"resource_changes": [
|
||||
{
|
||||
"address": "tfcoremock_nested_object.nested_object",
|
||||
"change": {
|
||||
"actions": [
|
||||
"create"
|
||||
],
|
||||
"after": {
|
||||
"id": "B2491EF0-9361-40FD-B25A-0332A1A5E052",
|
||||
"parent_object": {
|
||||
"first_nested_object": {
|
||||
"attribute_one": "09AE7244-7BFB-476B-912C-D1AB4E7E9622",
|
||||
"attribute_two": "5425587C-49EF-4C1E-A906-1DC923A12725"
|
||||
},
|
||||
"second_nested_object": {
|
||||
"attribute_one": "63712BFE-78F8-42D3-A074-A78249E5E25E",
|
||||
"attribute_two": "FB350D92-4AAE-48C6-A408-BFFAFAD46B04"
|
||||
}
|
||||
}
|
||||
},
|
||||
"after_sensitive": {
|
||||
"parent_object": {
|
||||
"first_nested_object": {},
|
||||
"second_nested_object": {}
|
||||
}
|
||||
},
|
||||
"after_unknown": {},
|
||||
"before": null,
|
||||
"before_sensitive": false
|
||||
},
|
||||
"mode": "managed",
|
||||
"name": "nested_object",
|
||||
"provider_name": "registry.terraform.io/hashicorp/tfcoremock",
|
||||
"type": "tfcoremock_nested_object"
|
||||
}
|
||||
]
|
||||
}
|
36
testing/equivalence-tests/outputs/nested_objects/state.json
Normal file
36
testing/equivalence-tests/outputs/nested_objects/state.json
Normal file
@ -0,0 +1,36 @@
|
||||
{
|
||||
"format_version": "1.0",
|
||||
"values": {
|
||||
"root_module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "tfcoremock_nested_object.nested_object",
|
||||
"mode": "managed",
|
||||
"name": "nested_object",
|
||||
"provider_name": "registry.terraform.io/hashicorp/tfcoremock",
|
||||
"schema_version": 0,
|
||||
"sensitive_values": {
|
||||
"parent_object": {
|
||||
"first_nested_object": {},
|
||||
"second_nested_object": {}
|
||||
}
|
||||
},
|
||||
"type": "tfcoremock_nested_object",
|
||||
"values": {
|
||||
"id": "B2491EF0-9361-40FD-B25A-0332A1A5E052",
|
||||
"parent_object": {
|
||||
"first_nested_object": {
|
||||
"attribute_one": "09AE7244-7BFB-476B-912C-D1AB4E7E9622",
|
||||
"attribute_two": "5425587C-49EF-4C1E-A906-1DC923A12725"
|
||||
},
|
||||
"second_nested_object": {
|
||||
"attribute_one": "63712BFE-78F8-42D3-A074-A78249E5E25E",
|
||||
"attribute_two": "FB350D92-4AAE-48C6-A408-BFFAFAD46B04"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,80 @@
|
||||
[
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "tfcoremock_nested_object.nested_object: Plan to update",
|
||||
"@module": "terraform.ui",
|
||||
"change": {
|
||||
"action": "update",
|
||||
"resource": {
|
||||
"addr": "tfcoremock_nested_object.nested_object",
|
||||
"implied_provider": "tfcoremock",
|
||||
"module": "",
|
||||
"resource": "tfcoremock_nested_object.nested_object",
|
||||
"resource_key": null,
|
||||
"resource_name": "nested_object",
|
||||
"resource_type": "tfcoremock_nested_object"
|
||||
}
|
||||
},
|
||||
"type": "planned_change"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "tfcoremock_nested_object.nested_object: Modifying... [id=B2491EF0-9361-40FD-B25A-0332A1A5E052]",
|
||||
"@module": "terraform.ui",
|
||||
"hook": {
|
||||
"action": "update",
|
||||
"id_key": "id",
|
||||
"id_value": "B2491EF0-9361-40FD-B25A-0332A1A5E052",
|
||||
"resource": {
|
||||
"addr": "tfcoremock_nested_object.nested_object",
|
||||
"implied_provider": "tfcoremock",
|
||||
"module": "",
|
||||
"resource": "tfcoremock_nested_object.nested_object",
|
||||
"resource_key": null,
|
||||
"resource_name": "nested_object",
|
||||
"resource_type": "tfcoremock_nested_object"
|
||||
}
|
||||
},
|
||||
"type": "apply_start"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "tfcoremock_nested_object.nested_object: Modifications complete after 0s [id=B2491EF0-9361-40FD-B25A-0332A1A5E052]",
|
||||
"@module": "terraform.ui",
|
||||
"hook": {
|
||||
"action": "update",
|
||||
"elapsed_seconds": 0,
|
||||
"id_key": "id",
|
||||
"id_value": "B2491EF0-9361-40FD-B25A-0332A1A5E052",
|
||||
"resource": {
|
||||
"addr": "tfcoremock_nested_object.nested_object",
|
||||
"implied_provider": "tfcoremock",
|
||||
"module": "",
|
||||
"resource": "tfcoremock_nested_object.nested_object",
|
||||
"resource_key": null,
|
||||
"resource_name": "nested_object",
|
||||
"resource_type": "tfcoremock_nested_object"
|
||||
}
|
||||
},
|
||||
"type": "apply_complete"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "Apply complete! Resources: 0 added, 1 changed, 0 destroyed.",
|
||||
"@module": "terraform.ui",
|
||||
"changes": {
|
||||
"add": 0,
|
||||
"change": 1,
|
||||
"operation": "apply",
|
||||
"remove": 0
|
||||
},
|
||||
"type": "change_summary"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "Outputs: 0",
|
||||
"@module": "terraform.ui",
|
||||
"outputs": {},
|
||||
"type": "outputs"
|
||||
}
|
||||
]
|
31
testing/equivalence-tests/outputs/nested_objects_update/plan
Normal file
31
testing/equivalence-tests/outputs/nested_objects_update/plan
Normal file
@ -0,0 +1,31 @@
|
||||
tfcoremock_nested_object.nested_object: Refreshing state... [id=B2491EF0-9361-40FD-B25A-0332A1A5E052]
|
||||
|
||||
Terraform used the selected providers to generate the following execution
|
||||
plan. Resource actions are indicated with the following symbols:
|
||||
~ update in-place
|
||||
|
||||
Terraform will perform the following actions:
|
||||
|
||||
# tfcoremock_nested_object.nested_object will be updated in-place
|
||||
~ resource "tfcoremock_nested_object" "nested_object" {
|
||||
id = "B2491EF0-9361-40FD-B25A-0332A1A5E052"
|
||||
~ parent_object = {
|
||||
~ first_nested_object = {
|
||||
~ attribute_two = "5425587C-49EF-4C1E-A906-1DC923A12725" -> "FB350D92-4AAE-48C6-A408-BFFAFAD46B04"
|
||||
# (1 unchanged attribute hidden)
|
||||
}
|
||||
~ second_nested_object = {
|
||||
~ attribute_two = "FB350D92-4AAE-48C6-A408-BFFAFAD46B04" -> "5425587C-49EF-4C1E-A906-1DC923A12725"
|
||||
# (1 unchanged attribute hidden)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Plan: 0 to add, 1 to change, 0 to destroy.
|
||||
|
||||
─────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Saved the plan to: equivalence_test_plan
|
||||
|
||||
To perform exactly these actions, run the following command to apply:
|
||||
terraform apply "equivalence_test_plan"
|
@ -0,0 +1,163 @@
|
||||
{
|
||||
"configuration": {
|
||||
"provider_config": {
|
||||
"tfcoremock": {
|
||||
"full_name": "registry.terraform.io/hashicorp/tfcoremock",
|
||||
"name": "tfcoremock",
|
||||
"version_constraint": "0.1.0"
|
||||
}
|
||||
},
|
||||
"root_module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "tfcoremock_nested_object.nested_object",
|
||||
"expressions": {
|
||||
"id": {
|
||||
"constant_value": "B2491EF0-9361-40FD-B25A-0332A1A5E052"
|
||||
},
|
||||
"parent_object": {
|
||||
"constant_value": {
|
||||
"first_nested_object": {
|
||||
"attribute_one": "09AE7244-7BFB-476B-912C-D1AB4E7E9622",
|
||||
"attribute_two": "FB350D92-4AAE-48C6-A408-BFFAFAD46B04"
|
||||
},
|
||||
"second_nested_object": {
|
||||
"attribute_one": "63712BFE-78F8-42D3-A074-A78249E5E25E",
|
||||
"attribute_two": "5425587C-49EF-4C1E-A906-1DC923A12725"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"mode": "managed",
|
||||
"name": "nested_object",
|
||||
"provider_config_key": "tfcoremock",
|
||||
"schema_version": 0,
|
||||
"type": "tfcoremock_nested_object"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"format_version": "1.1",
|
||||
"planned_values": {
|
||||
"root_module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "tfcoremock_nested_object.nested_object",
|
||||
"mode": "managed",
|
||||
"name": "nested_object",
|
||||
"provider_name": "registry.terraform.io/hashicorp/tfcoremock",
|
||||
"schema_version": 0,
|
||||
"sensitive_values": {
|
||||
"parent_object": {
|
||||
"first_nested_object": {},
|
||||
"second_nested_object": {}
|
||||
}
|
||||
},
|
||||
"type": "tfcoremock_nested_object",
|
||||
"values": {
|
||||
"id": "B2491EF0-9361-40FD-B25A-0332A1A5E052",
|
||||
"parent_object": {
|
||||
"first_nested_object": {
|
||||
"attribute_one": "09AE7244-7BFB-476B-912C-D1AB4E7E9622",
|
||||
"attribute_two": "FB350D92-4AAE-48C6-A408-BFFAFAD46B04"
|
||||
},
|
||||
"second_nested_object": {
|
||||
"attribute_one": "63712BFE-78F8-42D3-A074-A78249E5E25E",
|
||||
"attribute_two": "5425587C-49EF-4C1E-A906-1DC923A12725"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"prior_state": {
|
||||
"format_version": "1.0",
|
||||
"values": {
|
||||
"root_module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "tfcoremock_nested_object.nested_object",
|
||||
"mode": "managed",
|
||||
"name": "nested_object",
|
||||
"provider_name": "registry.terraform.io/hashicorp/tfcoremock",
|
||||
"schema_version": 0,
|
||||
"sensitive_values": {
|
||||
"parent_object": {
|
||||
"first_nested_object": {},
|
||||
"second_nested_object": {}
|
||||
}
|
||||
},
|
||||
"type": "tfcoremock_nested_object",
|
||||
"values": {
|
||||
"id": "B2491EF0-9361-40FD-B25A-0332A1A5E052",
|
||||
"parent_object": {
|
||||
"first_nested_object": {
|
||||
"attribute_one": "09AE7244-7BFB-476B-912C-D1AB4E7E9622",
|
||||
"attribute_two": "5425587C-49EF-4C1E-A906-1DC923A12725"
|
||||
},
|
||||
"second_nested_object": {
|
||||
"attribute_one": "63712BFE-78F8-42D3-A074-A78249E5E25E",
|
||||
"attribute_two": "FB350D92-4AAE-48C6-A408-BFFAFAD46B04"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"resource_changes": [
|
||||
{
|
||||
"address": "tfcoremock_nested_object.nested_object",
|
||||
"change": {
|
||||
"actions": [
|
||||
"update"
|
||||
],
|
||||
"after": {
|
||||
"id": "B2491EF0-9361-40FD-B25A-0332A1A5E052",
|
||||
"parent_object": {
|
||||
"first_nested_object": {
|
||||
"attribute_one": "09AE7244-7BFB-476B-912C-D1AB4E7E9622",
|
||||
"attribute_two": "FB350D92-4AAE-48C6-A408-BFFAFAD46B04"
|
||||
},
|
||||
"second_nested_object": {
|
||||
"attribute_one": "63712BFE-78F8-42D3-A074-A78249E5E25E",
|
||||
"attribute_two": "5425587C-49EF-4C1E-A906-1DC923A12725"
|
||||
}
|
||||
}
|
||||
},
|
||||
"after_sensitive": {
|
||||
"parent_object": {
|
||||
"first_nested_object": {},
|
||||
"second_nested_object": {}
|
||||
}
|
||||
},
|
||||
"after_unknown": {},
|
||||
"before": {
|
||||
"id": "B2491EF0-9361-40FD-B25A-0332A1A5E052",
|
||||
"parent_object": {
|
||||
"first_nested_object": {
|
||||
"attribute_one": "09AE7244-7BFB-476B-912C-D1AB4E7E9622",
|
||||
"attribute_two": "5425587C-49EF-4C1E-A906-1DC923A12725"
|
||||
},
|
||||
"second_nested_object": {
|
||||
"attribute_one": "63712BFE-78F8-42D3-A074-A78249E5E25E",
|
||||
"attribute_two": "FB350D92-4AAE-48C6-A408-BFFAFAD46B04"
|
||||
}
|
||||
}
|
||||
},
|
||||
"before_sensitive": {
|
||||
"parent_object": {
|
||||
"first_nested_object": {},
|
||||
"second_nested_object": {}
|
||||
}
|
||||
}
|
||||
},
|
||||
"mode": "managed",
|
||||
"name": "nested_object",
|
||||
"provider_name": "registry.terraform.io/hashicorp/tfcoremock",
|
||||
"type": "tfcoremock_nested_object"
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
{
|
||||
"format_version": "1.0",
|
||||
"values": {
|
||||
"root_module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "tfcoremock_nested_object.nested_object",
|
||||
"mode": "managed",
|
||||
"name": "nested_object",
|
||||
"provider_name": "registry.terraform.io/hashicorp/tfcoremock",
|
||||
"schema_version": 0,
|
||||
"sensitive_values": {
|
||||
"parent_object": {
|
||||
"first_nested_object": {},
|
||||
"second_nested_object": {}
|
||||
}
|
||||
},
|
||||
"type": "tfcoremock_nested_object",
|
||||
"values": {
|
||||
"id": "B2491EF0-9361-40FD-B25A-0332A1A5E052",
|
||||
"parent_object": {
|
||||
"first_nested_object": {
|
||||
"attribute_one": "09AE7244-7BFB-476B-912C-D1AB4E7E9622",
|
||||
"attribute_two": "FB350D92-4AAE-48C6-A408-BFFAFAD46B04"
|
||||
},
|
||||
"second_nested_object": {
|
||||
"attribute_one": "63712BFE-78F8-42D3-A074-A78249E5E25E",
|
||||
"attribute_two": "5425587C-49EF-4C1E-A906-1DC923A12725"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
78
testing/equivalence-tests/outputs/nested_set/apply.json
Normal file
78
testing/equivalence-tests/outputs/nested_set/apply.json
Normal file
@ -0,0 +1,78 @@
|
||||
[
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "tfcoremock_nested_set.nested_set: Plan to create",
|
||||
"@module": "terraform.ui",
|
||||
"change": {
|
||||
"action": "create",
|
||||
"resource": {
|
||||
"addr": "tfcoremock_nested_set.nested_set",
|
||||
"implied_provider": "tfcoremock",
|
||||
"module": "",
|
||||
"resource": "tfcoremock_nested_set.nested_set",
|
||||
"resource_key": null,
|
||||
"resource_name": "nested_set",
|
||||
"resource_type": "tfcoremock_nested_set"
|
||||
}
|
||||
},
|
||||
"type": "planned_change"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "tfcoremock_nested_set.nested_set: Creating...",
|
||||
"@module": "terraform.ui",
|
||||
"hook": {
|
||||
"action": "create",
|
||||
"resource": {
|
||||
"addr": "tfcoremock_nested_set.nested_set",
|
||||
"implied_provider": "tfcoremock",
|
||||
"module": "",
|
||||
"resource": "tfcoremock_nested_set.nested_set",
|
||||
"resource_key": null,
|
||||
"resource_name": "nested_set",
|
||||
"resource_type": "tfcoremock_nested_set"
|
||||
}
|
||||
},
|
||||
"type": "apply_start"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "tfcoremock_nested_set.nested_set: Creation complete after 0s [id=510598F6-83FE-4090-8986-793293E90480]",
|
||||
"@module": "terraform.ui",
|
||||
"hook": {
|
||||
"action": "create",
|
||||
"elapsed_seconds": 0,
|
||||
"id_key": "id",
|
||||
"id_value": "510598F6-83FE-4090-8986-793293E90480",
|
||||
"resource": {
|
||||
"addr": "tfcoremock_nested_set.nested_set",
|
||||
"implied_provider": "tfcoremock",
|
||||
"module": "",
|
||||
"resource": "tfcoremock_nested_set.nested_set",
|
||||
"resource_key": null,
|
||||
"resource_name": "nested_set",
|
||||
"resource_type": "tfcoremock_nested_set"
|
||||
}
|
||||
},
|
||||
"type": "apply_complete"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "Apply complete! Resources: 1 added, 0 changed, 0 destroyed.",
|
||||
"@module": "terraform.ui",
|
||||
"changes": {
|
||||
"add": 1,
|
||||
"change": 0,
|
||||
"operation": "apply",
|
||||
"remove": 0
|
||||
},
|
||||
"type": "change_summary"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "Outputs: 0",
|
||||
"@module": "terraform.ui",
|
||||
"outputs": {},
|
||||
"type": "outputs"
|
||||
}
|
||||
]
|
30
testing/equivalence-tests/outputs/nested_set/plan
Normal file
30
testing/equivalence-tests/outputs/nested_set/plan
Normal file
@ -0,0 +1,30 @@
|
||||
|
||||
Terraform used the selected providers to generate the following execution
|
||||
plan. Resource actions are indicated with the following symbols:
|
||||
+ create
|
||||
|
||||
Terraform will perform the following actions:
|
||||
|
||||
# tfcoremock_nested_set.nested_set will be created
|
||||
+ resource "tfcoremock_nested_set" "nested_set" {
|
||||
+ id = "510598F6-83FE-4090-8986-793293E90480"
|
||||
+ sets = [
|
||||
+ [
|
||||
+ "29B6824A-5CB6-4C25-A359-727BAFEF25EB",
|
||||
+ "7E90963C-BE32-4411-B9DD-B02E7FE75766",
|
||||
],
|
||||
+ [
|
||||
+ "9373D62D-1BF0-4F17-B100-7C0FBE368ADE",
|
||||
],
|
||||
+ [],
|
||||
]
|
||||
}
|
||||
|
||||
Plan: 1 to add, 0 to change, 0 to destroy.
|
||||
|
||||
─────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Saved the plan to: equivalence_test_plan
|
||||
|
||||
To perform exactly these actions, run the following command to apply:
|
||||
terraform apply "equivalence_test_plan"
|
122
testing/equivalence-tests/outputs/nested_set/plan.json
Normal file
122
testing/equivalence-tests/outputs/nested_set/plan.json
Normal file
@ -0,0 +1,122 @@
|
||||
{
|
||||
"configuration": {
|
||||
"provider_config": {
|
||||
"tfcoremock": {
|
||||
"full_name": "registry.terraform.io/hashicorp/tfcoremock",
|
||||
"name": "tfcoremock",
|
||||
"version_constraint": "0.1.0"
|
||||
}
|
||||
},
|
||||
"root_module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "tfcoremock_nested_set.nested_set",
|
||||
"expressions": {
|
||||
"id": {
|
||||
"constant_value": "510598F6-83FE-4090-8986-793293E90480"
|
||||
},
|
||||
"sets": {
|
||||
"constant_value": [
|
||||
[],
|
||||
[
|
||||
"9373D62D-1BF0-4F17-B100-7C0FBE368ADE"
|
||||
],
|
||||
[
|
||||
"7E90963C-BE32-4411-B9DD-B02E7FE75766",
|
||||
"29B6824A-5CB6-4C25-A359-727BAFEF25EB"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
"mode": "managed",
|
||||
"name": "nested_set",
|
||||
"provider_config_key": "tfcoremock",
|
||||
"schema_version": 0,
|
||||
"type": "tfcoremock_nested_set"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"format_version": "1.1",
|
||||
"planned_values": {
|
||||
"root_module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "tfcoremock_nested_set.nested_set",
|
||||
"mode": "managed",
|
||||
"name": "nested_set",
|
||||
"provider_name": "registry.terraform.io/hashicorp/tfcoremock",
|
||||
"schema_version": 0,
|
||||
"sensitive_values": {
|
||||
"sets": [
|
||||
[
|
||||
false,
|
||||
false
|
||||
],
|
||||
[
|
||||
false
|
||||
],
|
||||
[]
|
||||
]
|
||||
},
|
||||
"type": "tfcoremock_nested_set",
|
||||
"values": {
|
||||
"id": "510598F6-83FE-4090-8986-793293E90480",
|
||||
"sets": [
|
||||
[
|
||||
"29B6824A-5CB6-4C25-A359-727BAFEF25EB",
|
||||
"7E90963C-BE32-4411-B9DD-B02E7FE75766"
|
||||
],
|
||||
[
|
||||
"9373D62D-1BF0-4F17-B100-7C0FBE368ADE"
|
||||
],
|
||||
[]
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"resource_changes": [
|
||||
{
|
||||
"address": "tfcoremock_nested_set.nested_set",
|
||||
"change": {
|
||||
"actions": [
|
||||
"create"
|
||||
],
|
||||
"after": {
|
||||
"id": "510598F6-83FE-4090-8986-793293E90480",
|
||||
"sets": [
|
||||
[
|
||||
"29B6824A-5CB6-4C25-A359-727BAFEF25EB",
|
||||
"7E90963C-BE32-4411-B9DD-B02E7FE75766"
|
||||
],
|
||||
[
|
||||
"9373D62D-1BF0-4F17-B100-7C0FBE368ADE"
|
||||
],
|
||||
[]
|
||||
]
|
||||
},
|
||||
"after_sensitive": {
|
||||
"sets": [
|
||||
[
|
||||
false,
|
||||
false
|
||||
],
|
||||
[
|
||||
false
|
||||
],
|
||||
[]
|
||||
]
|
||||
},
|
||||
"after_unknown": {},
|
||||
"before": null,
|
||||
"before_sensitive": false
|
||||
},
|
||||
"mode": "managed",
|
||||
"name": "nested_set",
|
||||
"provider_name": "registry.terraform.io/hashicorp/tfcoremock",
|
||||
"type": "tfcoremock_nested_set"
|
||||
}
|
||||
]
|
||||
}
|
42
testing/equivalence-tests/outputs/nested_set/state.json
Normal file
42
testing/equivalence-tests/outputs/nested_set/state.json
Normal file
@ -0,0 +1,42 @@
|
||||
{
|
||||
"format_version": "1.0",
|
||||
"values": {
|
||||
"root_module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "tfcoremock_nested_set.nested_set",
|
||||
"mode": "managed",
|
||||
"name": "nested_set",
|
||||
"provider_name": "registry.terraform.io/hashicorp/tfcoremock",
|
||||
"schema_version": 0,
|
||||
"sensitive_values": {
|
||||
"sets": [
|
||||
[
|
||||
false,
|
||||
false
|
||||
],
|
||||
[
|
||||
false
|
||||
],
|
||||
[]
|
||||
]
|
||||
},
|
||||
"type": "tfcoremock_nested_set",
|
||||
"values": {
|
||||
"id": "510598F6-83FE-4090-8986-793293E90480",
|
||||
"sets": [
|
||||
[
|
||||
"29B6824A-5CB6-4C25-A359-727BAFEF25EB",
|
||||
"7E90963C-BE32-4411-B9DD-B02E7FE75766"
|
||||
],
|
||||
[
|
||||
"9373D62D-1BF0-4F17-B100-7C0FBE368ADE"
|
||||
],
|
||||
[]
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,80 @@
|
||||
[
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "tfcoremock_nested_set.nested_set: Plan to update",
|
||||
"@module": "terraform.ui",
|
||||
"change": {
|
||||
"action": "update",
|
||||
"resource": {
|
||||
"addr": "tfcoremock_nested_set.nested_set",
|
||||
"implied_provider": "tfcoremock",
|
||||
"module": "",
|
||||
"resource": "tfcoremock_nested_set.nested_set",
|
||||
"resource_key": null,
|
||||
"resource_name": "nested_set",
|
||||
"resource_type": "tfcoremock_nested_set"
|
||||
}
|
||||
},
|
||||
"type": "planned_change"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "tfcoremock_nested_set.nested_set: Modifying... [id=510598F6-83FE-4090-8986-793293E90480]",
|
||||
"@module": "terraform.ui",
|
||||
"hook": {
|
||||
"action": "update",
|
||||
"id_key": "id",
|
||||
"id_value": "510598F6-83FE-4090-8986-793293E90480",
|
||||
"resource": {
|
||||
"addr": "tfcoremock_nested_set.nested_set",
|
||||
"implied_provider": "tfcoremock",
|
||||
"module": "",
|
||||
"resource": "tfcoremock_nested_set.nested_set",
|
||||
"resource_key": null,
|
||||
"resource_name": "nested_set",
|
||||
"resource_type": "tfcoremock_nested_set"
|
||||
}
|
||||
},
|
||||
"type": "apply_start"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "tfcoremock_nested_set.nested_set: Modifications complete after 0s [id=510598F6-83FE-4090-8986-793293E90480]",
|
||||
"@module": "terraform.ui",
|
||||
"hook": {
|
||||
"action": "update",
|
||||
"elapsed_seconds": 0,
|
||||
"id_key": "id",
|
||||
"id_value": "510598F6-83FE-4090-8986-793293E90480",
|
||||
"resource": {
|
||||
"addr": "tfcoremock_nested_set.nested_set",
|
||||
"implied_provider": "tfcoremock",
|
||||
"module": "",
|
||||
"resource": "tfcoremock_nested_set.nested_set",
|
||||
"resource_key": null,
|
||||
"resource_name": "nested_set",
|
||||
"resource_type": "tfcoremock_nested_set"
|
||||
}
|
||||
},
|
||||
"type": "apply_complete"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "Apply complete! Resources: 0 added, 1 changed, 0 destroyed.",
|
||||
"@module": "terraform.ui",
|
||||
"changes": {
|
||||
"add": 0,
|
||||
"change": 1,
|
||||
"operation": "apply",
|
||||
"remove": 0
|
||||
},
|
||||
"type": "change_summary"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "Outputs: 0",
|
||||
"@module": "terraform.ui",
|
||||
"outputs": {},
|
||||
"type": "outputs"
|
||||
}
|
||||
]
|
35
testing/equivalence-tests/outputs/nested_set_update/plan
Normal file
35
testing/equivalence-tests/outputs/nested_set_update/plan
Normal file
@ -0,0 +1,35 @@
|
||||
tfcoremock_nested_set.nested_set: Refreshing state... [id=510598F6-83FE-4090-8986-793293E90480]
|
||||
|
||||
Terraform used the selected providers to generate the following execution
|
||||
plan. Resource actions are indicated with the following symbols:
|
||||
~ update in-place
|
||||
|
||||
Terraform will perform the following actions:
|
||||
|
||||
# tfcoremock_nested_set.nested_set will be updated in-place
|
||||
~ resource "tfcoremock_nested_set" "nested_set" {
|
||||
id = "510598F6-83FE-4090-8986-793293E90480"
|
||||
~ sets = [
|
||||
- [
|
||||
- "29B6824A-5CB6-4C25-A359-727BAFEF25EB",
|
||||
- "7E90963C-BE32-4411-B9DD-B02E7FE75766",
|
||||
],
|
||||
+ [
|
||||
+ "29B6824A-5CB6-4C25-A359-727BAFEF25EB",
|
||||
],
|
||||
+ [
|
||||
+ "7E90963C-BE32-4411-B9DD-B02E7FE75766",
|
||||
],
|
||||
- [],
|
||||
# (1 unchanged element hidden)
|
||||
]
|
||||
}
|
||||
|
||||
Plan: 0 to add, 1 to change, 0 to destroy.
|
||||
|
||||
─────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Saved the plan to: equivalence_test_plan
|
||||
|
||||
To perform exactly these actions, run the following command to apply:
|
||||
terraform apply "equivalence_test_plan"
|
192
testing/equivalence-tests/outputs/nested_set_update/plan.json
Normal file
192
testing/equivalence-tests/outputs/nested_set_update/plan.json
Normal file
@ -0,0 +1,192 @@
|
||||
{
|
||||
"configuration": {
|
||||
"provider_config": {
|
||||
"tfcoremock": {
|
||||
"full_name": "registry.terraform.io/hashicorp/tfcoremock",
|
||||
"name": "tfcoremock",
|
||||
"version_constraint": "0.1.0"
|
||||
}
|
||||
},
|
||||
"root_module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "tfcoremock_nested_set.nested_set",
|
||||
"expressions": {
|
||||
"id": {
|
||||
"constant_value": "510598F6-83FE-4090-8986-793293E90480"
|
||||
},
|
||||
"sets": {
|
||||
"constant_value": [
|
||||
[
|
||||
"29B6824A-5CB6-4C25-A359-727BAFEF25EB"
|
||||
],
|
||||
[
|
||||
"9373D62D-1BF0-4F17-B100-7C0FBE368ADE"
|
||||
],
|
||||
[
|
||||
"7E90963C-BE32-4411-B9DD-B02E7FE75766"
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
"mode": "managed",
|
||||
"name": "nested_set",
|
||||
"provider_config_key": "tfcoremock",
|
||||
"schema_version": 0,
|
||||
"type": "tfcoremock_nested_set"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"format_version": "1.1",
|
||||
"planned_values": {
|
||||
"root_module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "tfcoremock_nested_set.nested_set",
|
||||
"mode": "managed",
|
||||
"name": "nested_set",
|
||||
"provider_name": "registry.terraform.io/hashicorp/tfcoremock",
|
||||
"schema_version": 0,
|
||||
"sensitive_values": {
|
||||
"sets": [
|
||||
[
|
||||
false
|
||||
],
|
||||
[
|
||||
false
|
||||
],
|
||||
[
|
||||
false
|
||||
]
|
||||
]
|
||||
},
|
||||
"type": "tfcoremock_nested_set",
|
||||
"values": {
|
||||
"id": "510598F6-83FE-4090-8986-793293E90480",
|
||||
"sets": [
|
||||
[
|
||||
"29B6824A-5CB6-4C25-A359-727BAFEF25EB"
|
||||
],
|
||||
[
|
||||
"7E90963C-BE32-4411-B9DD-B02E7FE75766"
|
||||
],
|
||||
[
|
||||
"9373D62D-1BF0-4F17-B100-7C0FBE368ADE"
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"prior_state": {
|
||||
"format_version": "1.0",
|
||||
"values": {
|
||||
"root_module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "tfcoremock_nested_set.nested_set",
|
||||
"mode": "managed",
|
||||
"name": "nested_set",
|
||||
"provider_name": "registry.terraform.io/hashicorp/tfcoremock",
|
||||
"schema_version": 0,
|
||||
"sensitive_values": {
|
||||
"sets": [
|
||||
[
|
||||
false,
|
||||
false
|
||||
],
|
||||
[
|
||||
false
|
||||
],
|
||||
[]
|
||||
]
|
||||
},
|
||||
"type": "tfcoremock_nested_set",
|
||||
"values": {
|
||||
"id": "510598F6-83FE-4090-8986-793293E90480",
|
||||
"sets": [
|
||||
[
|
||||
"29B6824A-5CB6-4C25-A359-727BAFEF25EB",
|
||||
"7E90963C-BE32-4411-B9DD-B02E7FE75766"
|
||||
],
|
||||
[
|
||||
"9373D62D-1BF0-4F17-B100-7C0FBE368ADE"
|
||||
],
|
||||
[]
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"resource_changes": [
|
||||
{
|
||||
"address": "tfcoremock_nested_set.nested_set",
|
||||
"change": {
|
||||
"actions": [
|
||||
"update"
|
||||
],
|
||||
"after": {
|
||||
"id": "510598F6-83FE-4090-8986-793293E90480",
|
||||
"sets": [
|
||||
[
|
||||
"29B6824A-5CB6-4C25-A359-727BAFEF25EB"
|
||||
],
|
||||
[
|
||||
"7E90963C-BE32-4411-B9DD-B02E7FE75766"
|
||||
],
|
||||
[
|
||||
"9373D62D-1BF0-4F17-B100-7C0FBE368ADE"
|
||||
]
|
||||
]
|
||||
},
|
||||
"after_sensitive": {
|
||||
"sets": [
|
||||
[
|
||||
false
|
||||
],
|
||||
[
|
||||
false
|
||||
],
|
||||
[
|
||||
false
|
||||
]
|
||||
]
|
||||
},
|
||||
"after_unknown": {},
|
||||
"before": {
|
||||
"id": "510598F6-83FE-4090-8986-793293E90480",
|
||||
"sets": [
|
||||
[
|
||||
"29B6824A-5CB6-4C25-A359-727BAFEF25EB",
|
||||
"7E90963C-BE32-4411-B9DD-B02E7FE75766"
|
||||
],
|
||||
[
|
||||
"9373D62D-1BF0-4F17-B100-7C0FBE368ADE"
|
||||
],
|
||||
[]
|
||||
]
|
||||
},
|
||||
"before_sensitive": {
|
||||
"sets": [
|
||||
[
|
||||
false,
|
||||
false
|
||||
],
|
||||
[
|
||||
false
|
||||
],
|
||||
[]
|
||||
]
|
||||
}
|
||||
},
|
||||
"mode": "managed",
|
||||
"name": "nested_set",
|
||||
"provider_name": "registry.terraform.io/hashicorp/tfcoremock",
|
||||
"type": "tfcoremock_nested_set"
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
{
|
||||
"format_version": "1.0",
|
||||
"values": {
|
||||
"root_module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "tfcoremock_nested_set.nested_set",
|
||||
"mode": "managed",
|
||||
"name": "nested_set",
|
||||
"provider_name": "registry.terraform.io/hashicorp/tfcoremock",
|
||||
"schema_version": 0,
|
||||
"sensitive_values": {
|
||||
"sets": [
|
||||
[
|
||||
false
|
||||
],
|
||||
[
|
||||
false
|
||||
],
|
||||
[
|
||||
false
|
||||
]
|
||||
]
|
||||
},
|
||||
"type": "tfcoremock_nested_set",
|
||||
"values": {
|
||||
"id": "510598F6-83FE-4090-8986-793293E90480",
|
||||
"sets": [
|
||||
[
|
||||
"29B6824A-5CB6-4C25-A359-727BAFEF25EB"
|
||||
],
|
||||
[
|
||||
"7E90963C-BE32-4411-B9DD-B02E7FE75766"
|
||||
],
|
||||
[
|
||||
"9373D62D-1BF0-4F17-B100-7C0FBE368ADE"
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,76 @@
|
||||
[
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "null_resource.null_resource: Plan to create",
|
||||
"@module": "terraform.ui",
|
||||
"change": {
|
||||
"action": "create",
|
||||
"resource": {
|
||||
"addr": "null_resource.null_resource",
|
||||
"implied_provider": "null",
|
||||
"module": "",
|
||||
"resource": "null_resource.null_resource",
|
||||
"resource_key": null,
|
||||
"resource_name": "null_resource",
|
||||
"resource_type": "null_resource"
|
||||
}
|
||||
},
|
||||
"type": "planned_change"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "null_resource.null_resource: Creating...",
|
||||
"@module": "terraform.ui",
|
||||
"hook": {
|
||||
"action": "create",
|
||||
"resource": {
|
||||
"addr": "null_resource.null_resource",
|
||||
"implied_provider": "null",
|
||||
"module": "",
|
||||
"resource": "null_resource.null_resource",
|
||||
"resource_key": null,
|
||||
"resource_name": "null_resource",
|
||||
"resource_type": "null_resource"
|
||||
}
|
||||
},
|
||||
"type": "apply_start"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@module": "terraform.ui",
|
||||
"hook": {
|
||||
"action": "create",
|
||||
"elapsed_seconds": 0,
|
||||
"id_key": "id",
|
||||
"resource": {
|
||||
"addr": "null_resource.null_resource",
|
||||
"implied_provider": "null",
|
||||
"module": "",
|
||||
"resource": "null_resource.null_resource",
|
||||
"resource_key": null,
|
||||
"resource_name": "null_resource",
|
||||
"resource_type": "null_resource"
|
||||
}
|
||||
},
|
||||
"type": "apply_complete"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "Apply complete! Resources: 1 added, 0 changed, 0 destroyed.",
|
||||
"@module": "terraform.ui",
|
||||
"changes": {
|
||||
"add": 1,
|
||||
"change": 0,
|
||||
"operation": "apply",
|
||||
"remove": 0
|
||||
},
|
||||
"type": "change_summary"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "Outputs: 0",
|
||||
"@module": "terraform.ui",
|
||||
"outputs": {},
|
||||
"type": "outputs"
|
||||
}
|
||||
]
|
20
testing/equivalence-tests/outputs/null_provider_basic/plan
Normal file
20
testing/equivalence-tests/outputs/null_provider_basic/plan
Normal file
@ -0,0 +1,20 @@
|
||||
|
||||
Terraform used the selected providers to generate the following execution
|
||||
plan. Resource actions are indicated with the following symbols:
|
||||
+ create
|
||||
|
||||
Terraform will perform the following actions:
|
||||
|
||||
# null_resource.null_resource will be created
|
||||
+ resource "null_resource" "null_resource" {
|
||||
+ id = (known after apply)
|
||||
}
|
||||
|
||||
Plan: 1 to add, 0 to change, 0 to destroy.
|
||||
|
||||
─────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Saved the plan to: equivalence_test_plan
|
||||
|
||||
To perform exactly these actions, run the following command to apply:
|
||||
terraform apply "equivalence_test_plan"
|
@ -0,0 +1,65 @@
|
||||
{
|
||||
"configuration": {
|
||||
"provider_config": {
|
||||
"null": {
|
||||
"full_name": "registry.terraform.io/hashicorp/null",
|
||||
"name": "null",
|
||||
"version_constraint": "3.1.1"
|
||||
}
|
||||
},
|
||||
"root_module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "null_resource.null_resource",
|
||||
"mode": "managed",
|
||||
"name": "null_resource",
|
||||
"provider_config_key": "null",
|
||||
"schema_version": 0,
|
||||
"type": "null_resource"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"format_version": "1.1",
|
||||
"planned_values": {
|
||||
"root_module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "null_resource.null_resource",
|
||||
"mode": "managed",
|
||||
"name": "null_resource",
|
||||
"provider_name": "registry.terraform.io/hashicorp/null",
|
||||
"schema_version": 0,
|
||||
"sensitive_values": {},
|
||||
"type": "null_resource",
|
||||
"values": {
|
||||
"triggers": null
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"resource_changes": [
|
||||
{
|
||||
"address": "null_resource.null_resource",
|
||||
"change": {
|
||||
"actions": [
|
||||
"create"
|
||||
],
|
||||
"after": {
|
||||
"triggers": null
|
||||
},
|
||||
"after_sensitive": {},
|
||||
"after_unknown": {
|
||||
"id": true
|
||||
},
|
||||
"before": null,
|
||||
"before_sensitive": false
|
||||
},
|
||||
"mode": "managed",
|
||||
"name": "null_resource",
|
||||
"provider_name": "registry.terraform.io/hashicorp/null",
|
||||
"type": "null_resource"
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
{
|
||||
"format_version": "1.0",
|
||||
"values": {
|
||||
"root_module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "null_resource.null_resource",
|
||||
"mode": "managed",
|
||||
"name": "null_resource",
|
||||
"provider_name": "registry.terraform.io/hashicorp/null",
|
||||
"schema_version": 0,
|
||||
"sensitive_values": {},
|
||||
"type": "null_resource",
|
||||
"values": {
|
||||
"triggers": null
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
[
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "null_resource.null_resource: Plan to delete",
|
||||
"@module": "terraform.ui",
|
||||
"change": {
|
||||
"action": "delete",
|
||||
"reason": "delete_because_no_resource_config",
|
||||
"resource": {
|
||||
"addr": "null_resource.null_resource",
|
||||
"implied_provider": "null",
|
||||
"module": "",
|
||||
"resource": "null_resource.null_resource",
|
||||
"resource_key": null,
|
||||
"resource_name": "null_resource",
|
||||
"resource_type": "null_resource"
|
||||
}
|
||||
},
|
||||
"type": "planned_change"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "null_resource.null_resource: Destroying... [id=7115293105928418144]",
|
||||
"@module": "terraform.ui",
|
||||
"hook": {
|
||||
"action": "delete",
|
||||
"id_key": "id",
|
||||
"id_value": "7115293105928418144",
|
||||
"resource": {
|
||||
"addr": "null_resource.null_resource",
|
||||
"implied_provider": "null",
|
||||
"module": "",
|
||||
"resource": "null_resource.null_resource",
|
||||
"resource_key": null,
|
||||
"resource_name": "null_resource",
|
||||
"resource_type": "null_resource"
|
||||
}
|
||||
},
|
||||
"type": "apply_start"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "null_resource.null_resource: Destruction complete after 0s",
|
||||
"@module": "terraform.ui",
|
||||
"hook": {
|
||||
"action": "delete",
|
||||
"elapsed_seconds": 0,
|
||||
"resource": {
|
||||
"addr": "null_resource.null_resource",
|
||||
"implied_provider": "null",
|
||||
"module": "",
|
||||
"resource": "null_resource.null_resource",
|
||||
"resource_key": null,
|
||||
"resource_name": "null_resource",
|
||||
"resource_type": "null_resource"
|
||||
}
|
||||
},
|
||||
"type": "apply_complete"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "Apply complete! Resources: 0 added, 0 changed, 1 destroyed.",
|
||||
"@module": "terraform.ui",
|
||||
"changes": {
|
||||
"add": 0,
|
||||
"change": 0,
|
||||
"operation": "apply",
|
||||
"remove": 1
|
||||
},
|
||||
"type": "change_summary"
|
||||
},
|
||||
{
|
||||
"@level": "info",
|
||||
"@message": "Outputs: 0",
|
||||
"@module": "terraform.ui",
|
||||
"outputs": {},
|
||||
"type": "outputs"
|
||||
}
|
||||
]
|
22
testing/equivalence-tests/outputs/null_provider_delete/plan
Normal file
22
testing/equivalence-tests/outputs/null_provider_delete/plan
Normal file
@ -0,0 +1,22 @@
|
||||
null_resource.null_resource: Refreshing state... [id=7115293105928418144]
|
||||
|
||||
Terraform used the selected providers to generate the following execution
|
||||
plan. Resource actions are indicated with the following symbols:
|
||||
- destroy
|
||||
|
||||
Terraform will perform the following actions:
|
||||
|
||||
# null_resource.null_resource will be destroyed
|
||||
# (because null_resource.null_resource is not in configuration)
|
||||
- resource "null_resource" "null_resource" {
|
||||
- id = "7115293105928418144" -> null
|
||||
}
|
||||
|
||||
Plan: 0 to add, 0 to change, 1 to destroy.
|
||||
|
||||
─────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
Saved the plan to: equivalence_test_plan
|
||||
|
||||
To perform exactly these actions, run the following command to apply:
|
||||
terraform apply "equivalence_test_plan"
|
@ -0,0 +1,61 @@
|
||||
{
|
||||
"configuration": {
|
||||
"provider_config": {
|
||||
"null": {
|
||||
"full_name": "registry.terraform.io/hashicorp/null",
|
||||
"name": "null",
|
||||
"version_constraint": "3.1.1"
|
||||
}
|
||||
},
|
||||
"root_module": {}
|
||||
},
|
||||
"format_version": "1.1",
|
||||
"planned_values": {
|
||||
"root_module": {}
|
||||
},
|
||||
"prior_state": {
|
||||
"format_version": "1.0",
|
||||
"values": {
|
||||
"root_module": {
|
||||
"resources": [
|
||||
{
|
||||
"address": "null_resource.null_resource",
|
||||
"mode": "managed",
|
||||
"name": "null_resource",
|
||||
"provider_name": "registry.terraform.io/hashicorp/null",
|
||||
"schema_version": 0,
|
||||
"sensitive_values": {},
|
||||
"type": "null_resource",
|
||||
"values": {
|
||||
"id": "7115293105928418144",
|
||||
"triggers": null
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"resource_changes": [
|
||||
{
|
||||
"action_reason": "delete_because_no_resource_config",
|
||||
"address": "null_resource.null_resource",
|
||||
"change": {
|
||||
"actions": [
|
||||
"delete"
|
||||
],
|
||||
"after": null,
|
||||
"after_sensitive": false,
|
||||
"after_unknown": {},
|
||||
"before": {
|
||||
"id": "7115293105928418144",
|
||||
"triggers": null
|
||||
},
|
||||
"before_sensitive": {}
|
||||
},
|
||||
"mode": "managed",
|
||||
"name": "null_resource",
|
||||
"provider_name": "registry.terraform.io/hashicorp/null",
|
||||
"type": "null_resource"
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"format_version": "1.0"
|
||||
}
|
21
testing/equivalence-tests/tests/local_provider_basic/main.tf
Normal file
21
testing/equivalence-tests/tests/local_provider_basic/main.tf
Normal file
@ -0,0 +1,21 @@
|
||||
terraform {
|
||||
required_providers {
|
||||
local = {
|
||||
source = "hashicorp/local"
|
||||
version = "2.2.3"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
locals {
|
||||
contents = jsonencode({
|
||||
"hello" = "world"
|
||||
})
|
||||
}
|
||||
|
||||
provider "local" {}
|
||||
|
||||
resource "local_file" "local_file" {
|
||||
filename = "output.json"
|
||||
content = local.contents
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"include_files": [
|
||||
"output.json"
|
||||
],
|
||||
"ignore_fields": {}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
# This file is maintained automatically by "terraform init".
|
||||
# Manual edits may be lost in future updates.
|
||||
|
||||
provider "registry.terraform.io/hashicorp/local" {
|
||||
version = "2.2.3"
|
||||
constraints = "2.2.3"
|
||||
hashes = [
|
||||
"h1:FvRIEgCmAezgZUqb2F+PZ9WnSSnR5zbEM2ZI+GLmbMk=",
|
||||
"zh:04f0978bb3e052707b8e82e46780c371ac1c66b689b4a23bbc2f58865ab7d5c0",
|
||||
"zh:6484f1b3e9e3771eb7cc8e8bab8b35f939a55d550b3f4fb2ab141a24269ee6aa",
|
||||
"zh:78a56d59a013cb0f7eb1c92815d6eb5cf07f8b5f0ae20b96d049e73db915b238",
|
||||
"zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3",
|
||||
"zh:8aa9950f4c4db37239bcb62e19910c49e47043f6c8587e5b0396619923657797",
|
||||
"zh:996beea85f9084a725ff0e6473a4594deb5266727c5f56e9c1c7c62ded6addbb",
|
||||
"zh:9a7ef7a21f48fabfd145b2e2a4240ca57517ad155017e86a30860d7c0c109de3",
|
||||
"zh:a63e70ac052aa25120113bcddd50c1f3cfe61f681a93a50cea5595a4b2cc3e1c",
|
||||
"zh:a6e8d46f94108e049ad85dbed60354236dc0b9b5ec8eabe01c4580280a43d3b8",
|
||||
"zh:bb112ce7efbfcfa0e65ed97fa245ef348e0fd5bfa5a7e4ab2091a9bd469f0a9e",
|
||||
"zh:d7bec0da5c094c6955efed100f3fe22fca8866859f87c025be1760feb174d6d9",
|
||||
"zh:fb9f271b72094d07cef8154cd3d50e9aa818a0ea39130bc193132ad7b23076fd",
|
||||
]
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
terraform {
|
||||
required_providers {
|
||||
local = {
|
||||
source = "hashicorp/local"
|
||||
version = "2.2.3"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
locals {
|
||||
contents = jsonencode({
|
||||
"goodbye" = "world"
|
||||
})
|
||||
}
|
||||
|
||||
provider "local" {}
|
1
testing/equivalence-tests/tests/local_provider_delete/output.json
Executable file
1
testing/equivalence-tests/tests/local_provider_delete/output.json
Executable file
@ -0,0 +1 @@
|
||||
{"hello":"world"}
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
"include_files": [],
|
||||
"ignore_fields": {}
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
{
|
||||
"version": 4,
|
||||
"terraform_version": "1.3.0",
|
||||
"serial": 2,
|
||||
"lineage": "e2a94970-ee0e-0eb7-16a5-67e94860dc8e",
|
||||
"outputs": {},
|
||||
"resources": [
|
||||
{
|
||||
"mode": "managed",
|
||||
"type": "local_file",
|
||||
"name": "local_file",
|
||||
"provider": "provider[\"registry.terraform.io/hashicorp/local\"]",
|
||||
"instances": [
|
||||
{
|
||||
"schema_version": 0,
|
||||
"attributes": {
|
||||
"content": "{\"hello\":\"world\"}",
|
||||
"content_base64": null,
|
||||
"directory_permission": "0777",
|
||||
"file_permission": "0777",
|
||||
"filename": "output.json",
|
||||
"id": "2248ee2fa0aaaad99178531f924bf00b4b0a8f4e",
|
||||
"sensitive_content": null,
|
||||
"source": null
|
||||
},
|
||||
"sensitive_attributes": [],
|
||||
"private": "bnVsbA=="
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"check_results": []
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
# This file is maintained automatically by "terraform init".
|
||||
# Manual edits may be lost in future updates.
|
||||
|
||||
provider "registry.terraform.io/hashicorp/local" {
|
||||
version = "2.2.3"
|
||||
constraints = "2.2.3"
|
||||
hashes = [
|
||||
"h1:FvRIEgCmAezgZUqb2F+PZ9WnSSnR5zbEM2ZI+GLmbMk=",
|
||||
"zh:04f0978bb3e052707b8e82e46780c371ac1c66b689b4a23bbc2f58865ab7d5c0",
|
||||
"zh:6484f1b3e9e3771eb7cc8e8bab8b35f939a55d550b3f4fb2ab141a24269ee6aa",
|
||||
"zh:78a56d59a013cb0f7eb1c92815d6eb5cf07f8b5f0ae20b96d049e73db915b238",
|
||||
"zh:78d5eefdd9e494defcb3c68d282b8f96630502cac21d1ea161f53cfe9bb483b3",
|
||||
"zh:8aa9950f4c4db37239bcb62e19910c49e47043f6c8587e5b0396619923657797",
|
||||
"zh:996beea85f9084a725ff0e6473a4594deb5266727c5f56e9c1c7c62ded6addbb",
|
||||
"zh:9a7ef7a21f48fabfd145b2e2a4240ca57517ad155017e86a30860d7c0c109de3",
|
||||
"zh:a63e70ac052aa25120113bcddd50c1f3cfe61f681a93a50cea5595a4b2cc3e1c",
|
||||
"zh:a6e8d46f94108e049ad85dbed60354236dc0b9b5ec8eabe01c4580280a43d3b8",
|
||||
"zh:bb112ce7efbfcfa0e65ed97fa245ef348e0fd5bfa5a7e4ab2091a9bd469f0a9e",
|
||||
"zh:d7bec0da5c094c6955efed100f3fe22fca8866859f87c025be1760feb174d6d9",
|
||||
"zh:fb9f271b72094d07cef8154cd3d50e9aa818a0ea39130bc193132ad7b23076fd",
|
||||
]
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
terraform {
|
||||
required_providers {
|
||||
local = {
|
||||
source = "hashicorp/local"
|
||||
version = "2.2.3"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
locals {
|
||||
contents = jsonencode({
|
||||
"goodbye" = "world"
|
||||
})
|
||||
}
|
||||
|
||||
provider "local" {}
|
||||
|
||||
resource "local_file" "local_file" {
|
||||
filename = "output.json"
|
||||
content = local.contents
|
||||
}
|
1
testing/equivalence-tests/tests/local_provider_update/output.json
Executable file
1
testing/equivalence-tests/tests/local_provider_update/output.json
Executable file
@ -0,0 +1 @@
|
||||
{"hello":"world"}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"include_files": [
|
||||
"output.json"
|
||||
],
|
||||
"ignore_fields": {}
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
{
|
||||
"version": 4,
|
||||
"terraform_version": "1.3.0",
|
||||
"serial": 2,
|
||||
"lineage": "e2a94970-ee0e-0eb7-16a5-67e94860dc8e",
|
||||
"outputs": {},
|
||||
"resources": [
|
||||
{
|
||||
"mode": "managed",
|
||||
"type": "local_file",
|
||||
"name": "local_file",
|
||||
"provider": "provider[\"registry.terraform.io/hashicorp/local\"]",
|
||||
"instances": [
|
||||
{
|
||||
"schema_version": 0,
|
||||
"attributes": {
|
||||
"content": "{\"hello\":\"world\"}",
|
||||
"content_base64": null,
|
||||
"directory_permission": "0777",
|
||||
"file_permission": "0777",
|
||||
"filename": "output.json",
|
||||
"id": "2248ee2fa0aaaad99178531f924bf00b4b0a8f4e",
|
||||
"sensitive_content": null,
|
||||
"source": null
|
||||
},
|
||||
"sensitive_attributes": [],
|
||||
"private": "bnVsbA=="
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"check_results": []
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
{
|
||||
"tfcoremock_multiple_blocks": {
|
||||
"blocks": {
|
||||
"first_block": {
|
||||
"attributes": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
}
|
||||
},
|
||||
"mode": "list"
|
||||
},
|
||||
"second_block": {
|
||||
"attributes": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
}
|
||||
},
|
||||
"mode": "list"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
34
testing/equivalence-tests/tests/multiple_block_types/main.tf
Normal file
34
testing/equivalence-tests/tests/multiple_block_types/main.tf
Normal file
@ -0,0 +1,34 @@
|
||||
terraform {
|
||||
required_providers {
|
||||
tfcoremock = {
|
||||
source = "hashicorp/tfcoremock"
|
||||
version = "0.1.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
provider "tfcoremock" {}
|
||||
|
||||
resource "tfcoremock_multiple_blocks" "multiple_blocks" {
|
||||
id = "DA051126-BAD6-4EB2-92E5-F0250DAF0B92"
|
||||
|
||||
first_block {
|
||||
id = "D35E88DA-BC3B-46D7-9E0B-4ED4582FA65A"
|
||||
}
|
||||
|
||||
first_block {
|
||||
id = "E60148A2-04D1-4EF8-90A2-45CAFC02C60D"
|
||||
}
|
||||
|
||||
first_block {
|
||||
id = "717C64FB-6A93-4763-A1EF-FE4C5B341488"
|
||||
}
|
||||
|
||||
second_block {
|
||||
id = "157660A9-D590-469E-BE28-83B8526428CA"
|
||||
}
|
||||
|
||||
second_block {
|
||||
id = "D080F298-2BA4-4DFA-A367-2C5FB0EA7BFE"
|
||||
}
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
"include_files": [],
|
||||
"ignore_fields": {}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
{
|
||||
"tfcoremock_multiple_blocks": {
|
||||
"blocks": {
|
||||
"first_block": {
|
||||
"attributes": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
}
|
||||
},
|
||||
"mode": "list"
|
||||
},
|
||||
"second_block": {
|
||||
"attributes": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
}
|
||||
},
|
||||
"mode": "list"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
terraform {
|
||||
required_providers {
|
||||
tfcoremock = {
|
||||
source = "hashicorp/tfcoremock"
|
||||
version = "0.1.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
provider "tfcoremock" {}
|
||||
|
||||
resource "tfcoremock_multiple_blocks" "multiple_blocks" {
|
||||
id = "DA051126-BAD6-4EB2-92E5-F0250DAF0B92"
|
||||
|
||||
first_block {
|
||||
id = "B27FB8BE-52D4-4CEB-ACE9-5E7FB3968F2B"
|
||||
}
|
||||
|
||||
first_block {
|
||||
id = "E60148A2-04D1-4EF8-90A2-45CAFC02C60D"
|
||||
}
|
||||
|
||||
first_block {
|
||||
id = "717C64FB-6A93-4763-A1EF-FE4C5B341488"
|
||||
}
|
||||
|
||||
second_block {
|
||||
id = "91640A80-A65F-4BEF-925B-684E4517A04D"
|
||||
}
|
||||
|
||||
second_block {
|
||||
id = "D080F298-2BA4-4DFA-A367-2C5FB0EA7BFE"
|
||||
}
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
"include_files": [],
|
||||
"ignore_fields": {}
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
{
|
||||
"values": {
|
||||
"first_block": {
|
||||
"list": [
|
||||
{
|
||||
"object": {
|
||||
"id": {
|
||||
"string": "D35E88DA-BC3B-46D7-9E0B-4ED4582FA65A"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"object": {
|
||||
"id": {
|
||||
"string": "E60148A2-04D1-4EF8-90A2-45CAFC02C60D"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"object": {
|
||||
"id": {
|
||||
"string": "717C64FB-6A93-4763-A1EF-FE4C5B341488"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"id": {
|
||||
"string": "DA051126-BAD6-4EB2-92E5-F0250DAF0B92"
|
||||
},
|
||||
"second_block": {
|
||||
"list": [
|
||||
{
|
||||
"object": {
|
||||
"id": {
|
||||
"string": "157660A9-D590-469E-BE28-83B8526428CA"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"object": {
|
||||
"id": {
|
||||
"string": "D080F298-2BA4-4DFA-A367-2C5FB0EA7BFE"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
{
|
||||
"version": 4,
|
||||
"terraform_version": "1.3.0",
|
||||
"serial": 2,
|
||||
"lineage": "a5c97830-8a8e-bf77-515e-481367d1e17e",
|
||||
"outputs": {},
|
||||
"resources": [
|
||||
{
|
||||
"mode": "managed",
|
||||
"type": "tfcoremock_multiple_blocks",
|
||||
"name": "multiple_blocks",
|
||||
"provider": "provider[\"registry.terraform.io/hashicorp/tfcoremock\"]",
|
||||
"instances": [
|
||||
{
|
||||
"schema_version": 0,
|
||||
"attributes": {
|
||||
"first_block": [
|
||||
{
|
||||
"id": "D35E88DA-BC3B-46D7-9E0B-4ED4582FA65A"
|
||||
},
|
||||
{
|
||||
"id": "E60148A2-04D1-4EF8-90A2-45CAFC02C60D"
|
||||
},
|
||||
{
|
||||
"id": "717C64FB-6A93-4763-A1EF-FE4C5B341488"
|
||||
}
|
||||
],
|
||||
"id": "DA051126-BAD6-4EB2-92E5-F0250DAF0B92",
|
||||
"second_block": [
|
||||
{
|
||||
"id": "157660A9-D590-469E-BE28-83B8526428CA"
|
||||
},
|
||||
{
|
||||
"id": "D080F298-2BA4-4DFA-A367-2C5FB0EA7BFE"
|
||||
}
|
||||
]
|
||||
},
|
||||
"sensitive_attributes": []
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"check_results": []
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
{
|
||||
"tfcoremock_nested_list": {
|
||||
"attributes": {
|
||||
"lists": {
|
||||
"type": "list",
|
||||
"required": true,
|
||||
"list": {
|
||||
"type": "list",
|
||||
"list": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
20
testing/equivalence-tests/tests/nested_list/main.tf
Normal file
20
testing/equivalence-tests/tests/nested_list/main.tf
Normal file
@ -0,0 +1,20 @@
|
||||
terraform {
|
||||
required_providers {
|
||||
tfcoremock = {
|
||||
source = "hashicorp/tfcoremock"
|
||||
version = "0.1.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
provider "tfcoremock" {}
|
||||
|
||||
resource "tfcoremock_nested_list" "nested_list" {
|
||||
id = "DA051126-BAD6-4EB2-92E5-F0250DAF0B92"
|
||||
|
||||
lists = [
|
||||
[],
|
||||
["44E1C623-7B70-4D78-B4D3-D9CFE8A6D982"],
|
||||
["13E3B154-7B85-4EAA-B3D0-E295E7D71D7F", "8B031CD1-01F7-422C-BBE6-FF8A0E18CDFD"],
|
||||
]
|
||||
}
|
4
testing/equivalence-tests/tests/nested_list/spec.json
Normal file
4
testing/equivalence-tests/tests/nested_list/spec.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"include_files": [],
|
||||
"ignore_fields": {}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
{
|
||||
"tfcoremock_nested_list": {
|
||||
"attributes": {
|
||||
"lists": {
|
||||
"type": "list",
|
||||
"required": true,
|
||||
"list": {
|
||||
"type": "list",
|
||||
"list": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
20
testing/equivalence-tests/tests/nested_list_update/main.tf
Normal file
20
testing/equivalence-tests/tests/nested_list_update/main.tf
Normal file
@ -0,0 +1,20 @@
|
||||
terraform {
|
||||
required_providers {
|
||||
tfcoremock = {
|
||||
source = "hashicorp/tfcoremock"
|
||||
version = "0.1.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
provider "tfcoremock" {}
|
||||
|
||||
resource "tfcoremock_nested_list" "nested_list" {
|
||||
id = "DA051126-BAD6-4EB2-92E5-F0250DAF0B92"
|
||||
|
||||
lists = [
|
||||
["44E1C623-7B70-4D78-B4D3-D9CFE8A6D982"],
|
||||
["8B031CD1-01F7-422C-BBE6-FF8A0E18CDFD"],
|
||||
["13E3B154-7B85-4EAA-B3D0-E295E7D71D7F"],
|
||||
]
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
"include_files": [],
|
||||
"ignore_fields": {}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
{
|
||||
"values": {
|
||||
"id": {
|
||||
"string": "DA051126-BAD6-4EB2-92E5-F0250DAF0B92"
|
||||
},
|
||||
"lists": {
|
||||
"list": [
|
||||
{
|
||||
"list": []
|
||||
},
|
||||
{
|
||||
"list": [
|
||||
{
|
||||
"string": "44E1C623-7B70-4D78-B4D3-D9CFE8A6D982"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"list": [
|
||||
{
|
||||
"string": "13E3B154-7B85-4EAA-B3D0-E295E7D71D7F"
|
||||
},
|
||||
{
|
||||
"string": "8B031CD1-01F7-422C-BBE6-FF8A0E18CDFD"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
{
|
||||
"version": 4,
|
||||
"terraform_version": "1.3.0",
|
||||
"serial": 2,
|
||||
"lineage": "a370201d-6899-c596-f68f-01dfdf622d44",
|
||||
"outputs": {},
|
||||
"resources": [
|
||||
{
|
||||
"mode": "managed",
|
||||
"type": "tfcoremock_nested_list",
|
||||
"name": "nested_list",
|
||||
"provider": "provider[\"registry.terraform.io/hashicorp/tfcoremock\"]",
|
||||
"instances": [
|
||||
{
|
||||
"schema_version": 0,
|
||||
"attributes": {
|
||||
"id": "DA051126-BAD6-4EB2-92E5-F0250DAF0B92",
|
||||
"lists": [
|
||||
[],
|
||||
[
|
||||
"44E1C623-7B70-4D78-B4D3-D9CFE8A6D982"
|
||||
],
|
||||
[
|
||||
"13E3B154-7B85-4EAA-B3D0-E295E7D71D7F",
|
||||
"8B031CD1-01F7-422C-BBE6-FF8A0E18CDFD"
|
||||
]
|
||||
]
|
||||
},
|
||||
"sensitive_attributes": []
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"check_results": []
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
{
|
||||
"tfcoremock_nested_map": {
|
||||
"attributes": {
|
||||
"maps": {
|
||||
"type": "map",
|
||||
"required": true,
|
||||
"map": {
|
||||
"type": "map",
|
||||
"map": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
25
testing/equivalence-tests/tests/nested_map/main.tf
Normal file
25
testing/equivalence-tests/tests/nested_map/main.tf
Normal file
@ -0,0 +1,25 @@
|
||||
terraform {
|
||||
required_providers {
|
||||
tfcoremock = {
|
||||
source = "hashicorp/tfcoremock"
|
||||
version = "0.1.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
provider "tfcoremock" {}
|
||||
|
||||
resource "tfcoremock_nested_map" "nested_map" {
|
||||
id = "502B0348-B796-4F6A-8694-A5A397237B85"
|
||||
|
||||
maps = {
|
||||
"first_nested_map": {
|
||||
"first_key": "9E858021-953F-4DD3-8842-F2C782780422",
|
||||
"second_key": "D55D0E1E-51D9-4BCE-9021-7D201906D3C0"
|
||||
},
|
||||
"second_nested_map": {
|
||||
"first_key": "6E80C701-A823-43FE-A520-699851EF9052",
|
||||
"second_key": "79CBEBB1-1192-480A-B4A8-E816A1A9D2FC"
|
||||
}
|
||||
}
|
||||
}
|
4
testing/equivalence-tests/tests/nested_map/spec.json
Normal file
4
testing/equivalence-tests/tests/nested_map/spec.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"include_files": [],
|
||||
"ignore_fields": {}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
{
|
||||
"tfcoremock_nested_map": {
|
||||
"attributes": {
|
||||
"maps": {
|
||||
"type": "map",
|
||||
"required": true,
|
||||
"map": {
|
||||
"type": "map",
|
||||
"map": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
25
testing/equivalence-tests/tests/nested_map_update/main.tf
Normal file
25
testing/equivalence-tests/tests/nested_map_update/main.tf
Normal file
@ -0,0 +1,25 @@
|
||||
terraform {
|
||||
required_providers {
|
||||
tfcoremock = {
|
||||
source = "hashicorp/tfcoremock"
|
||||
version = "0.1.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
provider "tfcoremock" {}
|
||||
|
||||
resource "tfcoremock_nested_map" "nested_map" {
|
||||
id = "502B0348-B796-4F6A-8694-A5A397237B85"
|
||||
|
||||
maps = {
|
||||
"first_nested_map": {
|
||||
"first_key": "6E80C701-A823-43FE-A520-699851EF9052",
|
||||
"second_key": "D55D0E1E-51D9-4BCE-9021-7D201906D3C0"
|
||||
"third_key": "79CBEBB1-1192-480A-B4A8-E816A1A9D2FC"
|
||||
},
|
||||
"second_nested_map": {
|
||||
"first_key": "9E858021-953F-4DD3-8842-F2C782780422",
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
"include_files": [],
|
||||
"ignore_fields": {}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
{
|
||||
"values": {
|
||||
"id": {
|
||||
"string": "502B0348-B796-4F6A-8694-A5A397237B85"
|
||||
},
|
||||
"maps": {
|
||||
"map": {
|
||||
"first_nested_map": {
|
||||
"map": {
|
||||
"first_key": {
|
||||
"string": "9E858021-953F-4DD3-8842-F2C782780422"
|
||||
},
|
||||
"second_key": {
|
||||
"string": "D55D0E1E-51D9-4BCE-9021-7D201906D3C0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"second_nested_map": {
|
||||
"map": {
|
||||
"first_key": {
|
||||
"string": "6E80C701-A823-43FE-A520-699851EF9052"
|
||||
},
|
||||
"second_key": {
|
||||
"string": "79CBEBB1-1192-480A-B4A8-E816A1A9D2FC"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
{
|
||||
"version": 4,
|
||||
"terraform_version": "1.3.0",
|
||||
"serial": 2,
|
||||
"lineage": "f6b2f8a8-d060-337c-a45a-25c038eb196f",
|
||||
"outputs": {},
|
||||
"resources": [
|
||||
{
|
||||
"mode": "managed",
|
||||
"type": "tfcoremock_nested_map",
|
||||
"name": "nested_map",
|
||||
"provider": "provider[\"registry.terraform.io/hashicorp/tfcoremock\"]",
|
||||
"instances": [
|
||||
{
|
||||
"schema_version": 0,
|
||||
"attributes": {
|
||||
"id": "502B0348-B796-4F6A-8694-A5A397237B85",
|
||||
"maps": {
|
||||
"first_nested_map": {
|
||||
"first_key": "9E858021-953F-4DD3-8842-F2C782780422",
|
||||
"second_key": "D55D0E1E-51D9-4BCE-9021-7D201906D3C0"
|
||||
},
|
||||
"second_nested_map": {
|
||||
"first_key": "6E80C701-A823-43FE-A520-699851EF9052",
|
||||
"second_key": "79CBEBB1-1192-480A-B4A8-E816A1A9D2FC"
|
||||
}
|
||||
}
|
||||
},
|
||||
"sensitive_attributes": []
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"check_results": []
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
{
|
||||
"tfcoremock_nested_object": {
|
||||
"attributes": {
|
||||
"parent_object": {
|
||||
"type": "object",
|
||||
"required": true,
|
||||
"object": {
|
||||
"first_nested_object": {
|
||||
"type": "object",
|
||||
"required": true,
|
||||
"object": {
|
||||
"attribute_one": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
},
|
||||
"attribute_two": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"second_nested_object": {
|
||||
"type": "object",
|
||||
"required": true,
|
||||
"object": {
|
||||
"attribute_one": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
},
|
||||
"attribute_two": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user