Skip to content

Commit

Permalink
azurerm_redis_linked_server - Adding geo replicated hostname to attri…
Browse files Browse the repository at this point in the history
…bute list (#23984)

* Adding geo replicated hostname to attribute list

* Resolving PR comments

---------

Co-authored-by: Jacob Ellingson <[email protected]>
  • Loading branch information
EndureBlackout and jakeellingson authored Dec 4, 2023
1 parent 0288b4b commit 464aa0e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal/services/redis/redis_linked_server_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"log"
"time"

"github.com/hashicorp/go-azure-helpers/lang/pointer"
"github.com/hashicorp/go-azure-helpers/lang/response"
"github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema"
"github.com/hashicorp/go-azure-helpers/resourcemanager/location"
Expand Down Expand Up @@ -75,6 +76,11 @@ func resourceRedisLinkedServer() *pluginsdk.Resource {
Type: pluginsdk.TypeString,
Computed: true,
},

"geo_replicated_primary_host_name": {
Type: pluginsdk.TypeString,
Computed: true,
},
},
}
}
Expand Down Expand Up @@ -175,6 +181,7 @@ func resourceRedisLinkedServerRead(d *pluginsdk.ResourceData, meta interface{})

d.Set("linked_redis_cache_location", location.Normalize(props.LinkedRedisCacheLocation))
d.Set("server_role", string(props.ServerRole))
d.Set("geo_replicated_primary_host_name", pointer.From(props.GeoReplicatedPrimaryHostName))
}
}

Expand Down
2 changes: 2 additions & 0 deletions website/docs/r/redis_linked_server.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ In addition to the Arguments listed above - the following Attributes are exporte

* `name` - The name of the linked server.

* `geo_replicated_primary_host_name` - The geo-replicated primary hostname for this linked server.

## Timeouts

The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/language/resources/syntax#operation-timeouts) for certain actions:
Expand Down

0 comments on commit 464aa0e

Please sign in to comment.