Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Error to access the state after upgrading to v5.1.0 #31743

Closed
thiagolsfortunato opened this issue Jun 2, 2023 · 4 comments
Closed

[Bug]: Error to access the state after upgrading to v5.1.0 #31743

thiagolsfortunato opened this issue Jun 2, 2023 · 4 comments
Labels
bug Addresses a defect in current functionality. service/directconnect Issues and PRs that pertain to the directconnect service.

Comments

@thiagolsfortunato
Copy link

Terraform Core Version

1.4.6

AWS Provider Version

5.1.0

Affected Resource(s)

After upgrading the provider from v4.67.0 to v5.1.0 the terraform plan reproduce an error just for the resourceaws_dx_connection.

╷
│ Warning: Failed to decode resource from state
│ 
│ Error decoding "aws_dx_connection.example" from prior state: a number is required
╵
...
╷
│ Error: a number is required
│ 
│   with aws_dx_connection.example,
│   on dx-connection.tf line 3, in resource "aws_dx_connection" "example":
│    3: resource "aws_dx_connection" "example" {
│ 
╵

Expected Behavior

No changes had been detected in the state.

Actual Behavior

Error in accessing the resource in the state.

Relevant Error/Panic Output Snippet

No response

Terraform Configuration Files

terraform {
  required_version = ">= 1.3"

  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "~> 4.0"
    }
  }
}

provider "aws" {
  region = "us-east-1"
}

resource "aws_dx_connection" "example" {
  name      = "example"
  bandwidth = "1Gbps"
  location  = "EqDC2"
}

Steps to Reproduce

terraform init && terraform apply -auto-approve

upgrade the AWS Provider Version Constraint:

terraform {
  required_version = ">= 1.3"

  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = ">= 4.0"
    }
  }
}

run:

terraform init -upgrade && terraform plan

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

@thiagolsfortunato thiagolsfortunato added bug Addresses a defect in current functionality. needs-triage Waiting for first response or review from a maintainer. labels Jun 2, 2023
@github-actions
Copy link

github-actions bot commented Jun 2, 2023

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added the service/directconnect Issues and PRs that pertain to the directconnect service. label Jun 2, 2023
@thiagolsfortunato
Copy link
Author

Will be fixed here #31735

@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label Jun 2, 2023
@ewbankkit
Copy link
Contributor

@thiagolsfortunato Thanks for raising this issue.
It has already been noticed in #31732. I'm going to close this one as a duplicate so that we can concentrate discussion in the linked issue.
Please add any additional comments there.

@github-actions
Copy link

github-actions bot commented Jul 3, 2023

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/directconnect Issues and PRs that pertain to the directconnect service.
Projects
None yet
Development

No branches or pull requests

2 participants