Skip to content

Ephemeral google_secret_manager_secret_version does not properly set version after open #25071

@LeeSaferite

Description

@LeeSaferite

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 me too comments, 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.
  • If an issue is assigned to a user, that user is claiming responsibility for the issue.
  • Customers working with a Google Technical Account Manager or Customer Engineer can ask them to reach out internally to expedite investigation and resolution of this issue.

Terraform Version & Provider Version(s)

Terraform v1.12.2
on linux_amd64

  • provider registry.terraform.io/hashicorp/google v7.10.0
  • provider registry.terraform.io/hashicorp/google-beta v7.10.0

Affected Resource(s)

ephemeral.google_secret_manager_secret_version

Terraform Configuration

ephemeral google_secret_manager_secret_version "test" {
  secret = google_secret_manager_secret.test.id
}

Debug Output

No response

Expected Behavior

I would expect that with a missing version in the ephemeral resource definition it would load the "latest" secret version which it does. I would also expect that version would show the loaded version, like data.google_secret_manager_secret_version, which it does not.

Actual Behavior

The version attribute is unchanged from what was provided as the version argument.

NOTE: I know the distinction between argument/attribute is minimal and they use the same struct, but in this scenario the data resource is updating the version value to match what was actually loaded when using the "latest" attribute.

Steps to reproduce

  1. terraform apply

Important Factoids

No response

References

Ref to data version: https://github.com/hashicorp/terraform-provider-google/blob/v7.10.0/google/services/secretmanager/data_source_secret_manager_secret_version.go#L157-L159

b/462810537

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions