Skip to content

Commit

Permalink
(operator) add operator_version variable (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
ffalor authored Apr 12, 2023
1 parent 6a9c12b commit 4068754
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 5 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ No resources.
| <a name="input_cluster_name"></a> [cluster\_name](#input\_cluster\_name) | Your Cluster Name | `string` | n/a | yes |
| <a name="input_docker_api_token"></a> [docker\_api\_token](#input\_docker\_api\_token) | Falcon Docker API Token | `string` | n/a | yes |
| <a name="input_environment"></a> [environment](#input\_environment) | Environment or 'Alias' tag | `string` | `"tf_module"` | no |
| <a name="input_operator_version"></a> [operator\_version](#input\_operator\_version) | Falcon Operator version to deploy. Can be a branch, tag, or commit hash of the falcon-operator repo. | `string` | `"v0.7.2"` | no |
| <a name="input_sensor_type"></a> [sensor\_type](#input\_sensor\_type) | Falcon sensor type: FalconNodeSensor or FalconContainer. | `string` | `"FalconNodeSensor"` | no |
## Outputs

Expand Down
9 changes: 5 additions & 4 deletions main.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
module "falcon_operator" {
source = "./modules/operator"

client_id = var.client_id
client_secret = var.client_secret
sensor_type = var.sensor_type
environment = var.environment
client_id = var.client_id
client_secret = var.client_secret
sensor_type = var.sensor_type
environment = var.environment
operator_version = var.operator_version
}

module "falcon_kpa" {
Expand Down
1 change: 1 addition & 0 deletions modules/operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Credentials (`client_id` and `client_secret`) from this step will be used in dep
| <a name="input_client_id"></a> [client\_id](#input\_client\_id) | Falcon API Client ID | `string` | n/a | yes |
| <a name="input_client_secret"></a> [client\_secret](#input\_client\_secret) | Falcon API Client Secret | `string` | n/a | yes |
| <a name="input_environment"></a> [environment](#input\_environment) | Environment or 'Alias' tag | `string` | `"tf_module"` | no |
| <a name="input_operator_version"></a> [operator\_version](#input\_operator\_version) | Falcon Operator version to deploy. Can be a branch, tag, or commit hash of the falcon-operator repo. | `string` | `"v0.7.2"` | no |
| <a name="input_sensor_type"></a> [sensor\_type](#input\_sensor\_type) | Falcon sensor type: FalconNodeSensor or FalconContainer. | `string` | `"FalconNodeSensor"` | no |
## Outputs

Expand Down
2 changes: 1 addition & 1 deletion modules/operator/main.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
data "http" "falcon_operator" {
url = "https://github.com/CrowdStrike/falcon-operator/releases/latest/download/falcon-operator.yaml"
url = "https://raw.githubusercontent.com/CrowdStrike/falcon-operator/${var.operator_version}/deploy/falcon-operator.yaml"
}

data "kubectl_file_documents" "docs" {
Expand Down
6 changes: 6 additions & 0 deletions modules/operator/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,9 @@ variable "environment" {
type = string
default = "tf_module"
}

variable "operator_version" {
description = "Falcon Operator version to deploy. Can be a branch, tag, or commit hash of the falcon-operator repo."
type = string
default = "v0.7.2"
}
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,9 @@ variable "environment" {
type = string
default = "tf_module"
}

variable "operator_version" {
description = "Falcon Operator version to deploy. Can be a branch, tag, or commit hash of the falcon-operator repo."
type = string
default = "v0.7.2"
}

0 comments on commit 4068754

Please sign in to comment.