Skip to content

Commit abd7833

Browse files
committed
update descriptions
1 parent 6265d3d commit abd7833

File tree

4 files changed

+52
-23
lines changed

4 files changed

+52
-23
lines changed

docs/data-sources/lb_frontends.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,11 @@ In addition to all arguments above, the following attributes are exported:
4040
~> **Important:** LB frontend IDs are [zoned](../guides/regions_and_zones.md#resource-ids), which means they are of the form `{zone}/{id}`, e.g. `fr-par-1/11111111-1111-1111-1111-111111111111`
4141
- `inbound_port` - TCP port the frontend listens to.
4242
- `created_at` - The date on which the frontend was created (RFC 3339 format).
43-
- `update_at` - The date aont which the frontend was last updated (RFC 3339 format).
43+
- `update_at` - The date on which the frontend was last updated (RFC 3339 format).
4444
- `backend_id` - The Load Balancer backend ID this frontend is attached to.
4545
~> **Important:** Load Balancer backend IDs are [zoned](../guides/regions_and_zones.md#resource-ids), which means they are of the form `{zone}/{id}`, e.g. `fr-par-1/11111111-1111-1111-1111-111111111111`
4646
- `timeout_client` - Maximum inactivity time on the client side.
4747
- `certificate_ids` - List of certificate IDs that are used by the frontend.
4848
- `enable_http3` - Whether HTTP/3 protocol is activated.
49+
- `connection_rate_limit` - The rate limit for new connections established on this frontend. Use 0 value to disable, else value is connections per second.
50+
- `enable_access_logs` - Defines whether to enable access logs on the frontend.

docs/resources/lb_frontend.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,9 @@ In addition to all arguments above, the following attributes are exported:
223223

224224
- `certificate_id` - (Deprecated, use `certificate_ids` instead) First certificate ID used by the frontend.
225225

226+
- `created_at` - The date and time the frontend was created.
227+
228+
- `updated_at` - The date and time the frontend resource was updated.
226229

227230
## Import
228231

internal/services/lb/data_source_lb_frontends.go

Lines changed: 34 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -32,55 +32,67 @@ func DataSourceFrontends() *schema.Resource {
3232
Elem: &schema.Resource{
3333
Schema: map[string]*schema.Schema{
3434
"id": {
35-
Computed: true,
36-
Type: schema.TypeString,
35+
Computed: true,
36+
Type: schema.TypeString,
37+
Description: "The load-balancer frontend ID",
3738
},
3839
"name": {
39-
Computed: true,
40-
Type: schema.TypeString,
40+
Computed: true,
41+
Type: schema.TypeString,
42+
Description: "The name of the frontend",
4143
},
4244
"inbound_port": {
43-
Computed: true,
44-
Type: schema.TypeInt,
45+
Computed: true,
46+
Type: schema.TypeInt,
47+
Description: "TCP port to listen on the front side",
4548
},
4649
"backend_id": {
47-
Computed: true,
48-
Type: schema.TypeString,
50+
Computed: true,
51+
Type: schema.TypeString,
52+
Description: "The load-balancer backend ID",
4953
},
5054
"lb_id": {
51-
Computed: true,
52-
Type: schema.TypeString,
55+
Computed: true,
56+
Type: schema.TypeString,
57+
Description: "The load-balancer ID",
5358
},
5459
"timeout_client": {
55-
Computed: true,
56-
Type: schema.TypeString,
60+
Computed: true,
61+
Type: schema.TypeString,
62+
Description: "Set the maximum inactivity time on the client side",
5763
},
5864
"certificate_ids": {
5965
Computed: true,
6066
Type: schema.TypeList,
6167
Elem: &schema.Schema{
6268
Type: schema.TypeString,
6369
},
70+
Description: "Collection of Certificate IDs related to the load balancer and domain",
6471
},
6572
"created_at": {
66-
Computed: true,
67-
Type: schema.TypeString,
73+
Computed: true,
74+
Type: schema.TypeString,
75+
Description: "The date and time of the creation of the frontend",
6876
},
6977
"update_at": {
70-
Computed: true,
71-
Type: schema.TypeString,
78+
Computed: true,
79+
Type: schema.TypeString,
80+
Description: "The date and time of the last update of the frontend",
7281
},
7382
"enable_http3": {
74-
Computed: true,
75-
Type: schema.TypeBool,
83+
Computed: true,
84+
Type: schema.TypeBool,
85+
Description: "Activates HTTP/3 protocol",
7686
},
7787
"connection_rate_limit": {
78-
Computed: true,
79-
Type: schema.TypeInt,
88+
Computed: true,
89+
Type: schema.TypeInt,
90+
Description: "Rate limit for new connections established on this frontend. Use 0 value to disable, else value is connections per second",
8091
},
8192
"enable_access_logs": {
82-
Computed: true,
83-
Type: schema.TypeBool,
93+
Computed: true,
94+
Type: schema.TypeBool,
95+
Description: "Defines whether to enable access logs on the frontend",
8496
},
8597
},
8698
},

internal/services/lb/frontend.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,16 @@ func ResourceFrontend() *schema.Resource {
234234
Optional: true,
235235
Default: false,
236236
},
237+
"created_at": {
238+
Type: schema.TypeString,
239+
Computed: true,
240+
Description: "The date and time of the creation of the frontend",
241+
},
242+
"updated_at": {
243+
Type: schema.TypeString,
244+
Computed: true,
245+
Description: "The date and time of the last update of the frontend",
246+
},
237247
},
238248
}
239249
}
@@ -339,6 +349,8 @@ func resourceLbFrontendRead(ctx context.Context, d *schema.ResourceData, m any)
339349
_ = d.Set("enable_http3", frontend.EnableHTTP3)
340350
_ = d.Set("connection_rate_limit", types.FlattenUint32Ptr(frontend.ConnectionRateLimit))
341351
_ = d.Set("enable_access_logs", frontend.EnableAccessLogs)
352+
_ = d.Set("created_at", types.FlattenTime(frontend.CreatedAt))
353+
_ = d.Set("updated_at", types.FlattenTime(frontend.UpdatedAt))
342354

343355
if frontend.Certificate != nil { //nolint:staticcheck
344356
_ = d.Set("certificate_id", zonal.NewIDString(zone, frontend.Certificate.ID)) //nolint:staticcheck

0 commit comments

Comments
 (0)