Skip to content

Commit

Permalink
add example service deployment tf
Browse files Browse the repository at this point in the history
  • Loading branch information
floreks committed Nov 15, 2023
1 parent c8074e9 commit c1c3dac
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions example/service/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
provider "plural" {
use_cli = true
}

resource "plural_cluster" "byok_workload_cluster" {
name = "tf-workload-cluster"
handle = "tf-workload-cluster"
cloud = "byok"
tags = {
"managed-by" = "terraform-provider-plural"
}
}

data "plural_git_repository" "cd-test" {
url = "https://github.com/pluralsh/plrl-cd-test.git"
}

resource "plural_service_deployment" "cd-test" {
name = "tf-cd-test"
namespace = "tf-cd-test"
configuration = [
{
name : "host"
value : "tf-cd-test.gcp.plural.sh"
},
{
name : "tag"
value : "sha-4d01e86"
}
]

cluster = {
handle = plural_cluster.byok_workload_cluster.handle
}

repository = {
id = data.plural_git_repository.cd-test.id
ref = "main"
folder = "kubernetes"
}

depends_on = [
plural_cluster.byok_workload_cluster,
data.plural_git_repository.cd-test
]
}

0 comments on commit c1c3dac

Please sign in to comment.