You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: Fixing backend delete safety features (#4089)
* fix: Fixing visible subcommands and flags
* fix: Fixing implementation for subcommands, as that was fine
* fix: Fixing backend safety feature for `delete`
* fix: Adding feature flag to control versioning
* feat: Adding integration test for force requirement
* fix: Adding GCP check too
* fix: Plumbing ctx through for GCS bucket provisioning
returnerrors.New("bucket is not versioned, refusing to delete backend state. If you are sure you want to delete the backend state anyways, use the --force flag")
client.logger.Warnf("Versioning is not enabled for the remote state GCS bucket %s. We recommend enabling versioning so that you can roll back to previous versions of your Terraform state in case of error.", bucketName)
169
+
client.logger.Warnf("Versioning is not enabled for the remote state GCS bucket %s. We recommend enabling versioning so that you can roll back to previous versions of your OpenTofu/Terraform state in case of error.", bucketName)
171
170
}
172
171
173
-
returnnil
172
+
returnattrs.VersioningEnabled, nil
174
173
}
175
174
176
175
// CreateGCSBucketWithVersioning creates the given GCS bucket and enables versioning for it.
returnerrors.New("bucket is not versioned, refusing to delete backend state. If you are sure you want to delete the backend state anyways, use the --force flag")
client.logger.Warnf("Versioning is not enabled for the remote state S3 bucket %s. We recommend enabling versioning so that you can roll back to previous versions of your Terraform state in case of error.", bucketName)
419
+
client.logger.Warnf("Versioning is not enabled for the remote state S3 bucket %s. We recommend enabling versioning so that you can roll back to previous versions of your OpenTofu/Terraform state in case of error.", bucketName)
0 commit comments