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
import logging | |
import requests | |
import json | |
from opentelemetry.instrumentation.logging import LoggingInstrumentor | |
metadata_server = "http://metadata/computeMetadata/v1/" | |
metadata_flavor = {'Metadata-Flavor': 'Google'} | |
project_id = requests.get( | |
metadata_server + 'project/project-id', headers=metadata_flavor).text |
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
receivers: [0/45] | |
elasticsearch/elasticsearch_elasticsearch: | |
collection_interval: 30s | |
endpoint: https://my-deployment-<CHANGEME>.es.europe-west1.gcp.cloud.es.io | |
nodes: ["_local"] | |
password: <CHANGEME> | |
skip_cluster_metrics: false | |
tls: | |
insecure: false | |
username: elastic |
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
import googleapiclient.discovery | |
compute_v1 = googleapiclient.discovery.build( | |
"compute", "v1", cache_discovery=False | |
) | |
project_id = "<project_id>" | |
project_info = compute_v1.projects().get(project=project_id).execute() |
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
{%- if cookiecutter.use_monitoring == "datadog" %} | |
provider "datadog" { | |
api_url = "https://api.datadoghq.eu/" | |
} | |
resource "datadog_monitor" "alert-slack" { | |
name = "{{cookiecutter.project_name}} function errored" | |
type = "metric alert" | |
message = "{{cookiecutter.project_name}} completion in error !" | |
query = "sum(last_5m):sum:gcp.cloudfunctions.function.execution_count{function_name:${var.function_name},status:error,project_id:${var.project_id}}.as_count() > 0" |
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
name: CI | |
on: | |
push: | |
pull_request: | |
branches: [master] | |
jobs: | |
Quality: | |
runs-on: ubuntu-latest | |
steps: |
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
provider_installation { | |
dev_overrides { | |
"registry.terraform.io/grafana/grafana" = "<path_to_binary>" | |
} | |
direct {} | |
} |
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
terraform { | |
required_providers { | |
grafana = { | |
source = "grafana/grafana" | |
} | |
} | |
} | |
resource "grafana_dashboard" "test" { | |
config_json = <<EOD | |
{ |
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
terraform { | |
required_providers { | |
hello = { | |
source = "registry1.jnahelou.net/jnahelou/hello" | |
} | |
} | |
} | |
provider "hello" { | |
nickname = "jnahelou" |
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
diff --git a/command/providers_mirror.go b/command/providers_mirror.go | |
index 029b08630..db0760d95 100644 | |
--- a/command/providers_mirror.go | |
+++ b/command/providers_mirror.go | |
@@ -4,6 +4,8 @@ import ( | |
"encoding/json" | |
"fmt" | |
"io/ioutil" | |
+ "log" | |
+ "net/http" |
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
--- gems/2.5.0/gems/inspec-iggy-0.6.0/lib/inspec-iggy/terraform/generate.rb 2019-08-08 13:27:19.494150516 +0200 | |
+++ gems/2.5.0/gems/inspec-iggy-0.6.0/lib/inspec-iggy/terraform/generate.rb 2019-10-18 11:46:58.920277083 +0200 | |
@@ -30,31 +30,31 @@ | |
def self.parse_resources(tfstate, resource_path, _platform) | |
# iterate over the resources | |
resources = {} | |
- tfstate['modules'].each do |m| | |
- tf_resources = m['resources'] | |
- tf_resources.keys.each do |tf_res| | |
- resource_type = tf_resources[tf_res]['type'] |
NewerOlder