@@ -106,7 +106,7 @@ func upsert(
106
106
paramsPath string ,
107
107
cliTags map [string ]string ,
108
108
devPluginPath string ,
109
- env string ,
109
+ envName string ,
110
110
generateDefaultOutputs bool ,
111
111
capabilities []* string ,
112
112
confirm bool ,
@@ -159,11 +159,11 @@ func upsert(
159
159
paramMap [key ] = value
160
160
}
161
161
162
- if env , ok := manifestFile .Environments [env ]; ok {
162
+ if env , ok := manifestFile .Environments [envName ]; ok {
163
163
if ! env .IsWhitelistedAccount (acctID ) {
164
164
printer .Fatal (
165
- fmt .Errorf ("Account %s is not allowed for environment %s" , acctID , env ),
166
- "Use whitelisted account, or add account to environment accounts in kombustion.yaml" ,
165
+ fmt .Errorf ("Account %s is not allowed for environment %s" , acctID , envName ),
166
+ fmt . Sprintf ( "Use whitelisted account, or add account %s to environment accounts in kombustion.yaml" , acctID ) ,
167
167
"" ,
168
168
)
169
169
}
@@ -173,7 +173,7 @@ func upsert(
173
173
if tags == nil {
174
174
tags = make (map [string ]string )
175
175
}
176
- if env , ok := manifestFile .Environments [env ]; ok {
176
+ if env , ok := manifestFile .Environments [envName ]; ok {
177
177
for key , value := range env .Tags {
178
178
tags [key ] = value
179
179
}
@@ -187,7 +187,7 @@ func upsert(
187
187
generateParams := cloudformation.GenerateParams {
188
188
ObjectStore : objectStore ,
189
189
Filename : templatePath ,
190
- Env : env ,
190
+ Env : envName ,
191
191
GenerateDefaultOutputs : generateDefaultOutputs || manifestFile .GenerateDefaultOutputs ,
192
192
ParamMap : paramMap ,
193
193
Plugins : loadedPlugins ,
@@ -196,14 +196,14 @@ func upsert(
196
196
// CloudFormation Stack parameters
197
197
var parameters []* awsCF.Parameter
198
198
199
- fullStackName := cloudformation .GetStackName (manifestFile , templatePath , env , stackName )
199
+ fullStackName := cloudformation .GetStackName (manifestFile , templatePath , envName , stackName )
200
200
201
201
printer .Progress ("Upserting template" )
202
202
203
203
// FIXME - this previously looked for a --url param to use a template in
204
204
// S3. This should probably be reimplemented around an S3ObjectStore
205
205
templateBody , cfYaml := tasks .GenerateYamlTemplate (generateParams )
206
- parameters = cloudformation .ResolveParameters (env , paramMap , cfYaml , manifestFile )
206
+ parameters = cloudformation .ResolveParameters (envName , paramMap , cfYaml , manifestFile )
207
207
208
208
tasks .UpsertStackBody (
209
209
templateBody ,
0 commit comments