Skip to content

Commit

Permalink
Add insecure-skip-tls-verify
Browse files Browse the repository at this point in the history
  • Loading branch information
dormullor committed Jun 10, 2024
1 parent c46979c commit 35b5771
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions helm/resource_release.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ var defaultAttributes = map[string]interface{}{
"create_namespace": false,
"lint": false,
"pass_credentials": false,
"insecure_skip_tls_verify": false,
}

func resourceRelease() *schema.Resource {
Expand Down Expand Up @@ -347,6 +348,12 @@ func resourceRelease() *schema.Resource {
return new == ""
},
},
"insecure_skip_tls_verify": {
Type: schema.TypeBool,
Optional: true,
Default: defaultAttributes["insecure_skip_tls_verify"],
Description: "Skip tls certificate checks for the repository",
},
"create_namespace": {
Type: schema.TypeBool,
Optional: true,
Expand Down Expand Up @@ -608,6 +615,7 @@ func resourceReleaseCreate(ctx context.Context, d *schema.ResourceData, meta int
client.Replace = d.Get("replace").(bool)
client.Description = d.Get("description").(string)
client.CreateNamespace = d.Get("create_namespace").(bool)
client.InsecureSkipTLSverify = d.Get("insecure_skip_tls_verify").(bool)

if cmd := d.Get("postrender.0.binary_path").(string); cmd != "" {
av := d.Get("postrender.0.args")
Expand Down Expand Up @@ -731,6 +739,7 @@ func resourceReleaseUpdate(ctx context.Context, d *schema.ResourceData, meta int
client.MaxHistory = d.Get("max_history").(int)
client.CleanupOnFail = d.Get("cleanup_on_fail").(bool)
client.Description = d.Get("description").(string)
client.InsecureSkipTLSverify = d.Get("insecure_skip_tls_verify").(bool)

if cmd := d.Get("postrender.0.binary_path").(string); cmd != "" {
av := d.Get("postrender.0.args")
Expand Down Expand Up @@ -942,6 +951,7 @@ func resourceDiff(ctx context.Context, d *schema.ResourceDiff, meta interface{})
install.Replace = d.Get("replace").(bool)
install.Description = d.Get("description").(string)
install.CreateNamespace = d.Get("create_namespace").(bool)
install.InsecureSkipTLSverify = d.Get("insecure_skip_tls_verify").(bool)
install.PostRenderer = postRenderer

values, err := getValues(d)
Expand Down Expand Up @@ -1004,6 +1014,7 @@ func resourceDiff(ctx context.Context, d *schema.ResourceDiff, meta interface{})
upgrade.MaxHistory = d.Get("max_history").(int)
upgrade.CleanupOnFail = d.Get("cleanup_on_fail").(bool)
upgrade.Description = d.Get("description").(string)
upgrade.InsecureSkipTLSverify = d.Get("insecure_skip_tls_verify").(bool)
upgrade.PostRenderer = postRenderer

values, err := getValues(d)
Expand Down

0 comments on commit 35b5771

Please sign in to comment.