Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -923,6 +923,12 @@ This is due to some terraform limitation and we will update the module once terr

The template of the target URL used for the links; must be a valid URL and contain `<num>` for the reference number.

- [**`is_alphanumeric`**](#attr-autolink_references-is_alphanumeric): *(Optional `bool`)*<a name="attr-autolink_references-is_alphanumeric"></a>

Specify if your autolink reference is alphanumeric or numeric identifier.

Default is `true`.

#### App Installations

- [**`app_installations`**](#var-app_installations): *(Optional `set(string)`)*<a name="var-app_installations"></a>
Expand Down
9 changes: 9 additions & 0 deletions README.tfdoc.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -1207,6 +1207,15 @@ section {
The template of the target URL used for the links; must be a valid URL and contain `<num>` for the reference number.
END
}

attribute "is_alphanumeric" {
required = false
type = bool
default = true
description = <<-END
Specify if your autolink reference is alphanumeric or numeric identifier.
END
}
}
}

Expand Down
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,7 @@ resource "github_repository_autolink_reference" "repository_autolink_reference"
repository = github_repository.repository.name
key_prefix = each.value.key_prefix
target_url_template = each.value.target_url_template
is_alphanumeric = each.value.is_alphanumeric
}

# ---------------------------------------------------------------------------------------------------------------------
Expand Down
2 changes: 2 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -525,13 +525,15 @@ variable "autolink_references" {
type = list(object({
key_prefix = string
target_url_template = string
is_alphanumeric = optional(bool)
}))

# Example:
# autolink_references = [
# {
# key_prefix = "TICKET-"
# target_url_template = "https://hello.there/TICKET?query=<num>"
# is_alphanumeric = true
# }
# ]

Expand Down