Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
50bdc8a
Add atlantis config file in the repo
hemanthgk10 Jul 11, 2022
7c2e6a0
Sample terraform infra
hemanthgk10 Jul 11, 2022
2c20513
Add null resource
hemanthgk10 Jul 11, 2022
191c826
add terraform lock file
hemanthgk10 Jul 11, 2022
3124b8a
fix the customize atlantis
hemanthgk10 Jul 11, 2022
a29ff4b
Add monitoring service
hemanthgk10 Jul 11, 2022
95e942f
Add projects information
hemanthgk10 Jul 11, 2022
af45b59
Add projects information
hemanthgk10 Jul 11, 2022
7dd3f50
Add newline after config
hemanthgk10 Jul 11, 2022
78483f0
Add newline after config
hemanthgk10 Jul 11, 2022
a246c80
Add newline after config
hemanthgk10 Jul 11, 2022
589f4a0
Add newline after config
hemanthgk10 Jul 11, 2022
a4b8643
kubernetes file with master password issue
hemanthgk10 Jul 11, 2022
5329460
fix terraform output
hemanthgk10 Jul 11, 2022
2f97fcf
Set the project field
hemanthgk10 Jul 11, 2022
55493f0
specify the hardcoded location
hemanthgk10 Jul 11, 2022
b8a3c4d
generate json file
hemanthgk10 Jul 11, 2022
6dbf4cc
fix command
hemanthgk10 Jul 11, 2022
989b828
use soluble command instead of the checkov
hemanthgk10 Jul 12, 2022
72b44a6
Test environment variables
hemanthgk10 Jul 12, 2022
88121ad
Test environment variables
hemanthgk10 Jul 12, 2022
e8c39b1
Test environment variables
hemanthgk10 Jul 12, 2022
2106020
Test environment variables
hemanthgk10 Jul 12, 2022
4d48be7
Test suppression
hemanthgk10 Jul 12, 2022
21f9e13
Test suppression
hemanthgk10 Jul 12, 2022
df63a66
Test suppression
hemanthgk10 Jul 12, 2022
f0d9ed9
Test suppression
hemanthgk10 Jul 12, 2022
77675bf
test with sub directory
hemanthgk10 Jul 12, 2022
b34f2d7
Add provider
hemanthgk10 Jul 12, 2022
efcb2c8
echo env
hemanthgk10 Jul 12, 2022
94df04d
Print other env variables too
hemanthgk10 Jul 12, 2022
afa04f7
Print other env variables too
hemanthgk10 Jul 12, 2022
913e5b4
check if gitRepo information is available
hemanthgk10 Jul 12, 2022
cfea50b
check if gitRepo owner information is available
hemanthgk10 Jul 12, 2022
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
3 changes: 3 additions & 0 deletions .lacework/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
suppress:
- "ckv-aws-50"
- "ckv-gcp-20"
40 changes: 40 additions & 0 deletions .terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions atlantis.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
version: 3
projects:
- dir: terraform-gcp
workflow: testing
workflows:
testing:
plan:
steps:
- run: "printf 'print getting started: $PLANFILE $WORKSPACE $DIR $HEAD_COMMIT $HEAD_BRANCH_NAME $PULL_NUM $PROJECT_NAME $HEAD_REPO_OWNER $HEAD_BRANCH_NAME $ATLANTIS_TERRAFORM_VERSION'"
- run: "echo $DIR, $WORKSPACE, $HEAD_COMMIT, $PULL_NUM, $PROJECT_NAME, $HEAD_BRANCH_NAME, $HEAD_REPO_NAME, $BASE_REPO_NAME, $HEAD_REPO_OWNER"
- init
- run: "terraform plan -input=false -refresh -out $PLANFILE"
- run: "terraform show -json $PLANFILE > $SHOWFILE"
- run: "soluble ea terraform-plan-scan --plan $SHOWFILE"
- run: "printf 'print meeee'"
43 changes: 43 additions & 0 deletions kubernetes.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
data "google_compute_zones" "available" {
}

# tfsec:ignore:GCP009: test comment
resource "google_container_cluster" "primary" {
name = var.cluster_name
location = "us-central1"
initial_node_count = 1

min_master_version = var.kubernetes_version
node_version = var.kubernetes_version

monitoring_service = "monitoring.googleapis.com/kubernetes"

master_auth {
client_certificate_config {
issue_client_certificate = false
}
}

node_config {
# tfsec:ignore:AVD-GCP-0050
oauth_scopes = [
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/devstorage.read_only",
"https://www.googleapis.com/auth/logging.write",
]

}

}

output "cluster_name" {
value = google_container_cluster.primary.name
}

output "endpoint" {
value = google_container_cluster.primary.endpoint
}

output "node_version" {
value = google_container_cluster.primary.node_version
}
3 changes: 3 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
resource "null_resource" "example" {

}
4 changes: 4 additions & 0 deletions provider.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
provider "google" {
project = "soluble-ci"
region = var.region
}
29 changes: 12 additions & 17 deletions terraform-gcp/kubernetes.tf
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
data "google_compute_zones" "available" {
}

# tfsec:ignore:GCP009: test comment
resource "google_container_cluster" "primary" {
name = var.cluster_name
location = data.google_compute_zones.available.names[0]
initial_node_count = 3
name = var.cluster_name
location = "us-central1"
initial_node_count = 1

min_master_version = var.kubernetes_version
node_version = var.kubernetes_version

node_locations = [
data.google_compute_zones.available.names[1],
]
monitoring_service = "monitoring.googleapis.com/kubernetes"

master_auth {
username = var.username
password = var.password
client_certificate_config {
issue_client_certificate = false
}
}

node_config {
Expand All @@ -22,23 +24,16 @@ resource "google_container_cluster" "primary" {
"https://www.googleapis.com/auth/compute",
"https://www.googleapis.com/auth/devstorage.read_only",
"https://www.googleapis.com/auth/logging.write",

]

}

}

output "cluster_name" {
value = google_container_cluster.primary.name
}

output "primary_zone" {
value = google_container_cluster.primary.zone
}

output "additional_zones" {
value = google_container_cluster.primary.additional_zones
}

output "endpoint" {
value = google_container_cluster.primary.endpoint
}
Expand Down
1 change: 1 addition & 0 deletions terraform-gcp/provider.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
provider "google" {
project = "soluble-ci"
region = var.region
}
24 changes: 24 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
variable "region" {
type = string
default = "us-west-2"
}

variable "kubernetes_version" {
default = "1.16.8"
}

variable "username" {
type = string
default = "ubuntu"
}

variable "password" {
type = string
#tfsec:ignore:GEN001
default = "ubuntu"
}

variable "cluster_name" {
type = string
default = "soluble-gcp-example-cluster"
}