Skip to content

Commit

Permalink
fixed data_source_secret_manager_secret_version on its id (#3904) (#7098
Browse files Browse the repository at this point in the history
)

Co-authored-by: Edward Sun <[email protected]>
Signed-off-by: Modular Magician <[email protected]>

Co-authored-by: Edward Sun <[email protected]>
  • Loading branch information
modular-magician and Edward Sun authored Aug 25, 2020
1 parent d5c2dbf commit 40bd46d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
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
}

0 comments on commit 40bd46d

Please sign in to comment.