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

Bug: fail on missing secret #1002

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 3 commits
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
7 changes: 0 additions & 7 deletions rancher2/data_source_rancher2_secret_v2.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package rancher2

import (
"log"

"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

Expand Down Expand Up @@ -61,11 +59,6 @@ func dataSourceRancher2SecretV2Read(d *schema.ResourceData, meta interface{}) er

secret, err := getSecretV2ByID(meta.(*Config), clusterID, rancherID)
if err != nil {
if IsNotFound(err) || IsForbidden(err) {
log.Printf("[INFO] Secret V2 %s not found at cluster %s", rancherID, clusterID)
d.SetId("")
return nil
}
return err
}

Expand Down