Skip to content

Commit

Permalink
datasource -> DataSource
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Gatto <[email protected]>
  • Loading branch information
outscale-mgo committed Apr 4, 2024
1 parent 21d7730 commit 0cad81e
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 32 deletions.
6 changes: 3 additions & 3 deletions outscale/data_source_outscale_internet_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)

func datasourceOutscaleInternetService() *schema.Resource {
func DataSourceOutscaleInternetService() *schema.Resource {
return &schema.Resource{
Read: datasourceOutscaleInternetServiceRead,
Read: DataSourceOutscaleInternetServiceRead,
Schema: map[string]*schema.Schema{
"filter": dataSourceFiltersSchema(),
"state": {
Expand All @@ -39,7 +39,7 @@ func datasourceOutscaleInternetService() *schema.Resource {
}
}

func datasourceOutscaleInternetServiceRead(d *schema.ResourceData, meta interface{}) error {
func DataSourceOutscaleInternetServiceRead(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*OutscaleClient).OSCAPI

filters, filtersOk := d.GetOk("filter")
Expand Down
6 changes: 3 additions & 3 deletions outscale/data_source_outscale_internet_services.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)

func datasourceOutscaleInternetServices() *schema.Resource {
func DataSourceOutscaleInternetServices() *schema.Resource {
return &schema.Resource{
Read: datasourceOutscaleInternetServicesRead,
Read: DataSourceOutscaleInternetServicesRead,
Schema: map[string]*schema.Schema{
"filter": dataSourceFiltersSchema(),
"internet_service_ids": {
Expand Down Expand Up @@ -54,7 +54,7 @@ func datasourceOutscaleInternetServices() *schema.Resource {
}
}

func datasourceOutscaleInternetServicesRead(d *schema.ResourceData, meta interface{}) error {
func DataSourceOutscaleInternetServicesRead(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*OutscaleClient).OSCAPI

filters, filtersOk := d.GetOk("filter")
Expand Down
6 changes: 3 additions & 3 deletions outscale/data_source_outscale_keypair.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)

func datasourceOutscaleKeyPairRead(d *schema.ResourceData, meta interface{}) error {
func DataSourceOutscaleKeyPairRead(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*OutscaleClient).OSCAPI
req := oscgo.ReadKeypairsRequest{
Filters: &oscgo.FiltersKeypair{KeypairNames: &[]string{d.Id()}},
Expand Down Expand Up @@ -79,9 +79,9 @@ func datasourceOutscaleKeyPairRead(d *schema.ResourceData, meta interface{}) err
return nil
}

func datasourceOutscaleKeyPair() *schema.Resource {
func DataSourceOutscaleKeyPair() *schema.Resource {
return &schema.Resource{
Read: datasourceOutscaleKeyPairRead,
Read: DataSourceOutscaleKeyPairRead,

Schema: map[string]*schema.Schema{
"filter": dataSourceFiltersSchema(),
Expand Down
6 changes: 3 additions & 3 deletions outscale/data_source_outscale_keypairs.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)

func datasourceOutscaleOAPiKeyPairsRead(d *schema.ResourceData, meta interface{}) error {
func DataSourceOutscaleOAPiKeyPairsRead(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*OutscaleClient).OSCAPI
req := oscgo.ReadKeypairsRequest{
Filters: &oscgo.FiltersKeypair{},
Expand Down Expand Up @@ -85,9 +85,9 @@ func datasourceOutscaleOAPiKeyPairsRead(d *schema.ResourceData, meta interface{}
return d.Set("keypairs", keypairs)
}

func datasourceOutscaleKeyPairs() *schema.Resource {
func DataSourceOutscaleKeyPairs() *schema.Resource {
return &schema.Resource{
Read: datasourceOutscaleOAPiKeyPairsRead,
Read: DataSourceOutscaleOAPiKeyPairsRead,

Schema: map[string]*schema.Schema{
"filter": dataSourceFiltersSchema(),
Expand Down
6 changes: 3 additions & 3 deletions outscale/data_source_outscale_server_certificate.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)

func datasourceOutscaleServerCertificate() *schema.Resource {
func DataSourceOutscaleServerCertificate() *schema.Resource {
return &schema.Resource{
Read: datasourceOutscaleServerCertificateRead,
Read: DataSourceOutscaleServerCertificateRead,
Schema: map[string]*schema.Schema{
"filter": dataSourceFiltersSchema(),
"expiration_date": {
Expand Down Expand Up @@ -46,7 +46,7 @@ func datasourceOutscaleServerCertificate() *schema.Resource {
}
}

func datasourceOutscaleServerCertificateRead(d *schema.ResourceData, meta interface{}) error {
func DataSourceOutscaleServerCertificateRead(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*OutscaleClient).OSCAPI

filters, filtersOk := d.GetOk("filter")
Expand Down
6 changes: 3 additions & 3 deletions outscale/data_source_outscale_server_certificates.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
"github.com/outscale/terraform-provider-outscale/utils"
)

func datasourceOutscaleServerCertificates() *schema.Resource {
func DataSourceOutscaleServerCertificates() *schema.Resource {
return &schema.Resource{
Read: datasourceOutscaleServerCertificatesRead,
Read: DataSourceOutscaleServerCertificatesRead,
Schema: map[string]*schema.Schema{
"filter": dataSourceFiltersSchema(),
"server_certificates": {
Expand Down Expand Up @@ -57,7 +57,7 @@ func datasourceOutscaleServerCertificates() *schema.Resource {
}
}

func datasourceOutscaleServerCertificatesRead(d *schema.ResourceData, meta interface{}) error {
func DataSourceOutscaleServerCertificatesRead(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*OutscaleClient).OSCAPI

filters, filtersOk := d.GetOk("filter")
Expand Down
6 changes: 3 additions & 3 deletions outscale/data_source_outscale_vms.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ import (
"github.com/outscale/terraform-provider-outscale/utils"
)

func datasourceOutscaleVMS() *schema.Resource {
func DataSourceOutscaleVMS() *schema.Resource {
return &schema.Resource{
Read: dataSourceOutscaleVMSRead,

Schema: datasourceOutscaleVMSSchema(),
Schema: DataSourceOutscaleVMSSchema(),
}
}

Expand All @@ -43,7 +43,7 @@ func dataSourceFiltersSchema() *schema.Schema {
}
}

func datasourceOutscaleVMSSchema() map[string]*schema.Schema {
func DataSourceOutscaleVMSSchema() map[string]*schema.Schema {
wholeSchema := map[string]*schema.Schema{
"filter": dataSourceFiltersSchema(),
"vms": {
Expand Down
2 changes: 1 addition & 1 deletion outscale/data_source_outscale_volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"github.com/outscale/terraform-provider-outscale/utils"
)

func datasourceOutscaleVolume() *schema.Resource {
func DataSourceOutscaleVolume() *schema.Resource {
return &schema.Resource{
Read: datasourceOAPIVolumeRead,

Expand Down
2 changes: 1 addition & 1 deletion outscale/data_source_outscale_volumes.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)

func datasourceOutscaleVolumes() *schema.Resource {
func DataSourceOutscaleVolumes() *schema.Resource {
return &schema.Resource{
Read: datasourceOAPIVolumesRead,

Expand Down
18 changes: 9 additions & 9 deletions outscale/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func Provider() *schema.Provider {
},
DataSourcesMap: map[string]*schema.Resource{
"outscale_vm": DataSourceOutscaleVM(),
"outscale_vms": datasourceOutscaleVMS(),
"outscale_vms": DataSourceOutscaleVMS(),
"outscale_security_group": DataSourceOutscaleSecurityGroup(),
"outscale_security_groups": DataSourceOutscaleSecurityGroups(),
"outscale_image": DataSourceOutscaleImage(),
Expand All @@ -115,16 +115,16 @@ func Provider() *schema.Provider {
"outscale_tags": DataSourceOutscaleTags(),
"outscale_public_ip": DataSourceOutscalePublicIP(),
"outscale_public_ips": DataSourceOutscalePublicIPS(),
"outscale_volume": datasourceOutscaleVolume(),
"outscale_volumes": datasourceOutscaleVolumes(),
"outscale_volume": DataSourceOutscaleVolume(),
"outscale_volumes": DataSourceOutscaleVolumes(),
"outscale_nat_service": DataSourceOutscaleNatService(),
"outscale_nat_services": DataSourceOutscaleNatServices(),
"outscale_keypair": datasourceOutscaleKeyPair(),
"outscale_keypairs": datasourceOutscaleKeyPairs(),
"outscale_keypair": DataSourceOutscaleKeyPair(),
"outscale_keypairs": DataSourceOutscaleKeyPairs(),
"outscale_vm_state": DataSourceOutscaleVMState(),
"outscale_vm_states": DataSourceOutscaleVMStates(),
"outscale_internet_service": datasourceOutscaleInternetService(),
"outscale_internet_services": datasourceOutscaleInternetServices(),
"outscale_internet_service": DataSourceOutscaleInternetService(),
"outscale_internet_services": DataSourceOutscaleInternetServices(),
"outscale_subnet": DataSourceOutscaleSubnet(),
"outscale_subnets": DataSourceOutscaleSubnets(),
"outscale_net": DataSourceOutscaleVpc(),
Expand Down Expand Up @@ -168,8 +168,8 @@ func Provider() *schema.Provider {
"outscale_quotas": DataSourceOutscaleQuotas(),
"outscale_image_export_task": DataSourceOutscaleImageExportTask(),
"outscale_image_export_tasks": DataSourceOutscaleImageExportTasks(),
"outscale_server_certificate": datasourceOutscaleServerCertificate(),
"outscale_server_certificates": datasourceOutscaleServerCertificates(),
"outscale_server_certificate": DataSourceOutscaleServerCertificate(),
"outscale_server_certificates": DataSourceOutscaleServerCertificates(),
"outscale_snapshot_export_task": DataSourceOutscaleSnapshotExportTask(),
"outscale_snapshot_export_tasks": DataSourceOutscaleSnapshotExportTasks(),
"outscale_ca": DataSourceOutscaleCa(),
Expand Down

0 comments on commit 0cad81e

Please sign in to comment.