Skip to content

Commit fdd75d4

Browse files
committed
Add secret aware for private tags
1 parent 25590d6 commit fdd75d4

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

.env

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
PROVIDER_SHORT_NAME=shoreline
2-
ENV_VARS_NAME_PREFIX=SHORELINE
3-
SHORELINE_RETRIES=5
2+
DEFAULT_USER_NAME=Shoreline
43
DEFAULT_TRIGGER_SOURCE=shoreline
5-
SHORELINE_DEBUG=false
6-
TF_LOG_FILE=/tmp/tf_provider.log
74
TF_ACC=0
8-
RENDERED_PROVIDER_NAME=Shoreline
5+
ENV_VARS_NAME_PREFIX=SHORELINE
96
PROVIDER_PATH=registry.opentofu.org/shorelinesoftware/shoreline
10-
DEFAULT_USER_NAME=Shoreline
7+
TF_LOG_FILE=/tmp/tf_provider.log
8+
RENDERED_PROVIDER_NAME=Shoreline
9+
SHORELINE_DEBUG=false
10+
SHORELINE_RETRIES=5

provider/provider.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1251,6 +1251,17 @@ func NormalizeNotebookCells(cells *[]interface{}) {
12511251
}
12521252

12531253
func IsSecretAwareSupported(backendVersion VersionRecord) bool {
1254+
if !backendVersion.Valid {
1255+
var build struct {
1256+
Tag string `json:"tag"`
1257+
}
1258+
if err := json.Unmarshal([]byte(backendVersion.Build), &build); err == nil {
1259+
return strings.HasPrefix(build.Tag, "private-") ||
1260+
strings.HasPrefix(build.Tag, "arm-private-") ||
1261+
strings.HasPrefix(build.Tag, "master-")
1262+
}
1263+
}
1264+
12541265
if backendVersion.Major > 28 {
12551266
return true
12561267
}

0 commit comments

Comments
 (0)