Skip to content

Latest commit

 

History

History
130 lines (101 loc) · 4.19 KB

port_integration.md

File metadata and controls

130 lines (101 loc) · 4.19 KB
page_title subcategory description
port_integration Resource - terraform-provider-port-labs
Integration resource NOTE: This resource manages existing integration and integration mappings, not for creating new integrations. Docs about integrations can be found here https://docs.getport.io/integrations-index/. Docs about how to import existing integrations and manage their mappings can be found here https://docs.getport.io/build-your-software-catalog/custom-integration/iac/terraform/examples/import-and-manage-integration. ```hcl resource "portintegration" "mycustomintegration" { installationid = "my-custom-integration-id" title = "My Custom Integration" version = "1.33.7" config = jsonencode({ createMissingRelatedEntitiesboolean = true deleteDependentEntities = true, resources = [{ kind = "my-custom-kind" selector = { query = ".title" } port = { entity = { mappings = [{ identifier = "'my-identifier'" title = ".title" blueprint = "'my-blueprint'" properties = { my_property = 123 } relations = {} }] } } }] }) } ``` NOTICE: The following config properties (selector.query|entity.mappings.*) are jq expressions, which means that you need to input either a valid jq expression (E.g .title), or if you want a string value, a qouted escaped string val (E.g 'my-string').

port_integration (Resource)

Integration resource

NOTE: This resource manages existing integration and integration mappings, not for creating new integrations.

Docs about integrations can be found here.

Docs about how to import existing integrations and manage their mappings can be found here.

resource "port_integration" "my_custom_integration" {
	installation_id       = "my-custom-integration-id"
	title                 = "My Custom Integration"
	version               = "1.33.7"
	config = jsonencode({
		createMissingRelatedEntitiesboolean = true
		deleteDependentEntities = true,
		resources = [{
			kind = "my-custom-kind"
			selector = {
				query = ".title"
			}
			port = {
				entity = {
					mappings = [{
						identifier = "'my-identifier'"
						title      = ".title"
						blueprint  = "'my-blueprint'"
						properties = {
							my_property = 123
						}
						relations  = {}
					}]
				}
			}
		}]
	})
}

NOTICE:

The following config properties (selector.query|entity.mappings.*) are jq expressions, which means that you need to input either a valid jq expression (E.g .title), or if you want a string value, a qouted escaped string val (E.g 'my-string').

Schema

Required

  • installation_id (String)

Optional

  • config (String) Integration Config Raw JSON string (use jsonencode)
  • installation_app_type (String)
  • kafka_changelog_destination (Object) The changelog destination of the blueprint (just an empty {}) (see below for nested schema)
  • title (String)
  • version (String)
  • webhook_changelog_destination (Attributes) The webhook changelog destination of the integration (see below for nested schema)

Read-Only

  • id (String) The ID of this resource.

Nested Schema for kafka_changelog_destination

Optional:

Nested Schema for webhook_changelog_destination

Required:

  • url (String) The url of the webhook changelog destination

Optional:

  • agent (Boolean) The agent of the webhook changelog destination