Skip to content

chore: support single environment resource #107

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 30, 2025
Merged

chore: support single environment resource #107

merged 2 commits into from
Apr 30, 2025

Conversation

ecmadao
Copy link
Collaborator

@ecmadao ecmadao commented Apr 30, 2025

resource "bytebase_setting" "environments" {
  name = "bb.workspace.environment"
  environment_setting {
    environment {
      id        = "prod"
      title     = "Prod"
      protected = true
    }

    environment {
      id        = "test"
      title     = "Test"
      protected = false
    }
  }
}

# Upsert test environment.
resource "bytebase_environment" "test" {
  depends_on = [
    bytebase_setting.environments
  ]
  resource_id = "test"
  title       = "Staging" // rename to "Staging"
  order       = 0         // change order to 0
  protected   = false
}

# Upsert prod environment.
resource "bytebase_environment" "prod" {
  depends_on = [
    bytebase_environment.test
  ]
  resource_id = "prod"
  title       = "Prod"
  order       = 1 // change order to 1
  protected   = true
}

@ecmadao ecmadao merged commit f64b094 into main Apr 30, 2025
3 checks passed
@ecmadao ecmadao deleted the chore/BYT-7327 branch April 30, 2025 04:42
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