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

[State] Apply changes not stored in state file (ibm_is_subnet_reserved_ip) #4927

Closed
shemau opened this issue Nov 15, 2023 · 0 comments · Fixed by #4988
Closed

[State] Apply changes not stored in state file (ibm_is_subnet_reserved_ip) #4927

shemau opened this issue Nov 15, 2023 · 0 comments · Fixed by #4988
Labels
service/VPC Infrastructure Issues related to the VPC Infrastructure

Comments

@shemau
Copy link

shemau commented Nov 15, 2023

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • 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
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform CLI and Terraform IBM Provider Version

terraform -v
Terraform v1.5.7
on darwin_amd64
+ provider registry.terraform.io/hashicorp/time v0.9.1
+ provider registry.terraform.io/ibm-cloud/ibm v1.59.0

Affected Resource(s)

  • ibm_is_subnet_reserved_ip

Terraform Configuration Files

https://github.com/terraform-ibm-modules/terraform-ibm-vpe-gateway/blob/v4.0.1/main.tf#L72

Debug Output

Panic Output

Expected Behavior

When changing the name attribute on ibm_is_subnet_reserved_ip and running an apply the changes to the environment should be reflected in the state file.

Actual Behavior

The changes are not stored in the state file, so subsequent applies always have changes to make.

Steps to Reproduce

  1. terraform plan
  2. change the name value in the source code
  3. terraform apply
  4. terraform plan shows that changes are required (this should not happen)
  5. [work around / fix] terraform refresh (this should not be required)

Example partial output from those steps

No changes. Your infrastructure matches the configuration
  # module.vpes.ibm_is_subnet_reserved_ip.ip["vpe-vpc-instance-subnet-c-postgresql-gateway-3-ip"] will be updated in-place
  ~ resource "ibm_is_subnet_reserved_ip" "ip" {
        id              = "0737-6588cd82-3071-4d1e-8537-ca188044f700/0737-59ddbfa0-e6dc-422f-8ef5-114aa7f36a96"
      ~ name            = "shucking-graffiti-creamlike-idealist" -> "vpe-vpc-instance-postgresql-3"
        # (11 unchanged attributes hidden)
    }
...
module.vpes.ibm_is_subnet_reserved_ip.ip["vpe-vpc-instance-subnet-c-postgresql-gateway-3-ip"]: Modifying... [id=0737-6588cd82-3071-4d1e-8537-ca188044f700/0737-59ddbfa0-e6dc-422f-8ef5-114aa7f36a96]
...
module.vpes.ibm_is_subnet_reserved_ip.ip["vpe-vpc-instance-subnet-c-postgresql-gateway-3-ip"]: Modifications complete after 2s [id=0737-6588cd82-3071-4d1e-8537-ca188044f700/0737-59ddbfa0-e6dc-422f-8ef5-114aa7f36a96]
Changes to Outputs:
  ~ vpe_ips = {
      ~ vpe-vpc-instance-postgresql           = [
          ~ {
                id            = "0737-59ddbfa0-e6dc-422f-8ef5-114aa7f36a96"
              ~ name          = "shucking-graffiti-creamlike-idealist" -> "vpe-vpc-instance-postgresql-3"
                # (2 unchanged attributes hidden)
            },
        ]

Important Factoids

This is a change in the outputs. The resources themselves appear to have been updated.

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service/VPC Infrastructure Issues related to the VPC Infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant