Skip to content

Commit b0f3f47

Browse files
Fix mandatory attributes of transit peer network resource (#93)
1 parent 534b336 commit b0f3f47

File tree

7 files changed

+11
-14
lines changed

7 files changed

+11
-14
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
## 0.1.10 (unreleased)
22

3+
- Fix issue with mandatory attributes in `transit_peer_network` resource, [link](https://github.com/CiscoDevNet/terraform-provider-catalystcenter/issues/92)
34
- BREAKING CHANGE: Fix `ip_pool` update if more than 25 pools are registered
45
- BREAKING CHANGE: Rename `radio_type_a_power_treshold_v1` attribute of `catalystcenter_wireless_rf_profile` resource to `radio_type_a_power_threshold_v1`
56
- BREAKING CHANGE: Rename `radio_type_b_power_treshold_v1` attribute of `catalystcenter_wireless_rf_profile` resource to `radio_type_b_power_threshold_v1`

docs/guides/changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ description: |-
99

1010
## 0.1.10 (unreleased)
1111

12+
- Fix issue with mandatory attributes in `transit_peer_network` resource, [link](https://github.com/CiscoDevNet/terraform-provider-catalystcenter/issues/92)
1213
- BREAKING CHANGE: Fix `ip_pool` update if more than 25 pools are registered
1314
- BREAKING CHANGE: Rename `radio_type_a_power_treshold_v1` attribute of `catalystcenter_wireless_rf_profile` resource to `radio_type_a_power_threshold_v1`
1415
- BREAKING CHANGE: Rename `radio_type_b_power_treshold_v1` attribute of `catalystcenter_wireless_rf_profile` resource to `radio_type_b_power_threshold_v1`

docs/resources/transit_peer_network.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ resource "catalystcenter_transit_peer_network" "example" {
3232

3333
### Required
3434

35-
- `autonomous_system_number` (String) Autonomous System Number
36-
- `routing_protocol_name` (String) Routing Protocol Name
37-
- Choices: `BGP`
3835
- `transit_peer_network_name` (String) Transit Peer Network Name
3936
- `transit_peer_network_type` (String) Transit Peer Network Type
4037
- Choices: `ip_transit`, `sda_transit_with_lisp_bgp`, `sda_transit_with_pub_sub`
4138

4239
### Optional
4340

41+
- `autonomous_system_number` (String) Autonomous System Number
42+
- `routing_protocol_name` (String) Routing Protocol Name
43+
- Choices: `BGP`
4444
- `transit_control_plane_settings` (Attributes List) Transit Control Plane Settings info (see [below for nested schema](#nestedatt--transit_control_plane_settings))
4545

4646
### Read-Only
@@ -50,7 +50,7 @@ resource "catalystcenter_transit_peer_network" "example" {
5050
<a id="nestedatt--transit_control_plane_settings"></a>
5151
### Nested Schema for `transit_control_plane_settings`
5252

53-
Required:
53+
Optional:
5454

5555
- `device_management_ip_address` (String) Device Management Ip Address of provisioned device
5656
- `site_name_hierarchy` (String) Site Name Hierarchy where device is provisioned

gen/definitions/transit_peer_network.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,13 @@ attributes:
2424
- model_name: routingProtocolName
2525
data_path: ipTransitSettings
2626
type: String
27-
mandatory: true
2827
requires_replace: true
2928
description: Routing Protocol Name
3029
enum_values: [BGP]
3130
example: BGP
3231
- model_name: autonomousSystemNumber
3332
data_path: ipTransitSettings
3433
type: String
35-
mandatory: true
3634
requires_replace: true
3735
description: Autonomous System Number
3836
example: "65010"
@@ -45,12 +43,10 @@ attributes:
4543
- model_name: siteNameHierarchy
4644
requires_replace: true
4745
type: String
48-
mandatory: true
4946
description: Site Name Hierarchy where device is provisioned
5047
example: "Global/Area1"
5148
- model_name: deviceManagementIpAddress
5249
requires_replace: true
5350
type: String
54-
mandatory: true
5551
description: Device Management Ip Address of provisioned device
5652
example: "10.0.0.1"

internal/provider/resource_catalystcenter_transit_peer_network.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func (r *TransitPeerNetworkResource) Schema(ctx context.Context, req resource.Sc
8989
},
9090
"routing_protocol_name": schema.StringAttribute{
9191
MarkdownDescription: helpers.NewAttributeDescription("Routing Protocol Name").AddStringEnumDescription("BGP").String,
92-
Required: true,
92+
Optional: true,
9393
Validators: []validator.String{
9494
stringvalidator.OneOf("BGP"),
9595
},
@@ -99,7 +99,7 @@ func (r *TransitPeerNetworkResource) Schema(ctx context.Context, req resource.Sc
9999
},
100100
"autonomous_system_number": schema.StringAttribute{
101101
MarkdownDescription: helpers.NewAttributeDescription("Autonomous System Number").String,
102-
Required: true,
102+
Optional: true,
103103
PlanModifiers: []planmodifier.String{
104104
stringplanmodifier.RequiresReplace(),
105105
},
@@ -111,14 +111,14 @@ func (r *TransitPeerNetworkResource) Schema(ctx context.Context, req resource.Sc
111111
Attributes: map[string]schema.Attribute{
112112
"site_name_hierarchy": schema.StringAttribute{
113113
MarkdownDescription: helpers.NewAttributeDescription("Site Name Hierarchy where device is provisioned").String,
114-
Required: true,
114+
Optional: true,
115115
PlanModifiers: []planmodifier.String{
116116
stringplanmodifier.RequiresReplace(),
117117
},
118118
},
119119
"device_management_ip_address": schema.StringAttribute{
120120
MarkdownDescription: helpers.NewAttributeDescription("Device Management Ip Address of provisioned device").String,
121-
Required: true,
121+
Optional: true,
122122
PlanModifiers: []planmodifier.String{
123123
stringplanmodifier.RequiresReplace(),
124124
},

internal/provider/resource_catalystcenter_transit_peer_network_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,6 @@ func testAccCcTransitPeerNetworkConfig_minimum() string {
6161
config := `resource "catalystcenter_transit_peer_network" "test" {` + "\n"
6262
config += ` transit_peer_network_name = "TRANSIT_1"` + "\n"
6363
config += ` transit_peer_network_type = "ip_transit"` + "\n"
64-
config += ` routing_protocol_name = "BGP"` + "\n"
65-
config += ` autonomous_system_number = "65010"` + "\n"
6664
config += `}` + "\n"
6765
return config
6866
}

templates/guides/changelog.md.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ description: |-
99

1010
## 0.1.10 (unreleased)
1111

12+
- Fix issue with mandatory attributes in `transit_peer_network` resource, [link](https://github.com/CiscoDevNet/terraform-provider-catalystcenter/issues/92)
1213
- BREAKING CHANGE: Fix `ip_pool` update if more than 25 pools are registered
1314
- BREAKING CHANGE: Rename `radio_type_a_power_treshold_v1` attribute of `catalystcenter_wireless_rf_profile` resource to `radio_type_a_power_threshold_v1`
1415
- BREAKING CHANGE: Rename `radio_type_b_power_treshold_v1` attribute of `catalystcenter_wireless_rf_profile` resource to `radio_type_b_power_threshold_v1`

0 commit comments

Comments
 (0)