Skip to content

Commit 2da0fcd

Browse files
fix import and data_source in fabric_l3_handoff_ip_transit
1 parent b8bae25 commit 2da0fcd

File tree

5 files changed

+4
-9
lines changed

5 files changed

+4
-9
lines changed

docs/data-sources/fabric_l3_handoff_ip_transit.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ This data source can read the Fabric L3 Handoff IP Transit.
1414

1515
```terraform
1616
data "catalystcenter_fabric_l3_handoff_ip_transit" "example" {
17+
id = "76d24097-41c4-4558-a4d0-a8c07ac08470"
1718
network_device_id = "5e6f7b3a-2b0b-4a7d-8b1c-0d4b1cd5e1b1"
1819
fabric_id = "c4b85bb2-ce3f-4db9-a32b-e439a388ac2f"
1920
}
@@ -25,12 +26,12 @@ data "catalystcenter_fabric_l3_handoff_ip_transit" "example" {
2526
### Required
2627

2728
- `fabric_id` (String) ID of the fabric this device belongs to
29+
- `id` (String) The id of the object
2830
- `network_device_id` (String) Network device ID of the fabric device
2931

3032
### Read-Only
3133

3234
- `external_connectivity_ip_pool_name` (String) External connectivity ip pool will be used by Catalyst Center to allocate IP address for the connection between the border node and peer
33-
- `id` (String) The id of the object
3435
- `interface_name` (String) Interface name of the layer 3 handoff ip transit
3536
- `local_ip_address` (String) Local ipv4 address for the selected virtual network. Enter the IP addresses and subnet mask in the CIDR notation (IP address/prefix-length). Not applicable if you have already provided an external connectivity ip pool name
3637
- `local_ipv6_address` (String) Local ipv6 address for the selected virtual network. Enter the IP addresses and subnet mask in the CIDR notation (IP address/prefix-length). Not applicable if you have already provided an external connectivity ip pool name
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
data "catalystcenter_fabric_l3_handoff_ip_transit" "example" {
2+
id = "76d24097-41c4-4558-a4d0-a8c07ac08470"
23
network_device_id = "5e6f7b3a-2b0b-4a7d-8b1c-0d4b1cd5e1b1"
34
fabric_id = "c4b85bb2-ce3f-4db9-a32b-e439a388ac2f"
45
}

gen/definitions/fabric_l3_handoff_ip_transit.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ id_from_query_path: response
66
id_from_query_path_attribute: id
77
put_id_include_path: 0.id
88
get_from_all: true
9-
data_source_no_id: true
109
put_no_id: true
1110
doc_category: SDA
1211
test_tags: [SDA]

internal/provider/data_source_catalystcenter_fabric_l3_handoff_ip_transit.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func (d *FabricL3HandoffIPTransitDataSource) Schema(ctx context.Context, req dat
5959
Attributes: map[string]schema.Attribute{
6060
"id": schema.StringAttribute{
6161
MarkdownDescription: "The id of the object",
62-
Computed: true,
62+
Required: true,
6363
},
6464
"network_device_id": schema.StringAttribute{
6565
MarkdownDescription: "Network device ID of the fabric device",

internal/provider/model_catalystcenter_fabric_l3_handoff_ip_transit.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,6 @@ func (data FabricL3HandoffIPTransit) toBody(ctx context.Context, state FabricL3H
110110

111111
// Section below is generated&owned by "gen/generator.go". //template:begin fromBody
112112
func (data *FabricL3HandoffIPTransit) fromBody(ctx context.Context, res gjson.Result) {
113-
// Retrieve the 'id' attribute, if Data Source doesn't require id
114-
if value := res.Get("response.id"); value.Exists() {
115-
data.Id = types.StringValue(value.String())
116-
} else {
117-
data.Id = types.StringNull()
118-
}
119113
if value := res.Get("networkDeviceId"); value.Exists() {
120114
data.NetworkDeviceId = types.StringValue(value.String())
121115
} else {

0 commit comments

Comments
 (0)