- Notifications
You must be signed in to change notification settings - Fork1.1k
feat: persist prebuild definitions on template import#16951
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes from1 commit
5ecc277bc5f4f448c5372b16d1262c255428e491d8514fdbf390a1fd07e9613a07c2b2300e80fb7882378122595bfb7c286639167769ae1de7e9c2739360478bdcafb412d19851773ec23773c2bc3ff44baa3076ed14fb33cc74fbfc32154d7b4ec4e8b53f79df6554ccc309eee1f16ad040ddd83a6722cd707100f3bda0a7c7cd297cc4ff4d59039205d6afe489e1b1b2968620470e46fc18897b9c8cee189a0b692c0e5f747db03166a42aa6b490bc4e7d2f167b928fd34ab7a8ec49a64d661865998bc787cd2bd38603097f9c34cfdd6f4a34d528d9cd45f870d7e18ad9314667171a26c094bf4ab53a84b1bb6ed4121e8b15022312f414540a555c41ba9d09b75761e86f61419df06589221b15b97add656a7508b244e1f585d7d4f1b943f82b95d8de71a87933a798cfa1dc87f457c17fcdFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -468,3 +468,5 @@ require ( | ||
| kernel.org/pub/linux/libs/security/libcap/psx v1.2.73 // indirect | ||
| sigs.k8s.io/yaml v1.4.0 // indirect | ||
| ) | ||
SasSwart marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| replace github.com/coder/terraform-provider-coder/v2 => github.com/coder/terraform-provider-coder/v2 v2.1.4-0.20250211100915-129c295afed8 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -853,6 +853,17 @@ func ConvertState(ctx context.Context, modules []*tfjson.StateModule, rawGraph s | ||
| Name: preset.Name, | ||
| Parameters: presetParameters, | ||
| } | ||
| if len(preset.Prebuild) > 1 { | ||
SasSwart marked this conversation as resolved. OutdatedShow resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
| // The provider template schema should prevent this, but we're being defensive here. | ||
| logger.Info(ctx, "coder_workspace_preset has more than 1 prebuild, only using the first one", slog.F("name", preset.Name)) | ||
| } | ||
| if len(preset.Prebuild) == 1 { | ||
| protoPreset.Prebuild = &proto.Prebuild{ | ||
| Instances: int32(preset.Prebuild[0].Instances), | ||
| } | ||
| } | ||
| if slice.Contains(duplicatedPresetNames, preset.Name) { | ||
| duplicatedPresetNames = append(duplicatedPresetNames, preset.Name) | ||
| } | ||
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.