mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-10-03 01:01:06 +00:00
Fix compute project metadata error from previous "common_metadata" IDs (#2844)
Signed-off-by: Modular Magician <magic-modules@google.com>
This commit is contained in:
parent
461fb2aba0
commit
601f6cf346
@ -60,11 +60,13 @@ func resourceComputeProjectMetadataCreateOrUpdate(d *schema.ResourceData, meta i
|
||||
func resourceComputeProjectMetadataRead(d *schema.ResourceData, meta interface{}) error {
|
||||
config := meta.(*Config)
|
||||
|
||||
if d.Id() == "" {
|
||||
projectID, err := getProject(d, config)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if d.Id() == "" || d.Id() != projectID {
|
||||
log.Printf("[DEBUG] Setting ID to: %s", projectID)
|
||||
d.SetId(projectID)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user