All Downloads are FREE. Search and download functionalities are using the official Maven repository.

xyz.block.ftl.v1beta1.provisioner.plugin.proto Maven / Gradle / Ivy

There is a newer version: 0.368.1
Show newest version
syntax = "proto3";

package xyz.block.ftl.v1beta1.provisioner;

import "xyz/block/ftl/v1/ftl.proto";
import "xyz/block/ftl/v1beta1/provisioner/resource.proto";

option go_package = "github.com/TBD54566975/ftl/backend/protos/xyz/block/ftl/v1beta1/provisioner;provisioner";
option java_multiple_files = true;

// ResourceContext is the context used to create a new resource
// This includes the direct dependencies of the new resource, that can impact
// the resource creation.
message ResourceContext {
  Resource resource = 1;
  repeated Resource dependencies = 2;
}

message ProvisionRequest {
  string ftl_cluster_id = 1;
  string module = 2;

  // The resource FTL thinks exists currently
  repeated Resource existing_resources = 3;

  // The resource FTL would like to exist after this provisioning run.
  // This includes all new, existing, and changes resources in this change.
  repeated ResourceContext desired_resources = 4;
}

message ProvisionResponse {
  enum ProvisionResponseStatus {
    UNKNOWN = 0;
    SUBMITTED = 1;
    NO_CHANGES = 2;
  }

  string provisioning_token = 1;
  ProvisionResponseStatus status = 2;
}

message StatusRequest {
  string provisioning_token = 1;

  // The set of desired_resources used to initiate this provisioning request
  // We need this as input here, so we can populate any resource fields in them
  // when the provisioning finishes
  repeated Resource desired_resources = 2;
}

message StatusResponse {
  message ProvisioningRunning {}

  message ProvisioningFailed {
    string error_message = 1;
  }

  message ProvisioningSuccess {
    // Some fields in the resources might have been populated
    // during the provisioning. The new state is returned here
    repeated Resource updated_resources = 1;
  }

  oneof status {
    ProvisioningRunning running = 1;
    ProvisioningFailed failed = 2;
    ProvisioningSuccess success = 3;
  }
}

message PlanRequest {
  ProvisionRequest provisioning = 1;
}

message PlanResponse {
  // a detailed, implementation specific, plan of changes this deployment would do
  string plan = 1;
}

service ProvisionerPluginService {
  rpc Ping(xyz.block.ftl.v1.PingRequest) returns (xyz.block.ftl.v1.PingResponse);

  rpc Provision(ProvisionRequest) returns (ProvisionResponse);

  rpc Plan(PlanRequest) returns (PlanResponse);

  rpc Status(StatusRequest) returns (StatusResponse);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy