Skip to content

Add xray_jira_integration resource and Jira ticketing support on watches#392

Open
gineshkumar wants to merge 2 commits intojfrog:mainfrom
gineshkumar:feature/add-jira-integration-resource
Open

Add xray_jira_integration resource and Jira ticketing support on watches#392
gineshkumar wants to merge 2 commits intojfrog:mainfrom
gineshkumar:feature/add-jira-integration-resource

Conversation

@gineshkumar
Copy link
Copy Markdown

Summary

  • Adds a new xray_jira_integration resource for managing Xray Jira integration configurations (CRUD via xray/api/v1/ticketing/jira-integrations endpoints)
  • Adds Jira ticketing fields to the xray_watch resource: create_ticket_enabled, ticket_profile, and a ticket_generation block (with create_duplicate_tickets, impact_path_profiles_mapping, and create_tickets_for_ignored_violation)
  • When a watch has no ticket profile, the API's default ticket_generation response is correctly suppressed to avoid state drift

New Resource: xray_jira_integration

Attribute Type Description
connection_name string (required, forces replace) Unique identifier for the connection
jira_server_url string (required) URL of the Jira instance
installation_type string (required) cloud or server
auth_type string (optional, default basic) Authentication method
username string (required) Jira username
password string (required, sensitive) Jira password/API token
skip_proxy bool (optional, default false) Bypass proxy settings

Watch Resource: New Jira Fields

Attribute Type Description
create_ticket_enabled bool (optional) Enable Jira ticket creation
ticket_profile string (optional) Jira profile name
ticket_generation block (optional) Ticket generation settings
ticket_generation.create_tickets_for_ignored_violation bool Create tickets for ignored violations
ticket_generation.create_duplicate_tickets.by_version block Build/package/release_bundle booleans
ticket_generation.impact_path_profiles_mapping.include set Profile + pattern mappings

Files Changed

File Action
pkg/xray/resource/resource_xray_jira_integration.go NEW - Resource implementation
pkg/xray/resource/resource_xray_jira_integration_test.go NEW - Acceptance tests
pkg/xray/resource/resource_xray_watch.go MODIFIED - Added Jira ticketing fields
pkg/xray/provider.go MODIFIED - Registered new resource
docs/resources/jira_integration.md NEW - Generated docs
examples/resources/xray_jira_integration/ NEW - Examples + import
templates/resources/jira_integration.md.tmpl NEW - Doc template

Test Plan

  • xray_jira_integration: CREATE with skip_proxy=false, verified via curl GET
  • xray_jira_integration: UPDATE skip_proxy to true, verified via curl GET
  • xray_jira_integration: READ (clean terraform plan after create and update)
  • xray_jira_integration: LIST all integrations via curl GET collection
  • xray_jira_integration: DELETE via terraform destroy, verified via curl GET (404)
  • xray_watch: CREATE watch without Jira fields, verified clean plan (no drift from API defaults)
  • xray_watch: UPDATE watch to add Jira ticketing (create_ticket_enabled, ticket_profile, ticket_generation), verified via curl GET
  • xray_watch: READ back matches (clean plan after update)
  • xray_watch: UPDATE watch to remove Jira ticketing, verified clean plan
  • All verified against live Xray instance (z0gkterra1.jfrogdev.org)

Made with Cursor

Introduces a new `xray_jira_integration` resource for managing Xray Jira
integration configurations (CRUD via `ticketing/jira-integrations` API).

Also adds Jira ticketing fields to the `xray_watch` resource:
- `create_ticket_enabled` (bool)
- `ticket_profile` (string)
- `ticket_generation` block with `create_duplicate_tickets`,
  `impact_path_profiles_mapping`, and
  `create_tickets_for_ignored_violation`

Made-with: Cursor
- GET uses same path as PUT/DELETE (no /details suffix)
- PUT uses collection endpoint (connection_name in body, not path)
- Response field is connection_name, not integrationName

Made-with: Cursor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant