Skip to content

Commit e348252

Browse files
feat(tf): configure storage account default portal access
1 parent 1831fe2 commit e348252

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

pkg/recipes/terraform/terraform.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,16 @@ func (tf *terraformWrapper) Init() error {
181181
return internal.ReturnErrorOrPanic(err)
182182
}
183183

184+
defaultPortalAccessCmd := exec.Command("az", "storage", "account", "update",
185+
"--name", tf.stateStorageAccountName,
186+
"--resource-group", tf.resourceGroupName,
187+
"--set", "defaultToOAuthAuthentication=true")
188+
189+
_, err = tf.executor.ExecuteCmd(defaultPortalAccessCmd)
190+
if err != nil {
191+
return internal.ReturnErrorOrPanic(err)
192+
}
193+
184194
fileSharePropertiesCmd := exec.Command("az", "storage", "account", "file-service-properties", "update",
185195
"--account-name", tf.stateStorageAccountName,
186196
"--resource-group", tf.resourceGroupName,
@@ -190,7 +200,6 @@ func (tf *terraformWrapper) Init() error {
190200
"--channel-encryption", "AES-256-GCM")
191201

192202
_, err = tf.executor.ExecuteCmd(fileSharePropertiesCmd)
193-
194203
if err != nil {
195204
return internal.ReturnErrorOrPanic(err)
196205
}

0 commit comments

Comments
 (0)