states/version3 upgrade: revert provider FQN changes (#24504)

This commit reverts an earlier change which automatically converted
provider strings to legacy provider FQNs. It has become apparent that a
state upgrade step will be required before upgrading to v0.13.
This commit is contained in:
Kristin Laemmert 2020-03-31 08:33:48 -04:00 committed by Martin Atkins
parent a4280caf57
commit d95667f264
6 changed files with 12 additions and 12 deletions

View File

@ -28,7 +28,7 @@
"type": "null_resource", "type": "null_resource",
"name": "bar", "name": "bar",
"each": "list", "each": "list",
"provider": "provider[\"registry.terraform.io/-/null\"]", "provider": "provider.null",
"instances": [ "instances": [
{ {
"attributes_flat": { "attributes_flat": {
@ -60,7 +60,7 @@
"mode": "managed", "mode": "managed",
"type": "null_resource", "type": "null_resource",
"name": "baz", "name": "baz",
"provider": "provider[\"registry.terraform.io/-/null\"]", "provider": "provider.null",
"instances": [ "instances": [
{ {
"attributes_flat": { "attributes_flat": {
@ -86,7 +86,7 @@
"mode": "managed", "mode": "managed",
"type": "null_resource", "type": "null_resource",
"name": "foo", "name": "foo",
"provider": "provider[\"registry.terraform.io/-/null\"]", "provider": "provider.null",
"instances": [ "instances": [
{ {
"attributes_flat": { "attributes_flat": {

View File

@ -28,7 +28,7 @@
"type": "null_resource", "type": "null_resource",
"name": "bar", "name": "bar",
"each": "list", "each": "list",
"provider": "provider[\"registry.terraform.io/-/null\"]", "provider": "provider.null",
"instances": [ "instances": [
{ {
"attributes_flat": { "attributes_flat": {
@ -60,7 +60,7 @@
"mode": "managed", "mode": "managed",
"type": "null_resource", "type": "null_resource",
"name": "baz", "name": "baz",
"provider": "provider[\"registry.terraform.io/-/null\"]", "provider": "provider.null",
"instances": [ "instances": [
{ {
"attributes_flat": { "attributes_flat": {
@ -86,7 +86,7 @@
"mode": "managed", "mode": "managed",
"type": "null_resource", "type": "null_resource",
"name": "foo", "name": "foo",
"provider": "provider[\"registry.terraform.io/-/null\"]", "provider": "provider.null",
"instances": [ "instances": [
{ {
"attributes_flat": { "attributes_flat": {

View File

@ -14,7 +14,7 @@
"mode": "managed", "mode": "managed",
"type": "null_resource", "type": "null_resource",
"name": "bar", "name": "bar",
"provider": "provider[\"registry.terraform.io/-/null\"]", "provider": "provider.null",
"instances": [ "instances": [
{ {
"schema_version": 0, "schema_version": 0,

View File

@ -14,7 +14,7 @@
"mode": "managed", "mode": "managed",
"type": "null_resource", "type": "null_resource",
"name": "bar", "name": "bar",
"provider": "provider[\"registry.terraform.io/-/null\"]", "provider": "provider.null",
"instances": [ "instances": [
{ {
"schema_version": 0, "schema_version": 0,
@ -35,7 +35,7 @@
"mode": "managed", "mode": "managed",
"type": "null_resource", "type": "null_resource",
"name": "foo", "name": "foo",
"provider": "provider[\"registry.terraform.io/-/null\"]", "provider": "provider.null",
"each": "list", "each": "list",
"instances": [ "instances": [
{ {
@ -62,7 +62,7 @@
"mode": "managed", "mode": "managed",
"type": "null_resource", "type": "null_resource",
"name": "foobar", "name": "foobar",
"provider": "provider[\"registry.terraform.io/-/null\"]", "provider": "provider.null",
"instances": [ "instances": [
{ {
"schema_version": 0, "schema_version": 0,

View File

@ -33,7 +33,7 @@
"mode": "managed", "mode": "managed",
"type": "null_resource", "type": "null_resource",
"name": "foo", "name": "foo",
"provider": "provider.null", "provider": "provider[\"registry.terraform.io/-/null\"]",
"each": "list", "each": "list",
"instances": [ "instances": [
{ {

View File

@ -154,7 +154,7 @@ func upgradeStateV3ToV4(old *stateV3) (*stateV4, error) {
Type: resAddr.Type, Type: resAddr.Type,
Name: resAddr.Name, Name: resAddr.Name,
Instances: []instanceObjectStateV4{}, Instances: []instanceObjectStateV4{},
ProviderConfig: providerAddr.String(), ProviderConfig: providerAddr.LegacyString(),
} }
resourceStates[resAddr.String()] = rs resourceStates[resAddr.String()] = rs
} }