Skip to content

Commit a0535ed

Browse files
[APIT-2483] Update docs for Private Link Attachment / Private Link Attachment Connection to indicate that display_name is required (#434)
* Update docs for PLA / PLAC to indicate that display_name is required * Update code for PLA / PLAC to indicate display_name is required * Add more fix to the required display_name field * Removed the Computed field * small fix
1 parent 8d82099 commit a0535ed

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

docs/resources/confluent_private_link_attachment.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ output "private_link_attachment" {
3434

3535
The following arguments are supported:
3636

37-
- `display_name` - (Optional String) The name of the Private Link Attachment.
37+
- `display_name` - (Required String) The name of the Private Link Attachment.
3838
- `environment` (Required Configuration Block) supports the following:
3939
- `id` - (Required String) The ID of the Environment that the Private Link Attachment belongs to, for example `env-xyz456`.
4040
- `cloud` - (Required String) The cloud service provider that hosts the resources to access with the Private Link Attachment.

docs/resources/confluent_private_link_attachment_connection.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ output "private_link_attachment_connection" {
5151

5252
The following arguments are supported:
5353

54-
- `display_name` - (Optional String) The name of the Private Link Attachment Connection.
54+
- `display_name` - (Required String) The name of the Private Link Attachment Connection.
5555
- `environment` (Required Configuration Block) supports the following:
5656
- `id` - (Required String) The ID of the Environment that the Private Link Attachment Connection belongs to, for example `env-xyz456`.
5757
- `private_link_attachment` (Required Configuration Block) supports the following:

internal/provider/resource_private_link_attachment.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ func privateLinkAttachmentResource() *schema.Resource {
3838
},
3939
Schema: map[string]*schema.Schema{
4040
paramDisplayName: {
41-
Type: schema.TypeString,
42-
Description: "The name of the Private Link Attachment.",
43-
Optional: true,
44-
Computed: true,
41+
Type: schema.TypeString,
42+
Description: "The name of the Private Link Attachment.",
43+
Required: true,
44+
ValidateFunc: validation.StringIsNotEmpty,
4545
},
4646
paramCloud: {
4747
Type: schema.TypeString,

internal/provider/resource_private_link_attachment_connection.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import (
2222
"github.com/hashicorp/terraform-plugin-log/tflog"
2323
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
2424
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
25+
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
2526
"net/http"
2627
"strings"
2728
)
@@ -49,10 +50,10 @@ func privateLinkAttachmentConnectionResource() *schema.Resource {
4950
},
5051
Schema: map[string]*schema.Schema{
5152
paramDisplayName: {
52-
Type: schema.TypeString,
53-
Description: "The name of the Private Link Attachment Connection.",
54-
Optional: true,
55-
Computed: true,
53+
Type: schema.TypeString,
54+
Description: "The name of the Private Link Attachment Connection.",
55+
Required: true,
56+
ValidateFunc: validation.StringIsNotEmpty,
5657
},
5758
paramResourceName: {
5859
Type: schema.TypeString,

0 commit comments

Comments
 (0)