Skip to content

data-source/alicloud_cloud_firewall_nat_firewalls: expose status and region_no output fields - #10418

Open
api-tool-agent wants to merge 1 commit into
aliyun:masterfrom
api-tool-agent:provider-update-9e5c71
Open

data-source/alicloud_cloud_firewall_nat_firewalls: expose status and region_no output fields#10418
api-tool-agent wants to merge 1 commit into
aliyun:masterfrom
api-tool-agent:provider-update-9e5c71

Conversation

@api-tool-agent

Copy link
Copy Markdown
Collaborator

Summary

The alicloud_cloud_firewall_nat_firewalls data source exposes the list of NAT firewalls but did not include each firewall status or region in the firewalls output block. As a result, users could not read a firewall status to locate NAT gateways without a firewall created, and could not pass the data source output into alicloud_cloud_firewall_nat_firewall resources, which require region_no.

This change adds two computed output attributes to the firewalls block:

  • status - mapped from the ProxyStatus response field
  • region_no - mapped from the RegionId response field

The existing status and region_no input filters, pagination, and ids matching logic are unchanged. A latent reference to an empty object key and its unused accumulator are also removed.

Test plan

  • gofmt on the changed Go files (clean)
  • go vet ./alicloud - the package builds; no vet issues in the changed files
  • Added firewalls.0.status and firewalls.0.region_no CHECKSET assertions to the existing exist-case checks in data_source_alicloud_cloud_firewall_nat_firewalls_test.go; existing assertions unchanged
  • GitHub CI on the final head SHA
  • Independent QA verification of the datasource contract

…region_no output fields

## Summary
The `alicloud_cloud_firewall_nat_firewalls` data source did not expose the
status or region of each NAT firewall in its `firewalls` output block.
Consumers could not read a firewall's status to find NAT gateways without a
firewall created, and could not feed the data source result into
`alicloud_cloud_firewall_nat_firewall` resources, which require `region_no`.

This adds two computed output fields to the `firewalls` block:
- `status` - mapped from the `ProxyStatus` response field
- `region_no` - mapped from the `RegionId` response field

The existing `status` and `region_no` input filters are unchanged, and the
existing pagination, ids filtering and output logic is untouched. A latent
reference to an empty object key (`objectRaw[""]`) and its unused accumulator
are also removed.

## Test plan
- [x] gofmt on the changed Go files (clean)
- [x] `go vet ./alicloud` builds the package; no vet issues in the changed files
- [x] `data_source_alicloud_cloud_firewall_nat_firewalls_test.go` adds
      `firewalls.0.status` and `firewalls.0.region_no` CHECKSET assertions to
      the existing exist-case checks; existing assertions unchanged
- [ ] GitHub CI on the final head SHA
- [ ] Independent QA verification of the datasource contract
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant