@@ -48,31 +48,42 @@ func (t *TerraformAdmin) NewServer(userConfig legacy.UserConfig, config legacy.C
48
48
SslCertFile : userConfig .SSLCertFile ,
49
49
SslKeyFile : userConfig .SSLKeyFile ,
50
50
},
51
- // we need the servercfg stuff, see setAtlantisURL
51
+ // we need the servercfg stuff, see setAtlantisURL() TODO: is this true?
52
52
ServerCfg : neptune.ServerConfig {
53
53
URL : parsedURL ,
54
54
Version : config .AtlantisVersion ,
55
55
Port : userConfig .Port ,
56
56
},
57
+ // we need the terraformcfg stuff, since we need terraformActivities
57
58
TerraformCfg : neptune.TerraformConfig {
58
59
DefaultVersion : userConfig .DefaultTFVersion ,
59
60
DownloadURL : userConfig .TFDownloadURL ,
60
61
LogFilters : globalCfg .TerraformLogFilter ,
61
62
},
63
+ // also passed to terraform activities, even though we don't need conf test OPA stuff
64
+ // TODO: But we have to introduce branching if we remove this...
62
65
ValidationConfig : neptune.ValidationConfig {
63
66
DefaultVersion : globalCfg .PolicySets .Version ,
64
67
Policies : globalCfg .PolicySets ,
65
68
},
66
- DeploymentConfig : globalCfg .PersistenceConfig .Deployments ,
67
- DataDir : userConfig .DataDir ,
68
- TemporalCfg : globalCfg .Temporal ,
69
- GithubCfg : globalCfg .Github ,
70
- App : appConfig ,
71
- CtxLogger : ctxLogger ,
72
- StatsNamespace : userConfig .StatsNamespace ,
73
- Metrics : globalCfg .Metrics ,
74
- LyftAuditJobsSnsTopicArn : userConfig .LyftAuditJobsSnsTopicArn ,
75
- RevisionSetter : globalCfg .RevisionSetter ,
69
+
70
+ // Do not need deployment config
71
+ // do need datadir, we will save the archive there
72
+ DataDir : userConfig .DataDir ,
73
+ // do need temporalconfig since we use temporal
74
+ TemporalCfg : globalCfg .Temporal ,
75
+ // do need githubcfg, since we use github to get the archive
76
+ GithubCfg : globalCfg .Github ,
77
+ // same as above
78
+ App : appConfig ,
79
+ // we do need logging
80
+ CtxLogger : ctxLogger ,
81
+ // we do need stats
82
+ StatsNamespace : userConfig .StatsNamespace ,
83
+ // we do need metrics
84
+ Metrics : globalCfg .Metrics ,
85
+ // no SnsTopicArn since we don't use the auditing
86
+ // no revision setter
76
87
}
77
88
return terraformadmin .NewServer (cfg )
78
89
}
0 commit comments