Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove secrets manager #121

Merged
merged 4 commits into from
Dec 21, 2023
Merged
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
1 change: 0 additions & 1 deletion src/mlstacks/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ class ComponentTypeEnum(str, Enum):
ARTIFACT_STORE = "artifact_store"
ORCHESTRATOR = "orchestrator"
CONTAINER_REGISTRY = "container_registry"
SECRETS_MANAGER = "secrets_manager"
DATA_VALIDATOR = "data_validator"
EXPERIMENT_TRACKER = "experiment_tracker"
MODEL_REGISTRY = "model_registry"
Expand Down
8 changes: 0 additions & 8 deletions src/mlstacks/terraform/aws-modular/output_file.tf
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,6 @@ resource "local_file" "stack_file" {
%{endif}
%{endif}

%{if var.enable_secrets_manager}
secrets_manager:
id: ${uuid()}
flavor: aws
name: aws_secrets_manager
configuration: {"region_name": "${var.region}"}
%{endif}

%{if var.enable_experiment_tracker_mlflow}
experiment_tracker:
id: ${uuid()}
Expand Down
20 changes: 1 addition & 19 deletions src/mlstacks/terraform/aws-modular/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -84,24 +84,6 @@ output "experiment_tracker_configuration" {
}) : ""
}


# if secrets manager is enabled, set the secrets manager outputs to the secrets manager values
# otherwise, set the secrets manager outputs to empty strings
output "secrets_manager_id" {
value = var.enable_secrets_manager ? uuid() : ""
}
output "secrets_manager_flavor" {
value = var.enable_secrets_manager ? "aws" : ""
}
output "secrets_manager_name" {
value = var.enable_secrets_manager ? "aws_secrets_manager_${random_string.unique.result}" : ""
}
output "secrets_manager_configuration" {
value = var.enable_secrets_manager ? jsonencode({
region_name = var.region
}) : ""
}

# if kserve is enabled, set the model deployer outputs to the kserve values
# if seldon is enabled, set the model deployer outputs to the seldon values
# otherwise, set the model deployer outputs to empty strings
Expand Down Expand Up @@ -206,4 +188,4 @@ output "zenml-url" {
}
output "zenml-username" {
value = var.enable_zenml ? module.zenml[0].username : null
}
}
4 changes: 0 additions & 4 deletions src/mlstacks/terraform/aws-modular/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ variable "enable_container_registry" {
description = "Enable ECR deployment"
default = false
}
variable "enable_secrets_manager" {
description = "Enable Secret Manager deployment"
default = false
}
variable "enable_orchestrator_kubeflow" {
description = "Enable Kubeflow deployment"
default = false
Expand Down
11 changes: 1 addition & 10 deletions src/mlstacks/terraform/gcp-modular/enable_services.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,9 @@ data "google_project" "project" {
project_id = var.project_id
}

# You must have owner, editor, or service config editor roles
# You must have owner, editor, or service config editor roles
# to be able to enable services.

# enable secret manager
resource "google_project_service" "secret_manager" {
count = var.enable_secrets_manager ? 1 : 0
project = var.project_id
service = "secretmanager.googleapis.com"

disable_on_destroy = false
}

# enable container registry
resource "google_project_service" "container_registry" {
count = var.enable_container_registry ? 1 : 0
Expand Down
9 changes: 0 additions & 9 deletions src/mlstacks/terraform/gcp-modular/output_file.tf
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,6 @@ resource "local_file" "stack_file" {
configuration: {"project": "${var.project_id}", "region": "${var.region}", "service_account_path": "${local_file.sa_key_file[0].filename}"}
%{endif}


%{if var.enable_secrets_manager}
secrets_manager:
id: ${uuid()}
flavor: gcp
name: gcp_secrets_manager
configuration: {"project_id": "${var.project_id}"}
%{endif}

%{if var.enable_experiment_tracker_mlflow}
experiment_tracker:
id: ${uuid()}
Expand Down
17 changes: 0 additions & 17 deletions src/mlstacks/terraform/gcp-modular/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -100,23 +100,6 @@ output "experiment_tracker_configuration" {
}) : ""
}

# if secrets manager is enabled, set the secrets manager outputs to the secrets manager values
# otherwise, set the secrets manager outputs to empty strings
output "secrets_manager_id" {
value = var.enable_secrets_manager ? uuid() : ""
}
output "secrets_manager_flavor" {
value = var.enable_secrets_manager ? "gcp" : ""
}
output "secrets_manager_name" {
value = var.enable_secrets_manager ? "gcp_secrets_manager_${random_string.unique.result}" : ""
}
output "secrets_manager_configuration" {
value = var.enable_secrets_manager ? jsonencode({
project_id = var.project_id
}) : ""
}

# if kserve is enabled, set the model deployer outputs to the kserve values
# if seldon is enabled, set the model deployer outputs to the seldon values
# otherwise, set the model deployer outputs to empty strings
Expand Down
4 changes: 0 additions & 4 deletions src/mlstacks/terraform/gcp-modular/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ variable "enable_container_registry" {
description = "Enable GCR deployment"
default = false
}
variable "enable_secrets_manager" {
description = "Enable Secret Manager deployment"
default = false
}
variable "enable_orchestrator_kubeflow" {
description = "Enable Kubeflow deployment"
default = false
Expand Down
5 changes: 0 additions & 5 deletions src/mlstacks/terraform/k3d-modular/output_stack.tf
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,6 @@ resource "local_file" "stack_file" {
kubernetes_namespace: "${local.seldon.workloads_namespace}"
base_url: "http://${var.enable_model_deployer_seldon ? module.istio[0].ingress-ip-address : ""}"
kubernetes_secret_name: "${var.seldon-secret-name}"
secrets_manager:
id: ${uuid()}
flavor: local
name: k3d-secrets-manager-${random_string.cluster_id.result}
configuration: {}
%{endif}
ADD
filename = "./k3d_stack_${replace(substr(timestamp(), 0, 16), ":", "_")}.yaml"
Expand Down
Loading