-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8475b1a
commit 473ac94
Showing
17 changed files
with
214 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
src/mapping/gcp/resource/cloudsql/google_sql_database.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[ | ||
{ | ||
"apply": [ | ||
"cloudsql.databases.create", | ||
"cloudsql.databases.delete", | ||
"cloudsql.databases.get", | ||
"cloudsql.databases.update" | ||
], | ||
"attributes": { | ||
"tags": [] | ||
}, | ||
"destroy": [ | ||
"cloudsql.databases.delete" | ||
], | ||
"modify": [ | ||
"cloudsql.databases.update" | ||
], | ||
"plan": [] | ||
} | ||
] |
22 changes: 22 additions & 0 deletions
22
src/mapping/gcp/resource/cloudsql/google_sql_database_instance.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
[ | ||
{ | ||
"apply": [ | ||
"cloudsql.instances.create", | ||
"cloudsql.instances.get", | ||
"cloudsql.instances.delete", | ||
"cloudsql.instances.update", | ||
"cloudsql.users.list", | ||
"cloudsql.users.delete" | ||
], | ||
"attributes": { | ||
"tags": [] | ||
}, | ||
"destroy": [ | ||
"cloudsql.instances.delete" | ||
], | ||
"modify": [ | ||
"cloudsql.instances.update" | ||
], | ||
"plan": [] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[ | ||
{ | ||
"apply": [ | ||
"cloudsql.users.list", | ||
"cloudsql.users.delete", | ||
"cloudsql.users.create" | ||
], | ||
"attributes": { | ||
"tags": [] | ||
}, | ||
"destroy": [ | ||
"cloudsql.users.delete" | ||
], | ||
"modify": [ | ||
"cloudsql.users.update" | ||
], | ||
"plan": [] | ||
} | ||
] |
20 changes: 20 additions & 0 deletions
20
src/mapping/gcp/resource/compute/google_compute_global_address.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[ | ||
{ | ||
"apply": [ | ||
"compute.globalAddresses.create", | ||
"compute.globalAddresses.delete", | ||
"compute.globalAddresses.get", | ||
"compute.networks.use" | ||
], | ||
"attributes": { | ||
"address_type": [ | ||
"compute.globalAddresses.deleteInternal", | ||
"compute.globalAddresses.createInternal" | ||
], | ||
"tags": [] | ||
}, | ||
"destroy": [], | ||
"modify": [], | ||
"plan": [] | ||
} | ||
] |
11 changes: 11 additions & 0 deletions
11
src/mapping/gcp/resource/google_cloudfunctions_function.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[ | ||
{ | ||
"apply": [], | ||
"attributes": { | ||
"tags": [] | ||
}, | ||
"destroy": [], | ||
"modify": [], | ||
"plan": [] | ||
} | ||
] |
18 changes: 18 additions & 0 deletions
18
src/mapping/gcp/resource/servicenetworking/google_service_networking_connection.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[ | ||
{ | ||
"apply": [ | ||
"resourcemanager.projects.get", | ||
"servicenetworking.services.get", | ||
"servicenetworking.services.addPeering", | ||
"compute.networks.removePeering" | ||
], | ||
"attributes": { | ||
"tags": [] | ||
}, | ||
"destroy": [ | ||
"compute.networks.removePeering" | ||
], | ||
"modify": [], | ||
"plan": [] | ||
} | ||
] |
7 changes: 7 additions & 0 deletions
7
terraform/gcp/backup/google_compute_global_address.private_ip_address.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
resource "google_compute_global_address" "private_ip_address" { | ||
name = "pike" | ||
purpose = "VPC_PEERING" | ||
address_type = "INTERNAL" | ||
prefix_length = 16 | ||
network = "https://www.googleapis.com/compute/v1/projects/pike-361314/global/networks/default" | ||
} |
5 changes: 5 additions & 0 deletions
5
terraform/gcp/backup/google_service_networking_connection.private_vpc_connection.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
resource "google_service_networking_connection" "private_vpc_connection" { | ||
network = "https://www.googleapis.com/compute/v1/projects/pike-361314/global/networks/default" | ||
service = "servicenetworking.googleapis.com" | ||
reserved_peering_ranges = ["pike"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
resource "google_sql_database" "pike" { | ||
name = "pike" | ||
instance = google_sql_database_instance.main.name | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
resource "random_id" "db_name_suffix" { | ||
byte_length = 4 | ||
} | ||
|
||
resource "google_sql_database_instance" "main" { | ||
|
||
name = "main-instance-${random_id.db_name_suffix.hex}" | ||
database_version = "MYSQL_5_7" | ||
region = "europe-west1" | ||
settings { | ||
tier = "db-f1-micro" | ||
user_labels = { | ||
pike = "permissions" | ||
} | ||
} | ||
//encryption_key_name = "projects/pike-361314/locations/europe-west1/keyRings/pike/cryptoKeys/pike-key-keep" | ||
deletion_protection = false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
resource "google_sql_user" "users" { | ||
name = "me" | ||
instance = google_sql_database_instance.main.name | ||
// host = "me.com" | ||
password = "changemeagain" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#resource "google_cloudfunctions_function" "pike" {} |
15 changes: 15 additions & 0 deletions
15
terraform/gcp/google_cloudfunctions_function_iam_member.invoker.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# IAM entry for all users to invoke the function | ||
#resource "google_cloudfunctions_function_iam_member" "invoker" { | ||
# project = google_cloudfunctions_function.lambda.project | ||
# region = google_cloudfunctions_function.lambda.region | ||
# cloud_function = google_cloudfunctions_function.lambda.name | ||
# | ||
# role = "roles/cloudfunctions.invoker" | ||
# member = var.invoker | ||
#} | ||
# | ||
# | ||
#variable "invoker" { | ||
# description = "Set who can invoke the lambda" | ||
# default="allUsers" | ||
#} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters