@@ -89,6 +89,87 @@ func dataSourceRegistry() *schema.Resource {
8989 Optional : true ,
9090 Computed : true ,
9191 },
92+ "lastupdate" : {
93+ Type : schema .TypeInt ,
94+ Description : "The last time the registry was modified in UNIX time" ,
95+ Optional : true ,
96+ Computed : true ,
97+ },
98+ "advanced_settings_cleanup" : {
99+ Type : schema .TypeBool ,
100+ Description : "Automatically clean up that don't match the pull criteria" ,
101+ Optional : true ,
102+ },
103+ "always_pull_patterns" : {
104+ Type : schema .TypeList ,
105+ Description : "List of image patterns to pull always" ,
106+ Optional : true ,
107+ Elem : & schema.Schema {
108+ Type : schema .TypeString ,
109+ },
110+ },
111+ "pull_image_tag_pattern" : {
112+ Type : schema .TypeList ,
113+ Description : "List of image tags patterns to pull" ,
114+ Optional : true ,
115+ Elem : & schema.Schema {
116+ Type : schema .TypeString ,
117+ },
118+ },
119+ "pull_repo_patterns_excluded" : {
120+ Type : schema .TypeList ,
121+ Description : "List of image patterns to exclude" ,
122+ Optional : true ,
123+ Elem : & schema.Schema {
124+ Type : schema .TypeString ,
125+ },
126+ },
127+ "registry_scan_timeout" : {
128+ Type : schema .TypeInt ,
129+ Description : "Registry scan timeout in Minutes" ,
130+ Optional : true ,
131+ },
132+ "webhook" : {
133+ Type : schema .TypeSet ,
134+ Optional : true ,
135+ Description : "When enabled, registry events are sent to the given Aqua webhook url" ,
136+ Elem : & schema.Resource {
137+ Schema : map [string ]* schema.Schema {
138+ "enabled" : {
139+ Type : schema .TypeBool ,
140+ Optional : true ,
141+ },
142+ "url" : {
143+ Type : schema .TypeString ,
144+ Optional : true ,
145+ },
146+ "auth_token" : {
147+ Type : schema .TypeString ,
148+ Optional : true ,
149+ },
150+ "un_quarantine" : {
151+ Type : schema .TypeBool ,
152+ Optional : true ,
153+ },
154+ },
155+ },
156+ },
157+ "options" : {
158+ Type : schema .TypeList ,
159+ Optional : true ,
160+ Elem : & schema.Resource {
161+ Schema : map [string ]* schema.Schema {
162+ "option" : {
163+ Type : schema .TypeString ,
164+ Optional : true ,
165+ },
166+ "value" : {
167+ Type : schema .TypeString ,
168+ Optional : true ,
169+ },
170+ },
171+ },
172+ },
92173 "scanner_type" : {
93174 Type : schema .TypeString ,
94175 Description : "Scanner type" ,
@@ -136,7 +217,15 @@ func dataRegistryRead(d *schema.ResourceData, m interface{}) error {
136217 d .Set ("auto_pull_time" , reg .AutoPullTime )
137218 d .Set ("auto_pull_interval" , reg .AutoPullInterval )
138219 d .Set ("auto_cleanup" , reg .AutoCleanUp )
220+ d .Set ("lastupdate" , reg .Lastupdate )
139221 d .Set ("scanner_type" , reg .ScannerType )
222+ d .Set ("advanced_settings_cleanup" , reg .AdvancedSettingsCleanup )
223+ d .Set ("always_pull_patterns" , reg .AlwaysPullPatterns )
224+ d .Set ("pull_image_tag_pattern" , reg .PullImageTagPattern )
225+ d .Set ("registry_scan_timeout" , reg .RegistryScanTimeout )
226+ d .Set ("pull_repo_patterns_excluded" , reg .PullRepoPatternsExcluded )
227+ d .Set ("options" , flattenoptions (reg .Options ))
228+ d .Set ("webhook" , flattenwebhook (reg .Webhook ))
140229 d .Set ("prefixes" , convertStringArr (prefixes ))
141230 scannerType := d .Get ("scanner_type" ).(string )
142231 if scannerType == "specific" {
0 commit comments