Skip to content

Commit

Permalink
add missing return; fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismarget-j committed Jan 21, 2025
1 parent 61a2859 commit e96cad6
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ func (o bgpPeeringGenericSystemBatchIdPlanModifier) MarkdownDescription(ctx cont
func (o bgpPeeringGenericSystemBatchIdPlanModifier) PlanModifyString(ctx context.Context, req planmodifier.StringRequest, resp *planmodifier.StringResponse) {
var plan, state BgpPeeringGenericSystem

// unpacking the parent object's planed value should always work
// unpacking the parent object's planned value should always work
resp.Diagnostics.Append(req.Plan.GetAttribute(ctx, req.Path.ParentPath(), &plan)...)
if resp.Diagnostics.HasError() {
return
Expand All @@ -390,6 +390,7 @@ func (o bgpPeeringGenericSystemBatchIdPlanModifier) PlanModifyString(ctx context
if planHasChildren == stateHasChildren {
// state and plan agree about whether a batch ID is required. Reuse the old value.
resp.PlanValue = req.StateValue
return
}

// We've either gained our first, or lost our last child primitive. Set the plan value accordingly.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ func (o bgpPeeringIpEndpointBatchIdPlanModifier) MarkdownDescription(ctx context
func (o bgpPeeringIpEndpointBatchIdPlanModifier) PlanModifyString(ctx context.Context, req planmodifier.StringRequest, resp *planmodifier.StringResponse) {
var plan, state BgpPeeringIpEndpoint

// unpacking the parent object's planed value should always work
// unpacking the parent object's planned value should always work
resp.Diagnostics.Append(req.Plan.GetAttribute(ctx, req.Path.ParentPath(), &plan)...)
if resp.Diagnostics.HasError() {
return
Expand All @@ -355,6 +355,7 @@ func (o bgpPeeringIpEndpointBatchIdPlanModifier) PlanModifyString(ctx context.Co
if planHasChildren == stateHasChildren {
// state and plan agree about whether a batch ID is required. Reuse the old value.
resp.PlanValue = req.StateValue
return
}

// We've either gained our first, or lost our last child primitive. Set the plan value accordingly.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ func (o dynamicBgpPeeringBatchIdPlanModifier) MarkdownDescription(ctx context.Co
func (o dynamicBgpPeeringBatchIdPlanModifier) PlanModifyString(ctx context.Context, req planmodifier.StringRequest, resp *planmodifier.StringResponse) {
var plan, state DynamicBgpPeering

// unpacking the parent object's planed value should always work
// unpacking the parent object's planned value should always work
resp.Diagnostics.Append(req.Plan.GetAttribute(ctx, req.Path.ParentPath(), &plan)...)
if resp.Diagnostics.HasError() {
return
Expand All @@ -366,6 +366,7 @@ func (o dynamicBgpPeeringBatchIdPlanModifier) PlanModifyString(ctx context.Conte
if planHasChildren == stateHasChildren {
// state and plan agree about whether a batch ID is required. Reuse the old value.
resp.PlanValue = req.StateValue
return
}

// We've either gained our first, or lost our last child primitive. Set the plan value accordingly.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ func (o ipLinkBatchIdPlanModifier) MarkdownDescription(ctx context.Context) stri
func (o ipLinkBatchIdPlanModifier) PlanModifyString(ctx context.Context, req planmodifier.StringRequest, resp *planmodifier.StringResponse) {
var plan, state IpLink

// unpacking the parent object's planed value should always work
// unpacking the parent object's planned value should always work
resp.Diagnostics.Append(req.Plan.GetAttribute(ctx, req.Path.ParentPath(), &plan)...)
if resp.Diagnostics.HasError() {
return
Expand Down Expand Up @@ -370,6 +370,7 @@ func (o ipLinkBatchIdPlanModifier) PlanModifyString(ctx context.Context, req pla
if planHasChildren == stateHasChildren {
// state and plan agree about whether a batch ID is required. Reuse the old value.
resp.PlanValue = req.StateValue
return
}

// We've either gained our first, or lost our last child primitive. Set the plan value accordingly.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ func (o virtualNetworkSingleBatchIdPlanModifier) MarkdownDescription(ctx context
func (o virtualNetworkSingleBatchIdPlanModifier) PlanModifyString(ctx context.Context, req planmodifier.StringRequest, resp *planmodifier.StringResponse) {
var plan, state VirtualNetworkSingle

// unpacking the parent object's planed value should always work
// unpacking the parent object's planned value should always work
resp.Diagnostics.Append(req.Plan.GetAttribute(ctx, req.Path.ParentPath(), &plan)...)
if resp.Diagnostics.HasError() {
return
Expand Down Expand Up @@ -242,6 +242,7 @@ func (o virtualNetworkSingleBatchIdPlanModifier) PlanModifyString(ctx context.Co
if planHasChildren == stateHasChildren {
// state and plan agree about whether a batch ID is required. Reuse the old value.
resp.PlanValue = req.StateValue
return
}

// We've either gained our first, or lost our last child primitive. Set the plan value accordingly.
Expand Down

0 comments on commit e96cad6

Please sign in to comment.