diff --git a/outscale/data_source_outscale_internet_service.go b/outscale/data_source_outscale_internet_service.go index 3cba03804..0b73d1999 100644 --- a/outscale/data_source_outscale_internet_service.go +++ b/outscale/data_source_outscale_internet_service.go @@ -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": { @@ -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") diff --git a/outscale/data_source_outscale_internet_services.go b/outscale/data_source_outscale_internet_services.go index c65a18d61..7cca476e2 100644 --- a/outscale/data_source_outscale_internet_services.go +++ b/outscale/data_source_outscale_internet_services.go @@ -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": { @@ -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") diff --git a/outscale/data_source_outscale_keypair.go b/outscale/data_source_outscale_keypair.go index 365b0a33a..028ee8a1b 100644 --- a/outscale/data_source_outscale_keypair.go +++ b/outscale/data_source_outscale_keypair.go @@ -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()}}, @@ -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(), diff --git a/outscale/data_source_outscale_keypairs.go b/outscale/data_source_outscale_keypairs.go index e2f7f0a17..0f0731ff2 100644 --- a/outscale/data_source_outscale_keypairs.go +++ b/outscale/data_source_outscale_keypairs.go @@ -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{}, @@ -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(), diff --git a/outscale/data_source_outscale_server_certificate.go b/outscale/data_source_outscale_server_certificate.go index 247036cdb..e45191526 100644 --- a/outscale/data_source_outscale_server_certificate.go +++ b/outscale/data_source_outscale_server_certificate.go @@ -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": { @@ -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") diff --git a/outscale/data_source_outscale_server_certificates.go b/outscale/data_source_outscale_server_certificates.go index 403c93dc0..772a0290c 100644 --- a/outscale/data_source_outscale_server_certificates.go +++ b/outscale/data_source_outscale_server_certificates.go @@ -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": { @@ -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") diff --git a/outscale/data_source_outscale_vms.go b/outscale/data_source_outscale_vms.go index 9c54b4f03..8a1e41918 100644 --- a/outscale/data_source_outscale_vms.go +++ b/outscale/data_source_outscale_vms.go @@ -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(), } } @@ -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": { diff --git a/outscale/data_source_outscale_volume.go b/outscale/data_source_outscale_volume.go index 10820f1b0..6703abbea 100644 --- a/outscale/data_source_outscale_volume.go +++ b/outscale/data_source_outscale_volume.go @@ -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, diff --git a/outscale/data_source_outscale_volumes.go b/outscale/data_source_outscale_volumes.go index 12afc7018..449cc4659 100644 --- a/outscale/data_source_outscale_volumes.go +++ b/outscale/data_source_outscale_volumes.go @@ -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, diff --git a/outscale/provider.go b/outscale/provider.go index e799fdb69..038961028 100644 --- a/outscale/provider.go +++ b/outscale/provider.go @@ -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(), @@ -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(), @@ -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(),