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

google_compute_public_advertised_prefix adding in output only shared_secret #7767

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
3 changes: 3 additions & 0 deletions .changelog/11146.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
compute: added `shared_secret` field to `google_compute_public_advertised_prefix` resource
```
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ except the last character, which cannot be a dash.`,
ForceNew: true,
Description: `An optional description of this resource.`,
},
"shared_secret": {
Type: schema.TypeString,
Computed: true,
Description: `Output Only. The shared secret to be used for reverse DNS verification.`,
},
"project": {
Type: schema.TypeString,
Optional: true,
Expand Down Expand Up @@ -238,6 +243,9 @@ func resourceComputePublicAdvertisedPrefixRead(d *schema.ResourceData, meta inte
if err := d.Set("ip_cidr_range", flattenComputePublicAdvertisedPrefixIpCidrRange(res["ipCidrRange"], d, config)); err != nil {
return fmt.Errorf("Error reading PublicAdvertisedPrefix: %s", err)
}
if err := d.Set("shared_secret", flattenComputePublicAdvertisedPrefixSharedSecret(res["sharedSecret"], d, config)); err != nil {
return fmt.Errorf("Error reading PublicAdvertisedPrefix: %s", err)
}
if err := d.Set("self_link", tpgresource.ConvertSelfLinkToV1(res["selfLink"].(string))); err != nil {
return fmt.Errorf("Error reading PublicAdvertisedPrefix: %s", err)
}
Expand Down Expand Up @@ -337,6 +345,10 @@ func flattenComputePublicAdvertisedPrefixIpCidrRange(v interface{}, d *schema.Re
return v
}

func flattenComputePublicAdvertisedPrefixSharedSecret(v interface{}, d *schema.ResourceData, config *transport_tpg.Config) interface{} {
return v
}

func expandComputePublicAdvertisedPrefixDescription(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) {
return v, nil
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ The following arguments are supported:
In addition to the arguments listed above, the following computed attributes are exported:

* `id` - an identifier for the resource with format `projects/{{project}}/global/publicAdvertisedPrefixes/{{name}}`

* `shared_secret` -
Output Only. The shared secret to be used for reverse DNS verification.
* `self_link` - The URI of the created resource.


Expand Down