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

fixed data_source_secret_manager_secret_version on its id #7098

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fixed data_source_secret_manager_secret_version on its id (#3904)
Co-authored-by: Edward Sun <[email protected]>
Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician and Edward Sun committed Aug 25, 2020
commit b1b0f16a68b1624f3f8db6970a8d809f6e48b1fc
3 changes: 3 additions & 0 deletions .changelog/3904.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
fixed data_source_secret_manager_secret_version on its id value
```
3 changes: 1 addition & 2 deletions google/data_source_secret_manager_secret_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"fmt"
"log"
"regexp"
"time"

"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)
Expand Down Expand Up @@ -121,6 +120,6 @@ func dataSourceSecretManagerSecretVersionRead(d *schema.ResourceData, meta inter
}
d.Set("secret_data", string(secretData))

d.SetId(time.Now().UTC().String())
d.SetId(version["name"].(string))
return nil
}