Skip to content

Commit 5327b8f

Browse files
authored
Fix typos (#499)
Just thought I'd contribute some typo fixes I've stumbled upon. FYI, the top typos are: * publis * rooth * parmeter * paramters * somehing * priviliges * susbcription * privilges * remooving * succeses * conenct * dopped * implicitely * mapas
1 parent a9e6984 commit 5327b8f

24 files changed

+41
-41
lines changed

.goreleaser.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ signs:
4040
- artifacts: checksum
4141
args:
4242
# if you are using this is a GitHub action or some other automated pipeline, you
43-
# need to pass the batch flag to indicate its not interactive.
43+
# need to pass the batch flag to indicate it's not interactive.
4444
- "--batch"
4545
- "--local-user"
4646
- "{{ .Env.GPG_FINGERPRINT }}" # set this environment variable for your signing key

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Terraform Provider for PostgreSQL
22
=================================
33

4-
This provider allows to manage with Terraform [Postgresql](https://www.postgresql.org/) objects like databases, extensions, roles, etc..
4+
This provider allows to manage with Terraform [Postgresql](https://www.postgresql.org/) objects like databases, extensions, roles, etc.
55

66
It's published on the [Terraform registry](https://registry.terraform.io/providers/cyrilgdn/postgresql/latest/docs).
77
It replaces https://github.com/hashicorp/terraform-provider-postgresql since Hashicorp stopped hosting community providers in favor of the Terraform registry.

examples/rds/postgresql/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#RDS instance
22

3-
This module creates a RDS Postgresql database instance to test the Terraform provider.
3+
This module creates an RDS Postgresql database instance to test the Terraform provider.
44

55
:warning: **This creates a wide publicly accessible database (with a default hardcoded password).**
66
:warning: **This is only for tests purpose and should be destroyed as soon as possible.**

postgresql/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ func (c *Client) Connect() (*DBConnection, error) {
307307

308308
// We don't want to retain connection
309309
// So when we connect on a specific database which might be managed by terraform,
310-
// we don't keep opened connection in case of the db has to be dopped in the plan.
310+
// we don't keep opened connection in case of the db has to be dropped in the plan.
311311
db.SetMaxIdleConns(0)
312312
db.SetMaxOpenConns(c.config.MaxConns)
313313

postgresql/helpers.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ func withRolesGranted(txn *sql.Tx, roles []string, fn func() error) error {
179179
// in order to manipulate its objects/privileges.
180180
// But PostgreSQL prevents `foo` to be a member of the role `postgres`,
181181
// and for `postgres` to be a member of the role `foo`, at the same time.
182-
// In this case we will temporary revoke this privilege.
182+
// In this case we will temporarily revoke this privilege.
183183
// So, the following queries will happen (in the same transaction):
184184
// - REVOKE postgres FROM foo
185185
// - GRANT foo TO postgres
@@ -294,7 +294,7 @@ func resourcePrivilegesEqual(granted *schema.Set, d *schema.ResourceData) bool {
294294
}
295295

296296
// implicit check: e.g. for object_type schema -> ALL == ["CREATE", "USAGE"]
297-
log.Printf("The wanted privilege is 'ALL'. therefore, we will check if the current privileges are ALL implicitely")
297+
log.Printf("The wanted privilege is 'ALL'. therefore, we will check if the current privileges are ALL implicitly")
298298
implicits := []interface{}{}
299299
for _, p := range allowedPrivileges[objectType] {
300300
if p != "ALL" {

postgresql/helpers_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ import (
99

1010
func TestFindStringSubmatchMap(t *testing.T) {
1111

12-
resultMap := findStringSubmatchMap(`(?si).*\$(?P<Body>.*)\$.*`, "aa $somehing_to_extract$ bb")
12+
resultMap := findStringSubmatchMap(`(?si).*\$(?P<Body>.*)\$.*`, "aa $something_to_extract$ bb")
1313

1414
assert.Equal(t,
1515
resultMap,
1616
map[string]string{
17-
"Body": "somehing_to_extract",
17+
"Body": "something_to_extract",
1818
},
1919
)
2020
}

postgresql/provider.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func Provider() *schema.Provider {
5454
"database": {
5555
Type: schema.TypeString,
5656
Optional: true,
57-
Description: "The name of the database to connect to in order to conenct to (defaults to `postgres`).",
57+
Description: "The name of the database to connect to in order to connect to (defaults to `postgres`).",
5858
DefaultFunc: schema.EnvDefaultFunc("PGDATABASE", "postgres"),
5959
},
6060
"username": {
@@ -120,7 +120,7 @@ func Provider() *schema.Provider {
120120
Description: "Service account to impersonate when using GCP IAM authentication.",
121121
},
122122

123-
// Conection username can be different than database username with user name mapas (e.g.: in Azure)
123+
// Connection username can be different than database username with user name maps (e.g.: in Azure)
124124
// See https://www.postgresql.org/docs/current/auth-username-maps.html
125125
"database_username": {
126126
Type: schema.TypeString,

postgresql/resource_postgresql_database_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ func TestAccPostgresqlDatabase_Update(t *testing.T) {
135135
// Version dependent features values will be set in PreCheck
136136
// because we need to access database to check Postgres version.
137137

138-
// Allow connection depends of Postgres version (needs pg >= 9.5)
138+
// Allow connection depends on Postgres version (needs pg >= 9.5)
139139
var allowConnections bool
140140

141141
resource.Test(t, resource.TestCase{

postgresql/resource_postgresql_default_privileges.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ func resourcePostgreSQLDefaultPrivilegesCreate(db *DBConnection, d *schema.Resou
144144
if err := withRolesGranted(txn, []string{owner}, func() error {
145145

146146
// Revoke all privileges before granting otherwise reducing privileges will not work.
147-
// We just have to revoke them in the same transaction so role will not lost his privileges
147+
// We just have to revoke them in the same transaction so role will not lose its privileges
148148
// between revoke and grant.
149149
if err = revokeRoleDefaultPrivileges(txn, d); err != nil {
150150
return err

postgresql/resource_postgresql_default_privileges_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,8 @@ resource "postgresql_default_privileges" "test_ro" {
195195
})
196196
}
197197

198-
// Test the case where we define default priviliges without specifying a schema. These
199-
// priviliges should apply to newly created resources for the named role in all schema.
198+
// Test the case where we define default privileges without specifying a schema. These
199+
// privileges should apply to newly created resources for the named role in all schema.
200200
func TestAccPostgresqlDefaultPrivileges_NoSchema(t *testing.T) {
201201
skipIfNotAcc(t)
202202

0 commit comments

Comments
 (0)