Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change import path, to outscale #439

Merged
merged 2 commits into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ default: build

.PHONY: build
build: fmtcheck
go build -ldflags "-X github.com/terraform-providers/terraform-provider-outscale/version.version=${VERSION}"
go build -ldflags "-X github.com/outscale/terraform-provider-outscale/version.version=${VERSION}"

.PHONY: fmtcheck
fmtcheck:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,15 @@ export OUTSCALE_X509CERT=/myrepository/certificate/client_ca.crt
export OUTSCALE_X509KEY=/myrepository/certificate/client_ca.key
```
## Building The Provider
Clone repository to: `$GOPATH/src/github.com/terraform-providers/terraform-provider-outscale`
Clone repository to: `$GOPATH/src/github.com/outscale/terraform-provider-outscale`
```sh
mkdir -p $GOPATH/src/github.com/terraform-providers
cd $GOPATH/src/github.com/terraform-providers
git clone --branch v0.11.0 https://github.com/outscale/terraform-provider-outscale
```
Enter the provider directory and build the provider
```sh
cd $GOPATH/src/github.com/terraform-providers/terraform-provider-outscale
cd $GOPATH/src/github.com/outscale/terraform-provider-outscale
go build -o terraform-provider-outscale_v0.11.0
```
## Using the provider
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/terraform-providers/terraform-provider-outscale
module github.com/outscale/terraform-provider-outscale

go 1.22.0

Expand Down
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"github.com/hashicorp/terraform-plugin-go/tfprotov5"
"github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server"
"github.com/hashicorp/terraform-plugin-mux/tf5muxserver"
"github.com/terraform-providers/terraform-provider-outscale/outscale"
vers "github.com/terraform-providers/terraform-provider-outscale/version"
"github.com/outscale/terraform-provider-outscale/outscale"
vers "github.com/outscale/terraform-provider-outscale/version"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion outscale/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/logging"
oscgo "github.com/outscale/osc-sdk-go/v2"
"github.com/terraform-providers/terraform-provider-outscale/version"
"github.com/outscale/terraform-provider-outscale/version"
)

// Config ...
Expand Down
8 changes: 4 additions & 4 deletions outscale/data_source_outscale_access_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ import (
"time"

oscgo "github.com/outscale/osc-sdk-go/v2"
"github.com/terraform-providers/terraform-provider-outscale/utils"
"github.com/outscale/terraform-provider-outscale/utils"

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
)

func dataSourceOutscaleAccessKey() *schema.Resource {
func DataSourceOutscaleAccessKey() *schema.Resource {
return &schema.Resource{
Read: dataSourceOutscaleAccessKeyRead,
Read: DataSourceOutscaleAccessKeyRead,
Schema: map[string]*schema.Schema{
"filter": dataSourceFiltersSchema(),
"access_key_id": {
Expand Down Expand Up @@ -48,7 +48,7 @@ func dataSourceOutscaleAccessKey() *schema.Resource {
}
}

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

filters, filtersOk := d.GetOk("filter")
Expand Down
8 changes: 4 additions & 4 deletions outscale/data_source_outscale_access_keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ import (
"time"

oscgo "github.com/outscale/osc-sdk-go/v2"
"github.com/terraform-providers/terraform-provider-outscale/utils"
"github.com/outscale/terraform-provider-outscale/utils"

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
)

func dataSourceOutscaleAccessKeys() *schema.Resource {
func DataSourceOutscaleAccessKeys() *schema.Resource {
return &schema.Resource{
Read: dataSourceOutscaleAccessKeysRead,
Read: DataSourceOutscaleAccessKeysRead,
Schema: map[string]*schema.Schema{
"filter": dataSourceFiltersSchema(),
"access_key_ids": {
Expand Down Expand Up @@ -67,7 +67,7 @@ func dataSourceOutscaleAccessKeys() *schema.Resource {
}
}

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

filters, filtersOk := d.GetOk("filter")
Expand Down
8 changes: 4 additions & 4 deletions outscale/data_source_outscale_account.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import (

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/terraform-providers/terraform-provider-outscale/utils"
"github.com/outscale/terraform-provider-outscale/utils"
)

func dataSourceAccount() *schema.Resource {
func DataSourceAccount() *schema.Resource {
return &schema.Resource{
Read: dataSourceAccountRead,
Read: DataSourceAccountRead,
Schema: map[string]*schema.Schema{
"account_id": {
Type: schema.TypeString,
Expand Down Expand Up @@ -85,7 +85,7 @@ func dataSourceAccount() *schema.Resource {
}
}

func dataSourceAccountRead(d *schema.ResourceData, meta interface{}) error {
func DataSourceAccountRead(d *schema.ResourceData, meta interface{}) error {

conn := meta.(*OutscaleClient).OSCAPI

Expand Down
8 changes: 4 additions & 4 deletions outscale/data_source_outscale_accounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import (

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/terraform-providers/terraform-provider-outscale/utils"
"github.com/outscale/terraform-provider-outscale/utils"
)

func dataSourceAccounts() *schema.Resource {
func DataSourceAccounts() *schema.Resource {
return &schema.Resource{
Read: dataSourceAccountsRead,
Read: DataSourceAccountsRead,
Schema: map[string]*schema.Schema{
"accounts": {
Type: schema.TypeList,
Expand Down Expand Up @@ -93,7 +93,7 @@ func dataSourceAccounts() *schema.Resource {
}
}

func dataSourceAccountsRead(d *schema.ResourceData, meta interface{}) error {
func DataSourceAccountsRead(d *schema.ResourceData, meta interface{}) error {

conn := meta.(*OutscaleClient).OSCAPI

Expand Down
8 changes: 4 additions & 4 deletions outscale/data_source_outscale_api_access_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
oscgo "github.com/outscale/osc-sdk-go/v2"
"github.com/terraform-providers/terraform-provider-outscale/utils"
"github.com/outscale/terraform-provider-outscale/utils"
)

func dataSourceOutscaleOAPIApiAccessPolicy() *schema.Resource {
func DataSourceOutscaleApiAccessPolicy() *schema.Resource {
return &schema.Resource{
Read: dataSourceOutscaleOAPIApiAccessPolicyRead,
Read: DataSourceOutscaleApiAccessPolicyRead,
Schema: map[string]*schema.Schema{
"max_access_key_expiration_seconds": {
Type: schema.TypeInt,
Expand All @@ -31,7 +31,7 @@ func dataSourceOutscaleOAPIApiAccessPolicy() *schema.Resource {
}
}

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

req := oscgo.ReadApiAccessPolicyRequest{}
Expand Down
6 changes: 3 additions & 3 deletions outscale/data_source_outscale_api_access_policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
)

func TestAccDataSourceOutscaleOAPIApiAccessPolicy_basic(t *testing.T) {
func TestAccDataSourceOutscaleApiAccessPolicy_basic(t *testing.T) {

resource.Test(t, resource.TestCase{
PreCheck: func() {
Expand All @@ -16,13 +16,13 @@ func TestAccDataSourceOutscaleOAPIApiAccessPolicy_basic(t *testing.T) {
Providers: testAccProviders,
Steps: []resource.TestStep{
{
Config: testAccDataSourceOutscaleOAPIApiAccessPolicyConfig(),
Config: testAccDataSourceOutscaleApiAccessPolicyConfig(),
},
},
})
}

func testAccDataSourceOutscaleOAPIApiAccessPolicyConfig() string {
func testAccDataSourceOutscaleApiAccessPolicyConfig() string {
return fmt.Sprintf(`
data "outscale_api_access_policy" "api_access_policy" {}
`)
Expand Down
8 changes: 4 additions & 4 deletions outscale/data_source_outscale_api_access_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
oscgo "github.com/outscale/osc-sdk-go/v2"
"github.com/terraform-providers/terraform-provider-outscale/utils"
"github.com/outscale/terraform-provider-outscale/utils"
)

func dataSourceOutscaleOAPIApiAccessRule() *schema.Resource {
func DataSourceOutscaleApiAccessRule() *schema.Resource {
return &schema.Resource{
Read: dataSourceOutscaleOAPIApiAccessRuleRead,
Read: DataSourceOutscaleApiAccessRuleRead,
Schema: map[string]*schema.Schema{
"filter": dataSourceFiltersSchema(),
"api_access_rule_id": {
Expand Down Expand Up @@ -48,7 +48,7 @@ func dataSourceOutscaleOAPIApiAccessRule() *schema.Resource {
}
}

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

filters, filtersOk := d.GetOk("filter")
Expand Down
8 changes: 4 additions & 4 deletions outscale/data_source_outscale_api_access_rule_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
oscgo "github.com/outscale/osc-sdk-go/v2"
"github.com/terraform-providers/terraform-provider-outscale/utils"
"github.com/outscale/terraform-provider-outscale/utils"
)

func TestAccOthers_DataOutscaleOAPIApiAccessRule_basic(t *testing.T) {
func TestAccOthers_DataOutscaleApiAccessRule_basic(t *testing.T) {
t.Parallel()
resourceName := "outscale_api_access_rule.rule_data"
ca_path := os.Getenv("CA_PATH")
Expand All @@ -24,7 +24,7 @@ func TestAccOthers_DataOutscaleOAPIApiAccessRule_basic(t *testing.T) {
CheckDestroy: testAccDataCheckOutscaleApiAccessRuleDestroy,
Steps: []resource.TestStep{
{
Config: testAccDataOutscaleOAPIApiAccessRuleConfig(ca_path),
Config: testAccDataOutscaleApiAccessRuleConfig(ca_path),
Check: resource.ComposeTestCheckFunc(
testAccCheckOutscaleApiAccessRuleExists(resourceName),
),
Expand Down Expand Up @@ -71,7 +71,7 @@ func testAccDataCheckOutscaleApiAccessRuleDestroy(s *terraform.State) error {
return nil
}

func testAccDataOutscaleOAPIApiAccessRuleConfig(path string) string {
func testAccDataOutscaleApiAccessRuleConfig(path string) string {
return fmt.Sprintf(`
resource "outscale_ca" "ca_rule" {
ca_pem = file(%q)
Expand Down
8 changes: 4 additions & 4 deletions outscale/data_source_outscale_api_access_rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
oscgo "github.com/outscale/osc-sdk-go/v2"
"github.com/terraform-providers/terraform-provider-outscale/utils"
"github.com/outscale/terraform-provider-outscale/utils"
)

func dataSourceOutscaleOAPIApiAccessRules() *schema.Resource {
func DataSourceOutscaleApiAccessRules() *schema.Resource {
return &schema.Resource{
Read: dataSourceOutscaleOAPIApiAccessRulesRead,
Read: DataSourceOutscaleApiAccessRulesRead,
Schema: map[string]*schema.Schema{
"filter": dataSourceFiltersSchema(),
"api_access_rules": {
Expand Down Expand Up @@ -55,7 +55,7 @@ func dataSourceOutscaleOAPIApiAccessRules() *schema.Resource {
}
}

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

filters, filtersOk := d.GetOk("filter")
Expand Down
8 changes: 4 additions & 4 deletions outscale/data_source_outscale_api_access_rules_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
oscgo "github.com/outscale/osc-sdk-go/v2"
"github.com/terraform-providers/terraform-provider-outscale/utils"
"github.com/outscale/terraform-provider-outscale/utils"
)

func TestAccDataOutscaleOAPIApiAccessRules_basic(t *testing.T) {
func TestAccDataOutscaleApiAccessRules_basic(t *testing.T) {
t.Parallel()
resourceName := "outscale_api_access_rule.rule_data"
resource.Test(t, resource.TestCase{
Expand All @@ -21,7 +21,7 @@ func TestAccDataOutscaleOAPIApiAccessRules_basic(t *testing.T) {
CheckDestroy: testAccDataCheckOutscaleApiAccessRuleDestroy,
Steps: []resource.TestStep{
{
Config: testAccDataOutscaleOAPIApiAccessRulesConfig(),
Config: testAccDataOutscaleApiAccessRulesConfig(),
Check: resource.ComposeTestCheckFunc(
testAccCheckOutscaleApiAccessRuleExists(resourceName),
),
Expand Down Expand Up @@ -68,7 +68,7 @@ func testAccDataCheckOutscaleApiAccessRulesDestroy(s *terraform.State) error {
return nil
}

func testAccDataOutscaleOAPIApiAccessRulesConfig() string {
func testAccDataOutscaleApiAccessRulesConfig() string {
return fmt.Sprintf(`
resource "outscale_ca" "ca_rule" {
ca_pem = file("./test-cert.pem")
Expand Down
12 changes: 6 additions & 6 deletions outscale/data_source_outscale_ca.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
oscgo "github.com/outscale/osc-sdk-go/v2"
"github.com/terraform-providers/terraform-provider-outscale/utils"
"github.com/outscale/terraform-provider-outscale/utils"
)

func dataSourceOutscaleOAPICa() *schema.Resource {
func DataSourceOutscaleCa() *schema.Resource {
return &schema.Resource{
Read: dataSourceOutscaleOAPICaRead,
Read: DataSourceOutscaleCaRead,
Schema: map[string]*schema.Schema{
"filter": dataSourceFiltersSchema(),
"ca_pem": {
Expand All @@ -41,7 +41,7 @@ func dataSourceOutscaleOAPICa() *schema.Resource {
}
}

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

filters, filtersOk := d.GetOk("filter")
Expand All @@ -51,7 +51,7 @@ func dataSourceOutscaleOAPICaRead(d *schema.ResourceData, meta interface{}) erro

params := oscgo.ReadCasRequest{}
if filtersOk {
params.Filters = buildOutscaleOAPIDataSourceCaFilters(filters.(*schema.Set))
params.Filters = buildOutscaleDataSourceCaFilters(filters.(*schema.Set))
}
var resp oscgo.ReadCasResponse
var err error
Expand Down Expand Up @@ -93,7 +93,7 @@ func dataSourceOutscaleOAPICaRead(d *schema.ResourceData, meta interface{}) erro
return nil
}

func buildOutscaleOAPIDataSourceCaFilters(set *schema.Set) *oscgo.FiltersCa {
func buildOutscaleDataSourceCaFilters(set *schema.Set) *oscgo.FiltersCa {
var filters oscgo.FiltersCa
for _, v := range set.List() {
m := v.(map[string]interface{})
Expand Down
6 changes: 3 additions & 3 deletions outscale/data_source_outscale_ca_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
oscgo "github.com/outscale/osc-sdk-go/v2"
"github.com/terraform-providers/terraform-provider-outscale/utils"
"github.com/outscale/terraform-provider-outscale/utils"
)

func TestAccOthers_DataOutscaleCa_basic(t *testing.T) {
Expand All @@ -23,7 +23,7 @@ func TestAccOthers_DataOutscaleCa_basic(t *testing.T) {
CheckDestroy: testAccDataCheckOutscaleCaDestroy,
Steps: []resource.TestStep{
{
Config: testAccDataOutscaleOAPICaConfig(ca_path),
Config: testAccDataOutscaleCaConfig(ca_path),
Check: resource.ComposeTestCheckFunc(
testAccCheckOutscaleCaExists(resourceName),
),
Expand Down Expand Up @@ -72,7 +72,7 @@ func testAccDataCheckOutscaleCaDestroy(s *terraform.State) error {
return nil
}

func testAccDataOutscaleOAPICaConfig(path string) string {
func testAccDataOutscaleCaConfig(path string) string {
return fmt.Sprintf(`
resource "outscale_ca" "ca_test" {
ca_pem = file(%q)
Expand Down
Loading
Loading