Skip to content

Commit

Permalink
Update example to v0.4.46
Browse files Browse the repository at this point in the history
  • Loading branch information
eschultink committed Feb 1, 2024
1 parent c9269b2 commit e2958c0
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 27 deletions.
7 changes: 4 additions & 3 deletions check-prereqs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ fi


# Check AWS installation
AWSCLI_REASON="It is used if you're deploying to AWS."
AWSCLI_REASON="Required if deploying to AWS."
if ! aws --version &> /dev/null ; then
printf "${RED}AWS CLI is not installed.${NC} ${AWSCLI_REASON} See https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html\n"
if $HOMEBREW_AVAILABLE; then printf " or, as you have Homebrew available, run ${BLUE}brew install awscli${NC}\n"; fi
Expand All @@ -80,7 +80,7 @@ fi
printf "\n"

# Check GCloud CLI installation
GCLOUD_REASON="It is used if you're deploying to GCP or using Google Workspace data sources."
GCLOUD_REASON="Required if deploying to GCP or using Google Workspace data sources."
if ! gcloud --version &> /dev/null ; then
printf "${RED}Google Cloud SDK is not installed.${NC} ${GCLOUD_REASON} See https://cloud.google.com/sdk/docs/install\n"
if $HOMEBREW_AVAILABLE; then printf " or, as you have Homebrew available, run ${BLUE}brew install --cask google-cloud-sdk${NC}\n"; fi
Expand All @@ -92,7 +92,7 @@ fi
printf "\n"

# Check Azure CLI installation
AZCLI_REASON="It is used if you're deploying to Azure or using Microsoft 365 data sources."
AZCLI_REASON="Required if deploying to Azure or using Microsoft 365 data sources."
if ! az --version &> /dev/null ; then
printf "${RED}Azure CLI is not installed.${NC} ${AZCLI_REASON} See https://docs.microsoft.com/en-us/cli/azure/install-azure-cli\n"
if $HOMEBREW_AVAILABLE; then printf " or, as you have Homebrew available, run ${BLUE}brew install azure-cli${NC}\n"; fi
Expand All @@ -101,3 +101,4 @@ else
printf "Azure CLI version ${BLUE}`az --version --only-show-errors | head -n 1`${NC} is installed.\n"
printf "\t- make sure ${BLUE}az account show${NC} is the user/tenant you expect. If not, ${BLUE}az login --allow-no-subscription${NC} to authenticate. $AZCLI_REASON\n"
fi

2 changes: 1 addition & 1 deletion google-workspace.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ provider "google" {


module "worklytics_connectors_google_workspace" {
source = "git::https://github.com/worklytics/psoxy//infra/modules/worklytics-connectors-google-workspace?ref=v0.4.43"
source = "git::https://github.com/worklytics/psoxy//infra/modules/worklytics-connectors-google-workspace?ref=v0.4.46"

providers = {
google = google.google_workspace
Expand Down
32 changes: 17 additions & 15 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,21 @@ locals {
# be provisioned via Terraform, so doesn't add any dependencies
# call this 'generic_source_connectors'?
module "worklytics_connectors" {
source = "git::https://github.com/worklytics/psoxy//infra/modules/worklytics-connectors?ref=v0.4.43"


enabled_connectors = var.enabled_connectors
jira_cloud_id = var.jira_cloud_id
jira_server_url = var.jira_server_url
jira_example_issue_id = var.jira_example_issue_id
salesforce_domain = var.salesforce_domain
github_api_host = var.github_api_host
github_installation_id = var.github_installation_id
github_organization = var.github_organization
github_example_repository = var.github_example_repository
salesforce_example_account_id = var.salesforce_example_account_id
source = "git::https://github.com/worklytics/psoxy//infra/modules/worklytics-connectors?ref=v0.4.46"


enabled_connectors = var.enabled_connectors
jira_cloud_id = var.jira_cloud_id
jira_server_url = var.jira_server_url
jira_example_issue_id = var.jira_example_issue_id
salesforce_domain = var.salesforce_domain
github_api_host = var.github_api_host
github_enterprise_server_host = var.github_enterprise_server_host
github_enterprise_server_version = var.github_enterprise_server_version
github_installation_id = var.github_installation_id
github_organization = var.github_organization
github_example_repository = var.github_example_repository
salesforce_example_account_id = var.salesforce_example_account_id
}

# sources which require additional dependencies are split into distinct Terraform files, following
Expand Down Expand Up @@ -75,7 +77,7 @@ locals {
}

module "psoxy" {
source = "git::https://github.com/worklytics/psoxy//infra/modules/gcp-host?ref=v0.4.43"
source = "git::https://github.com/worklytics/psoxy//infra/modules/gcp-host?ref=v0.4.46"

gcp_project_id = var.gcp_project_id
environment_name = var.environment_name
Expand Down Expand Up @@ -113,7 +115,7 @@ locals {
module "connection_in_worklytics" {
for_each = local.all_instances

source = "git::https://github.com/worklytics/psoxy//infra/modules/worklytics-psoxy-connection-generic?ref=v0.4.43"
source = "git::https://github.com/worklytics/psoxy//infra/modules/worklytics-psoxy-connection-generic?ref=v0.4.46"

psoxy_host_platform_id = local.host_platform_id
psoxy_instance_id = each.key
Expand Down
25 changes: 23 additions & 2 deletions misc-data-source-variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,23 @@ variable "jira_example_issue_id" {
description = "If using Jira Server/Cloud connector, provide id of an issue for only to be used as part of example calls for Jira (ex: ETV-12)"
}

# DEPRECATED
variable "github_api_host" {
type = string
default = null
description = "(Only required if using Github connector for on premises) Host of the Github instance (ex: github.mycompany.com)."
description = "DEPRECATED; use `github_enterprise_server_host`. (Only required if using Github connector for on premises) Host of the Github instance (ex: github.mycompany.com)."
}

variable "github_enterprise_server_host" {
type = string
default = ""
description = "(Only required if using Github Enterprise Server connector) Host of the Github instance (ex: github.mycompany.com)."
}

variable "github_enterprise_server_version" {
type = string
default = "v3"
description = "(Only required if using Github Enterprise Server connector) Version of the server to use (ex: v3). By default, v3"
}

variable "github_installation_id" {
Expand All @@ -41,7 +54,7 @@ variable "github_installation_id" {
variable "github_organization" {
type = string
default = null
description = "(Only required if using Github connector) Name of the organization to be used as part of example calls for Github (ex: Worklytics)"
description = "(Only required if using Github connector) Name of the organization to be used as part of example calls for Github (ex: Worklytics). NOTE: If using Enterprise Server, this can be a list of organizations split by commas (ex: Worklytics,Worklytics2)"
}

variable "github_example_repository" {
Expand All @@ -65,4 +78,12 @@ locals {
(!local.validate_salesforce_domain
? local.validate_salesforce_domain_message
: ""))

validate_github_enterprise_server_host = (var.github_api_host == null && (var.github_enterprise_server_host == null || var.github_enterprise_server_host == "" || can(regex(":|\\/", try(var.github_enterprise_server_host, ""))))) && contains(var.enabled_connectors, "github-enterprise-server")
validate_github_enterprise_server_host_message = "The github_enterprise_server_host var should be populated and to be with only the domain without protocol or query paths if GitHub Enterprise Server is enabled."
validate_github_enterprise_server_host_check = regex(
"^${local.validate_github_enterprise_server_host_message}$",
(!local.validate_github_enterprise_server_host
? local.validate_github_enterprise_server_host_message
: ""))
}
4 changes: 2 additions & 2 deletions msft-365.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# BEGIN MSFT

module "worklytics_connectors_msft_365" {
source = "git::https://github.com/worklytics/psoxy//infra/modules/worklytics-connectors-msft-365?ref=v0.4.43"
source = "git::https://github.com/worklytics/psoxy//infra/modules/worklytics-connectors-msft-365?ref=v0.4.46"


enabled_connectors = var.enabled_connectors
Expand Down Expand Up @@ -30,7 +30,7 @@ locals {
module "msft-connection-auth-federation" {
for_each = module.worklytics_connectors_msft_365.enabled_api_connectors

source = "git::https://github.com/worklytics/psoxy//infra/modules/azuread-federated-credentials?ref=v0.4.43"
source = "git::https://github.com/worklytics/psoxy//infra/modules/azuread-federated-credentials?ref=v0.4.46"

application_object_id = each.value.connector.id
display_name = "GcpFederation"
Expand Down
8 changes: 4 additions & 4 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,10 @@ variable "custom_api_connector_rules" {

variable "custom_bulk_connectors" {
type = map(object({
source_kind = string
display_name = optional(string, "Custom Bulk Connector")
input_bucket_name = optional(string) # allow override of default bucket name
sanitized_bucket_name = optional(string) # allow override of default bucket name
source_kind = string
display_name = optional(string, "Custom Bulk Connector")
input_bucket_name = optional(string) # allow override of default bucket name
sanitized_bucket_name = optional(string) # allow override of default bucket name
worklytics_connector_id = optional(string, "bulk-import-psoxy")
worklytics_connector_name = optional(string, "Custom Bulk Data via Psoxy")
rules = optional(object({
Expand Down

0 comments on commit e2958c0

Please sign in to comment.