1
0
mirror of https://github.com/coder/coder.git synced 2025-03-15 19:19:58 +00:00

feat(provisioner): add support for presets to coder provisioners ()

This pull request adds support for presets to coder provisioners.
If a template defines presets using a compatible version of the
provider, then this PR will allow those presets to be persisted to the
control plane database for use in workspace creation.
This commit is contained in:
Sas Swart
2025-02-17 13:00:44 +02:00
committed by GitHub
parent a845370231
commit 46e04c68e3
20 changed files with 2253 additions and 761 deletions

@ -15,8 +15,6 @@ import (
)
func TestTemplateVersionPresets(t *testing.T) {
// TODO (sasswart): Test case: what if a user tries to read presets or preset parameters from a different org?
t.Parallel()
givenPreset := codersdk.Preset{

@ -1340,6 +1340,11 @@ func (s *server) CompleteJob(ctx context.Context, completed *proto.CompletedJob)
}
}
err = InsertWorkspacePresetsAndParameters(ctx, s.Logger, s.Database, jobID, input.TemplateVersionID, jobType.TemplateImport.Presets, s.timeNow())
if err != nil {
return nil, xerrors.Errorf("insert workspace presets and parameters: %w", err)
}
var completedError sql.NullString
for _, externalAuthProvider := range jobType.TemplateImport.ExternalAuthProviders {
@ -1809,6 +1814,52 @@ func InsertWorkspaceModule(ctx context.Context, db database.Store, jobID uuid.UU
return nil
}
func InsertWorkspacePresetsAndParameters(ctx context.Context, logger slog.Logger, db database.Store, jobID uuid.UUID, templateVersionID uuid.UUID, protoPresets []*sdkproto.Preset, t time.Time) error {
for _, preset := range protoPresets {
logger.Info(ctx, "inserting template import job preset",
slog.F("job_id", jobID.String()),
slog.F("preset_name", preset.Name),
)
if err := InsertWorkspacePresetAndParameters(ctx, db, templateVersionID, preset, t); err != nil {
return xerrors.Errorf("insert workspace preset: %w", err)
}
}
return nil
}
func InsertWorkspacePresetAndParameters(ctx context.Context, db database.Store, templateVersionID uuid.UUID, protoPreset *sdkproto.Preset, t time.Time) error {
err := db.InTx(func(tx database.Store) error {
dbPreset, err := tx.InsertPreset(ctx, database.InsertPresetParams{
TemplateVersionID: templateVersionID,
Name: protoPreset.Name,
CreatedAt: t,
})
if err != nil {
return xerrors.Errorf("insert preset: %w", err)
}
var presetParameterNames []string
var presetParameterValues []string
for _, parameter := range protoPreset.Parameters {
presetParameterNames = append(presetParameterNames, parameter.Name)
presetParameterValues = append(presetParameterValues, parameter.Value)
}
_, err = tx.InsertPresetParameters(ctx, database.InsertPresetParametersParams{
TemplateVersionPresetID: dbPreset.ID,
Names: presetParameterNames,
Values: presetParameterValues,
})
if err != nil {
return xerrors.Errorf("insert preset parameters: %w", err)
}
return nil
}, nil)
if err != nil {
return xerrors.Errorf("insert preset and parameters: %w", err)
}
return nil
}
func InsertWorkspaceResource(ctx context.Context, db database.Store, jobID uuid.UUID, transition database.WorkspaceTransition, protoResource *sdkproto.Resource, snapshot *telemetry.Snapshot) error {
resource, err := db.InsertWorkspaceResource(ctx, database.InsertWorkspaceResourceParams{
ID: uuid.New(),

@ -30,6 +30,7 @@ import (
"github.com/coder/coder/v2/coderd/database"
"github.com/coder/coder/v2/coderd/database/dbgen"
"github.com/coder/coder/v2/coderd/database/dbmem"
"github.com/coder/coder/v2/coderd/database/dbtestutil"
"github.com/coder/coder/v2/coderd/database/dbtime"
"github.com/coder/coder/v2/coderd/database/pubsub"
"github.com/coder/coder/v2/coderd/externalauth"
@ -1708,6 +1709,155 @@ func TestCompleteJob(t *testing.T) {
})
}
func TestInsertWorkspacePresetsAndParameters(t *testing.T) {
t.Parallel()
type testCase struct {
name string
givenPresets []*sdkproto.Preset
}
testCases := []testCase{
{
name: "no presets",
},
{
name: "one preset with no parameters",
givenPresets: []*sdkproto.Preset{
{
Name: "preset1",
},
},
},
{
name: "one preset with multiple parameters",
givenPresets: []*sdkproto.Preset{
{
Name: "preset1",
Parameters: []*sdkproto.PresetParameter{
{
Name: "param1",
Value: "value1",
},
{
Name: "param2",
Value: "value2",
},
},
},
},
},
{
name: "multiple presets with parameters",
givenPresets: []*sdkproto.Preset{
{
Name: "preset1",
Parameters: []*sdkproto.PresetParameter{
{
Name: "param1",
Value: "value1",
},
{
Name: "param2",
Value: "value2",
},
},
},
{
Name: "preset2",
Parameters: []*sdkproto.PresetParameter{
{
Name: "param3",
Value: "value3",
},
{
Name: "param4",
Value: "value4",
},
},
},
},
},
}
for _, c := range testCases {
c := c
t.Run(c.name, func(t *testing.T) {
t.Parallel()
ctx := testutil.Context(t, testutil.WaitLong)
logger := testutil.Logger(t)
db, ps := dbtestutil.NewDB(t)
org := dbgen.Organization(t, db, database.Organization{})
user := dbgen.User(t, db, database.User{})
job := dbgen.ProvisionerJob(t, db, ps, database.ProvisionerJob{
Type: database.ProvisionerJobTypeWorkspaceBuild,
OrganizationID: org.ID,
})
templateVersion := dbgen.TemplateVersion(t, db, database.TemplateVersion{
JobID: job.ID,
OrganizationID: org.ID,
CreatedBy: user.ID,
})
err := provisionerdserver.InsertWorkspacePresetsAndParameters(
ctx,
logger,
db,
job.ID,
templateVersion.ID,
c.givenPresets,
time.Now(),
)
require.NoError(t, err)
gotPresets, err := db.GetPresetsByTemplateVersionID(ctx, templateVersion.ID)
require.NoError(t, err)
require.Len(t, gotPresets, len(c.givenPresets))
for _, givenPreset := range c.givenPresets {
foundMatch := false
for _, gotPreset := range gotPresets {
if givenPreset.Name == gotPreset.Name {
foundMatch = true
break
}
}
require.True(t, foundMatch, "preset %s not found in parameters", givenPreset.Name)
}
gotPresetParameters, err := db.GetPresetParametersByTemplateVersionID(ctx, templateVersion.ID)
require.NoError(t, err)
for _, givenPreset := range c.givenPresets {
for _, givenParameter := range givenPreset.Parameters {
foundMatch := false
for _, gotParameter := range gotPresetParameters {
nameMatches := givenParameter.Name == gotParameter.Name
valueMatches := givenParameter.Value == gotParameter.Value
// ensure that preset parameters are matched to the correct preset:
var gotPreset database.TemplateVersionPreset
for _, preset := range gotPresets {
if preset.ID == gotParameter.TemplateVersionPresetID {
gotPreset = preset
break
}
}
presetMatches := gotPreset.Name == givenPreset.Name
if nameMatches && valueMatches && presetMatches {
foundMatch = true
break
}
}
require.True(t, foundMatch, "preset parameter %s not found in presets", givenParameter.Name)
}
}
})
}
}
func TestInsertWorkspaceResource(t *testing.T) {
t.Parallel()
ctx := context.Background()

@ -308,6 +308,7 @@ func (e *executor) plan(ctx, killCtx context.Context, env, vars []string, logr l
Resources: state.Resources,
ExternalAuthProviders: state.ExternalAuthProviders,
Timings: append(e.timings.aggregate(), graphTimings.aggregate()...),
Presets: state.Presets,
}, nil
}

@ -149,6 +149,7 @@ type resourceMetadataItem struct {
type State struct {
Resources []*proto.Resource
Parameters []*proto.RichParameter
Presets []*proto.Preset
ExternalAuthProviders []*proto.ExternalAuthProviderResource
}
@ -176,7 +177,7 @@ func ConvertState(ctx context.Context, modules []*tfjson.StateModule, rawGraph s
// Extra array to preserve the order of rich parameters.
tfResourcesRichParameters := make([]*tfjson.StateResource, 0)
tfResourcesPresets := make([]*tfjson.StateResource, 0)
var findTerraformResources func(mod *tfjson.StateModule)
findTerraformResources = func(mod *tfjson.StateModule) {
for _, module := range mod.ChildModules {
@ -186,6 +187,9 @@ func ConvertState(ctx context.Context, modules []*tfjson.StateModule, rawGraph s
if resource.Type == "coder_parameter" {
tfResourcesRichParameters = append(tfResourcesRichParameters, resource)
}
if resource.Type == "coder_workspace_preset" {
tfResourcesPresets = append(tfResourcesPresets, resource)
}
label := convertAddressToLabel(resource.Address)
if tfResourcesByLabel[label] == nil {
@ -775,6 +779,78 @@ func ConvertState(ctx context.Context, modules []*tfjson.StateModule, rawGraph s
)
}
var duplicatedPresetNames []string
presets := make([]*proto.Preset, 0)
for _, resource := range tfResourcesPresets {
var preset provider.WorkspacePreset
err = mapstructure.Decode(resource.AttributeValues, &preset)
if err != nil {
return nil, xerrors.Errorf("decode preset attributes: %w", err)
}
var duplicatedPresetParameterNames []string
var nonExistentParameters []string
var presetParameters []*proto.PresetParameter
for name, value := range preset.Parameters {
presetParameter := &proto.PresetParameter{
Name: name,
Value: value,
}
formattedName := fmt.Sprintf("%q", name)
if !slice.Contains(duplicatedPresetParameterNames, formattedName) &&
slice.ContainsCompare(presetParameters, presetParameter, func(a, b *proto.PresetParameter) bool {
return a.Name == b.Name
}) {
duplicatedPresetParameterNames = append(duplicatedPresetParameterNames, formattedName)
}
if !slice.ContainsCompare(parameters, &proto.RichParameter{Name: name}, func(a, b *proto.RichParameter) bool {
return a.Name == b.Name
}) {
nonExistentParameters = append(nonExistentParameters, name)
}
presetParameters = append(presetParameters, presetParameter)
}
if len(duplicatedPresetParameterNames) > 0 {
s := ""
if len(duplicatedPresetParameterNames) == 1 {
s = "s"
}
return nil, xerrors.Errorf(
"coder_workspace_preset parameters must be unique but %s appear%s multiple times", stringutil.JoinWithConjunction(duplicatedPresetParameterNames), s,
)
}
if len(nonExistentParameters) > 0 {
logger.Warn(
ctx,
"coder_workspace_preset defines preset values for at least one parameter that is not defined by the template",
slog.F("parameters", stringutil.JoinWithConjunction(nonExistentParameters)),
)
}
protoPreset := &proto.Preset{
Name: preset.Name,
Parameters: presetParameters,
}
if slice.Contains(duplicatedPresetNames, preset.Name) {
duplicatedPresetNames = append(duplicatedPresetNames, preset.Name)
}
presets = append(presets, protoPreset)
}
if len(duplicatedPresetNames) > 0 {
s := ""
if len(duplicatedPresetNames) == 1 {
s = "s"
}
return nil, xerrors.Errorf(
"coder_workspace_preset names must be unique but %s appear%s multiple times",
stringutil.JoinWithConjunction(duplicatedPresetNames), s,
)
}
// A map is used to ensure we don't have duplicates!
externalAuthProvidersMap := map[string]*proto.ExternalAuthProviderResource{}
for _, tfResources := range tfResourcesByLabel {
@ -808,6 +884,7 @@ func ConvertState(ctx context.Context, modules []*tfjson.StateModule, rawGraph s
return &State{
Resources: resources,
Parameters: parameters,
Presets: presets,
ExternalAuthProviders: externalAuthProviders,
}, nil
}

@ -36,6 +36,7 @@ func TestConvertResources(t *testing.T) {
type testCase struct {
resources []*proto.Resource
parameters []*proto.RichParameter
Presets []*proto.Preset
externalAuthProviders []*proto.ExternalAuthProviderResource
}
@ -777,6 +778,58 @@ func TestConvertResources(t *testing.T) {
}},
}},
},
"presets": {
resources: []*proto.Resource{{
Name: "dev",
Type: "null_resource",
Agents: []*proto.Agent{{
Name: "dev",
OperatingSystem: "windows",
Architecture: "arm64",
Auth: &proto.Agent_Token{},
ConnectionTimeoutSeconds: 120,
DisplayApps: &displayApps,
ResourcesMonitoring: &proto.ResourcesMonitoring{},
}},
}},
parameters: []*proto.RichParameter{{
Name: "First parameter from child module",
Type: "string",
Description: "First parameter from child module",
Mutable: true,
DefaultValue: "abcdef",
}, {
Name: "Second parameter from child module",
Type: "string",
Description: "Second parameter from child module",
Mutable: true,
DefaultValue: "ghijkl",
}, {
Name: "First parameter from module",
Type: "string",
Description: "First parameter from module",
Mutable: true,
DefaultValue: "abcdef",
}, {
Name: "Second parameter from module",
Type: "string",
Description: "Second parameter from module",
Mutable: true,
DefaultValue: "ghijkl",
}, {
Name: "Sample",
Type: "string",
Description: "blah blah",
DefaultValue: "ok",
}},
Presets: []*proto.Preset{{
Name: "My First Project",
Parameters: []*proto.PresetParameter{{
Name: "Sample",
Value: "A1B2C3",
}},
}},
},
} {
folderName := folderName
expected := expected
@ -859,6 +912,8 @@ func TestConvertResources(t *testing.T) {
require.Equal(t, expectedNoMetadataMap, resourcesMap)
require.ElementsMatch(t, expected.externalAuthProviders, state.ExternalAuthProviders)
require.ElementsMatch(t, expected.Presets, state.Presets)
})
t.Run("Provision", func(t *testing.T) {
@ -904,6 +959,8 @@ func TestConvertResources(t *testing.T) {
require.Failf(t, "unexpected resources", "diff (-want +got):\n%s", diff)
}
require.ElementsMatch(t, expected.externalAuthProviders, state.ExternalAuthProviders)
require.ElementsMatch(t, expected.Presets, state.Presets)
})
})
}

@ -0,0 +1,28 @@
terraform {
required_providers {
coder = {
source = "coder/coder"
version = "0.22.0"
}
docker = {
source = "kreuzwerker/docker"
version = "~> 2.22"
}
}
}
data "coder_parameter" "child_first_parameter_from_module" {
name = "First parameter from child module"
mutable = true
type = "string"
description = "First parameter from child module"
default = "abcdef"
}
data "coder_parameter" "child_second_parameter_from_module" {
name = "Second parameter from child module"
mutable = true
type = "string"
description = "Second parameter from child module"
default = "ghijkl"
}

@ -0,0 +1,32 @@
terraform {
required_providers {
coder = {
source = "coder/coder"
version = "0.22.0"
}
docker = {
source = "kreuzwerker/docker"
version = "~> 2.22"
}
}
}
module "this_is_external_child_module" {
source = "./child-external-module"
}
data "coder_parameter" "first_parameter_from_module" {
name = "First parameter from module"
mutable = true
type = "string"
description = "First parameter from module"
default = "abcdef"
}
data "coder_parameter" "second_parameter_from_module" {
name = "Second parameter from module"
mutable = true
type = "string"
description = "Second parameter from module"
default = "ghijkl"
}

@ -0,0 +1,39 @@
terraform {
required_providers {
coder = {
source = "coder/coder"
version = "0.22.0"
}
}
}
module "this_is_external_module" {
source = "./external-module"
}
data "coder_parameter" "sample" {
name = "Sample"
type = "string"
description = "blah blah"
default = "ok"
}
data "coder_workspace_preset" "MyFirstProject" {
name = "My First Project"
parameters = {
(data.coder_parameter.sample.name) = "A1B2C3"
# TODO (sasswart): Add support for parameters from external modules
# (data.coder_parameter.first_parameter_from_module.name) = "A1B2C3"
# (data.coder_parameter.child_first_parameter_from_module.name) = "A1B2C3"
}
}
resource "coder_agent" "dev" {
os = "windows"
arch = "arm64"
}
resource "null_resource" "dev" {
depends_on = [coder_agent.dev]
}

@ -0,0 +1,45 @@
digraph {
compound = "true"
newrank = "true"
subgraph "root" {
"[root] coder_agent.dev (expand)" [label = "coder_agent.dev", shape = "box"]
"[root] data.coder_parameter.sample (expand)" [label = "data.coder_parameter.sample", shape = "box"]
"[root] data.coder_workspace_preset.MyFirstProject (expand)" [label = "data.coder_workspace_preset.MyFirstProject", shape = "box"]
"[root] module.this_is_external_module.data.coder_parameter.first_parameter_from_module (expand)" [label = "module.this_is_external_module.data.coder_parameter.first_parameter_from_module", shape = "box"]
"[root] module.this_is_external_module.data.coder_parameter.second_parameter_from_module (expand)" [label = "module.this_is_external_module.data.coder_parameter.second_parameter_from_module", shape = "box"]
"[root] module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_first_parameter_from_module (expand)" [label = "module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_first_parameter_from_module", shape = "box"]
"[root] module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_second_parameter_from_module (expand)" [label = "module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_second_parameter_from_module", shape = "box"]
"[root] null_resource.dev (expand)" [label = "null_resource.dev", shape = "box"]
"[root] provider[\"registry.terraform.io/coder/coder\"]" [label = "provider[\"registry.terraform.io/coder/coder\"]", shape = "diamond"]
"[root] provider[\"registry.terraform.io/hashicorp/null\"]" [label = "provider[\"registry.terraform.io/hashicorp/null\"]", shape = "diamond"]
"[root] coder_agent.dev (expand)" -> "[root] provider[\"registry.terraform.io/coder/coder\"]"
"[root] data.coder_parameter.sample (expand)" -> "[root] provider[\"registry.terraform.io/coder/coder\"]"
"[root] data.coder_workspace_preset.MyFirstProject (expand)" -> "[root] data.coder_parameter.sample (expand)"
"[root] module.this_is_external_module (close)" -> "[root] module.this_is_external_module.data.coder_parameter.first_parameter_from_module (expand)"
"[root] module.this_is_external_module (close)" -> "[root] module.this_is_external_module.data.coder_parameter.second_parameter_from_module (expand)"
"[root] module.this_is_external_module (close)" -> "[root] module.this_is_external_module.module.this_is_external_child_module (close)"
"[root] module.this_is_external_module.data.coder_parameter.first_parameter_from_module (expand)" -> "[root] module.this_is_external_module (expand)"
"[root] module.this_is_external_module.data.coder_parameter.first_parameter_from_module (expand)" -> "[root] provider[\"registry.terraform.io/coder/coder\"]"
"[root] module.this_is_external_module.data.coder_parameter.second_parameter_from_module (expand)" -> "[root] module.this_is_external_module (expand)"
"[root] module.this_is_external_module.data.coder_parameter.second_parameter_from_module (expand)" -> "[root] provider[\"registry.terraform.io/coder/coder\"]"
"[root] module.this_is_external_module.module.this_is_external_child_module (close)" -> "[root] module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_first_parameter_from_module (expand)"
"[root] module.this_is_external_module.module.this_is_external_child_module (close)" -> "[root] module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_second_parameter_from_module (expand)"
"[root] module.this_is_external_module.module.this_is_external_child_module (expand)" -> "[root] module.this_is_external_module (expand)"
"[root] module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_first_parameter_from_module (expand)" -> "[root] module.this_is_external_module.module.this_is_external_child_module (expand)"
"[root] module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_first_parameter_from_module (expand)" -> "[root] provider[\"registry.terraform.io/coder/coder\"]"
"[root] module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_second_parameter_from_module (expand)" -> "[root] module.this_is_external_module.module.this_is_external_child_module (expand)"
"[root] module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_second_parameter_from_module (expand)" -> "[root] provider[\"registry.terraform.io/coder/coder\"]"
"[root] null_resource.dev (expand)" -> "[root] coder_agent.dev (expand)"
"[root] null_resource.dev (expand)" -> "[root] provider[\"registry.terraform.io/hashicorp/null\"]"
"[root] provider[\"registry.terraform.io/coder/coder\"] (close)" -> "[root] coder_agent.dev (expand)"
"[root] provider[\"registry.terraform.io/coder/coder\"] (close)" -> "[root] data.coder_workspace_preset.MyFirstProject (expand)"
"[root] provider[\"registry.terraform.io/coder/coder\"] (close)" -> "[root] module.this_is_external_module.data.coder_parameter.first_parameter_from_module (expand)"
"[root] provider[\"registry.terraform.io/coder/coder\"] (close)" -> "[root] module.this_is_external_module.data.coder_parameter.second_parameter_from_module (expand)"
"[root] provider[\"registry.terraform.io/coder/coder\"] (close)" -> "[root] module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_first_parameter_from_module (expand)"
"[root] provider[\"registry.terraform.io/coder/coder\"] (close)" -> "[root] module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_second_parameter_from_module (expand)"
"[root] provider[\"registry.terraform.io/hashicorp/null\"] (close)" -> "[root] null_resource.dev (expand)"
"[root] root" -> "[root] module.this_is_external_module (close)"
"[root] root" -> "[root] provider[\"registry.terraform.io/coder/coder\"] (close)"
"[root] root" -> "[root] provider[\"registry.terraform.io/hashicorp/null\"] (close)"
}
}

@ -0,0 +1,504 @@
{
"format_version": "1.2",
"terraform_version": "1.9.8",
"planned_values": {
"root_module": {
"resources": [
{
"address": "coder_agent.dev",
"mode": "managed",
"type": "coder_agent",
"name": "dev",
"provider_name": "registry.terraform.io/coder/coder",
"schema_version": 1,
"values": {
"arch": "arm64",
"auth": "token",
"connection_timeout": 120,
"dir": null,
"env": null,
"metadata": [],
"motd_file": null,
"order": null,
"os": "windows",
"shutdown_script": null,
"startup_script": null,
"startup_script_behavior": "non-blocking",
"troubleshooting_url": null
},
"sensitive_values": {
"display_apps": [],
"metadata": [],
"token": true
}
},
{
"address": "null_resource.dev",
"mode": "managed",
"type": "null_resource",
"name": "dev",
"provider_name": "registry.terraform.io/hashicorp/null",
"schema_version": 0,
"values": {
"triggers": null
},
"sensitive_values": {}
}
]
}
},
"resource_changes": [
{
"address": "coder_agent.dev",
"mode": "managed",
"type": "coder_agent",
"name": "dev",
"provider_name": "registry.terraform.io/coder/coder",
"change": {
"actions": [
"create"
],
"before": null,
"after": {
"arch": "arm64",
"auth": "token",
"connection_timeout": 120,
"dir": null,
"env": null,
"metadata": [],
"motd_file": null,
"order": null,
"os": "windows",
"shutdown_script": null,
"startup_script": null,
"startup_script_behavior": "non-blocking",
"troubleshooting_url": null
},
"after_unknown": {
"display_apps": true,
"id": true,
"init_script": true,
"metadata": [],
"token": true
},
"before_sensitive": false,
"after_sensitive": {
"display_apps": [],
"metadata": [],
"token": true
}
}
},
{
"address": "null_resource.dev",
"mode": "managed",
"type": "null_resource",
"name": "dev",
"provider_name": "registry.terraform.io/hashicorp/null",
"change": {
"actions": [
"create"
],
"before": null,
"after": {
"triggers": null
},
"after_unknown": {
"id": true
},
"before_sensitive": false,
"after_sensitive": {}
}
}
],
"prior_state": {
"format_version": "1.0",
"terraform_version": "1.9.8",
"values": {
"root_module": {
"resources": [
{
"address": "data.coder_parameter.sample",
"mode": "data",
"type": "coder_parameter",
"name": "sample",
"provider_name": "registry.terraform.io/coder/coder",
"schema_version": 0,
"values": {
"default": "ok",
"description": "blah blah",
"display_name": null,
"ephemeral": false,
"icon": null,
"id": "1e5ebd18-fd9e-435e-9b85-d5dded4b2d69",
"mutable": false,
"name": "Sample",
"option": null,
"optional": true,
"order": null,
"type": "string",
"validation": [],
"value": "ok"
},
"sensitive_values": {
"validation": []
}
},
{
"address": "data.coder_workspace_preset.MyFirstProject",
"mode": "data",
"type": "coder_workspace_preset",
"name": "MyFirstProject",
"provider_name": "registry.terraform.io/coder/coder",
"schema_version": 0,
"values": {
"id": "My First Project",
"name": "My First Project",
"parameters": {
"Sample": "A1B2C3"
}
},
"sensitive_values": {
"parameters": {}
}
}
],
"child_modules": [
{
"resources": [
{
"address": "module.this_is_external_module.data.coder_parameter.first_parameter_from_module",
"mode": "data",
"type": "coder_parameter",
"name": "first_parameter_from_module",
"provider_name": "registry.terraform.io/coder/coder",
"schema_version": 0,
"values": {
"default": "abcdef",
"description": "First parameter from module",
"display_name": null,
"ephemeral": false,
"icon": null,
"id": "600375fe-cb06-4d7d-92b6-8e2c93d4d9dd",
"mutable": true,
"name": "First parameter from module",
"option": null,
"optional": true,
"order": null,
"type": "string",
"validation": [],
"value": "abcdef"
},
"sensitive_values": {
"validation": []
}
},
{
"address": "module.this_is_external_module.data.coder_parameter.second_parameter_from_module",
"mode": "data",
"type": "coder_parameter",
"name": "second_parameter_from_module",
"provider_name": "registry.terraform.io/coder/coder",
"schema_version": 0,
"values": {
"default": "ghijkl",
"description": "Second parameter from module",
"display_name": null,
"ephemeral": false,
"icon": null,
"id": "c58f2ba6-9db3-49aa-8795-33fdb18f3e67",
"mutable": true,
"name": "Second parameter from module",
"option": null,
"optional": true,
"order": null,
"type": "string",
"validation": [],
"value": "ghijkl"
},
"sensitive_values": {
"validation": []
}
}
],
"address": "module.this_is_external_module",
"child_modules": [
{
"resources": [
{
"address": "module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_first_parameter_from_module",
"mode": "data",
"type": "coder_parameter",
"name": "child_first_parameter_from_module",
"provider_name": "registry.terraform.io/coder/coder",
"schema_version": 0,
"values": {
"default": "abcdef",
"description": "First parameter from child module",
"display_name": null,
"ephemeral": false,
"icon": null,
"id": "7d212d9b-f6cb-4611-989e-4512d4f86c10",
"mutable": true,
"name": "First parameter from child module",
"option": null,
"optional": true,
"order": null,
"type": "string",
"validation": [],
"value": "abcdef"
},
"sensitive_values": {
"validation": []
}
},
{
"address": "module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_second_parameter_from_module",
"mode": "data",
"type": "coder_parameter",
"name": "child_second_parameter_from_module",
"provider_name": "registry.terraform.io/coder/coder",
"schema_version": 0,
"values": {
"default": "ghijkl",
"description": "Second parameter from child module",
"display_name": null,
"ephemeral": false,
"icon": null,
"id": "6f71825d-4332-4f1c-a8d9-8bc118fa6a45",
"mutable": true,
"name": "Second parameter from child module",
"option": null,
"optional": true,
"order": null,
"type": "string",
"validation": [],
"value": "ghijkl"
},
"sensitive_values": {
"validation": []
}
}
],
"address": "module.this_is_external_module.module.this_is_external_child_module"
}
]
}
]
}
}
},
"configuration": {
"provider_config": {
"coder": {
"name": "coder",
"full_name": "registry.terraform.io/coder/coder",
"version_constraint": "0.22.0"
},
"module.this_is_external_module:docker": {
"name": "docker",
"full_name": "registry.terraform.io/kreuzwerker/docker",
"version_constraint": "~> 2.22",
"module_address": "module.this_is_external_module"
},
"null": {
"name": "null",
"full_name": "registry.terraform.io/hashicorp/null"
}
},
"root_module": {
"resources": [
{
"address": "coder_agent.dev",
"mode": "managed",
"type": "coder_agent",
"name": "dev",
"provider_config_key": "coder",
"expressions": {
"arch": {
"constant_value": "arm64"
},
"os": {
"constant_value": "windows"
}
},
"schema_version": 1
},
{
"address": "null_resource.dev",
"mode": "managed",
"type": "null_resource",
"name": "dev",
"provider_config_key": "null",
"schema_version": 0,
"depends_on": [
"coder_agent.dev"
]
},
{
"address": "data.coder_parameter.sample",
"mode": "data",
"type": "coder_parameter",
"name": "sample",
"provider_config_key": "coder",
"expressions": {
"default": {
"constant_value": "ok"
},
"description": {
"constant_value": "blah blah"
},
"name": {
"constant_value": "Sample"
},
"type": {
"constant_value": "string"
}
},
"schema_version": 0
},
{
"address": "data.coder_workspace_preset.MyFirstProject",
"mode": "data",
"type": "coder_workspace_preset",
"name": "MyFirstProject",
"provider_config_key": "coder",
"expressions": {
"name": {
"constant_value": "My First Project"
},
"parameters": {
"references": [
"data.coder_parameter.sample.name",
"data.coder_parameter.sample"
]
}
},
"schema_version": 0
}
],
"module_calls": {
"this_is_external_module": {
"source": "./external-module",
"module": {
"resources": [
{
"address": "data.coder_parameter.first_parameter_from_module",
"mode": "data",
"type": "coder_parameter",
"name": "first_parameter_from_module",
"provider_config_key": "coder",
"expressions": {
"default": {
"constant_value": "abcdef"
},
"description": {
"constant_value": "First parameter from module"
},
"mutable": {
"constant_value": true
},
"name": {
"constant_value": "First parameter from module"
},
"type": {
"constant_value": "string"
}
},
"schema_version": 0
},
{
"address": "data.coder_parameter.second_parameter_from_module",
"mode": "data",
"type": "coder_parameter",
"name": "second_parameter_from_module",
"provider_config_key": "coder",
"expressions": {
"default": {
"constant_value": "ghijkl"
},
"description": {
"constant_value": "Second parameter from module"
},
"mutable": {
"constant_value": true
},
"name": {
"constant_value": "Second parameter from module"
},
"type": {
"constant_value": "string"
}
},
"schema_version": 0
}
],
"module_calls": {
"this_is_external_child_module": {
"source": "./child-external-module",
"module": {
"resources": [
{
"address": "data.coder_parameter.child_first_parameter_from_module",
"mode": "data",
"type": "coder_parameter",
"name": "child_first_parameter_from_module",
"provider_config_key": "coder",
"expressions": {
"default": {
"constant_value": "abcdef"
},
"description": {
"constant_value": "First parameter from child module"
},
"mutable": {
"constant_value": true
},
"name": {
"constant_value": "First parameter from child module"
},
"type": {
"constant_value": "string"
}
},
"schema_version": 0
},
{
"address": "data.coder_parameter.child_second_parameter_from_module",
"mode": "data",
"type": "coder_parameter",
"name": "child_second_parameter_from_module",
"provider_config_key": "coder",
"expressions": {
"default": {
"constant_value": "ghijkl"
},
"description": {
"constant_value": "Second parameter from child module"
},
"mutable": {
"constant_value": true
},
"name": {
"constant_value": "Second parameter from child module"
},
"type": {
"constant_value": "string"
}
},
"schema_version": 0
}
]
}
}
}
}
}
}
}
},
"timestamp": "2025-02-06T07:28:26Z",
"applyable": true,
"complete": true,
"errored": false
}

@ -0,0 +1,45 @@
digraph {
compound = "true"
newrank = "true"
subgraph "root" {
"[root] coder_agent.dev (expand)" [label = "coder_agent.dev", shape = "box"]
"[root] data.coder_parameter.sample (expand)" [label = "data.coder_parameter.sample", shape = "box"]
"[root] data.coder_workspace_preset.MyFirstProject (expand)" [label = "data.coder_workspace_preset.MyFirstProject", shape = "box"]
"[root] module.this_is_external_module.data.coder_parameter.first_parameter_from_module (expand)" [label = "module.this_is_external_module.data.coder_parameter.first_parameter_from_module", shape = "box"]
"[root] module.this_is_external_module.data.coder_parameter.second_parameter_from_module (expand)" [label = "module.this_is_external_module.data.coder_parameter.second_parameter_from_module", shape = "box"]
"[root] module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_first_parameter_from_module (expand)" [label = "module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_first_parameter_from_module", shape = "box"]
"[root] module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_second_parameter_from_module (expand)" [label = "module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_second_parameter_from_module", shape = "box"]
"[root] null_resource.dev (expand)" [label = "null_resource.dev", shape = "box"]
"[root] provider[\"registry.terraform.io/coder/coder\"]" [label = "provider[\"registry.terraform.io/coder/coder\"]", shape = "diamond"]
"[root] provider[\"registry.terraform.io/hashicorp/null\"]" [label = "provider[\"registry.terraform.io/hashicorp/null\"]", shape = "diamond"]
"[root] coder_agent.dev (expand)" -> "[root] provider[\"registry.terraform.io/coder/coder\"]"
"[root] data.coder_parameter.sample (expand)" -> "[root] provider[\"registry.terraform.io/coder/coder\"]"
"[root] data.coder_workspace_preset.MyFirstProject (expand)" -> "[root] data.coder_parameter.sample (expand)"
"[root] module.this_is_external_module (close)" -> "[root] module.this_is_external_module.data.coder_parameter.first_parameter_from_module (expand)"
"[root] module.this_is_external_module (close)" -> "[root] module.this_is_external_module.data.coder_parameter.second_parameter_from_module (expand)"
"[root] module.this_is_external_module (close)" -> "[root] module.this_is_external_module.module.this_is_external_child_module (close)"
"[root] module.this_is_external_module.data.coder_parameter.first_parameter_from_module (expand)" -> "[root] module.this_is_external_module (expand)"
"[root] module.this_is_external_module.data.coder_parameter.first_parameter_from_module (expand)" -> "[root] provider[\"registry.terraform.io/coder/coder\"]"
"[root] module.this_is_external_module.data.coder_parameter.second_parameter_from_module (expand)" -> "[root] module.this_is_external_module (expand)"
"[root] module.this_is_external_module.data.coder_parameter.second_parameter_from_module (expand)" -> "[root] provider[\"registry.terraform.io/coder/coder\"]"
"[root] module.this_is_external_module.module.this_is_external_child_module (close)" -> "[root] module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_first_parameter_from_module (expand)"
"[root] module.this_is_external_module.module.this_is_external_child_module (close)" -> "[root] module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_second_parameter_from_module (expand)"
"[root] module.this_is_external_module.module.this_is_external_child_module (expand)" -> "[root] module.this_is_external_module (expand)"
"[root] module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_first_parameter_from_module (expand)" -> "[root] module.this_is_external_module.module.this_is_external_child_module (expand)"
"[root] module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_first_parameter_from_module (expand)" -> "[root] provider[\"registry.terraform.io/coder/coder\"]"
"[root] module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_second_parameter_from_module (expand)" -> "[root] module.this_is_external_module.module.this_is_external_child_module (expand)"
"[root] module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_second_parameter_from_module (expand)" -> "[root] provider[\"registry.terraform.io/coder/coder\"]"
"[root] null_resource.dev (expand)" -> "[root] coder_agent.dev (expand)"
"[root] null_resource.dev (expand)" -> "[root] provider[\"registry.terraform.io/hashicorp/null\"]"
"[root] provider[\"registry.terraform.io/coder/coder\"] (close)" -> "[root] coder_agent.dev (expand)"
"[root] provider[\"registry.terraform.io/coder/coder\"] (close)" -> "[root] data.coder_workspace_preset.MyFirstProject (expand)"
"[root] provider[\"registry.terraform.io/coder/coder\"] (close)" -> "[root] module.this_is_external_module.data.coder_parameter.first_parameter_from_module (expand)"
"[root] provider[\"registry.terraform.io/coder/coder\"] (close)" -> "[root] module.this_is_external_module.data.coder_parameter.second_parameter_from_module (expand)"
"[root] provider[\"registry.terraform.io/coder/coder\"] (close)" -> "[root] module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_first_parameter_from_module (expand)"
"[root] provider[\"registry.terraform.io/coder/coder\"] (close)" -> "[root] module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_second_parameter_from_module (expand)"
"[root] provider[\"registry.terraform.io/hashicorp/null\"] (close)" -> "[root] null_resource.dev (expand)"
"[root] root" -> "[root] module.this_is_external_module (close)"
"[root] root" -> "[root] provider[\"registry.terraform.io/coder/coder\"] (close)"
"[root] root" -> "[root] provider[\"registry.terraform.io/hashicorp/null\"] (close)"
}
}

@ -0,0 +1,235 @@
{
"format_version": "1.0",
"terraform_version": "1.9.8",
"values": {
"root_module": {
"resources": [
{
"address": "data.coder_parameter.sample",
"mode": "data",
"type": "coder_parameter",
"name": "sample",
"provider_name": "registry.terraform.io/coder/coder",
"schema_version": 0,
"values": {
"default": "ok",
"description": "blah blah",
"display_name": null,
"ephemeral": false,
"icon": null,
"id": "2919245a-ab45-4d7e-8b12-eab87c8dae93",
"mutable": false,
"name": "Sample",
"option": null,
"optional": true,
"order": null,
"type": "string",
"validation": [],
"value": "ok"
},
"sensitive_values": {
"validation": []
}
},
{
"address": "data.coder_workspace_preset.MyFirstProject",
"mode": "data",
"type": "coder_workspace_preset",
"name": "MyFirstProject",
"provider_name": "registry.terraform.io/coder/coder",
"schema_version": 0,
"values": {
"id": "My First Project",
"name": "My First Project",
"parameters": {
"Sample": "A1B2C3"
}
},
"sensitive_values": {
"parameters": {}
}
},
{
"address": "coder_agent.dev",
"mode": "managed",
"type": "coder_agent",
"name": "dev",
"provider_name": "registry.terraform.io/coder/coder",
"schema_version": 1,
"values": {
"arch": "arm64",
"auth": "token",
"connection_timeout": 120,
"dir": null,
"display_apps": [
{
"port_forwarding_helper": true,
"ssh_helper": true,
"vscode": true,
"vscode_insiders": false,
"web_terminal": true
}
],
"env": null,
"id": "409b5e6b-e062-4597-9d52-e1b9995fbcbc",
"init_script": "",
"metadata": [],
"motd_file": null,
"order": null,
"os": "windows",
"shutdown_script": null,
"startup_script": null,
"startup_script_behavior": "non-blocking",
"token": "4ffba3f0-5f6f-4c81-8cc7-1e85f9585e26",
"troubleshooting_url": null
},
"sensitive_values": {
"display_apps": [
{}
],
"metadata": [],
"token": true
}
},
{
"address": "null_resource.dev",
"mode": "managed",
"type": "null_resource",
"name": "dev",
"provider_name": "registry.terraform.io/hashicorp/null",
"schema_version": 0,
"values": {
"id": "5205838407378573477",
"triggers": null
},
"sensitive_values": {},
"depends_on": [
"coder_agent.dev"
]
}
],
"child_modules": [
{
"resources": [
{
"address": "module.this_is_external_module.data.coder_parameter.first_parameter_from_module",
"mode": "data",
"type": "coder_parameter",
"name": "first_parameter_from_module",
"provider_name": "registry.terraform.io/coder/coder",
"schema_version": 0,
"values": {
"default": "abcdef",
"description": "First parameter from module",
"display_name": null,
"ephemeral": false,
"icon": null,
"id": "754b099d-7ee7-4716-83fa-cd9afc746a1f",
"mutable": true,
"name": "First parameter from module",
"option": null,
"optional": true,
"order": null,
"type": "string",
"validation": [],
"value": "abcdef"
},
"sensitive_values": {
"validation": []
}
},
{
"address": "module.this_is_external_module.data.coder_parameter.second_parameter_from_module",
"mode": "data",
"type": "coder_parameter",
"name": "second_parameter_from_module",
"provider_name": "registry.terraform.io/coder/coder",
"schema_version": 0,
"values": {
"default": "ghijkl",
"description": "Second parameter from module",
"display_name": null,
"ephemeral": false,
"icon": null,
"id": "0a4e4511-d8bd-47b9-bb7a-ffddd09c7da4",
"mutable": true,
"name": "Second parameter from module",
"option": null,
"optional": true,
"order": null,
"type": "string",
"validation": [],
"value": "ghijkl"
},
"sensitive_values": {
"validation": []
}
}
],
"address": "module.this_is_external_module",
"child_modules": [
{
"resources": [
{
"address": "module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_first_parameter_from_module",
"mode": "data",
"type": "coder_parameter",
"name": "child_first_parameter_from_module",
"provider_name": "registry.terraform.io/coder/coder",
"schema_version": 0,
"values": {
"default": "abcdef",
"description": "First parameter from child module",
"display_name": null,
"ephemeral": false,
"icon": null,
"id": "1c981b95-6d26-4222-96e8-6552e43ecb51",
"mutable": true,
"name": "First parameter from child module",
"option": null,
"optional": true,
"order": null,
"type": "string",
"validation": [],
"value": "abcdef"
},
"sensitive_values": {
"validation": []
}
},
{
"address": "module.this_is_external_module.module.this_is_external_child_module.data.coder_parameter.child_second_parameter_from_module",
"mode": "data",
"type": "coder_parameter",
"name": "child_second_parameter_from_module",
"provider_name": "registry.terraform.io/coder/coder",
"schema_version": 0,
"values": {
"default": "ghijkl",
"description": "Second parameter from child module",
"display_name": null,
"ephemeral": false,
"icon": null,
"id": "f4667b4c-217f-494d-9811-7f8b58913c43",
"mutable": true,
"name": "Second parameter from child module",
"option": null,
"optional": true,
"order": null,
"type": "string",
"validation": [],
"value": "ghijkl"
},
"sensitive_values": {
"validation": []
}
}
],
"address": "module.this_is_external_module.module.this_is_external_child_module"
}
]
}
]
}
}
}

@ -1290,6 +1290,7 @@ type CompletedJob_TemplateImport struct {
ExternalAuthProviders []*proto.ExternalAuthProviderResource `protobuf:"bytes,5,rep,name=external_auth_providers,json=externalAuthProviders,proto3" json:"external_auth_providers,omitempty"`
StartModules []*proto.Module `protobuf:"bytes,6,rep,name=start_modules,json=startModules,proto3" json:"start_modules,omitempty"`
StopModules []*proto.Module `protobuf:"bytes,7,rep,name=stop_modules,json=stopModules,proto3" json:"stop_modules,omitempty"`
Presets []*proto.Preset `protobuf:"bytes,8,rep,name=presets,proto3" json:"presets,omitempty"`
}
func (x *CompletedJob_TemplateImport) Reset() {
@ -1373,6 +1374,13 @@ func (x *CompletedJob_TemplateImport) GetStopModules() []*proto.Module {
return nil
}
func (x *CompletedJob_TemplateImport) GetPresets() []*proto.Preset {
if x != nil {
return x.Presets
}
return nil
}
type CompletedJob_TemplateDryRun struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -1556,7 +1564,7 @@ var file_provisionerd_proto_provisionerd_proto_rawDesc = []byte{
0x2e, 0x54, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x69, 0x6e, 0x67, 0x73,
0x1a, 0x10, 0x0a, 0x0e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x6d, 0x70, 0x6f,
0x72, 0x74, 0x1a, 0x10, 0x0a, 0x0e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x44, 0x72,
0x79, 0x52, 0x75, 0x6e, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xd0, 0x08, 0x0a,
0x79, 0x52, 0x75, 0x6e, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xff, 0x08, 0x0a,
0x0c, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x12, 0x15, 0x0a,
0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a,
0x6f, 0x62, 0x49, 0x64, 0x12, 0x54, 0x0a, 0x0f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63,
@ -1587,7 +1595,7 @@ var file_provisionerd_proto_provisionerd_proto_rawDesc = []byte{
0x69, 0x6e, 0x67, 0x73, 0x12, 0x2d, 0x0a, 0x07, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x18,
0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f,
0x6e, 0x65, 0x72, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x07, 0x6d, 0x6f, 0x64, 0x75,
0x6c, 0x65, 0x73, 0x1a, 0xeb, 0x03, 0x0a, 0x0e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,
0x6c, 0x65, 0x73, 0x1a, 0x9a, 0x04, 0x0a, 0x0e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,
0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x3e, 0x0a, 0x0f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f,
0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x15, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x52, 0x65,
@ -1618,108 +1626,111 @@ var file_provisionerd_proto_provisionerd_proto_rawDesc = []byte{
0x70, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x13, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x4d, 0x6f,
0x64, 0x75, 0x6c, 0x65, 0x52, 0x0b, 0x73, 0x74, 0x6f, 0x70, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65,
0x73, 0x1a, 0x74, 0x0a, 0x0e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x44, 0x72, 0x79,
0x52, 0x75, 0x6e, 0x12, 0x33, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73,
0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69,
0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x72,
0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x07, 0x6d, 0x6f, 0x64, 0x75,
0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x76,
0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x07,
0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22,
0xb0, 0x01, 0x0a, 0x03, 0x4c, 0x6f, 0x67, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63,
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73,
0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x4c, 0x6f, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65,
0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65,
0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73,
0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x05,
0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64,
0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74,
0x65, 0x64, 0x41, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20,
0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75,
0x74, 0x70, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70,
0x75, 0x74, 0x22, 0xa6, 0x03, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x12, 0x25,
0x0a, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70,
0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x4c, 0x6f, 0x67, 0x52,
0x04, 0x6c, 0x6f, 0x67, 0x73, 0x12, 0x4c, 0x0a, 0x12, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74,
0x65, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e,
0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65,
0x52, 0x11, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62,
0x6c, 0x65, 0x73, 0x12, 0x4c, 0x0a, 0x14, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x72, 0x69,
0x61, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e,
0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x12, 0x75,
0x73, 0x65, 0x72, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65,
0x73, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x64, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28,
0x0c, 0x52, 0x06, 0x72, 0x65, 0x61, 0x64, 0x6d, 0x65, 0x12, 0x58, 0x0a, 0x0e, 0x77, 0x6f, 0x72,
0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x31, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64,
0x73, 0x12, 0x2d, 0x0a, 0x07, 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x73, 0x18, 0x08, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72,
0x2e, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x52, 0x07, 0x70, 0x72, 0x65, 0x73, 0x65, 0x74, 0x73,
0x1a, 0x74, 0x0a, 0x0e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x44, 0x72, 0x79, 0x52,
0x75, 0x6e, 0x12, 0x33, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18,
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f,
0x6e, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x72, 0x65,
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x07, 0x6d, 0x6f, 0x64, 0x75, 0x6c,
0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69,
0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x07, 0x6d,
0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xb0,
0x01, 0x0a, 0x03, 0x4c, 0x6f, 0x67, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69,
0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x4c, 0x6f, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52,
0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c,
0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69,
0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x05, 0x6c,
0x65, 0x76, 0x65, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f,
0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,
0x64, 0x41, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01,
0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74,
0x70, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75,
0x74, 0x22, 0xa6, 0x03, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f, 0x62, 0x49, 0x64, 0x12, 0x25, 0x0a,
0x04, 0x6c, 0x6f, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x72,
0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x4c, 0x6f, 0x67, 0x52, 0x04,
0x6c, 0x6f, 0x67, 0x73, 0x12, 0x4c, 0x0a, 0x12, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,
0x5f, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x54,
0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x52,
0x11, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c,
0x65, 0x73, 0x12, 0x4c, 0x0a, 0x14, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x72, 0x69, 0x61,
0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x2e, 0x56,
0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x12, 0x75, 0x73,
0x65, 0x72, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73,
0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x64, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c,
0x52, 0x06, 0x72, 0x65, 0x61, 0x64, 0x6d, 0x65, 0x12, 0x58, 0x0a, 0x0e, 0x77, 0x6f, 0x72, 0x6b,
0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x31, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e,
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e,
0x74, 0x72, 0x79, 0x52, 0x0d, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x61,
0x67, 0x73, 0x1a, 0x40, 0x0a, 0x12, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54,
0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x3a, 0x02, 0x38, 0x01, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, 0x7a, 0x0a, 0x11, 0x55, 0x70,
0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x1a, 0x0a, 0x08, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x08, 0x52, 0x08, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x65, 0x64, 0x12, 0x43, 0x0a, 0x0f, 0x76,
0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e,
0x65, 0x72, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65,
0x52, 0x0e, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73,
0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x22, 0x4a, 0x0a, 0x12, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74,
0x51, 0x75, 0x6f, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06,
0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a, 0x6f,
0x62, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x5f, 0x63, 0x6f, 0x73,
0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x43, 0x6f,
0x73, 0x74, 0x22, 0x68, 0x0a, 0x13, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x51, 0x75, 0x6f, 0x74,
0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x6b, 0x18,
0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x02, 0x6f, 0x6b, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x72, 0x65,
0x64, 0x69, 0x74, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x64, 0x18, 0x02, 0x20,
0x01, 0x28, 0x05, 0x52, 0x0f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x73,
0x75, 0x6d, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x18, 0x03,
0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x22, 0x0f, 0x0a, 0x0d,
0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x41, 0x63, 0x71, 0x75, 0x69, 0x72, 0x65, 0x2a, 0x34, 0x0a,
0x09, 0x4c, 0x6f, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x50, 0x52,
0x4f, 0x56, 0x49, 0x53, 0x49, 0x4f, 0x4e, 0x45, 0x52, 0x5f, 0x44, 0x41, 0x45, 0x4d, 0x4f, 0x4e,
0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x53, 0x49, 0x4f, 0x4e, 0x45,
0x52, 0x10, 0x01, 0x32, 0xc5, 0x03, 0x0a, 0x11, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f,
0x6e, 0x65, 0x72, 0x44, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x0a, 0x41, 0x63, 0x71,
0x75, 0x69, 0x72, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73,
0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x19, 0x2e, 0x70,
0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x41, 0x63, 0x71, 0x75,
0x69, 0x72, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x22, 0x03, 0x88, 0x02, 0x01, 0x12, 0x52, 0x0a, 0x14,
0x41, 0x63, 0x71, 0x75, 0x69, 0x72, 0x65, 0x4a, 0x6f, 0x62, 0x57, 0x69, 0x74, 0x68, 0x43, 0x61,
0x6e, 0x63, 0x65, 0x6c, 0x12, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e,
0x65, 0x72, 0x64, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x41, 0x63, 0x71, 0x75, 0x69, 0x72,
0x65, 0x1a, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64,
0x2e, 0x41, 0x63, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x28, 0x01, 0x30, 0x01,
0x12, 0x52, 0x0a, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x12,
0x20, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x43,
0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x21, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64,
0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x09, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f,
0x62, 0x12, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64,
0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x61, 0x67, 0x73, 0x45,
0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54,
0x61, 0x67, 0x73, 0x1a, 0x40, 0x0a, 0x12, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65,
0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76,
0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x3a, 0x02, 0x38, 0x01, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, 0x7a, 0x0a, 0x11, 0x55,
0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x08, 0x52, 0x08, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x65, 0x64, 0x12, 0x43, 0x0a, 0x0f,
0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18,
0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f,
0x6e, 0x65, 0x72, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75,
0x65, 0x52, 0x0e, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65,
0x73, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x22, 0x4a, 0x0a, 0x12, 0x43, 0x6f, 0x6d, 0x6d, 0x69,
0x74, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a,
0x06, 0x6a, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6a,
0x6f, 0x62, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x5f, 0x63, 0x6f,
0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x64, 0x61, 0x69, 0x6c, 0x79, 0x43,
0x6f, 0x73, 0x74, 0x22, 0x68, 0x0a, 0x13, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x51, 0x75, 0x6f,
0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x6b,
0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x02, 0x6f, 0x6b, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x72,
0x65, 0x64, 0x69, 0x74, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x64, 0x18, 0x02,
0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x73, 0x43, 0x6f, 0x6e,
0x73, 0x75, 0x6d, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x18,
0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x22, 0x0f, 0x0a,
0x0d, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x41, 0x63, 0x71, 0x75, 0x69, 0x72, 0x65, 0x2a, 0x34,
0x0a, 0x09, 0x4c, 0x6f, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x50,
0x52, 0x4f, 0x56, 0x49, 0x53, 0x49, 0x4f, 0x4e, 0x45, 0x52, 0x5f, 0x44, 0x41, 0x45, 0x4d, 0x4f,
0x4e, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x53, 0x49, 0x4f, 0x4e,
0x45, 0x52, 0x10, 0x01, 0x32, 0xc5, 0x03, 0x0a, 0x11, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69,
0x6f, 0x6e, 0x65, 0x72, 0x44, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x0a, 0x41, 0x63,
0x71, 0x75, 0x69, 0x72, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69,
0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x19, 0x2e,
0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x41, 0x63, 0x71,
0x75, 0x69, 0x72, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x22, 0x03, 0x88, 0x02, 0x01, 0x12, 0x52, 0x0a,
0x14, 0x41, 0x63, 0x71, 0x75, 0x69, 0x72, 0x65, 0x4a, 0x6f, 0x62, 0x57, 0x69, 0x74, 0x68, 0x43,
0x61, 0x6e, 0x63, 0x65, 0x6c, 0x12, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f,
0x6e, 0x65, 0x72, 0x64, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x41, 0x63, 0x71, 0x75, 0x69,
0x72, 0x65, 0x1a, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72,
0x64, 0x2e, 0x41, 0x63, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x28, 0x01, 0x30,
0x01, 0x12, 0x52, 0x0a, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x61,
0x12, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e,
0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x21, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72,
0x64, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4c, 0x0a, 0x09, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a,
0x6f, 0x62, 0x12, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72,
0x64, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72,
0x64, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x07, 0x46, 0x61, 0x69, 0x6c, 0x4a, 0x6f, 0x62, 0x12, 0x17,
0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x46, 0x61,
0x69, 0x6c, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x1a, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73,
0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x3e, 0x0a, 0x0b,
0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x1a, 0x2e, 0x70, 0x72,
0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6c,
0x65, 0x74, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x1a, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73,
0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, 0x2e, 0x5a, 0x2c,
0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x72,
0x2f, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2f, 0x76, 0x32, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73,
0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
0x74, 0x1a, 0x1f, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64,
0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x12, 0x37, 0x0a, 0x07, 0x46, 0x61, 0x69, 0x6c, 0x4a, 0x6f, 0x62, 0x12, 0x17, 0x2e,
0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x46, 0x61, 0x69,
0x6c, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x1a, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69,
0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x3e, 0x0a, 0x0b, 0x43,
0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x4a, 0x6f, 0x62, 0x12, 0x1a, 0x2e, 0x70, 0x72, 0x6f,
0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65,
0x74, 0x65, 0x64, 0x4a, 0x6f, 0x62, 0x1a, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69,
0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, 0x2e, 0x5a, 0x2c, 0x67,
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x72, 0x2f,
0x63, 0x6f, 0x64, 0x65, 0x72, 0x2f, 0x76, 0x32, 0x2f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69,
0x6f, 0x6e, 0x65, 0x72, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
}
var (
@ -1770,6 +1781,7 @@ var file_provisionerd_proto_provisionerd_proto_goTypes = []interface{}{
(*proto.Module)(nil), // 30: provisioner.Module
(*proto.RichParameter)(nil), // 31: provisioner.RichParameter
(*proto.ExternalAuthProviderResource)(nil), // 32: provisioner.ExternalAuthProviderResource
(*proto.Preset)(nil), // 33: provisioner.Preset
}
var file_provisionerd_proto_provisionerd_proto_depIdxs = []int32{
11, // 0: provisionerd.AcquiredJob.workspace_build:type_name -> provisionerd.AcquiredJob.WorkspaceBuild
@ -1808,25 +1820,26 @@ var file_provisionerd_proto_provisionerd_proto_depIdxs = []int32{
32, // 33: provisionerd.CompletedJob.TemplateImport.external_auth_providers:type_name -> provisioner.ExternalAuthProviderResource
30, // 34: provisionerd.CompletedJob.TemplateImport.start_modules:type_name -> provisioner.Module
30, // 35: provisionerd.CompletedJob.TemplateImport.stop_modules:type_name -> provisioner.Module
29, // 36: provisionerd.CompletedJob.TemplateDryRun.resources:type_name -> provisioner.Resource
30, // 37: provisionerd.CompletedJob.TemplateDryRun.modules:type_name -> provisioner.Module
1, // 38: provisionerd.ProvisionerDaemon.AcquireJob:input_type -> provisionerd.Empty
10, // 39: provisionerd.ProvisionerDaemon.AcquireJobWithCancel:input_type -> provisionerd.CancelAcquire
8, // 40: provisionerd.ProvisionerDaemon.CommitQuota:input_type -> provisionerd.CommitQuotaRequest
6, // 41: provisionerd.ProvisionerDaemon.UpdateJob:input_type -> provisionerd.UpdateJobRequest
3, // 42: provisionerd.ProvisionerDaemon.FailJob:input_type -> provisionerd.FailedJob
4, // 43: provisionerd.ProvisionerDaemon.CompleteJob:input_type -> provisionerd.CompletedJob
2, // 44: provisionerd.ProvisionerDaemon.AcquireJob:output_type -> provisionerd.AcquiredJob
2, // 45: provisionerd.ProvisionerDaemon.AcquireJobWithCancel:output_type -> provisionerd.AcquiredJob
9, // 46: provisionerd.ProvisionerDaemon.CommitQuota:output_type -> provisionerd.CommitQuotaResponse
7, // 47: provisionerd.ProvisionerDaemon.UpdateJob:output_type -> provisionerd.UpdateJobResponse
1, // 48: provisionerd.ProvisionerDaemon.FailJob:output_type -> provisionerd.Empty
1, // 49: provisionerd.ProvisionerDaemon.CompleteJob:output_type -> provisionerd.Empty
44, // [44:50] is the sub-list for method output_type
38, // [38:44] is the sub-list for method input_type
38, // [38:38] is the sub-list for extension type_name
38, // [38:38] is the sub-list for extension extendee
0, // [0:38] is the sub-list for field type_name
33, // 36: provisionerd.CompletedJob.TemplateImport.presets:type_name -> provisioner.Preset
29, // 37: provisionerd.CompletedJob.TemplateDryRun.resources:type_name -> provisioner.Resource
30, // 38: provisionerd.CompletedJob.TemplateDryRun.modules:type_name -> provisioner.Module
1, // 39: provisionerd.ProvisionerDaemon.AcquireJob:input_type -> provisionerd.Empty
10, // 40: provisionerd.ProvisionerDaemon.AcquireJobWithCancel:input_type -> provisionerd.CancelAcquire
8, // 41: provisionerd.ProvisionerDaemon.CommitQuota:input_type -> provisionerd.CommitQuotaRequest
6, // 42: provisionerd.ProvisionerDaemon.UpdateJob:input_type -> provisionerd.UpdateJobRequest
3, // 43: provisionerd.ProvisionerDaemon.FailJob:input_type -> provisionerd.FailedJob
4, // 44: provisionerd.ProvisionerDaemon.CompleteJob:input_type -> provisionerd.CompletedJob
2, // 45: provisionerd.ProvisionerDaemon.AcquireJob:output_type -> provisionerd.AcquiredJob
2, // 46: provisionerd.ProvisionerDaemon.AcquireJobWithCancel:output_type -> provisionerd.AcquiredJob
9, // 47: provisionerd.ProvisionerDaemon.CommitQuota:output_type -> provisionerd.CommitQuotaResponse
7, // 48: provisionerd.ProvisionerDaemon.UpdateJob:output_type -> provisionerd.UpdateJobResponse
1, // 49: provisionerd.ProvisionerDaemon.FailJob:output_type -> provisionerd.Empty
1, // 50: provisionerd.ProvisionerDaemon.CompleteJob:output_type -> provisionerd.Empty
45, // [45:51] is the sub-list for method output_type
39, // [39:45] is the sub-list for method input_type
39, // [39:39] is the sub-list for extension type_name
39, // [39:39] is the sub-list for extension extendee
0, // [0:39] is the sub-list for field type_name
}
func init() { file_provisionerd_proto_provisionerd_proto_init() }

@ -84,6 +84,7 @@ message CompletedJob {
repeated provisioner.ExternalAuthProviderResource external_auth_providers = 5;
repeated provisioner.Module start_modules = 6;
repeated provisioner.Module stop_modules = 7;
repeated provisioner.Preset presets = 8;
}
message TemplateDryRun {
repeated provisioner.Resource resources = 1;

@ -590,6 +590,7 @@ func (r *Runner) runTemplateImport(ctx context.Context) (*proto.CompletedJob, *p
ExternalAuthProviders: startProvision.ExternalAuthProviders,
StartModules: startProvision.Modules,
StopModules: stopProvision.Modules,
Presets: startProvision.Presets,
},
},
}, nil
@ -650,6 +651,7 @@ type templateImportProvision struct {
Parameters []*sdkproto.RichParameter
ExternalAuthProviders []*sdkproto.ExternalAuthProviderResource
Modules []*sdkproto.Module
Presets []*sdkproto.Preset
}
// Performs a dry-run provision when importing a template.
@ -742,6 +744,7 @@ func (r *Runner) runTemplateImportProvisionWithRichParameters(
Parameters: c.Parameters,
ExternalAuthProviders: c.ExternalAuthProviders,
Modules: c.Modules,
Presets: c.Presets,
}, nil
default:
return nil, xerrors.Errorf("invalid message type %q received from provisioner",

File diff suppressed because it is too large Load Diff

@ -57,6 +57,17 @@ message RichParameterValue {
string value = 2;
}
// Preset represents a set of preset parameters for a template version.
message Preset {
string name = 1;
repeated PresetParameter parameters = 2;
}
message PresetParameter {
string name = 1;
string value = 2;
}
// VariableValue holds the key/value mapping of a Terraform variable.
message VariableValue {
string name = 1;
@ -303,6 +314,7 @@ message PlanComplete {
repeated ExternalAuthProviderResource external_auth_providers = 4;
repeated Timing timings = 6;
repeated Module modules = 7;
repeated Preset presets = 8;
}
// ApplyRequest asks the provisioner to apply the changes. Apply MUST be preceded by a successful plan request/response

@ -579,6 +579,7 @@ const createTemplateVersionTar = async (
parameters: response.apply?.parameters ?? [],
externalAuthProviders: response.apply?.externalAuthProviders ?? [],
timings: response.apply?.timings ?? [],
presets: [],
},
};
});
@ -699,6 +700,7 @@ const createTemplateVersionTar = async (
externalAuthProviders: [],
timings: [],
modules: [],
presets: [],
...response.plan,
} as PlanComplete;
response.plan.resources = response.plan.resources?.map(fillResource);

@ -94,6 +94,17 @@ export interface RichParameterValue {
value: string;
}
/** Preset represents a set of preset parameters for a template version. */
export interface Preset {
name: string;
parameters: PresetParameter[];
}
export interface PresetParameter {
name: string;
value: string;
}
/** VariableValue holds the key/value mapping of a Terraform variable. */
export interface VariableValue {
name: string;
@ -322,6 +333,7 @@ export interface PlanComplete {
externalAuthProviders: ExternalAuthProviderResource[];
timings: Timing[];
modules: Module[];
presets: Preset[];
}
/**
@ -485,6 +497,30 @@ export const RichParameterValue = {
},
};
export const Preset = {
encode(message: Preset, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.name !== "") {
writer.uint32(10).string(message.name);
}
for (const v of message.parameters) {
PresetParameter.encode(v!, writer.uint32(18).fork()).ldelim();
}
return writer;
},
};
export const PresetParameter = {
encode(message: PresetParameter, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.name !== "") {
writer.uint32(10).string(message.name);
}
if (message.value !== "") {
writer.uint32(18).string(message.value);
}
return writer;
},
};
export const VariableValue = {
encode(message: VariableValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.name !== "") {
@ -1018,6 +1054,9 @@ export const PlanComplete = {
for (const v of message.modules) {
Module.encode(v!, writer.uint32(58).fork()).ldelim();
}
for (const v of message.presets) {
Preset.encode(v!, writer.uint32(66).fork()).ldelim();
}
return writer;
},
};