diff --git a/examples/data-sources/env0_agent_values/data-source.tf b/examples/data-sources/env0_agent_values/data-source.tf new file mode 100644 index 00000000..fc3f7817 --- /dev/null +++ b/examples/data-sources/env0_agent_values/data-source.tf @@ -0,0 +1,10 @@ +resource "env0_project" "project" { + name = "project" +} + +data "env0_agents" "agents" {} + +resource "env0_agent_project_assignment" "gent_project_assignment" { + agent_id = data.env0_agents.agents.0.agent_key + project_id = env0_project.project.id +} diff --git a/examples/data-sources/env0_agents/data-source.tf b/examples/data-sources/env0_agents/data-source.tf new file mode 100644 index 00000000..f7843233 --- /dev/null +++ b/examples/data-sources/env0_agents/data-source.tf @@ -0,0 +1,7 @@ +data "env0_agent_values" "agent_values" { + agent_key = "pr12" +} + +output "values" { + value = data.env0_agent_values.agent_values.values +} diff --git a/examples/data-sources/env0_aws_cost_credentials/data-source.tf b/examples/data-sources/env0_aws_cost_credentials/data-source.tf new file mode 100644 index 00000000..623b0c3e --- /dev/null +++ b/examples/data-sources/env0_aws_cost_credentials/data-source.tf @@ -0,0 +1,7 @@ +data "env0_aws_cost_credentials" "aws_cost_credentials_by_name" { + name = "aws cost credentials" +} + +data "env0_aws_cost_credentials" "aws_cost_credentials_by_id" { + id = "12345676safsd" +} diff --git a/examples/data-sources/env0_aws_credentials/data-source.tf b/examples/data-sources/env0_aws_credentials/data-source.tf new file mode 100644 index 00000000..74eecb59 --- /dev/null +++ b/examples/data-sources/env0_aws_credentials/data-source.tf @@ -0,0 +1,7 @@ +data "env0_aws_credentials" "aws_credentials_by_name" { + name = "aws credentials" +} + +data "env0_aws_credentials" "aws_credentials_by_id" { + id = "12345676safsd" +} diff --git a/examples/data-sources/env0_azure_cost_credentials/data-source.tf b/examples/data-sources/env0_azure_cost_credentials/data-source.tf new file mode 100644 index 00000000..76545ef3 --- /dev/null +++ b/examples/data-sources/env0_azure_cost_credentials/data-source.tf @@ -0,0 +1,7 @@ +data "env0_azure_cost_credentials" "azure_cost_credentials_by_name" { + name = "azure cost credentials" +} + +data "env0_azure_cost_credentials" "azure_cost_credentials_by_id" { + id = "12345676safsd" +} diff --git a/examples/data-sources/env0_azure_credentials/data-source.tf b/examples/data-sources/env0_azure_credentials/data-source.tf new file mode 100644 index 00000000..f7bfccfb --- /dev/null +++ b/examples/data-sources/env0_azure_credentials/data-source.tf @@ -0,0 +1,7 @@ +data "env0_azure_credentials" "azure_credentials_by_name" { + name = "azure credentials" +} + +data "env0_azure_credentials" "azure_credentials_by_id" { + id = "12345676safsd" +} diff --git a/examples/data-sources/env0_cloud_credentials/data-source.tf b/examples/data-sources/env0_cloud_credentials/data-source.tf index d9452c00..fc6ab61d 100644 --- a/examples/data-sources/env0_cloud_credentials/data-source.tf +++ b/examples/data-sources/env0_cloud_credentials/data-source.tf @@ -8,5 +8,5 @@ data "env0_aws_credentials" "aws_credentials" { } output "credentials_name" { - value = var.second_run ? data.env0_aws_credentials.aws_credentials["Test Role arn1"].name : "" + value = data.env0_aws_credentials.aws_credentials["Test Role arn1"].name } diff --git a/examples/data-sources/env0_custom_flow/data-source.tf b/examples/data-sources/env0_custom_flow/data-source.tf new file mode 100644 index 00000000..8a8bd0bb --- /dev/null +++ b/examples/data-sources/env0_custom_flow/data-source.tf @@ -0,0 +1,7 @@ +data "env0_custom_flow" "custom_flow_by_name" { + name = "custom flow 12345" +} + +data "env0_custom_flow" "custom_flow_by_id" { + id = "12345676safsd" +} diff --git a/examples/data-sources/env0_gcp_credentials/data-source.tf b/examples/data-sources/env0_gcp_credentials/data-source.tf new file mode 100644 index 00000000..ee126648 --- /dev/null +++ b/examples/data-sources/env0_gcp_credentials/data-source.tf @@ -0,0 +1,7 @@ +data "env0_gcp_credentials" "gcp_credentials_by_name" { + name = "gcp credentials" +} + +data "env0_gcp_credentials" "gcp_credentials_by_id" { + id = "12345676safsd" +} diff --git a/examples/data-sources/env0_google_cost_credentials/data-source.tf b/examples/data-sources/env0_google_cost_credentials/data-source.tf new file mode 100644 index 00000000..f692b6e6 --- /dev/null +++ b/examples/data-sources/env0_google_cost_credentials/data-source.tf @@ -0,0 +1,7 @@ +data "env0_google_cost_credentials" "google_cost_credentials_by_name" { + name = "google cost credentials" +} + +data "env0_google_cost_credentials" "google_cost_credentials_by_id" { + id = "12345676safsd" +} diff --git a/examples/data-sources/env0_gpg_key/data-source.tf b/examples/data-sources/env0_gpg_key/data-source.tf new file mode 100644 index 00000000..6057fac0 --- /dev/null +++ b/examples/data-sources/env0_gpg_key/data-source.tf @@ -0,0 +1,7 @@ +data "env0_gpg_key" "gpg_key_by_name" { + name = "gpg key fegsdfg" +} + +data "env0_gpg_key" "gpg_key_by_id" { + id = "sdfsdxcvxc-sdfsd-fsdfsd-dsda" +} diff --git a/examples/data-sources/env0_project_policy/data-source.tf b/examples/data-sources/env0_project_policy/data-source.tf new file mode 100644 index 00000000..addbb3d1 --- /dev/null +++ b/examples/data-sources/env0_project_policy/data-source.tf @@ -0,0 +1,7 @@ +data "env0_project" "project" { + name = "project" +} + +data "env0_project_policy" "project_policy" { + project_id = data.env0_project.project.id +} diff --git a/examples/data-sources/env0_provider/data-source.tf b/examples/data-sources/env0_provider/data-source.tf new file mode 100644 index 00000000..71a582e3 --- /dev/null +++ b/examples/data-sources/env0_provider/data-source.tf @@ -0,0 +1,3 @@ +data "env0_provider" "provider" { + id = "adsdasdasd-asdasdas" +} diff --git a/examples/data-sources/env0_team/data-source.tf b/examples/data-sources/env0_team/data-source.tf new file mode 100644 index 00000000..1f1935ed --- /dev/null +++ b/examples/data-sources/env0_team/data-source.tf @@ -0,0 +1,7 @@ +data "env0_team" "by_id" { + id = "asdasdas-asdas-dasdsa" +} + +data "env0_team" "by_name" { + name = "team-12345" +} diff --git a/examples/resources/env0_approval_policy_assignment/resource.tf b/examples/resources/env0_approval_policy_assignment/resource.tf new file mode 100644 index 00000000..f04be1f9 --- /dev/null +++ b/examples/resources/env0_approval_policy_assignment/resource.tf @@ -0,0 +1,17 @@ +data "env0_project" "project" { + name = "project" +} + +resource "env0_approval_policy" "approval_policy" { + name = "approval policy" + repository = "reopository" + github_installation_id = 4234234234 + path = "misc/null-resource" + +} + +resource "env0_approval_policy_assignment" "approval_policy_assignment" { + scope = "PROJECT" + scope_id = data.env0_project.project.id + blueprint_id = env0_approval_policy.approval_policy.id +} diff --git a/examples/resources/env0_aws_cost_credentials/import.sh b/examples/resources/env0_aws_cost_credentials/import.sh new file mode 100644 index 00000000..7875d2d8 --- /dev/null +++ b/examples/resources/env0_aws_cost_credentials/import.sh @@ -0,0 +1,2 @@ +terraform import env0_aws_cost_credentials.by_id d31a6b30-5f69-4d24-937c-22322754934e +terraform import env0_aws_cost_credentials.by_name "cost credentials name" \ No newline at end of file diff --git a/examples/resources/env0_aws_cost_credentials/resource.tf b/examples/resources/env0_aws_cost_credentials/resource.tf new file mode 100644 index 00000000..cae037be --- /dev/null +++ b/examples/resources/env0_aws_cost_credentials/resource.tf @@ -0,0 +1,5 @@ +resource "env0_aws_cost_credentials" "aws_cost_credentials" { + name = "cost credentials" + arn = "arn" + duration = 3600 +} diff --git a/examples/resources/env0_azure_cost_credentials/import.sh b/examples/resources/env0_azure_cost_credentials/import.sh new file mode 100644 index 00000000..6a4489af --- /dev/null +++ b/examples/resources/env0_azure_cost_credentials/import.sh @@ -0,0 +1,2 @@ +terraform import env0_azure_cost_credentials.by_id d31a6b30-5f69-4d24-937c-22322754934e +terraform import env0_azure_cost_credentials.by_name "cost credentials name" \ No newline at end of file diff --git a/examples/resources/env0_azure_cost_credentials/resource.tf b/examples/resources/env0_azure_cost_credentials/resource.tf new file mode 100644 index 00000000..40751644 --- /dev/null +++ b/examples/resources/env0_azure_cost_credentials/resource.tf @@ -0,0 +1,7 @@ +resource "env0_azure_cost_credentials" "azure_cost_credentials" { + name = "cost credentials" + client_id = "client id" + client_secret = "client secret" + subscription_id = "43242342dsdfsdfsdf" + tenant_id = "fsdf-fsdfdsfs-fsdfsdfsd-fsdfsd" +} diff --git a/examples/resources/env0_cost_credentials_project_assignment/resource.tf b/examples/resources/env0_cost_credentials_project_assignment/resource.tf new file mode 100644 index 00000000..78245013 --- /dev/null +++ b/examples/resources/env0_cost_credentials_project_assignment/resource.tf @@ -0,0 +1,16 @@ +resource "env0_azure_cost_credentials" "azure_cost_credentials" { + name = "cost credentials" + client_id = "client id" + client_secret = "client secret" + subscription_id = "43242342dsdfsdfsdf" + tenant_id = "fsdf-fsdfdsfs-fsdfsdfsd-fsdfsd" +} + +resource "env0_project" "project" { + name = "project" +} + +resource "env0_cost_credentials_project_assignment" "cost_project_assignment" { + credential_id = env0_azure_cost_credentials.azure_cost_credentials.id + project_id = env0_project.project.id +} diff --git a/examples/resources/env0_custom_flow/import.sh b/examples/resources/env0_custom_flow/import.sh new file mode 100644 index 00000000..3c5c770b --- /dev/null +++ b/examples/resources/env0_custom_flow/import.sh @@ -0,0 +1,2 @@ +terraform import env0_custom_flow.by_id 29b8037a-f877-48f5-a60b-3152ae1a1405 +terraform import env0_custom_flow.by_name custom-flow-name \ No newline at end of file diff --git a/examples/resources/env0_custom_flow/resource.tf b/examples/resources/env0_custom_flow/resource.tf new file mode 100644 index 00000000..9b0690d6 --- /dev/null +++ b/examples/resources/env0_custom_flow/resource.tf @@ -0,0 +1,10 @@ +data "env0_template" "github_template" { + name = "github_template" +} + +resource "env0_custom_flow" "custom_flow" { + name = "Custom Flow" + repository = data.env0_template.github_template.repository + github_installation_id = data.env0_template.github_template.github_installation_id + path = "custom-flows/opa.yaml" +} diff --git a/examples/resources/env0_gcp_cost_credentials/import.sh b/examples/resources/env0_gcp_cost_credentials/import.sh new file mode 100644 index 00000000..44f1667b --- /dev/null +++ b/examples/resources/env0_gcp_cost_credentials/import.sh @@ -0,0 +1,2 @@ +terraform import env0_gcp_cost_credentials.by_id d31a6b30-5f69-4d24-937c-22322754934e +terraform import env0_gcp_cost_credentials.by_name "cost credentials name" \ No newline at end of file diff --git a/examples/resources/env0_gcp_cost_credentials/resource.tf b/examples/resources/env0_gcp_cost_credentials/resource.tf new file mode 100644 index 00000000..61372e46 --- /dev/null +++ b/examples/resources/env0_gcp_cost_credentials/resource.tf @@ -0,0 +1,5 @@ +resource "env0_gcp_cost_credentials" "gcp_cost_credentials" { + name = "cost credentials" + table_id = "table id" + secret = "sdfsdfsdfsd" +} diff --git a/examples/resources/env0_notification_project_assignment/resource.tf b/examples/resources/env0_notification_project_assignment/resource.tf new file mode 100644 index 00000000..a1c18f7b --- /dev/null +++ b/examples/resources/env0_notification_project_assignment/resource.tf @@ -0,0 +1,15 @@ +resource "env0_notification" "notification" { + name = "notification" + type = "Slack" + value = "https://someurl.com" +} + +resource "env0_project" "project" { + name = "project" +} + +resource "env0_notification_project_assignment" "notification_project_assignment" { + project_id = env0_project.project.id + notification_endpoint_id = env0_notification.notification.id + event_names = ["environmentMarkedForAutoDestroy"] +}