resource "ankra_cluster" "example" {
cluster_name = "dev"
github_credential_name = "my-github-cred"
github_branch = "main"
github_repository = "ankra-io/my-repo"
ankra_token = var.ankra_token
stacks {
name = "create-ns-test"
description = "Test stack for creating a namespace and secret"
manifests {
name = "test-namespace"
from_file = "${path.module}/namespace.yaml"
parents = [] # No parents for the namespace
}
manifests {
name = "test-secret"
from_file = "${path.module}/secret.yaml"
parents = ["test-namespace"] # This secret depends on the namespace
}
addons {
name = "my-addon"
chart_name = "nginx"
chart_version = "1.2.3"
repository_url = "https://charts.example.com"
namespace = "test-ns"
parents = ["test-namespace", "test-secret"] # This addon depends on both
}
}
}