Skip to content

Commit

Permalink
added resource env variables to task created in run cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
numcys authored and nightfury1204 committed Aug 22, 2024
1 parent 5c54672 commit b89d969
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion provider/aws/processes.go
Original file line number Diff line number Diff line change
Expand Up @@ -1123,7 +1123,12 @@ func (p *Provider) generateTaskDefinition2(app, service string, opts structs.Pro
return nil, err
}

senv[fmt.Sprintf("%s_URL", strings.Replace(strings.ToUpper(r), "-", "_", -1))] = stackOutputs(rs)["Url"]
ResourceEnvVariables := map[string]string{"URL":"Url","NAME":"Name","HOST":"Host","PASS":"Pass","PORT":"Port","USER":"User"}
ResourceName := strings.Replace(strings.ToUpper(r), "-", "_", -1)

for k,v := range ResourceEnvVariables{
senv[fmt.Sprintf("%s_%s", ResourceName, k)] = stackOutputs(rs)[v]
}
}
}
}
Expand Down

0 comments on commit b89d969

Please sign in to comment.