Skip to content

Commit

Permalink
Data source results must not be optional (#706)
Browse files Browse the repository at this point in the history
* The collection returned by data sources must not be optional

* Updated test framework

* Fixed modules
  • Loading branch information
mcasperson authored Aug 6, 2024
1 parent 70a6a5f commit 263ec8c
Show file tree
Hide file tree
Showing 33 changed files with 65 additions and 38 deletions.
18 changes: 10 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.21

require (
github.com/OctopusDeploy/go-octopusdeploy/v2 v2.43.0
github.com/OctopusSolutionsEngineering/OctopusTerraformTestFramework v0.0.0-20240622231527-24df7b6eaa48
github.com/OctopusSolutionsEngineering/OctopusTerraformTestFramework v0.0.0-20240729041805-46db6fb717b4
github.com/google/uuid v1.6.0
github.com/gruntwork-io/terratest v0.41.11
github.com/hashicorp/go-cty v1.4.1-0.20200723130312-85980079f637
Expand All @@ -29,8 +29,8 @@ require (
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver/v3 v3.2.0 // indirect
github.com/Masterminds/sprig/v3 v3.2.3 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/Microsoft/hcsshim v0.11.4 // indirect
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/Microsoft/hcsshim v0.11.5 // indirect
github.com/ProtonMail/go-crypto v1.1.0-alpha.2 // indirect
github.com/agext/levenshtein v1.2.3 // indirect
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
Expand All @@ -43,13 +43,14 @@ require (
github.com/buger/jsonparser v1.1.1 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/cloudflare/circl v1.3.7 // indirect
github.com/containerd/containerd v1.7.15 // indirect
github.com/containerd/containerd v1.7.18 // indirect
github.com/containerd/errdefs v0.1.0 // indirect
github.com/containerd/log v0.1.0 // indirect
github.com/cpuguy83/dockercfg v0.3.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dghubble/sling v1.4.1 // indirect
github.com/distribution/reference v0.5.0 // indirect
github.com/docker/docker v25.0.5+incompatible // indirect
github.com/distribution/reference v0.6.0 // indirect
github.com/docker/docker v27.0.3+incompatible // indirect
github.com/docker/go-connections v0.5.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/fatih/color v1.16.0 // indirect
Expand Down Expand Up @@ -91,7 +92,7 @@ require (
github.com/imdario/mergo v0.3.15 // indirect
github.com/jinzhu/copier v0.3.5 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/klauspost/compress v1.16.0 // indirect
github.com/klauspost/compress v1.17.4 // indirect
github.com/leodido/go-urn v1.2.2 // indirect
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
Expand All @@ -106,6 +107,7 @@ require (
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/moby/patternmatcher v0.6.0 // indirect
github.com/moby/sys/sequential v0.5.0 // indirect
github.com/moby/sys/user v0.1.0 // indirect
Expand All @@ -125,7 +127,7 @@ require (
github.com/shopspring/decimal v1.3.1 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/testcontainers/testcontainers-go v0.31.0 // indirect
github.com/testcontainers/testcontainers-go v0.32.0 // indirect
github.com/tklauser/go-sysconf v0.3.12 // indirect
github.com/tklauser/numcpus v0.6.1 // indirect
github.com/tmccombs/hcl2json v0.3.6 // indirect
Expand Down
20 changes: 20 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,20 @@ github.com/Masterminds/sprig/v3 v3.2.3 h1:eL2fZNezLomi0uOLqjQoN6BfsDD+fyLtgbJMAj
github.com/Masterminds/sprig/v3 v3.2.3/go.mod h1:rXcFaZ2zZbLRJv/xSysmlgIM1u11eBaRMhvYXJNkGuM=
github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow=
github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM=
github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY=
github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
github.com/Microsoft/hcsshim v0.11.4 h1:68vKo2VN8DE9AdN4tnkWnmdhqdbpUFM8OF3Airm7fz8=
github.com/Microsoft/hcsshim v0.11.4/go.mod h1:smjE4dvqPX9Zldna+t5FG3rnoHhaB7QYxPRqGcpAD9w=
github.com/Microsoft/hcsshim v0.11.5 h1:haEcLNpj9Ka1gd3B3tAEs9CpE0c+1IhoL59w/exYU38=
github.com/Microsoft/hcsshim v0.11.5/go.mod h1:MV8xMfmECjl5HdO7U/3/hFVnkmSBjAjmA09d4bExKcU=
github.com/OctopusDeploy/go-octopusdeploy/v2 v2.43.0 h1:fYwGBqG88xy3qHp5j1ySCztdqfw2NLfg2yp0N3XcBYg=
github.com/OctopusDeploy/go-octopusdeploy/v2 v2.43.0/go.mod h1:GZmFu6LmN8Yg0tEoZx3ytk9FnaH+84cWm7u5TdWZC6E=
github.com/OctopusSolutionsEngineering/OctopusTerraformTestFramework v0.0.0-20240502041300-f71244db277d h1:E0Rm52/XBlVzdkHET/+Js1FVVgf5/0oRk1tNkI4jcyk=
github.com/OctopusSolutionsEngineering/OctopusTerraformTestFramework v0.0.0-20240502041300-f71244db277d/go.mod h1:Nyg+7cyTrSQ/lMIy5YY1UdJekRuoMWf4uHIPfaGmgTM=
github.com/OctopusSolutionsEngineering/OctopusTerraformTestFramework v0.0.0-20240622231527-24df7b6eaa48 h1:lxcmT+JUYCe2pA7owBK47/z0jY3va03yl1sQA3n0/Xo=
github.com/OctopusSolutionsEngineering/OctopusTerraformTestFramework v0.0.0-20240622231527-24df7b6eaa48/go.mod h1:/QwYrEWP690YoKAR9lUVEv2y1Ta0HY08OaWb4LMZCAw=
github.com/OctopusSolutionsEngineering/OctopusTerraformTestFramework v0.0.0-20240729041805-46db6fb717b4 h1:QfbVf0bOIRMp/WHAWsuVDB7KHoWnRsGbvDuOf2ua7k4=
github.com/OctopusSolutionsEngineering/OctopusTerraformTestFramework v0.0.0-20240729041805-46db6fb717b4/go.mod h1:Oq9KbiRNDBB5jFmrwnrgLX0urIqR/1ptY18TzkqXm7M=
github.com/ProtonMail/go-crypto v1.1.0-alpha.2 h1:bkyFVUP+ROOARdgCiJzNQo2V2kiB97LyUpzH9P6Hrlg=
github.com/ProtonMail/go-crypto v1.1.0-alpha.2/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE=
github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558=
Expand Down Expand Up @@ -87,6 +93,10 @@ github.com/containerd/containerd v1.7.12 h1:+KQsnv4VnzyxWcfO9mlxxELaoztsDEjOuCMP
github.com/containerd/containerd v1.7.12/go.mod h1:/5OMpE1p0ylxtEUGY8kuCYkDRzJm9NO1TFMWjUpdevk=
github.com/containerd/containerd v1.7.15 h1:afEHXdil9iAm03BmhjzKyXnnEBtjaLJefdU7DV0IFes=
github.com/containerd/containerd v1.7.15/go.mod h1:ISzRRTMF8EXNpJlTzyr2XMhN+j9K302C21/+cr3kUnY=
github.com/containerd/containerd v1.7.18 h1:jqjZTQNfXGoEaZdW1WwPU0RqSn1Bm2Ay/KJPUuO8nao=
github.com/containerd/containerd v1.7.18/go.mod h1:IYEk9/IO6wAPUz2bCMVUbsfXjzw5UNP5fLz4PsUygQ4=
github.com/containerd/errdefs v0.1.0 h1:m0wCRBiu1WJT/Fr+iOoQHMQS/eP5myQ8lCv4Dz5ZURM=
github.com/containerd/errdefs v0.1.0/go.mod h1:YgWiiHtLmSeBrvpw+UfPijzbLaB77mEG1WwJTDETIV0=
github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I=
github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo=
github.com/cpuguy83/dockercfg v0.3.1 h1:/FpZ+JaygUR/lZP2NlFI2DVfrOEMAIKP5wWEJdoYe9E=
Expand All @@ -103,8 +113,12 @@ github.com/dghubble/sling v1.4.1 h1:AxjTubpVyozMvbBCtXcsWEyGGgUZutC5YGrfxPNVOcQ=
github.com/dghubble/sling v1.4.1/go.mod h1:QoMB1KL3GAo+7HsD8Itd6S+6tW91who8BGZzuLvpOyc=
github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0=
github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk=
github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
github.com/docker/docker v25.0.5+incompatible h1:UmQydMduGkrD5nQde1mecF/YnSbTOaPeFIeP5C4W+DE=
github.com/docker/docker v25.0.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/docker v27.0.3+incompatible h1:aBGI9TeQ4MPlhquTQKq9XbK79rKFVwXNUAYz9aXyEBE=
github.com/docker/docker v27.0.3+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c=
github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc=
github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4=
Expand Down Expand Up @@ -296,6 +310,8 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o
github.com/klauspost/compress v1.11.2/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
github.com/klauspost/compress v1.16.0 h1:iULayQNOReoYUe+1qtKOqw9CwJv3aNQu8ivo7lw1HU4=
github.com/klauspost/compress v1.16.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=
github.com/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4=
github.com/klauspost/compress v1.17.4/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
Expand Down Expand Up @@ -348,6 +364,8 @@ github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RR
github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ=
github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0=
github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo=
github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk=
github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc=
github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc=
Expand Down Expand Up @@ -425,6 +443,8 @@ github.com/testcontainers/testcontainers-go v0.30.0 h1:jmn/XS22q4YRrcMwWg0pAwlCl
github.com/testcontainers/testcontainers-go v0.30.0/go.mod h1:K+kHNGiM5zjklKjgTtcrEetF3uhWbMUyqAQoyoh8Pf0=
github.com/testcontainers/testcontainers-go v0.31.0 h1:W0VwIhcEVhRflwL9as3dhY6jXjVCA27AkmbnZ+UTh3U=
github.com/testcontainers/testcontainers-go v0.31.0/go.mod h1:D2lAoA0zUFiSY+eAflqK5mcUx/A5hrrORaEQrd0SefI=
github.com/testcontainers/testcontainers-go v0.32.0 h1:ug1aK08L3gCHdhknlTTwWjPHPS+/alvLJU/DRxTD/ME=
github.com/testcontainers/testcontainers-go v0.32.0/go.mod h1:CRHrzHLQhlXUsa5gXjTOfqIEJcrK5+xMDmBr/WMI88E=
github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU=
github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI=
github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk=
Expand Down
6 changes: 5 additions & 1 deletion octopusdeploy/data_source_tenants.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ func dataSourceTenantsRead(ctx context.Context, d *schema.ResourceData, meta int
flattenedTenants = append(flattenedTenants, flattenTenant(tenant))
}

d.Set("tenants", flattenedTenants)
err = d.Set("tenants", flattenedTenants)
if err != nil {
return diag.FromErr(err)
}

d.SetId("Tenants " + time.Now().UTC().String())

return nil
Expand Down
1 change: 1 addition & 0 deletions octopusdeploy/schema_account_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ func getAccountResourceDataSchema() map[string]*schema.Schema {
Description: "A list of accounts that match the filter(s).",
Elem: &schema.Resource{Schema: dataSchema},
Type: schema.TypeList,
Optional: false,
},
"id": getDataSchemaID(),
"space_id": getQuerySpaceID(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func getAzureCloudServiceDeploymentTargetDataSchema() map[string]*schema.Schema
Computed: true,
Description: "A list of Azure cloud service deployment targets that match the filter(s).",
Elem: &schema.Resource{Schema: dataSchema},
Optional: true,
Optional: false,
Type: schema.TypeList,
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func getAzureServiceFabricClusterDeploymentTargetDataSchema() map[string]*schema
Computed: true,
Description: "A list of Azure service fabric cluster deployment targets that match the filter(s).",
Elem: &schema.Resource{Schema: dataSchema},
Optional: true,
Optional: false,
Type: schema.TypeList,
}

Expand Down
2 changes: 1 addition & 1 deletion octopusdeploy/schema_azure_web_app_deployment_target.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func getAzureWebAppDeploymentTargetDataSchema() map[string]*schema.Schema {
Computed: true,
Description: "A list of Azure web app deployment targets that match the filter(s).",
Elem: &schema.Resource{Schema: dataSchema},
Optional: true,
Optional: false,
Type: schema.TypeList,
}

Expand Down
2 changes: 1 addition & 1 deletion octopusdeploy/schema_certificate.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ func getCertificateDataSchema() map[string]*schema.Schema {
Computed: true,
Description: "A list of certificates that match the filter(s).",
Elem: &schema.Resource{Schema: dataSchema},
Optional: true,
Optional: false,
Type: schema.TypeList,
},
"first_result": getQueryFirstResult(),
Expand Down
2 changes: 1 addition & 1 deletion octopusdeploy/schema_channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func getChannelDataSchema() map[string]*schema.Schema {
Computed: true,
Description: "A channel that matches the specified filter(s).",
Elem: &schema.Resource{Schema: dataSchema},
Optional: true,
Optional: false,
Type: schema.TypeList,
},
"ids": getQueryIDs(),
Expand Down
2 changes: 1 addition & 1 deletion octopusdeploy/schema_cloud_region_deployment_target.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func getCloudRegionDeploymentTargetDataSchema() map[string]*schema.Schema {
Computed: true,
Description: "A list of cloud region deployment targets that match the filter(s).",
Elem: &schema.Resource{Schema: dataSchema},
Optional: true,
Optional: false,
Type: schema.TypeList,
}

Expand Down
2 changes: 1 addition & 1 deletion octopusdeploy/schema_deployment_target.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func getDeploymentTargetDataSchema() map[string]*schema.Schema {
Computed: true,
Description: "A list of deployment targets that match the filter(s).",
Elem: &schema.Resource{Schema: dataSchema},
Optional: true,
Optional: false,
Type: schema.TypeList,
},
"environments": getQueryEnvironments(),
Expand Down
2 changes: 1 addition & 1 deletion octopusdeploy/schema_environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func getEnvironmentDataSchema() map[string]*schema.Schema {
Computed: true,
Description: "A list of environments that match the filter(s).",
Elem: &schema.Resource{Schema: dataSchema},
Optional: true,
Optional: false,
Type: schema.TypeList,
},
"id": getDataSchemaID(),
Expand Down
2 changes: 1 addition & 1 deletion octopusdeploy/schema_feed.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func getFeedDataSchema() map[string]*schema.Schema {
Computed: true,
Description: "A list of feeds that match the filter(s).",
Elem: &schema.Resource{Schema: dataSchema},
Optional: true,
Optional: false,
Type: schema.TypeList,
},
"feed_type": getQueryFeedType(),
Expand Down
2 changes: 1 addition & 1 deletion octopusdeploy/schema_git_credential.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func getGitCredentialDataSchema() map[string]*schema.Schema {
Computed: true,
Description: "A list of Git Credentials that match the filter(s).",
Elem: &schema.Resource{Schema: dataSchema},
Optional: true,
Optional: false,
Type: schema.TypeList,
},
"name": getQueryName(),
Expand Down
2 changes: 1 addition & 1 deletion octopusdeploy/schema_kubernetes_agent_deployment_target.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ func getKubernetesAgentDeploymentTargetDataSchema() map[string]*schema.Schema {
Computed: true,
Description: "A list of kubernetes agent deployment targets that match the filter(s).",
Elem: &schema.Resource{Schema: dataSchema},
Optional: true,
Optional: false,
Type: schema.TypeList,
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func getKubernetesClusterDeploymentTargetDataSchema() map[string]*schema.Schema
Computed: true,
Description: "A list of Kubernetes cluster deployment targets that match the filter(s).",
Elem: &schema.Resource{Schema: dataSchema},
Optional: true,
Optional: false,
Type: schema.TypeList,
}

Expand Down
2 changes: 1 addition & 1 deletion octopusdeploy/schema_library_variable_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func getLibraryVariableSetDataSchema() map[string]*schema.Schema {
Computed: true,
Description: "A list of library variable sets that match the filter(s).",
Elem: &schema.Resource{Schema: dataSchema},
Optional: true,
Optional: false,
Type: schema.TypeList,
},
"partial_name": getQueryPartialName(),
Expand Down
2 changes: 1 addition & 1 deletion octopusdeploy/schema_lifecycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func getLifecycleDataSchema() map[string]*schema.Schema {
Computed: true,
Description: "A list of lifecycles that match the filter(s).",
Elem: &schema.Resource{Schema: dataSchema},
Optional: true,
Optional: false,
Type: schema.TypeList,
},
"partial_name": getQueryPartialName(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func getListeningTentacleDeploymentTargetDataSchema() map[string]*schema.Schema
Computed: true,
Description: "A list of listening tentacle deployment targets that match the filter(s).",
Elem: &schema.Resource{Schema: dataSchema},
Optional: true,
Optional: false,
Type: schema.TypeList,
}

Expand Down
2 changes: 1 addition & 1 deletion octopusdeploy/schema_machine_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func getMachinePolicyDataSchema() map[string]*schema.Schema {
Computed: true,
Description: "A list of machine policies that match the filter(s).",
Elem: &schema.Resource{Schema: dataSchema},
Optional: true,
Optional: false,
Type: schema.TypeList,
},
"partial_name": getQueryPartialName(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func getOfflinePackageDropDeploymentTargetDataSchema() map[string]*schema.Schema
Computed: true,
Description: "A list of offline package drop deployment targets that match the filter(s).",
Elem: &schema.Resource{Schema: dataSchema},
Optional: true,
Optional: false,
Type: schema.TypeList,
}

Expand Down
2 changes: 1 addition & 1 deletion octopusdeploy/schema_polling_tentacle_deployment_target.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func getPollingTentacleDeploymentTargetDataSchema() map[string]*schema.Schema {
Computed: true,
Description: "A list of polling tentacle deployment targets that match the filter(s).",
Elem: &schema.Resource{Schema: dataSchema},
Optional: true,
Optional: false,
Type: schema.TypeList,
}

Expand Down
2 changes: 1 addition & 1 deletion octopusdeploy/schema_project.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ func getProjectDataSchema() map[string]*schema.Schema {
Computed: true,
Description: "A list of projects that match the filter(s).",
Elem: &schema.Resource{Schema: dataSchema},
Optional: true,
Optional: false,
Type: schema.TypeList,
},
"skip": getQuerySkip(),
Expand Down
2 changes: 1 addition & 1 deletion octopusdeploy/schema_project_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func getProjectGroupDataSchema() map[string]*schema.Schema {
Computed: true,
Description: "A list of project groups that match the filter(s).",
Elem: &schema.Resource{Schema: dataSchema},
Optional: true,
Optional: false,
Type: schema.TypeList,
},
"skip": getQuerySkip(),
Expand Down
2 changes: 1 addition & 1 deletion octopusdeploy/schema_script_modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func getScriptModuleDataSchema() map[string]*schema.Schema {
Computed: true,
Description: "A list of script modules that match the filter(s).",
Elem: &schema.Resource{Schema: dataSchema},
Optional: true,
Optional: false,
Type: schema.TypeList,
},
"partial_name": getQueryPartialName(),
Expand Down
2 changes: 1 addition & 1 deletion octopusdeploy/schema_space.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func getSpacesDataSourceSchema() map[string]*schema.Schema {
Computed: true,
Description: "A list of spaces that match the filter(s).",
Elem: &schema.Resource{Schema: dataSchema},
Optional: true,
Optional: false,
Type: schema.TypeList,
},
}
Expand Down
2 changes: 1 addition & 1 deletion octopusdeploy/schema_ssh_connection_deployment_target.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func getSSHConnectionDeploymentTargetDataSchema() map[string]*schema.Schema {
Computed: true,
Description: "A list of SSH connection deployment targets that match the filter(s).",
Elem: &schema.Resource{Schema: dataSchema},
Optional: true,
Optional: false,
Type: schema.TypeList,
}

Expand Down
2 changes: 1 addition & 1 deletion octopusdeploy/schema_tag_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func getTagSetDataSchema() map[string]*schema.Schema {
Computed: true,
Description: "A list of tag sets that match the filter(s).",
Elem: &schema.Resource{Schema: dataSchema},
Optional: true,
Optional: false,
Type: schema.TypeList,
},
"take": getQueryTake(),
Expand Down
2 changes: 1 addition & 1 deletion octopusdeploy/schema_team.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func getTeamDataSchema() map[string]*schema.Schema {
Computed: true,
Description: "A list of teams that match the filter(s).",
Elem: &schema.Resource{Schema: dataSchema},
Optional: true,
Optional: false,
Type: schema.TypeList,
},
}
Expand Down
2 changes: 1 addition & 1 deletion octopusdeploy/schema_tenant.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func getTenantDataSchema() map[string]*schema.Schema {
Computed: true,
Description: "A list of tenants that match the filter(s).",
Elem: &schema.Resource{Schema: dataSchema},
Optional: true,
Optional: false,
Type: schema.TypeList,
},
"take": getQueryTake(),
Expand Down
2 changes: 1 addition & 1 deletion octopusdeploy/schema_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func getUserDataSchema() map[string]*schema.Schema {
Computed: true,
Description: "A list of users that match the filter(s).",
Elem: &schema.Resource{Schema: dataSchema},
Optional: true,
Optional: false,
Type: schema.TypeList,
},
}
Expand Down
Loading

0 comments on commit 263ec8c

Please sign in to comment.