Commit graph

35 commits

Author SHA1 Message Date
05530894ae
feat: towerops_coverage resource
Wraps the new /api/v1/coverages endpoints. Schema mirrors the cnHeat
mental model — antenna, frequency, height, azimuth, downtilt, radius
— with cnHeat-style imperial units (height_agl_ft, radius_mi,
frequency_ghz) the API converts to SI before validation.

Compute is asynchronous: 'terraform apply' returns once the prediction
is queued. The status / progress_pct / error_message / png_path /
raster_path / computed_at fields are computed and update on
'terraform refresh' as the worker progresses through queued →
computing → ready (or failed). Downstream resources that need a
ready heatmap can use a terraform_data trigger that polls the
status field.

Resource semantics:
- Create   POST   /api/v1/coverages           (auto-queues compute)
- Read     GET    /api/v1/coverages/:id
- Update   PATCH  /api/v1/coverages/:id       (does NOT auto-recompute)
- Delete   DELETE /api/v1/coverages/:id

Update doesn't auto-recompute because parameter tweaks may not
require a fresh heatmap; operators can call the recompute endpoint
directly via the existing client method when they want fresh
outputs.

ImportState supported via the standard UUID passthrough.
2026-05-06 17:21:30 -05:00
936b278652
ci: unset GITHUB_TOKEN so GoReleaser uses GITEA_TOKEN 2026-05-05 13:47:01 -05:00
5a37cfad8b
ci: rename release token secret to CODEBERG_TOKEN 2026-05-05 13:43:30 -05:00
30c1954efe
ci: retrigger workflow 2026-05-05 13:14:20 -05:00
3c172132ba
ci: switch runs-on to ubuntu-latest 2026-05-05 13:06:55 -05:00
b194346047
ci: remove container image pin from release workflow 2026-05-05 13:05:41 -05:00
5da9643e92
chore: migrate from GitHub to Codeberg/Forgejo
- Rename Go module path to codeberg.org/towerops/terraform-provider-towerops
- Replace .github/workflows/release.yml with .forgejo/workflows/release.yml
- Configure GoReleaser to publish to Codeberg via Gitea API
- Bump indirect dependencies (golang.org/x/*, grpc, go-plugin, etc.)
2026-05-05 12:59:27 -05:00
b922dbda22
refactor: remove device_role_source field
- Removed DeviceRoleSource field from Device struct and DeviceResourceModel
- Updated device_role description to reflect default value "other"
- Device role is now optional and defaults to "other" if not specified
- Cleaned up all CRUD operations to remove device_role_source handling

All device types are now manually selected with "other" as default.
2026-03-22 11:20:04 -05:00
80e800baf4
feat: add device_role and device_role_source fields to device resource
- Add device_role field to Device struct in client
- Add device_role and device_role_source to DeviceResourceModel
- Add schema attributes for device_role (optional/computed) and device_role_source (computed)
- Handle device_role in Create, Read, and Update operations
- Valid device_role values: server, switch, router, access_point, backhaul, other
- device_role_source automatically set to 'manual' by API when device_role is provided
2026-03-22 11:06:14 -05:00
Graham McIntire
de81fcdc57
Merge pull request #2 from towerops-app/fix/site-lat-lng-computed
fix site lat/lng inconsistent result after apply
2026-03-18 09:34:27 -05:00
e8e2a5fa56
fix site lat/lng inconsistent result after apply
mark latitude and longitude as Computed in addition to Optional so
the provider accepts server-set values (geocoding, UI) when the user
omits them from config
2026-03-18 09:33:22 -05:00
Graham McIntire
632a3ae4df
Merge pull request #1 from towerops-app/snmp-opt-in
make snmp opt-in for terraform provider devices
2026-03-17 11:14:36 -05:00
12206c16fe
make snmp opt-in for terraform provider devices
change snmp_enabled default from true to false so devices like
resolver1 that only need ping/dns don't trigger unnecessary snmp
discovery. skip sending snmp_version/snmp_port to the api when
snmp_enabled is false.
2026-03-17 11:13:07 -05:00
bc3dbfe419
add towerops_check resource for service check management
- new towerops_check resource supporting HTTP, TCP, DNS, and ping checks
- flat schema with type-specific fields (url, host, port, hostname, etc.)
- client CRUD methods for /api/v1/checks endpoints
- resource documentation, examples, and provider index updated
- acceptance tests for all check types, update, import, and error handling
2026-03-16 18:33:56 -05:00
3ff5ea41b3
rename integration provider to provider_type
"provider" is a reserved attribute name in Terraform.
2026-03-13 17:41:06 -05:00
4960adaf37
add address, latitude, longitude to site resource
Support geographic coordinates and street address in towerops_site.
All three fields are optional; server validates lat/long ranges.
2026-03-13 17:35:16 -05:00
bbe1babdf7
add agent, integration, and maintenance window resources
New Terraform resources: towerops_agent, towerops_integration,
towerops_maintenance_window with full CRUD, docs, and examples.
2026-03-11 14:33:52 -05:00
e7634da384
docs: add schedule and escalation policy documentation
Add Terraform Registry docs and examples for towerops_schedule and
towerops_escalation_policy resources. Update provider index and main
example to include on-call resources.
2026-03-11 14:04:29 -05:00
9d204a7ba3
feat: add schedule and escalation policy resources
Add towerops_schedule and towerops_escalation_policy Terraform resources
with client CRUD methods, resource models, and provider registration.
2026-03-11 14:01:37 -05:00
96bb767c83
feat: add SNMP community string support to organization resource
- Add snmp_community field to Organization struct (client.go)
- Add snmp_community attribute to organization resource schema
- Mark as Optional and Sensitive in Terraform
- Include in Create and Update operations
- Only settable by organization owners (enforced by API)

Example usage:
  resource "towerops_organization" "main" {
    name           = "My Organization"
    use_sites      = true
    snmp_community = "public"
  }
2026-03-10 13:59:54 -05:00
1ccf9ce30a
chore: update Go dependencies to latest versions
Updates include:
- terraform-plugin-framework v1.17.0 -> v1.19.0
- terraform-plugin-go v0.29.0 -> v0.31.0
- terraform-plugin-testing v1.14.0 -> v1.15.0
- terraform-plugin-sdk/v2 v2.38.1 -> v2.40.0
- Various other dependency updates

All tests passing with updated dependencies.
2026-03-10 13:39:26 -05:00
8babc54a16
docs: add organization resource examples for Terraform Registry
- Add examples/resources/towerops_organization/resource.tf
- Update examples/main.tf to include organization resource
- Terraform Registry will auto-generate docs from these examples
2026-03-10 13:34:42 -05:00
70c7a5cfbb
feat: allow setting organization name via Terraform
- Make 'name' field optional and computed in organization resource
- Include name in Create and Update operations when provided
- Name can only be changed by organization owners (enforced by API)
- Matches API capability to update organization name
- Backwards compatible: name remains optional

Example usage:
  resource "towerops_organization" "main" {
    name      = "My Organization"
    use_sites = true
  }
2026-03-10 13:32:56 -05:00
84bd97c120
Adding a device without an org id now works 2026-02-06 13:37:05 -06:00
4cdb96e189
feat: add site-less devices and SNMPv3 support
- Make site_id optional, add organization_id field
- Devices can be created without sites (directly in organization)
- Add SNMPv3 authentication and privacy fields
- Update documentation with new examples
2026-02-04 15:07:09 -06:00
eb6923c4b3
allow creating entities when they dont exist 2026-01-29 13:25:00 -06:00
233be61d3e
allow creating entities when they dont exist 2026-01-29 12:34:58 -06:00
3eef94f685
allow base url change 2026-01-26 14:00:20 -06:00
15b3af2a99
fix base url 2026-01-26 13:42:25 -06:00
3a970ac852
Name for devices is now optional 2026-01-26 13:36:06 -06:00
797fe93a9a
fix base url 2026-01-26 13:12:43 -06:00
897c9ae3d4
add documentation 2026-01-26 11:26:04 -06:00
50127766ff
ci fix 2026-01-26 11:23:16 -06:00
d365e770b4
add ci files 2026-01-26 11:20:49 -06:00
8fed566e22
init 2026-01-26 11:02:26 -06:00