Skip to content

Commit 8e4635f

Browse files
authored
Merge pull request #29 from port-labs/PORT-3155-terraform-provider-remove-icons-validation
Remove icon validation
2 parents 6530c91 + 83d2d4a commit 8e4635f

File tree

2 files changed

+12
-18
lines changed

2 files changed

+12
-18
lines changed

port/resource_port_action.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,9 @@ func newActionResource() *schema.Resource {
4444
Optional: true,
4545
},
4646
"icon": {
47-
Type: schema.TypeString,
48-
Description: "The icon of the action",
49-
ValidateFunc: validation.StringInSlice(ICONS, false),
50-
Optional: true,
47+
Type: schema.TypeString,
48+
Description: "The icon of the action",
49+
Optional: true,
5150
},
5251
"user_properties": {
5352
Description: "The input properties of the action",

port/resource_port_blueprint.go

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ import (
1212
"github.com/samber/lo"
1313
)
1414

15-
var ICONS = []string{"Actions", "Airflow", "Ansible", "Argo", "AuditLog", "Aws", "Azure", "Blueprint", "Bucket", "Cloud", "Cluster", "CPU", "Customer", "Datadog", "Day2Operation", "DefaultEntity", "DefaultProperty", "DeployedAt", "Deployment", "DevopsTool", "Docs", "Environment", "Git", "Github", "GitVersion", "GoogleCloud", "GPU", "Grafana", "Infinity", "Jenkins", "Lambda", "Link", "Lock", "Microservice", "Moon", "Node", "Okta", "Package", "Permission", "Relic", "Server", "Service", "Team", "Terraform", "User"}
16-
1715
func newBlueprintResource() *schema.Resource {
1816
return &schema.Resource{
1917
Description: "Port blueprint",
@@ -40,10 +38,9 @@ func newBlueprintResource() *schema.Resource {
4038
Deprecated: "Data source is ignored",
4139
},
4240
"icon": {
43-
Type: schema.TypeString,
44-
Description: "The icon of the blueprint",
45-
ValidateFunc: validation.StringInSlice(ICONS, false),
46-
Optional: true,
41+
Type: schema.TypeString,
42+
Description: "The icon of the blueprint",
43+
Optional: true,
4744
},
4845
"description": {
4946
Type: schema.TypeString,
@@ -95,10 +92,9 @@ func newBlueprintResource() *schema.Resource {
9592
Description: "The identifier of the property",
9693
},
9794
"icon": {
98-
Type: schema.TypeString,
99-
ValidateFunc: validation.StringInSlice(ICONS, false),
100-
Optional: true,
101-
Description: "The icon of the property",
95+
Type: schema.TypeString,
96+
Optional: true,
97+
Description: "The icon of the property",
10298
},
10399
"title": {
104100
Type: schema.TypeString,
@@ -209,10 +205,9 @@ func newBlueprintResource() *schema.Resource {
209205
Description: "A jq expression that calculates the value of the property, for instance \"'https://grafana.' + .identifier\"",
210206
},
211207
"icon": {
212-
Type: schema.TypeString,
213-
ValidateFunc: validation.StringInSlice(ICONS, false),
214-
Optional: true,
215-
Description: "The icon of the property",
208+
Type: schema.TypeString,
209+
Optional: true,
210+
Description: "The icon of the property",
216211
},
217212
"type": {
218213
Type: schema.TypeString,

0 commit comments

Comments
 (0)