Skip to content

Commit

Permalink
rdb changes needed for 1st gen success
Browse files Browse the repository at this point in the history
  • Loading branch information
Mia-Cross committed May 10, 2024
1 parent c6423eb commit 34ff4be
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 58 deletions.
34 changes: 7 additions & 27 deletions internal/services/documentdb/read_replica.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,15 @@ func ResourceReadReplica() *schema.Resource {
Optional: true,
Description: "Direct access endpoint, it gives you an IP and a port to access your read-replica",
MaxItems: 1,
Elem: &schema.Resource{},
},
"endpoints_spec": {
Type: schema.TypeList,
Computed: true,
Description: "Endpoints specs",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
// Endpoints common
// Endpoints common specs
"endpoint_id": {
Type: schema.TypeString,
Description: "UUID of the endpoint (UUID format).",
Expand Down Expand Up @@ -107,32 +113,6 @@ func ResourceReadReplica() *schema.Resource {
Description: "Private network zone",
Computed: true,
},
// Endpoints common
"endpoint_id": {
Type: schema.TypeString,
Description: "UUID of the endpoint (UUID format).",
Computed: true,
},
"ip": {
Type: schema.TypeString,
Description: "IPv4 address of the endpoint (IP address). Only one of ip and hostname may be set",
Computed: true,
},
"port": {
Type: schema.TypeInt,
Description: "TCP port of the endpoint",
Computed: true,
},
"name": {
Type: schema.TypeString,
Description: "Name of the endpoints",
Computed: true,
},
"hostname": {
Type: schema.TypeString,
Description: "Hostname of the endpoint. Only one of ip and hostname may be set",
Computed: true,
},
},
},
},
Expand Down
34 changes: 7 additions & 27 deletions internal/services/rdb/read_replica.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,15 @@ func ResourceReadReplica() *schema.Resource {
Optional: true,
Description: "Direct access endpoint, it gives you an IP and a port to access your read-replica",
MaxItems: 1,
Elem: &schema.Resource{},
},
"endpoints_spec": {
Type: schema.TypeList,
Computed: true,
Description: "Endpoints specs",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
// Endpoints common
// Endpoints common specs
"endpoint_id": {
Type: schema.TypeString,
Description: "UUID of the endpoint (UUID format).",
Expand Down Expand Up @@ -119,32 +125,6 @@ func ResourceReadReplica() *schema.Resource {
Description: "Private network zone",
Computed: true,
},
// Endpoints common
"endpoint_id": {
Type: schema.TypeString,
Description: "UUID of the endpoint (UUID format).",
Computed: true,
},
"ip": {
Type: schema.TypeString,
Description: "IPv4 address of the endpoint (IP address). Only one of ip and hostname may be set",
Computed: true,
},
"port": {
Type: schema.TypeInt,
Description: "TCP port of the endpoint",
Computed: true,
},
"name": {
Type: schema.TypeString,
Description: "Name of the endpoints",
Computed: true,
},
"hostname": {
Type: schema.TypeString,
Description: "Hostname of the endpoint. Only one of ip and hostname may be set",
Computed: true,
},
},
},
},
Expand Down
8 changes: 4 additions & 4 deletions internal/services/redis/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,10 @@ func ResourceCluster() *schema.Resource {
},
// Computed
"public_network": {
Type: schema.TypeList,
Optional: true,
Computed: true,
MaxItems: 1,
Type: schema.TypeList,
//Optional: true,

Check failure on line 172 in internal/services/redis/cluster.go

View workflow job for this annotation

GitHub Actions / lint

File is not `gofumpt`-ed (gofumpt)
Computed: true,
//MaxItems: 1,

Check failure on line 174 in internal/services/redis/cluster.go

View workflow job for this annotation

GitHub Actions / lint

File is not `gofumpt`-ed (gofumpt)
Description: "Public network specs details",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
Expand Down

0 comments on commit 34ff4be

Please sign in to comment.