@@ -39,10 +39,11 @@ func processDeployment(
3939
4040func createDeploymentRequestBody (systemID uuid.UUID , deployment Deployment ) api.CreateDeploymentJSONBody {
4141 return api.CreateDeploymentJSONBody {
42- SystemId : systemID ,
43- Slug : deployment .Slug ,
44- Name : deployment .Name ,
45- Description : deployment .Description ,
42+ SystemId : systemID ,
43+ Slug : deployment .Slug ,
44+ Name : deployment .Name ,
45+ Description : deployment .Description ,
46+ ResourceSelector : deployment .ResourceSelector ,
4647 }
4748}
4849
@@ -82,14 +83,13 @@ func processEnvironment(
8283 defer environmentWg .Done ()
8384
8485 body := api.CreateEnvironmentJSONRequestBody {
85- SystemId : systemID .String (),
86- Name : environment .Name ,
87- Description : & environment .Description ,
86+ SystemId : systemID .String (),
87+ Name : environment .Name ,
88+ Description : environment .Description ,
89+ ResourceSelector : environment .ResourceSelector ,
90+ Metadata : environment .Metadata ,
8891 }
8992
90- if environment .ResourceSelector != nil {
91- body .ResourceSelector = environment .ResourceSelector
92- }
9393 _ , err := client .CreateEnvironmentWithResponse (ctx , body )
9494 if err != nil {
9595 log .Error ("Failed to create environment" , "name" , environment .Name , "error" , err )
0 commit comments