Skip to content

Commit c914ca5

Browse files
committed
print a message when running in read-only mode
1 parent a7fc513 commit c914ca5

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

cmd/cli/multiregion/dns.go

+4
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ func InitDnsCmd(parentCmd *cobra.Command) {
5656
func runDnsCommand(failback bool) {
5757
pFlags := getPersistentFlags()
5858

59+
if pFlags.readOnlyMode {
60+
fmt.Println("-- Read-only mode enabled --")
61+
}
62+
5963
d := newDnsCommand(pFlags, failback)
6064

6165
d.setDnsRecordValues(pFlags.idp)

cmd/cli/multiregion/failover.go

+4
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ func InitFailoverCmd(parentCmd *cobra.Command) {
6565
func runFailover() {
6666
pFlags := getPersistentFlags()
6767

68+
if pFlags.readOnlyMode {
69+
fmt.Println("-- Read-only mode enabled --")
70+
}
71+
6872
lib.SetToken(pFlags.tfcToken)
6973

7074
answer := simplePrompt(`Please confirm activation of failover mode. Type "yes" to continue.`)

cmd/cli/multiregion/setup.go

+4
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ func InitSetupCmd(parentCmd *cobra.Command) {
2929
func runSetup() {
3030
pFlags := getPersistentFlags()
3131

32+
if pFlags.readOnlyMode {
33+
fmt.Println("-- Read-only mode enabled --")
34+
}
35+
3236
lib.SetToken(pFlags.tfcToken)
3337

3438
createSecondaryWorkspaces(pFlags)

0 commit comments

Comments
 (0)