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

Populate missing fields for data_google_compute_(?*_)address #7486

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
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,41 @@ func DataSourceGoogleComputeAddress() *schema.Resource {
Computed: true,
},

"address_type": {
Type: schema.TypeString,
Computed: true,
},

"network": {
Type: schema.TypeString,
Computed: true,
},

"network_tier": {
Type: schema.TypeString,
Computed: true,
},

"prefix_length": {
Type: schema.TypeInt,
Computed: true,
},

"purpose": {
Type: schema.TypeString,
Computed: true,
},

"subnetwork": {
Type: schema.TypeString,
Computed: true,
},

"users": {
Type: schema.TypeString,
Computed: true,
},

"status": {
Type: schema.TypeString,
Computed: true,
Expand Down Expand Up @@ -78,6 +113,24 @@ func dataSourceGoogleComputeAddressRead(d *schema.ResourceData, meta interface{}
if err := d.Set("address", address.Address); err != nil {
return fmt.Errorf("Error setting address: %s", err)
}
if err := d.Set("address_type", address.AddressType); err != nil {
return fmt.Errorf("Error setting address_type: %s", err)
}
if err := d.Set("network", address.Network); err != nil {
return fmt.Errorf("Error setting network: %s", err)
}
if err := d.Set("network_tier", address.NetworkTier); err != nil {
return fmt.Errorf("Error setting network_tier: %s", err)
}
if err := d.Set("prefix_length", address.PrefixLength); err != nil {
return fmt.Errorf("Error setting prefix_length: %s", err)
}
if err := d.Set("purpose", address.Purpose); err != nil {
return fmt.Errorf("Error setting purpose: %s", err)
}
if err := d.Set("subnetwork", address.Subnetwork); err != nil {
return fmt.Errorf("Error setting subnetwork: %s", err)
}
if err := d.Set("status", address.Status); err != nil {
return fmt.Errorf("Error setting status: %s", err)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,41 @@ func DataSourceGoogleComputeGlobalAddress() *schema.Resource {
Computed: true,
},

"address_type": {
Type: schema.TypeString,
Computed: true,
},

"network": {
Type: schema.TypeString,
Computed: true,
},

"network_tier": {
Type: schema.TypeString,
Computed: true,
},

"prefix_length": {
Type: schema.TypeInt,
Computed: true,
},

"purpose": {
Type: schema.TypeString,
Computed: true,
},

"subnetwork": {
Type: schema.TypeString,
Computed: true,
},

"users": {
Type: schema.TypeString,
Computed: true,
},

"status": {
Type: schema.TypeString,
Computed: true,
Expand Down Expand Up @@ -60,6 +95,24 @@ func dataSourceGoogleComputeGlobalAddressRead(d *schema.ResourceData, meta inter
if err := d.Set("address", address.Address); err != nil {
return fmt.Errorf("Error setting address: %s", err)
}
if err := d.Set("address_type", address.AddressType); err != nil {
return fmt.Errorf("Error setting address_type: %s", err)
}
if err := d.Set("network", address.Network); err != nil {
return fmt.Errorf("Error setting network: %s", err)
}
if err := d.Set("network_tier", address.NetworkTier); err != nil {
return fmt.Errorf("Error setting network_tier: %s", err)
}
if err := d.Set("prefix_length", address.PrefixLength); err != nil {
return fmt.Errorf("Error setting prefix_length: %s", err)
}
if err := d.Set("purpose", address.Purpose); err != nil {
return fmt.Errorf("Error setting purpose: %s", err)
}
if err := d.Set("subnetwork", address.Subnetwork); err != nil {
return fmt.Errorf("Error setting subnetwork: %s", err)
}
if err := d.Set("status", address.Status); err != nil {
return fmt.Errorf("Error setting status: %s", err)
}
Expand Down