Skip to content

chore: handle api breaking change #106

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

Merged
merged 2 commits into from
Apr 24, 2025
Merged

chore: handle api breaking change #106

merged 2 commits into from
Apr 24, 2025

Conversation

ecmadao
Copy link
Collaborator

@ecmadao ecmadao commented Apr 24, 2025

  • Break change: remove bytebase_environment. Now we need to handle the environment via bb.workspace.environment setting. Example:
resource "bytebase_setting" "environments" {
  name = "bb.workspace.environment"
  environment_setting {
    environment {
      id        = local.environment_id_test
      title     = "Test"
      protected = false
    }

    environment {
      id        = local.environment_id_prod
      title     = "Prod"
      protected = true
    }
  }
}
  • Break change: approval flow change. Example:
resource "bytebase_setting" "approval_flow" {
  name = "bb.workspace.approval"
  approval_flow {
    rules {
      flow {
        title       = "Project Owner -> DBA -> Admin"
        description = "Need DBA and workspace admin approval"
        creator     = "users/[email protected]"

        # Approval flow following the step order.
        steps {
          role = "roles/projectOwner"
        }

        steps {
          role = "roles/workspaceDBA"
        }

        steps {
          role = "roles/workspaceAdmin"
        }
      }

      # Match any condition will trigger this approval flow.
      conditions {
        source = "DML"
        level  = "MODERATE"
      }
      conditions {
        source = "DDL"
        level  = "HIGH"
      }
    }
  }
}

Close BYT-7319

@ecmadao ecmadao requested a review from d-bytebase April 24, 2025 15:15
@ecmadao ecmadao enabled auto-merge (squash) April 24, 2025 15:15
@ecmadao ecmadao merged commit aafa263 into main Apr 24, 2025
3 checks passed
@ecmadao ecmadao deleted the chore/bb-3.6.0 branch April 24, 2025 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants