Skip to content

Commit e72c4ad

Browse files
authored
Merge pull request #249 from KoppulaRajender/integration_reg_fix
fix: registry_integration and readme files
2 parents 17f93e6 + f24826c commit e72c4ad

File tree

14 files changed

+436
-186
lines changed

14 files changed

+436
-186
lines changed

DEVELOPMENT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ In order to test the provider installed locally, the provider block will have to
5555
terraform {
5656
required_providers {
5757
aquasec = {
58-
version = "0.8.20"
58+
version = "0.8.26"
5959
source = "terraform-provider-aquasec/aquasec/aquasec"
6060
}
6161
}

GNUmakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ HOSTNAME := github.com
66
NAMESPACE := aquasec
77
NAME := aquasec
88
BINARY := terraform-provider-${NAME}
9-
VERSION := 0.8.25
9+
VERSION := 0.8.26
1010
OS_ARCH := $(shell go env GOOS)_$(shell go env GOARCH)
1111

1212
default: build

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,12 @@ The provider lets you declaratively define the configuration for your Aqua Enter
2121

2222
## Contents
2323

24-
* [Requirements](#requirements)
25-
* [Using the Aquasec provider](#Using_the_Aquasec_provider)
26-
* [Contributing](#contributing)
24+
- [Aquasec Provider for Terraform](#aquasec-provider-for-terraform)
25+
- [Contents](#contents)
26+
- [Requirements](#requirements)
27+
- [Using the Aquasec provider](#using-the-aquasec-provider)
28+
- [Using the Aquasec provider SaaS solution](#using-the-aquasec-provider-saas-solution)
29+
- [Contributing](#contributing)
2730

2831

2932
## Requirements
@@ -40,7 +43,7 @@ To quickly get started using the Aquasec provider for Terraform, configure the p
4043
terraform {
4144
required_providers {
4245
aquasec = {
43-
version = "0.8.20"
46+
version = "0.8.26"
4447
source = "aquasecurity/aquasec"
4548
}
4649
}

aquasec/data_registry.go

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)