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

hcp_group with no description results in error #841

Closed
squaresurf opened this issue May 21, 2024 · 1 comment · Fixed by #844
Closed

hcp_group with no description results in error #841

squaresurf opened this issue May 21, 2024 · 1 comment · Fixed by #844
Labels
bug Something isn't working

Comments

@squaresurf
Copy link
Member

squaresurf commented May 21, 2024

Terraform Version and Provider Version

Terraform version: v1.8.3
HCP provider version: v0.89.0

Affected Resource(s)

  • hcp_group

Terraform Configuration Files

// Pin the version
terraform {
  required_providers {
    hcp = {
      source  = "hashicorp/hcp"
      version = "~> 0.89.0"
    }
  }
}

// Configure the provider
provider "hcp" {}

resource "hcp_group" "group-without-desc" {
  display_name = "Example Group without Desc"
  # BUG no description will cause an error
  # WORKAROUND set an empty string
  # description = ""
}

Debug Output

https://gist.github.com/squaresurf/72fa9f78c2308c543e0438a464b2a480

Panic Output

It does not panic.

Steps to Reproduce

  1. terraform apply

Expected Behavior

State should be saved after creating the group.

Actual Behavior

An error regarding inconsistent state is output and state is not saved after group is created in HCP.

Important Factoids

No.

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
@squaresurf squaresurf added the bug Something isn't working label May 21, 2024
squaresurf added a commit that referenced this issue May 21, 2024
Why:

* When an hcp_group description is not configured in a Terraform file,
  then Terraform returns an error about the state's value of null not
  matching the provider's return value of "".

This change addresses the need by:

* Add failing test for hcpi_group description not being configured.
* Fix test by configuring the hcp_group description attribute to be
  computed.

Fixes #841
squaresurf added a commit that referenced this issue May 21, 2024
Why:

* When an hcp_group description is not configured in a Terraform file,
  then Terraform returns an error about the state's value of null not
  matching the provider's return value of "".

This change addresses the need by:

* Add failing test for hcpi_group description not being configured.
* Fix test by configuring the hcp_group description attribute to be
  computed.

Fixes #841
squaresurf added a commit that referenced this issue May 21, 2024
Why:

* When an hcp_group description is not configured in a Terraform file,
  then Terraform returns an error about the state's value of null not
  matching the provider's return value of "".

This change addresses the need by:

* Add failing test for hcpi_group description not being configured.
* Fix test by configuring the hcp_group description attribute to be
  computed.

Fixes #841
@squaresurf
Copy link
Member Author

I have tested this with the new v0.90.0 release and this issue has successfully been resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant