diff --git a/docs/resources/service_deployment.md b/docs/resources/service_deployment.md
index 3181c59f..13bf0472 100644
--- a/docs/resources/service_deployment.md
+++ b/docs/resources/service_deployment.md
@@ -83,9 +83,10 @@ Optional:
- `chart` (String) The name of the chart to use.
- `repository` (Attributes) Resource reference to the flux Helm repository used by this chart. (see [below for nested schema](#nestedatt--helm--repository))
+- `url` (String) Helm repository URL to use.
- `values` (String) Helm values file to use with this service.
- `values_files` (Set of String) List of relative paths to values files to use form Helm applies.
-- `version` (String) Chart version to use
+- `version` (String) Chart version to use.
### Nested Schema for `helm.repository`
diff --git a/docs/resources/shared_secret.md b/docs/resources/shared_secret.md
new file mode 100644
index 00000000..98d63cbe
--- /dev/null
+++ b/docs/resources/shared_secret.md
@@ -0,0 +1,34 @@
+---
+# generated by https://github.com/hashicorp/terraform-plugin-docs
+page_title: "plural_shared_secret Resource - terraform-provider-plural"
+subcategory: ""
+description: |-
+ A one-time-viewable secret shared with a list of eligible users.
+---
+
+# plural_shared_secret (Resource)
+
+A one-time-viewable secret shared with a list of eligible users.
+
+
+
+
+## Schema
+
+### Required
+
+- `name` (String) The name of this shared secret.
+- `secret` (String, Sensitive) Content of this shared secret.
+
+### Optional
+
+- `notification_bindings` (Attributes Set) The users/groups you want this secret to be delivered to. (see [below for nested schema](#nestedatt--notification_bindings))
+
+
+### Nested Schema for `notification_bindings`
+
+Optional:
+
+- `group_id` (String)
+- `id` (String)
+- `user_id` (String)
diff --git a/example/service/helm/main.tf b/example/service/helm/main.tf
index 5901fd2e..47e0ee63 100644
--- a/example/service/helm/main.tf
+++ b/example/service/helm/main.tf
@@ -1,9 +1,18 @@
+terraform {
+ required_providers {
+ plural = {
+ source = "pluralsh/plural"
+ version = "0.2.1"
+ }
+ }
+}
+
provider "plural" {
use_cli = true
}
-data "plural_cluster" "byok_workload_cluster" {
- handle = "gcp-workload-cluster"
+data "plural_cluster" "cluster" {
+ handle = "mgmt"
}
resource "plural_service_deployment" "cd-test" {
@@ -12,17 +21,13 @@ resource "plural_service_deployment" "cd-test" {
namespace = "tf-cd-helm-test"
cluster = {
- handle = data.plural_cluster.byok_workload_cluster.handle
+ handle = data.plural_cluster.cluster.handle
}
- # Requires flux-source-controller addon to be installed and flux repo CRD for podinfo to exist
helm = {
- chart = "podinfo"
- repository = {
- name = "podinfo"
- namespace = "default"
- }
- version = "6.5.3"
+ chart = "grafana"
+ version = "8.x.x"
+ url = "https://grafana.github.io/helm-charts"
}
# Optional
@@ -30,16 +35,10 @@ resource "plural_service_deployment" "cd-test" {
docs_path = "doc"
protect = false
- configuration = [
- {
- name : "host"
- value : "tf-cd-test.gcp.plural.sh"
- },
- {
- name : "tag"
- value : "sha-4d01e86"
- }
- ]
+ configuration = {
+ "host" = "tf-cd-test.gcp.plural.sh",
+ "tag" = "sha-4d01e86"
+ }
sync_config = {
namespace_metadata = {
@@ -51,8 +50,4 @@ resource "plural_service_deployment" "cd-test" {
}
}
}
-
- depends_on = [
- data.plural_cluster.byok_workload_cluster,
- ]
}
diff --git a/internal/model/service_deployment.go b/internal/model/service_deployment.go
index 046bb844..c4d17799 100644
--- a/internal/model/service_deployment.go
+++ b/internal/model/service_deployment.go
@@ -291,6 +291,7 @@ type ServiceDeploymentHelm struct {
Values types.String `tfsdk:"values"`
ValuesFiles types.Set `tfsdk:"values_files"`
Version types.String `tfsdk:"version"`
+ URL types.String `tfsdk:"url"`
}
func (this *ServiceDeploymentHelm) Attributes() *gqlclient.HelmConfigAttributes {
@@ -309,6 +310,7 @@ func (this *ServiceDeploymentHelm) Attributes() *gqlclient.HelmConfigAttributes
Chart: this.Chart.ValueStringPointer(),
Version: this.Version.ValueStringPointer(),
Repository: this.Repository.Attributes(),
+ URL: this.URL.ValueStringPointer(),
}
}
diff --git a/internal/resource/service_deployment_schema.go b/internal/resource/service_deployment_schema.go
index b5e7c08b..c5f48ce9 100644
--- a/internal/resource/service_deployment_schema.go
+++ b/internal/resource/service_deployment_schema.go
@@ -291,8 +291,13 @@ func (r *ServiceDeploymentResource) schemaHelm() schema.SingleNestedAttribute {
},
"version": schema.StringAttribute{
Optional: true,
- Description: "Chart version to use",
- MarkdownDescription: "Chart version to use",
+ Description: "Chart version to use.",
+ MarkdownDescription: "Chart version to use.",
+ },
+ "url": schema.StringAttribute{
+ Optional: true,
+ Description: "Helm repository URL to use.",
+ MarkdownDescription: "Helm repository URL to use.",
},
},
Validators: []validator.Object{