Skip to content

Commit

Permalink
Merge pull request #1 from sahaqaa/update_old_references
Browse files Browse the repository at this point in the history
Update old references
  • Loading branch information
sahaqaa authored May 9, 2024
2 parents a8a16eb + 31deca4 commit ea4232d
Show file tree
Hide file tree
Showing 47 changed files with 135 additions and 125 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @OpenVPN/openvpn-cloud-terraform-project-admins
* @OpenVPN/cloudconnexa-terraform-project-admins
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Terraform Provider Cloud Connexa
# Terraform Provider CloudConnexa

<a href="https://www.terraform.io/" target="_blank">
<img align="right" src="https://upload.wikimedia.org/wikipedia/commons/thumb/0/04/Terraform_Logo.svg/2560px-Terraform_Logo.svg.png" alt="Terraform" width="120px">
Expand All @@ -12,18 +12,18 @@
<img align="right" src="https://upload.wikimedia.org/wikipedia/commons/thumb/f/f5/OpenVPN_logo.svg/2560px-OpenVPN_logo.svg.png" alt="OpenVPN" width="150px">
</a>

- [Website Cloud Connexa](https://openvpn.net/cloud-vpn/?utm_source=terraform&utm_medium=docs)
- [Terraform Registry](https://registry.terraform.io/providers/OpenVPN/openvpn-cloud/latest)
- [Website CloudConnexa](https://openvpn.net/cloud-vpn/?utm_source=terraform&utm_medium=docs)
- [Terraform Registry](https://registry.terraform.io/providers/OpenVPN/cloudconnexa/latest)

## Description

The Terraform provider for [Cloud Connexa](https://openvpn.net/cloud-vpn/?utm_source=terraform&utm_medium=docs) allows teams to configure and update Cloud Connexa project parameters via their command line.
The Terraform provider for [CloudConnexa](https://openvpn.net/cloud-vpn/?utm_source=terraform&utm_medium=docs) allows teams to configure and update CloudConnexa project parameters via their command line.

## Maintainers

This provider plugin is maintained by:

- OpenVPN team at [Cloud Connexa](https://openvpn.net/cloud-vpn/?utm_source=terraform&utm_medium=docs)
- OpenVPN team at [CloudConnexa](https://openvpn.net/cloud-vpn/?utm_source=terraform&utm_medium=docs)
- SRE Team at [ANNA Money](https://anna.money/?utm_source=terraform&utm_medium=referral&utm_campaign=docs) / [GitHub ANNA Money](http://github.com/anna-money/)
- [@patoarvizu](https://github.com/patoarvizu)

Expand All @@ -34,17 +34,17 @@ This provider plugin is maintained by:

## Building The Provider

Clone repository to: `$GOPATH/src/github.com/OpenVPN/terraform-provider-openvpn-cloud`
Clone repository to: `$GOPATH/src/github.com/OpenVPN/terraform-provider-cloudconnexa`

```sh
mkdir -p $GOPATH/src/github.com/OpenVPN; cd $GOPATH/src/github.com/OpenVPN
git clone [email protected]:OpenVPN/terraform-provider-openvpn-cloud.git
git clone [email protected]:OpenVPN/terraform-provider-cloudconnexa.git
```

Enter the provider directory and build the provider

```sh
cd $GOPATH/src/github.com/OpenVPN/terraform-provider-openvpn-cloud
cd $GOPATH/src/github.com/OpenVPN/terraform-provider-cloudconnexa
make build
```

Expand All @@ -57,7 +57,7 @@ To compile the provider, run `make build`. This will build the provider and put
```sh
make bin
...
$GOPATH/bin/terraform-provider-openvpn-cloud
$GOPATH/bin/terraform-provider-cloudconnexa
...
```

Expand All @@ -75,4 +75,4 @@ _Note:_ Acceptance tests create real resources, and often cost money to run.
make testacc
```

_**Please note:** This provider, like Cloud Connexa API, is in beta status. Report any problems via issue in this repo._
_**Please note:** This provider, like CloudConnexa API, is in beta status. Report any problems via issue in this repo._
2 changes: 1 addition & 1 deletion cloudconnexa/data_source_connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

func dataSourceConnector() *schema.Resource {
return &schema.Resource{
Description: "Use an `cloudconnexa_connector` data source to read an existing Cloud Connexa connector.",
Description: "Use an `cloudconnexa_connector` data source to read an existing CloudConnexa connector.",
ReadContext: dataSourceConnectorRead,
Schema: map[string]*schema.Schema{
"name": {
Expand Down
2 changes: 1 addition & 1 deletion cloudconnexa/data_source_host.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

func dataSourceHost() *schema.Resource {
return &schema.Resource{
Description: "Use an `cloudconnexa_host` data source to read an existing Cloud Connexa connector.",
Description: "Use an `cloudconnexa_host` data source to read an existing CloudConnexa connector.",
ReadContext: dataSourceHostRead,
Schema: map[string]*schema.Schema{
"name": {
Expand Down
5 changes: 3 additions & 2 deletions cloudconnexa/data_source_network.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@ package cloudconnexa

import (
"context"
"github.com/openvpn/cloudconnexa-go-client/v2/cloudconnexa"
"strconv"
"time"

"github.com/openvpn/cloudconnexa-go-client/v2/cloudconnexa"

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

func dataSourceNetwork() *schema.Resource {
return &schema.Resource{
Description: "Use a `cloudconnexa_network` data source to read an Cloud Connexa network.",
Description: "Use a `cloudconnexa_network` data source to read an CloudConnexa network.",
ReadContext: dataSourceNetworkRead,
Schema: map[string]*schema.Schema{
"network_id": {
Expand Down
7 changes: 4 additions & 3 deletions cloudconnexa/data_source_network_routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,24 @@ package cloudconnexa

import (
"context"
"github.com/openvpn/cloudconnexa-go-client/v2/cloudconnexa"
"strconv"
"time"

"github.com/openvpn/cloudconnexa-go-client/v2/cloudconnexa"

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

func dataSourceNetworkRoutes() *schema.Resource {
return &schema.Resource{
Description: "Use an `cloudconnexa_network_routes` data source to read all the routes associated with an Cloud Connexa network.",
Description: "Use an `cloudconnexa_network_routes` data source to read all the routes associated with an CloudConnexa network.",
ReadContext: dataSourceNetworkRoutesRead,
Schema: map[string]*schema.Schema{
"network_item_id": {
Type: schema.TypeString,
Required: true,
Description: "The id of the Cloud Connexa network of the routes to be discovered.",
Description: "The id of the CloudConnexa network of the routes to be discovered.",
},
"routes": {
Type: schema.TypeList,
Expand Down
5 changes: 3 additions & 2 deletions cloudconnexa/data_source_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@ package cloudconnexa

import (
"context"
"github.com/openvpn/cloudconnexa-go-client/v2/cloudconnexa"
"strconv"
"time"

"github.com/openvpn/cloudconnexa-go-client/v2/cloudconnexa"

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

func dataSourceUser() *schema.Resource {
return &schema.Resource{
Description: "Use a `cloudconnexa_user` data source to read a specific Cloud Connexa user.",
Description: "Use a `cloudconnexa_user` data source to read a specific CloudConnexa user.",
ReadContext: dataSourceUserRead,
Schema: map[string]*schema.Schema{
"user_id": {
Expand Down
5 changes: 3 additions & 2 deletions cloudconnexa/data_source_user_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@ package cloudconnexa

import (
"context"
"github.com/openvpn/cloudconnexa-go-client/v2/cloudconnexa"
"strconv"
"time"

"github.com/openvpn/cloudconnexa-go-client/v2/cloudconnexa"

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

func dataSourceUserGroup() *schema.Resource {
return &schema.Resource{
Description: "Use an `cloudconnexa_user_group` data source to read an Cloud Connexa user group.",
Description: "Use an `cloudconnexa_user_group` data source to read an CloudConnexa user group.",
ReadContext: dataSourceUserGroupRead,
Schema: map[string]*schema.Schema{
"user_group_id": {
Expand Down
5 changes: 3 additions & 2 deletions cloudconnexa/data_source_vpn_region.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@ package cloudconnexa

import (
"context"
"github.com/openvpn/cloudconnexa-go-client/v2/cloudconnexa"
"strconv"
"time"

"github.com/openvpn/cloudconnexa-go-client/v2/cloudconnexa"

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

func dataSourceVpnRegion() *schema.Resource {
return &schema.Resource{
Description: "Use a `cloudconnexa_vpn_region` data source to read an Cloud Connexa VPN region.",
Description: "Use a `cloudconnexa_vpn_region` data source to read an CloudConnexa VPN region.",
ReadContext: dataSourceVpnRegionRead,
Schema: map[string]*schema.Schema{
"region_id": {
Expand Down
7 changes: 4 additions & 3 deletions cloudconnexa/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package cloudconnexa
import (
"context"
"fmt"

"github.com/openvpn/cloudconnexa-go-client/v2/cloudconnexa"

"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
Expand All @@ -22,23 +23,23 @@ func Provider() *schema.Provider {
return &schema.Provider{
Schema: map[string]*schema.Schema{
"client_id": {
Description: "The authentication client_id used to connect to Cloud Connexa API. The value can be sourced from " +
Description: "The authentication client_id used to connect to CloudConnexa API. The value can be sourced from " +
"the `CLOUDCONNEXA_CLIENT_ID` environment variable.",
Type: schema.TypeString,
Optional: true,
Sensitive: true,
DefaultFunc: schema.EnvDefaultFunc(ClientIDEnvVar, nil),
},
"client_secret": {
Description: "The authentication client_secret used to connect to Cloud Connexa API. The value can be sourced from " +
Description: "The authentication client_secret used to connect to CloudConnexa API. The value can be sourced from " +
"the `CLOUDCONNEXA_CLIENT_SECRET` environment variable.",
Type: schema.TypeString,
Optional: true,
Sensitive: true,
DefaultFunc: schema.EnvDefaultFunc(ClientSecretEnvVar, nil),
},
"base_url": {
Description: "The target Cloud Connexa Base API URL in the format `https://[companyName].api.openvpn.com`",
Description: "The target CloudConnexa Base API URL in the format `https://[companyName].api.openvpn.com`",
Type: schema.TypeString,
Required: true,
},
Expand Down
4 changes: 2 additions & 2 deletions cloudconnexa/resource_connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

func resourceConnector() *schema.Resource {
return &schema.Resource{
Description: "Use `cloudconnexa_connector` to create an Cloud Connexa connector.\n\n~> NOTE: This only creates the Cloud Connexa connector object. Additional manual steps are required to associate a host in your infrastructure with the connector. Go to https://openvpn.net/cloud-docs/connector/ for more information.",
Description: "Use `cloudconnexa_connector` to create an CloudConnexa connector.\n\n~> NOTE: This only creates the CloudConnexa connector object. Additional manual steps are required to associate a host in your infrastructure with the connector. Go to https://openvpn.net/cloud-docs/connector/ for more information.",
CreateContext: resourceConnectorCreate,
ReadContext: resourceConnectorRead,
DeleteContext: resourceConnectorDelete,
Expand Down Expand Up @@ -90,7 +90,7 @@ func resourceConnectorCreate(ctx context.Context, d *schema.ResourceData, m inte
return append(diags, diag.Diagnostic{
Severity: diag.Warning,
Summary: "Connector needs to be set up manually",
Detail: "Terraform only creates the Cloud Connexa connector object, but additional manual steps are required to associate a host in your infrastructure with this connector. Go to https://openvpn.net/cloud-docs/connector/ for more information.",
Detail: "Terraform only creates the CloudConnexa connector object, but additional manual steps are required to associate a host in your infrastructure with this connector. Go to https://openvpn.net/cloud-docs/connector/ for more information.",
})
}

Expand Down
7 changes: 4 additions & 3 deletions cloudconnexa/resource_host.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@ package cloudconnexa

import (
"context"
"github.com/openvpn/cloudconnexa-go-client/v2/cloudconnexa"
"hash/fnv"

"github.com/openvpn/cloudconnexa-go-client/v2/cloudconnexa"

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

func resourceHost() *schema.Resource {
return &schema.Resource{
Description: "Use `cloudconnexa_host` to create an Cloud Connexa host.",
Description: "Use `cloudconnexa_host` to create an CloudConnexa host.",
CreateContext: resourceHostCreate,
ReadContext: resourceHostRead,
UpdateContext: resourceHostUpdate,
Expand Down Expand Up @@ -135,7 +136,7 @@ func resourceHostCreate(ctx context.Context, d *schema.ResourceData, m interface
return append(diags, diag.Diagnostic{
Severity: diag.Warning,
Summary: "The connector for this host needs to be set up manually",
Detail: "Terraform only creates the Cloud Connexa connector object for this host, but additional manual steps are required to associate a host in your infrastructure with this connector. Go to https://openvpn.net/cloud-docs/connector/ for more information.",
Detail: "Terraform only creates the CloudConnexa connector object for this host, but additional manual steps are required to associate a host in your infrastructure with this connector. Go to https://openvpn.net/cloud-docs/connector/ for more information.",
})
}

Expand Down
4 changes: 2 additions & 2 deletions cloudconnexa/resource_network.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

func resourceNetwork() *schema.Resource {
return &schema.Resource{
Description: "Use `cloudconnexa_network` to create an Cloud Connexa Network.",
Description: "Use `cloudconnexa_network` to create an CloudConnexa Network.",
CreateContext: resourceNetworkCreate,
ReadContext: resourceNetworkRead,
UpdateContext: resourceNetworkUpdate,
Expand Down Expand Up @@ -210,7 +210,7 @@ func resourceNetworkCreate(ctx context.Context, d *schema.ResourceData, m interf
return append(diags, diag.Diagnostic{
Severity: diag.Warning,
Summary: "The default connector for this network needs to be set up manually",
Detail: "Terraform only creates the Cloud Connexa default connector object for this network, but additional manual steps are required to associate a host in your infrastructure with this connector. Go to https://openvpn.net/cloud-docs/connector/ for more information.",
Detail: "Terraform only creates the CloudConnexa default connector object for this network, but additional manual steps are required to associate a host in your infrastructure with this connector. Go to https://openvpn.net/cloud-docs/connector/ for more information.",
})
}

Expand Down
2 changes: 1 addition & 1 deletion cloudconnexa/resource_route.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

func resourceRoute() *schema.Resource {
return &schema.Resource{
Description: "Use `cloudconnexa_route` to create a route on an Cloud Connexa network.",
Description: "Use `cloudconnexa_route` to create a route on an CloudConnexa network.",
CreateContext: resourceRouteCreate,
UpdateContext: resourceRouteUpdate,
ReadContext: resourceRouteRead,
Expand Down
2 changes: 1 addition & 1 deletion cloudconnexa/resource_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func resourceIPService() *schema.Resource {
},
"description": {
Type: schema.TypeString,
Default: "Created by Terraform Cloud Connexa Provider",
Default: "Created by Terraform CloudConnexa Provider",
ValidateFunc: validation.StringLenBetween(1, 255),
Optional: true,
},
Expand Down
11 changes: 6 additions & 5 deletions cloudconnexa/resource_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package cloudconnexa

import (
"context"

"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
Expand All @@ -10,7 +11,7 @@ import (

func resourceUser() *schema.Resource {
return &schema.Resource{
Description: "Use `cloudconnexa_user` to create an Cloud Connexa user.",
Description: "Use `cloudconnexa_user` to create an CloudConnexa user.",
CreateContext: resourceUserCreate,
ReadContext: resourceUserRead,
UpdateContext: resourceUserUpdate,
Expand All @@ -30,7 +31,7 @@ func resourceUser() *schema.Resource {
Type: schema.TypeString,
Required: true,
ValidateFunc: validation.StringLenBetween(1, 120),
Description: "An invitation to Cloud Connexa account will be sent to this email. It will include an initial password and a VPN setup guide.",
Description: "An invitation to CloudConnexa account will be sent to this email. It will include an initial password and a VPN setup guide.",
},
"first_name": {
Type: schema.TypeString,
Expand Down Expand Up @@ -61,7 +62,7 @@ func resourceUser() *schema.Resource {
Optional: true,
ForceNew: true,
MaxItems: 1,
Description: "When a user signs in, the device that they use will be added to their account. You can read more at [Cloud Connexa Device](https://openvpn.net/cloud-docs/device/).",
Description: "When a user signs in, the device that they use will be added to their account. You can read more at [CloudConnexa Device](https://openvpn.net/cloud-docs/device/).",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"name": {
Expand Down Expand Up @@ -134,7 +135,7 @@ func resourceUserCreate(ctx context.Context, d *schema.ResourceData, m interface
return append(diags, diag.Diagnostic{
Severity: diag.Warning,
Summary: "The user's role cannot be changed using the code.",
Detail: "There is a bug in Cloud Connexa API that prevents setting the user's role during the creation. All users are created as Members by default. Once it's fixed, the provider will be updated accordingly.",
Detail: "There is a bug in CloudConnexa API that prevents setting the user's role during the creation. All users are created as Members by default. Once it's fixed, the provider will be updated accordingly.",
})
}

Expand All @@ -144,7 +145,7 @@ func resourceUserRead(ctx context.Context, d *schema.ResourceData, m interface{}
userId := d.Id()
u, err := c.Users.Get(userId)

// If group_id is not set, Cloud Connexa sets it to the default group.
// If group_id is not set, CloudConnexa sets it to the default group.
var groupId string
if d.Get("group_id") == "" {
// The group has not been explicitly set.
Expand Down
3 changes: 2 additions & 1 deletion cloudconnexa/resource_user_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package cloudconnexa

import (
"context"

"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
Expand All @@ -10,7 +11,7 @@ import (

func resourceUserGroup() *schema.Resource {
return &schema.Resource{
Description: "Use `cloudconnexa_user_group` to create an Cloud Connexa user group.",
Description: "Use `cloudconnexa_user_group` to create an CloudConnexa user group.",
CreateContext: resourceUserGroupCreate,
ReadContext: resourceUserGroupRead,
UpdateContext: resourceUserGroupUpdate,
Expand Down
Loading

0 comments on commit ea4232d

Please sign in to comment.