From ee59bf882f245065dcc611171d6c31751d6d3eda Mon Sep 17 00:00:00 2001 From: "hashicorp-copywrite[bot]" <110428419+hashicorp-copywrite[bot]@users.noreply.github.com> Date: Mon, 15 May 2023 16:12:10 +0000 Subject: [PATCH] [COMPLIANCE] Add Copyright and License Headers --- governance/first-generation/aws/sentinel.hcl | 3 +++ governance/first-generation/external/check_account.sh | 3 +++ governance/first-generation/external/check_account.tf | 3 +++ governance/second-generation/aws/sentinel.hcl | 3 +++ governance/second-generation/azure/sentinel.hcl | 3 +++ .../cloud-agnostic/http-examples/sentinel.hcl | 3 +++ governance/second-generation/cloud-agnostic/sentinel.hcl | 3 +++ governance/second-generation/gcp/sentinel.hcl | 3 +++ governance/second-generation/vmware/sentinel.hcl | 3 +++ infrastructure-as-code/aws-ec2-instance/main.tf | 3 +++ infrastructure-as-code/aws-ec2-instance/outputs.tf | 3 +++ infrastructure-as-code/aws-ec2-instance/variables.tf | 3 +++ .../aws-lambda-ec2-lifecycles/asg_data_collectors.tf | 3 +++ .../aws-lambda-ec2-lifecycles/asg_reaper.tf | 3 +++ .../aws-lambda-ec2-lifecycles/asg_untagged_janitor.tf | 3 +++ .../aws-lambda-ec2-lifecycles/ec2_data_collectors.tf | 3 +++ .../aws-lambda-ec2-lifecycles/ec2_reaper.tf | 3 +++ .../aws-lambda-ec2-lifecycles/ec2_untagged_janitor.tf | 3 +++ .../aws-lambda-ec2-lifecycles/files/ASGJanitor.py | 3 +++ .../aws-lambda-ec2-lifecycles/files/ASGReaper.py | 3 +++ .../aws-lambda-ec2-lifecycles/files/EC2Janitor.py | 3 +++ .../aws-lambda-ec2-lifecycles/files/EC2Reaper.py | 3 +++ .../aws-lambda-ec2-lifecycles/files/getInstanceReport.py | 3 +++ .../aws-lambda-ec2-lifecycles/files/getRunningInstances.py | 3 +++ .../aws-lambda-ec2-lifecycles/files/getTaggedASGs.py | 3 +++ .../aws-lambda-ec2-lifecycles/files/getTaggedInstances.py | 3 +++ .../aws-lambda-ec2-lifecycles/files/getUntaggedASGs.py | 3 +++ .../aws-lambda-ec2-lifecycles/files/getUntaggedInstances.py | 3 +++ .../aws-lambda-ec2-lifecycles/files/notifyInstanceUsage.py | 3 +++ .../files/notifyUntaggedInstances.py | 3 +++ .../aws-lambda-ec2-lifecycles/iam_roles.tf | 3 +++ infrastructure-as-code/aws-lambda-ec2-lifecycles/main.tf | 3 +++ .../aws-lambda-ec2-lifecycles/notify_instance_usage.tf | 3 +++ .../aws-lambda-ec2-lifecycles/notify_untagged.tf | 3 +++ infrastructure-as-code/aws-lambda-ec2-lifecycles/outputs.tf | 3 +++ .../aws-lambda-ec2-lifecycles/variables.tf | 3 +++ infrastructure-as-code/azure-vm/main.tf | 3 +++ infrastructure-as-code/dynamic-aws-creds-from-vault/main.tf | 3 +++ .../networks-firewalls-ingress.tf | 3 +++ .../dynamic-aws-creds-from-vault/networks-firewalls.tf | 3 +++ .../dynamic-aws-creds-from-vault/networks-gateways.tf | 3 +++ .../dynamic-aws-creds-from-vault/networks-routes.tf | 3 +++ .../dynamic-aws-creds-from-vault/networks-subnets.tf | 3 +++ .../dynamic-aws-creds-from-vault/networks.tf | 3 +++ .../dynamic-aws-creds-from-vault/outputs.tf | 3 +++ .../dynamic-aws-creds-from-vault/variables.tf | 3 +++ .../dynamic-aws-creds/consumer-workspace/main.tf | 3 +++ .../dynamic-aws-creds/producer-workspace/main.tf | 3 +++ infrastructure-as-code/gcp-compute-instance/main.tf | 3 +++ .../hashistack/best-practices/terraform-aws/gitignore.tf | 3 +++ .../hashistack/best-practices/terraform-aws/main.tf | 3 +++ .../hashistack/best-practices/terraform-aws/outputs.tf | 3 +++ .../best-practices/terraform-aws/terraform.auto.tfvars | 3 +++ .../hashistack/best-practices/terraform-aws/variables.tf | 3 +++ .../hashistack/dev/terraform-aws/gitignore.tf | 3 +++ infrastructure-as-code/hashistack/dev/terraform-aws/main.tf | 3 +++ .../hashistack/dev/terraform-aws/outputs.tf | 3 +++ .../hashistack/dev/terraform-aws/terraform.auto.tfvars | 3 +++ .../hashistack/dev/terraform-aws/variables.tf | 3 +++ .../hashistack/dev/terraform-azure/_interface.tf | 3 +++ infrastructure-as-code/hashistack/dev/terraform-azure/env.sh | 3 +++ .../hashistack/dev/terraform-azure/main.tf | 3 +++ .../dev/terraform-azure/modules/consul-azure/_interface.tf | 3 +++ .../terraform-azure/modules/consul-azure/instances-consul.tf | 3 +++ .../dev/terraform-azure/modules/consul-azure/main.tf | 3 +++ .../dev/terraform-azure/modules/images-azure/_interface.tf | 3 +++ .../dev/terraform-azure/modules/network-azure/_interface.tf | 3 +++ .../modules/network-azure/firewalls-jumphost.tf | 3 +++ .../modules/network-azure/instances-jumphost.tf | 3 +++ .../dev/terraform-azure/modules/network-azure/main.tf | 3 +++ .../dev/terraform-azure/modules/network-azure/networks.tf | 3 +++ .../dev/terraform-azure/modules/network-azure/subnets.tf | 3 +++ .../terraform-azure/modules/ssh-keypair-data/_interface.tf | 3 +++ .../dev/terraform-azure/modules/ssh-keypair-data/main.tf | 3 +++ .../hashistack/dev/terraform-gcp/_interface.tf | 3 +++ infrastructure-as-code/hashistack/dev/terraform-gcp/main.tf | 3 +++ .../hashistack/quick-start/terraform-aws/gitignore.tf | 3 +++ .../hashistack/quick-start/terraform-aws/main.tf | 3 +++ .../hashistack/quick-start/terraform-aws/outputs.tf | 3 +++ .../quick-start/terraform-aws/terraform.auto.tfvars | 3 +++ .../hashistack/quick-start/terraform-aws/variables.tf | 3 +++ infrastructure-as-code/k8s-cluster-aks/main.tf | 3 +++ infrastructure-as-code/k8s-cluster-aks/outputs.tf | 3 +++ infrastructure-as-code/k8s-cluster-aks/sample-policy.hcl | 3 +++ infrastructure-as-code/k8s-cluster-aks/variables.tf | 3 +++ infrastructure-as-code/k8s-cluster-gke/main.tf | 3 +++ infrastructure-as-code/k8s-cluster-gke/outputs.tf | 3 +++ infrastructure-as-code/k8s-cluster-gke/sample-policy.hcl | 3 +++ infrastructure-as-code/k8s-cluster-gke/variables.tf | 3 +++ infrastructure-as-code/k8s-cluster-openshift-aws/main.tf | 3 +++ .../modules/openshift/00-variables.tf | 3 +++ .../k8s-cluster-openshift-aws/modules/openshift/01-amis.tf | 3 +++ .../k8s-cluster-openshift-aws/modules/openshift/02-vpc.tf | 3 +++ .../modules/openshift/03-security-groups.tf | 3 +++ .../k8s-cluster-openshift-aws/modules/openshift/04-roles.tf | 3 +++ .../k8s-cluster-openshift-aws/modules/openshift/05-nodes.tf | 3 +++ .../k8s-cluster-openshift-aws/modules/openshift/06-dns.tf | 3 +++ .../modules/openshift/07-bastion.tf | 3 +++ .../modules/openshift/08-outputs.tf | 3 +++ .../modules/openshift/files/install-from-bastion.sh | 3 +++ .../modules/openshift/files/setup-master.sh | 3 +++ .../modules/openshift/files/setup-node.sh | 3 +++ infrastructure-as-code/k8s-cluster-openshift-aws/outputs.tf | 3 +++ .../k8s-cluster-openshift-aws/sample-policy.hcl | 3 +++ .../k8s-cluster-openshift-aws/scripts/postinstall-master.sh | 3 +++ .../k8s-cluster-openshift-aws/scripts/postinstall-node.sh | 3 +++ .../k8s-cluster-openshift-aws/variables.tf | 3 +++ .../k8s-cluster-openshift-aws/vault-reviewer-rbac.yaml | 3 +++ .../k8s-cluster-openshift-aws/vault-reviewer.yaml | 3 +++ infrastructure-as-code/k8s-vault-config/main.tf | 3 +++ infrastructure-as-code/k8s-vault-config/outputs.tf | 3 +++ infrastructure-as-code/k8s-vault-config/variables.tf | 3 +++ infrastructure-as-code/s3-buckets-and-policies/main.tf | 3 +++ infrastructure-as-code/sagemaker-notebook/main.tf | 3 +++ .../terraform-0.12-examples/advanced-dynamic-blocks/main.tf | 3 +++ .../advanced-dynamic-blocks/terraform.tfvars | 3 +++ .../dynamic-blocks-and-splat-expressions/main.tf | 3 +++ .../terraform-0.12-examples/first-class-expressions/main.tf | 3 +++ .../terraform-0.12-examples/for-each-for-resources/main.tf | 3 +++ .../for-expressions/lists-and-maps-with-for.tf | 3 +++ .../terraform-0.12-examples/for-expressions/main.tf | 3 +++ .../terraform-0.12-examples/new-template-syntax/main.tf | 3 +++ .../terraform-0.12-examples/rich-value-types/main.tf | 3 +++ .../terraform-0.12-examples/rich-value-types/network/main.tf | 3 +++ .../rich-value-types/network/outputs.tf | 3 +++ .../rich-value-types/network/variables.tf | 3 +++ .../terraform-0.13-examples/module-depends-on/main-1.tf | 3 +++ .../module-depends-on/modules/read-files-complicated/main.tf | 3 +++ .../module-depends-on/modules/read-files/main.tf | 3 +++ .../modules/write-files-complicated/main.tf | 3 +++ .../module-depends-on/modules/write-files/main.tf | 3 +++ .../terraform-gcp-cloudsql/examples/prod-and-dev/main.tf | 3 +++ .../terraform-gcp-cloudsql/examples/simple/main.tf | 3 +++ infrastructure-as-code/terraform-gcp-cloudsql/main.tf | 3 +++ infrastructure-as-code/terraform-gcp-cloudsql/outputs.tf | 3 +++ infrastructure-as-code/terraform-gcp-cloudsql/variables.tf | 3 +++ operations/automation-script/config/main.tf | 3 +++ operations/automation-script/deleteWorkspace.sh | 3 +++ operations/automation-script/loadAndRunWorkspace-jq.sh | 3 +++ operations/automation-script/loadAndRunWorkspace-python.sh | 3 +++ .../sentinel-policies-scripts/create-policy-set-version.sh | 3 +++ operations/sentinel-policies-scripts/delete_policies.sh | 3 +++ operations/sentinel-policies-scripts/export_policies.sh | 3 +++ operations/sentinel-policies-scripts/import_policies.sh | 3 +++ operations/sentinel-policies-scripts/policy-set/sentinel.hcl | 3 +++ operations/variable-scripts/delete-variables.sh | 3 +++ operations/variable-scripts/set-variables.sh | 3 +++ self-serve-infrastructure/cats-and-dogs/backend/Dockerfile | 3 +++ .../cats-and-dogs/backend/vote-db/start_redis.sh | 3 +++ self-serve-infrastructure/cats-and-dogs/frontend/Dockerfile | 3 +++ .../cats-and-dogs/frontend/azure-vote/main.py | 3 +++ .../cats-and-dogs/frontend/azure-vote/static/default.css | 5 +++++ .../cats-and-dogs/frontend/azure-vote/templates/index.html | 5 +++++ .../getting-started/terraform-aws/_interface.tf | 3 +++ .../getting-started/terraform-aws/main.tf | 3 +++ .../getting-started/terraform-aws/outputs.tf | 3 +++ .../getting-started/terraform-aws/terraform.auto.tfvars | 3 +++ .../getting-started/terraform-azure/_interface.tf | 3 +++ .../getting-started/terraform-azure/main.tf | 3 +++ .../getting-started/terraform-azure/outputs.tf | 3 +++ .../getting-started/terraform-azure/terraform.auto.tfvars | 3 +++ .../getting-started/terraform-gcp/_interface.tf | 3 +++ .../getting-started/terraform-gcp/main.tf | 3 +++ .../getting-started/terraform-gcp/outputs.tf | 3 +++ .../getting-started/terraform-gcp/terraform.auto.tfvars | 3 +++ .../k8s-services-openshift/cats-and-dogs.yaml | 3 +++ self-serve-infrastructure/k8s-services-openshift/main.tf | 3 +++ self-serve-infrastructure/k8s-services-openshift/outputs.tf | 3 +++ .../k8s-services-openshift/variables.tf | 3 +++ self-serve-infrastructure/k8s-services/main.tf | 3 +++ self-serve-infrastructure/k8s-services/outputs.tf | 3 +++ self-serve-infrastructure/k8s-services/variables.tf | 3 +++ 172 files changed, 520 insertions(+) diff --git a/governance/first-generation/aws/sentinel.hcl b/governance/first-generation/aws/sentinel.hcl index 1418b1def..d4d81b5e6 100644 --- a/governance/first-generation/aws/sentinel.hcl +++ b/governance/first-generation/aws/sentinel.hcl @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + policy "restrict-aws-region" { enforcement_level = "soft-mandatory" } \ No newline at end of file diff --git a/governance/first-generation/external/check_account.sh b/governance/first-generation/external/check_account.sh index b4c84300f..eccb6cf26 100755 --- a/governance/first-generation/external/check_account.sh +++ b/governance/first-generation/external/check_account.sh @@ -1,4 +1,7 @@ #!/bin/bash +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + #set -e diff --git a/governance/first-generation/external/check_account.tf b/governance/first-generation/external/check_account.tf index 4f2e07a24..872da87ea 100644 --- a/governance/first-generation/external/check_account.tf +++ b/governance/first-generation/external/check_account.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + terraform { required_version = ">= 0.11.7" } diff --git a/governance/second-generation/aws/sentinel.hcl b/governance/second-generation/aws/sentinel.hcl index 3500eac23..4973a778c 100644 --- a/governance/second-generation/aws/sentinel.hcl +++ b/governance/second-generation/aws/sentinel.hcl @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + policy "enforce-mandatory-tags" { enforcement_level = "advisory" } diff --git a/governance/second-generation/azure/sentinel.hcl b/governance/second-generation/azure/sentinel.hcl index 7dd969a18..39ce30e31 100644 --- a/governance/second-generation/azure/sentinel.hcl +++ b/governance/second-generation/azure/sentinel.hcl @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + policy "enforce-mandatory-tags" { enforcement_level = "advisory" } diff --git a/governance/second-generation/cloud-agnostic/http-examples/sentinel.hcl b/governance/second-generation/cloud-agnostic/http-examples/sentinel.hcl index af3eb7da2..64f697d95 100644 --- a/governance/second-generation/cloud-agnostic/http-examples/sentinel.hcl +++ b/governance/second-generation/cloud-agnostic/http-examples/sentinel.hcl @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + policy "check-external-http-api" { enforcement_level = "advisory" } diff --git a/governance/second-generation/cloud-agnostic/sentinel.hcl b/governance/second-generation/cloud-agnostic/sentinel.hcl index 18f3de7df..e0fd28d63 100644 --- a/governance/second-generation/cloud-agnostic/sentinel.hcl +++ b/governance/second-generation/cloud-agnostic/sentinel.hcl @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + policy "prohibited-datasources" { enforcement_level = "advisory" } diff --git a/governance/second-generation/gcp/sentinel.hcl b/governance/second-generation/gcp/sentinel.hcl index ff41d1c3a..73664c518 100644 --- a/governance/second-generation/gcp/sentinel.hcl +++ b/governance/second-generation/gcp/sentinel.hcl @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + policy "enforce-mandatory-labels" { enforcement_level = "advisory" } diff --git a/governance/second-generation/vmware/sentinel.hcl b/governance/second-generation/vmware/sentinel.hcl index 56757ae63..154a30e70 100644 --- a/governance/second-generation/vmware/sentinel.hcl +++ b/governance/second-generation/vmware/sentinel.hcl @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + policy "restrict-vm-cpu-and-memory" { enforcement_level = "advisory" } diff --git a/infrastructure-as-code/aws-ec2-instance/main.tf b/infrastructure-as-code/aws-ec2-instance/main.tf index 7c002a141..68634b7b8 100644 --- a/infrastructure-as-code/aws-ec2-instance/main.tf +++ b/infrastructure-as-code/aws-ec2-instance/main.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + terraform { required_version = ">= 0.11.0" } diff --git a/infrastructure-as-code/aws-ec2-instance/outputs.tf b/infrastructure-as-code/aws-ec2-instance/outputs.tf index cc6ba1604..b5d54e438 100644 --- a/infrastructure-as-code/aws-ec2-instance/outputs.tf +++ b/infrastructure-as-code/aws-ec2-instance/outputs.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + output "public_dns" { value = "${aws_instance.ubuntu.public_dns}" } diff --git a/infrastructure-as-code/aws-ec2-instance/variables.tf b/infrastructure-as-code/aws-ec2-instance/variables.tf index 5a8cb11c5..b8cbc8ae1 100644 --- a/infrastructure-as-code/aws-ec2-instance/variables.tf +++ b/infrastructure-as-code/aws-ec2-instance/variables.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + variable "aws_region" { description = "AWS region" default = "us-west-1" diff --git a/infrastructure-as-code/aws-lambda-ec2-lifecycles/asg_data_collectors.tf b/infrastructure-as-code/aws-lambda-ec2-lifecycles/asg_data_collectors.tf index d4d32c877..8071357de 100644 --- a/infrastructure-as-code/aws-lambda-ec2-lifecycles/asg_data_collectors.tf +++ b/infrastructure-as-code/aws-lambda-ec2-lifecycles/asg_data_collectors.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + # These lambda functions return dictionaries of instances. # Use them with other functions to take action on tagged, untagged # or running instances. diff --git a/infrastructure-as-code/aws-lambda-ec2-lifecycles/asg_reaper.tf b/infrastructure-as-code/aws-lambda-ec2-lifecycles/asg_reaper.tf index 24dac6f42..9589054aa 100644 --- a/infrastructure-as-code/aws-lambda-ec2-lifecycles/asg_reaper.tf +++ b/infrastructure-as-code/aws-lambda-ec2-lifecycles/asg_reaper.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + # Checks the TTL of your instances, if expired can stop or terminate them. resource "aws_lambda_function" "ASGReaper" { filename = "./files/ASGReaper.zip" diff --git a/infrastructure-as-code/aws-lambda-ec2-lifecycles/asg_untagged_janitor.tf b/infrastructure-as-code/aws-lambda-ec2-lifecycles/asg_untagged_janitor.tf index bfb56ce15..6ba79d78c 100644 --- a/infrastructure-as-code/aws-lambda-ec2-lifecycles/asg_untagged_janitor.tf +++ b/infrastructure-as-code/aws-lambda-ec2-lifecycles/asg_untagged_janitor.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + # This lambda is intended to deal with untagged Auto Scaling Groups. resource "aws_lambda_function" "ASGJanitor" { filename = "./files/ASGJanitor.zip" diff --git a/infrastructure-as-code/aws-lambda-ec2-lifecycles/ec2_data_collectors.tf b/infrastructure-as-code/aws-lambda-ec2-lifecycles/ec2_data_collectors.tf index 9fc9e7db4..7784b7909 100644 --- a/infrastructure-as-code/aws-lambda-ec2-lifecycles/ec2_data_collectors.tf +++ b/infrastructure-as-code/aws-lambda-ec2-lifecycles/ec2_data_collectors.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + # These lambda functions return dictionaries of instances. # Use them with other functions to take action on tagged, untagged # or running instances. diff --git a/infrastructure-as-code/aws-lambda-ec2-lifecycles/ec2_reaper.tf b/infrastructure-as-code/aws-lambda-ec2-lifecycles/ec2_reaper.tf index 7d5d12ff8..6873e2b17 100644 --- a/infrastructure-as-code/aws-lambda-ec2-lifecycles/ec2_reaper.tf +++ b/infrastructure-as-code/aws-lambda-ec2-lifecycles/ec2_reaper.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + # Checks the TTL of your instances, if expired can stop or terminate them. resource "aws_lambda_function" "EC2Reaper" { filename = "./files/EC2Reaper.zip" diff --git a/infrastructure-as-code/aws-lambda-ec2-lifecycles/ec2_untagged_janitor.tf b/infrastructure-as-code/aws-lambda-ec2-lifecycles/ec2_untagged_janitor.tf index f01677b89..2538f1fab 100644 --- a/infrastructure-as-code/aws-lambda-ec2-lifecycles/ec2_untagged_janitor.tf +++ b/infrastructure-as-code/aws-lambda-ec2-lifecycles/ec2_untagged_janitor.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + # This lambda is intended to deal with untagged instances by either stopping # and then terminating them according to your lifecycle policy. resource "aws_lambda_function" "EC2Janitor" { diff --git a/infrastructure-as-code/aws-lambda-ec2-lifecycles/files/ASGJanitor.py b/infrastructure-as-code/aws-lambda-ec2-lifecycles/files/ASGJanitor.py index 772c8a33d..c343508df 100644 --- a/infrastructure-as-code/aws-lambda-ec2-lifecycles/files/ASGJanitor.py +++ b/infrastructure-as-code/aws-lambda-ec2-lifecycles/files/ASGJanitor.py @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + # This function deals with ASGs that are untagged. # TODO: Actually write the code to make it work. diff --git a/infrastructure-as-code/aws-lambda-ec2-lifecycles/files/ASGReaper.py b/infrastructure-as-code/aws-lambda-ec2-lifecycles/files/ASGReaper.py index 09ac2645a..955d0e2a2 100644 --- a/infrastructure-as-code/aws-lambda-ec2-lifecycles/files/ASGReaper.py +++ b/infrastructure-as-code/aws-lambda-ec2-lifecycles/files/ASGReaper.py @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + # This function uses the getTaggedASGs.py function to fetch a list of properly tagged ASGs. # It will then determine whether those ASGs have expired, and delete them if they have. # Finally a message is sent to Slack or Email to notify your admins. diff --git a/infrastructure-as-code/aws-lambda-ec2-lifecycles/files/EC2Janitor.py b/infrastructure-as-code/aws-lambda-ec2-lifecycles/files/EC2Janitor.py index 088c2d4bb..3d2fa914b 100644 --- a/infrastructure-as-code/aws-lambda-ec2-lifecycles/files/EC2Janitor.py +++ b/infrastructure-as-code/aws-lambda-ec2-lifecycles/files/EC2Janitor.py @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + # This function deals with instances that are untagged. Use the environment variables # sleepDays and reapDays to set your lifecycle policies. diff --git a/infrastructure-as-code/aws-lambda-ec2-lifecycles/files/EC2Reaper.py b/infrastructure-as-code/aws-lambda-ec2-lifecycles/files/EC2Reaper.py index 527d12b59..f56ab23ab 100644 --- a/infrastructure-as-code/aws-lambda-ec2-lifecycles/files/EC2Reaper.py +++ b/infrastructure-as-code/aws-lambda-ec2-lifecycles/files/EC2Reaper.py @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + # General purpose Lambda function for sending Slack messages, encrypted in transit. import boto3 diff --git a/infrastructure-as-code/aws-lambda-ec2-lifecycles/files/getInstanceReport.py b/infrastructure-as-code/aws-lambda-ec2-lifecycles/files/getInstanceReport.py index 01c16095f..137aff355 100644 --- a/infrastructure-as-code/aws-lambda-ec2-lifecycles/files/getInstanceReport.py +++ b/infrastructure-as-code/aws-lambda-ec2-lifecycles/files/getInstanceReport.py @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + # Example functions for AWS reporting. Use as a base to build your own. import boto3 diff --git a/infrastructure-as-code/aws-lambda-ec2-lifecycles/files/getRunningInstances.py b/infrastructure-as-code/aws-lambda-ec2-lifecycles/files/getRunningInstances.py index 58c68207f..06c0d7b3c 100644 --- a/infrastructure-as-code/aws-lambda-ec2-lifecycles/files/getRunningInstances.py +++ b/infrastructure-as-code/aws-lambda-ec2-lifecycles/files/getRunningInstances.py @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + import boto3 import json import logging diff --git a/infrastructure-as-code/aws-lambda-ec2-lifecycles/files/getTaggedASGs.py b/infrastructure-as-code/aws-lambda-ec2-lifecycles/files/getTaggedASGs.py index cee2b920b..abc750ba4 100644 --- a/infrastructure-as-code/aws-lambda-ec2-lifecycles/files/getTaggedASGs.py +++ b/infrastructure-as-code/aws-lambda-ec2-lifecycles/files/getTaggedASGs.py @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + # Gets a list of properly tagged ASGs and returns some info about them. import boto3 diff --git a/infrastructure-as-code/aws-lambda-ec2-lifecycles/files/getTaggedInstances.py b/infrastructure-as-code/aws-lambda-ec2-lifecycles/files/getTaggedInstances.py index 5203b8b21..8d72499a9 100644 --- a/infrastructure-as-code/aws-lambda-ec2-lifecycles/files/getTaggedInstances.py +++ b/infrastructure-as-code/aws-lambda-ec2-lifecycles/files/getTaggedInstances.py @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + import boto3 import json import logging diff --git a/infrastructure-as-code/aws-lambda-ec2-lifecycles/files/getUntaggedASGs.py b/infrastructure-as-code/aws-lambda-ec2-lifecycles/files/getUntaggedASGs.py index 0ac19e23b..187041506 100644 --- a/infrastructure-as-code/aws-lambda-ec2-lifecycles/files/getUntaggedASGs.py +++ b/infrastructure-as-code/aws-lambda-ec2-lifecycles/files/getUntaggedASGs.py @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + # Gets a list of untagged ASGs and returns some info about them. import boto3 diff --git a/infrastructure-as-code/aws-lambda-ec2-lifecycles/files/getUntaggedInstances.py b/infrastructure-as-code/aws-lambda-ec2-lifecycles/files/getUntaggedInstances.py index 6ee2da96a..664cd819f 100644 --- a/infrastructure-as-code/aws-lambda-ec2-lifecycles/files/getUntaggedInstances.py +++ b/infrastructure-as-code/aws-lambda-ec2-lifecycles/files/getUntaggedInstances.py @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + import boto3 import json import logging diff --git a/infrastructure-as-code/aws-lambda-ec2-lifecycles/files/notifyInstanceUsage.py b/infrastructure-as-code/aws-lambda-ec2-lifecycles/files/notifyInstanceUsage.py index 929bf6431..ec1fcd92e 100644 --- a/infrastructure-as-code/aws-lambda-ec2-lifecycles/files/notifyInstanceUsage.py +++ b/infrastructure-as-code/aws-lambda-ec2-lifecycles/files/notifyInstanceUsage.py @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + # General purpose Lambda function for sending Slack messages, encrypted in transit. import boto3 diff --git a/infrastructure-as-code/aws-lambda-ec2-lifecycles/files/notifyUntaggedInstances.py b/infrastructure-as-code/aws-lambda-ec2-lifecycles/files/notifyUntaggedInstances.py index f8b492137..e18259866 100644 --- a/infrastructure-as-code/aws-lambda-ec2-lifecycles/files/notifyUntaggedInstances.py +++ b/infrastructure-as-code/aws-lambda-ec2-lifecycles/files/notifyUntaggedInstances.py @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + # General purpose Lambda function for sending Slack messages, encrypted in transit. import boto3 diff --git a/infrastructure-as-code/aws-lambda-ec2-lifecycles/iam_roles.tf b/infrastructure-as-code/aws-lambda-ec2-lifecycles/iam_roles.tf index 622d110b2..7eec975fe 100644 --- a/infrastructure-as-code/aws-lambda-ec2-lifecycles/iam_roles.tf +++ b/infrastructure-as-code/aws-lambda-ec2-lifecycles/iam_roles.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + # IAM roles to allow Lambda functions to access different AWS resources. # Fetch our own account id and region. Used in our IAM policy templates. diff --git a/infrastructure-as-code/aws-lambda-ec2-lifecycles/main.tf b/infrastructure-as-code/aws-lambda-ec2-lifecycles/main.tf index 246df71d9..f35dcf80e 100644 --- a/infrastructure-as-code/aws-lambda-ec2-lifecycles/main.tf +++ b/infrastructure-as-code/aws-lambda-ec2-lifecycles/main.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + # Terraform configurations for creating lambda functions to help manage # your ec2 instance lifecycles. The data_collectors.tf and iam_roles.tf # files are required. You may also use one or more of the following: diff --git a/infrastructure-as-code/aws-lambda-ec2-lifecycles/notify_instance_usage.tf b/infrastructure-as-code/aws-lambda-ec2-lifecycles/notify_instance_usage.tf index ebb2413f2..4a95ccd17 100644 --- a/infrastructure-as-code/aws-lambda-ec2-lifecycles/notify_instance_usage.tf +++ b/infrastructure-as-code/aws-lambda-ec2-lifecycles/notify_instance_usage.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + # Notify slack about the # of each instance type you have running. resource "aws_lambda_function" "notifyInstanceUsage" { filename = "./files/notifyInstanceUsage.zip" diff --git a/infrastructure-as-code/aws-lambda-ec2-lifecycles/notify_untagged.tf b/infrastructure-as-code/aws-lambda-ec2-lifecycles/notify_untagged.tf index fc39fd06d..69737dd3d 100644 --- a/infrastructure-as-code/aws-lambda-ec2-lifecycles/notify_untagged.tf +++ b/infrastructure-as-code/aws-lambda-ec2-lifecycles/notify_untagged.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + # Notify about untagged instances and their key names. resource "aws_lambda_function" "notifyUntaggedInstances" { filename = "./files/notifyUntaggedInstances.zip" diff --git a/infrastructure-as-code/aws-lambda-ec2-lifecycles/outputs.tf b/infrastructure-as-code/aws-lambda-ec2-lifecycles/outputs.tf index e69de29bb..48753c8fa 100644 --- a/infrastructure-as-code/aws-lambda-ec2-lifecycles/outputs.tf +++ b/infrastructure-as-code/aws-lambda-ec2-lifecycles/outputs.tf @@ -0,0 +1,3 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + diff --git a/infrastructure-as-code/aws-lambda-ec2-lifecycles/variables.tf b/infrastructure-as-code/aws-lambda-ec2-lifecycles/variables.tf index 03c40f546..54a03f3e0 100644 --- a/infrastructure-as-code/aws-lambda-ec2-lifecycles/variables.tf +++ b/infrastructure-as-code/aws-lambda-ec2-lifecycles/variables.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + variable "region" { default = "us-west-2" description = "AWS Region" diff --git a/infrastructure-as-code/azure-vm/main.tf b/infrastructure-as-code/azure-vm/main.tf index bb948307f..99bc23187 100644 --- a/infrastructure-as-code/azure-vm/main.tf +++ b/infrastructure-as-code/azure-vm/main.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + terraform { required_version = ">= 0.11.1" } diff --git a/infrastructure-as-code/dynamic-aws-creds-from-vault/main.tf b/infrastructure-as-code/dynamic-aws-creds-from-vault/main.tf index 080af5432..b1d717b5b 100644 --- a/infrastructure-as-code/dynamic-aws-creds-from-vault/main.tf +++ b/infrastructure-as-code/dynamic-aws-creds-from-vault/main.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + terraform { required_version = ">= 0.11.0" } diff --git a/infrastructure-as-code/dynamic-aws-creds-from-vault/networks-firewalls-ingress.tf b/infrastructure-as-code/dynamic-aws-creds-from-vault/networks-firewalls-ingress.tf index 69501c689..222c6cd94 100644 --- a/infrastructure-as-code/dynamic-aws-creds-from-vault/networks-firewalls-ingress.tf +++ b/infrastructure-as-code/dynamic-aws-creds-from-vault/networks-firewalls-ingress.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + resource "aws_security_group_rule" "ssh" { security_group_id = "${aws_security_group.egress_public.id}" type = "ingress" diff --git a/infrastructure-as-code/dynamic-aws-creds-from-vault/networks-firewalls.tf b/infrastructure-as-code/dynamic-aws-creds-from-vault/networks-firewalls.tf index bbcf87d23..f72deca69 100644 --- a/infrastructure-as-code/dynamic-aws-creds-from-vault/networks-firewalls.tf +++ b/infrastructure-as-code/dynamic-aws-creds-from-vault/networks-firewalls.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + resource "aws_security_group" "egress_public" { name = "${var.environment_name}-egress_public" description = "${var.environment_name}-egress_public" diff --git a/infrastructure-as-code/dynamic-aws-creds-from-vault/networks-gateways.tf b/infrastructure-as-code/dynamic-aws-creds-from-vault/networks-gateways.tf index 0f17c05c5..5bc1a20ac 100644 --- a/infrastructure-as-code/dynamic-aws-creds-from-vault/networks-gateways.tf +++ b/infrastructure-as-code/dynamic-aws-creds-from-vault/networks-gateways.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + resource "aws_internet_gateway" "main" { vpc_id = "${aws_vpc.main.id}" diff --git a/infrastructure-as-code/dynamic-aws-creds-from-vault/networks-routes.tf b/infrastructure-as-code/dynamic-aws-creds-from-vault/networks-routes.tf index 958f9f85f..a5671a131 100644 --- a/infrastructure-as-code/dynamic-aws-creds-from-vault/networks-routes.tf +++ b/infrastructure-as-code/dynamic-aws-creds-from-vault/networks-routes.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + # # Public # diff --git a/infrastructure-as-code/dynamic-aws-creds-from-vault/networks-subnets.tf b/infrastructure-as-code/dynamic-aws-creds-from-vault/networks-subnets.tf index 633db6aad..14cb8b180 100644 --- a/infrastructure-as-code/dynamic-aws-creds-from-vault/networks-subnets.tf +++ b/infrastructure-as-code/dynamic-aws-creds-from-vault/networks-subnets.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + resource "aws_subnet" "public" { count = "${length(var.vpc_cidrs_public)}" diff --git a/infrastructure-as-code/dynamic-aws-creds-from-vault/networks.tf b/infrastructure-as-code/dynamic-aws-creds-from-vault/networks.tf index 9149f5e0f..4c19d73ca 100644 --- a/infrastructure-as-code/dynamic-aws-creds-from-vault/networks.tf +++ b/infrastructure-as-code/dynamic-aws-creds-from-vault/networks.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + resource "aws_vpc" "main" { cidr_block = "${var.vpc_cidr}" enable_dns_hostnames = true diff --git a/infrastructure-as-code/dynamic-aws-creds-from-vault/outputs.tf b/infrastructure-as-code/dynamic-aws-creds-from-vault/outputs.tf index ca26e2f40..104ce8562 100644 --- a/infrastructure-as-code/dynamic-aws-creds-from-vault/outputs.tf +++ b/infrastructure-as-code/dynamic-aws-creds-from-vault/outputs.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + # Outputs output "vpc_id" { value = "${aws_vpc.main.id}" diff --git a/infrastructure-as-code/dynamic-aws-creds-from-vault/variables.tf b/infrastructure-as-code/dynamic-aws-creds-from-vault/variables.tf index 5ebc08613..0210a965d 100644 --- a/infrastructure-as-code/dynamic-aws-creds-from-vault/variables.tf +++ b/infrastructure-as-code/dynamic-aws-creds-from-vault/variables.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + # Required variables variable "environment_name" { description = "Environment Name" diff --git a/infrastructure-as-code/dynamic-aws-creds/consumer-workspace/main.tf b/infrastructure-as-code/dynamic-aws-creds/consumer-workspace/main.tf index 1d650818e..debfa9278 100644 --- a/infrastructure-as-code/dynamic-aws-creds/consumer-workspace/main.tf +++ b/infrastructure-as-code/dynamic-aws-creds/consumer-workspace/main.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + variable "name" { default = "dynamic-aws-creds-consumer" } variable "path" { default = "../producer-workspace/terraform.tfstate" } variable "ttl" { default = "1" } diff --git a/infrastructure-as-code/dynamic-aws-creds/producer-workspace/main.tf b/infrastructure-as-code/dynamic-aws-creds/producer-workspace/main.tf index 76a7805a2..fa55e06dd 100644 --- a/infrastructure-as-code/dynamic-aws-creds/producer-workspace/main.tf +++ b/infrastructure-as-code/dynamic-aws-creds/producer-workspace/main.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + variable "aws_access_key" { } variable "aws_secret_key" { } variable "name" { default = "dynamic-aws-creds-producer" } diff --git a/infrastructure-as-code/gcp-compute-instance/main.tf b/infrastructure-as-code/gcp-compute-instance/main.tf index 3add9d76a..85bfc2b86 100644 --- a/infrastructure-as-code/gcp-compute-instance/main.tf +++ b/infrastructure-as-code/gcp-compute-instance/main.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + terraform { required_version = ">= 0.11.1" } diff --git a/infrastructure-as-code/hashistack/best-practices/terraform-aws/gitignore.tf b/infrastructure-as-code/hashistack/best-practices/terraform-aws/gitignore.tf index 71b131a87..72e0c3f10 100644 --- a/infrastructure-as-code/hashistack/best-practices/terraform-aws/gitignore.tf +++ b/infrastructure-as-code/hashistack/best-practices/terraform-aws/gitignore.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + # `.tf` files that contain the word "gitignore" are ignored # by git in the `.gitignore` file at the root of this repo. diff --git a/infrastructure-as-code/hashistack/best-practices/terraform-aws/main.tf b/infrastructure-as-code/hashistack/best-practices/terraform-aws/main.tf index 5bfe9e7c4..4a172ac3a 100644 --- a/infrastructure-as-code/hashistack/best-practices/terraform-aws/main.tf +++ b/infrastructure-as-code/hashistack/best-practices/terraform-aws/main.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + module "ssh_keypair_aws_override" { source = "github.com/hashicorp-modules/ssh-keypair-aws" diff --git a/infrastructure-as-code/hashistack/best-practices/terraform-aws/outputs.tf b/infrastructure-as-code/hashistack/best-practices/terraform-aws/outputs.tf index db3cf72a7..611be43e3 100644 --- a/infrastructure-as-code/hashistack/best-practices/terraform-aws/outputs.tf +++ b/infrastructure-as-code/hashistack/best-practices/terraform-aws/outputs.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + output "zREADME" { value = < /home/ec2-user/install-openshift.log 2>&1 diff --git a/infrastructure-as-code/k8s-cluster-openshift-aws/modules/openshift/files/setup-master.sh b/infrastructure-as-code/k8s-cluster-openshift-aws/modules/openshift/files/setup-master.sh index 1642a3721..0c473736f 100644 --- a/infrastructure-as-code/k8s-cluster-openshift-aws/modules/openshift/files/setup-master.sh +++ b/infrastructure-as-code/k8s-cluster-openshift-aws/modules/openshift/files/setup-master.sh @@ -1,4 +1,7 @@ #!/usr/bin/env bash +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + # This script template is expected to be populated during the setup of a # OpenShift node. It runs on host startup. diff --git a/infrastructure-as-code/k8s-cluster-openshift-aws/modules/openshift/files/setup-node.sh b/infrastructure-as-code/k8s-cluster-openshift-aws/modules/openshift/files/setup-node.sh index 6b7291b99..c23895b99 100644 --- a/infrastructure-as-code/k8s-cluster-openshift-aws/modules/openshift/files/setup-node.sh +++ b/infrastructure-as-code/k8s-cluster-openshift-aws/modules/openshift/files/setup-node.sh @@ -1,4 +1,7 @@ #!/usr/bin/env bash +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + # This script template is expected to be populated during the setup of a # OpenShift node. It runs on host startup. diff --git a/infrastructure-as-code/k8s-cluster-openshift-aws/outputs.tf b/infrastructure-as-code/k8s-cluster-openshift-aws/outputs.tf index b073f1328..a96d1b04d 100644 --- a/infrastructure-as-code/k8s-cluster-openshift-aws/outputs.tf +++ b/infrastructure-as-code/k8s-cluster-openshift-aws/outputs.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + # Output some useful variables for quick SSH access etc. output "master_url" { value = "https://${module.openshift.master_public_ip}.xip.io:8443" diff --git a/infrastructure-as-code/k8s-cluster-openshift-aws/sample-policy.hcl b/infrastructure-as-code/k8s-cluster-openshift-aws/sample-policy.hcl index 5582824e1..9bbb20350 100644 --- a/infrastructure-as-code/k8s-cluster-openshift-aws/sample-policy.hcl +++ b/infrastructure-as-code/k8s-cluster-openshift-aws/sample-policy.hcl @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + # Vault Policy file for user roger # Access to secret/roger diff --git a/infrastructure-as-code/k8s-cluster-openshift-aws/scripts/postinstall-master.sh b/infrastructure-as-code/k8s-cluster-openshift-aws/scripts/postinstall-master.sh index 88798aa35..c84d5aa5d 100755 --- a/infrastructure-as-code/k8s-cluster-openshift-aws/scripts/postinstall-master.sh +++ b/infrastructure-as-code/k8s-cluster-openshift-aws/scripts/postinstall-master.sh @@ -1,4 +1,7 @@ #!/usr/bin/env bash +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + # Note: This script runs after the ansible install, use it to make configuration # changes which would otherwise be overwritten by ansible. diff --git a/infrastructure-as-code/k8s-cluster-openshift-aws/scripts/postinstall-node.sh b/infrastructure-as-code/k8s-cluster-openshift-aws/scripts/postinstall-node.sh index b5e0f3c9b..32d50c0e4 100755 --- a/infrastructure-as-code/k8s-cluster-openshift-aws/scripts/postinstall-node.sh +++ b/infrastructure-as-code/k8s-cluster-openshift-aws/scripts/postinstall-node.sh @@ -1,4 +1,7 @@ #!/usr/bin/env bash +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + # Note: This script runs after the ansible install, use it to make configuration # changes which would otherwise be overwritten by ansible. diff --git a/infrastructure-as-code/k8s-cluster-openshift-aws/variables.tf b/infrastructure-as-code/k8s-cluster-openshift-aws/variables.tf index d2b984ffb..ec2d0c2f0 100644 --- a/infrastructure-as-code/k8s-cluster-openshift-aws/variables.tf +++ b/infrastructure-as-code/k8s-cluster-openshift-aws/variables.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + // The region we will deploy our cluster into. variable "region" { description = "Region to deploy the cluster into" diff --git a/infrastructure-as-code/k8s-cluster-openshift-aws/vault-reviewer-rbac.yaml b/infrastructure-as-code/k8s-cluster-openshift-aws/vault-reviewer-rbac.yaml index f4f92f28a..69922d838 100644 --- a/infrastructure-as-code/k8s-cluster-openshift-aws/vault-reviewer-rbac.yaml +++ b/infrastructure-as-code/k8s-cluster-openshift-aws/vault-reviewer-rbac.yaml @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + apiVersion: rbac.authorization.k8s.io/v1beta1 kind: ClusterRoleBinding metadata: diff --git a/infrastructure-as-code/k8s-cluster-openshift-aws/vault-reviewer.yaml b/infrastructure-as-code/k8s-cluster-openshift-aws/vault-reviewer.yaml index f480857ec..d25ac643a 100644 --- a/infrastructure-as-code/k8s-cluster-openshift-aws/vault-reviewer.yaml +++ b/infrastructure-as-code/k8s-cluster-openshift-aws/vault-reviewer.yaml @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + apiVersion: v1 kind: ServiceAccount metadata: diff --git a/infrastructure-as-code/k8s-vault-config/main.tf b/infrastructure-as-code/k8s-vault-config/main.tf index af87c6f73..8f71f5656 100644 --- a/infrastructure-as-code/k8s-vault-config/main.tf +++ b/infrastructure-as-code/k8s-vault-config/main.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + terraform { required_version = ">= 0.11.11" } diff --git a/infrastructure-as-code/k8s-vault-config/outputs.tf b/infrastructure-as-code/k8s-vault-config/outputs.tf index 215943602..300937f3a 100644 --- a/infrastructure-as-code/k8s-vault-config/outputs.tf +++ b/infrastructure-as-code/k8s-vault-config/outputs.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + output "vault_k8s_auth_backend" { value = "${vault_auth_backend.k8s.path}" } diff --git a/infrastructure-as-code/k8s-vault-config/variables.tf b/infrastructure-as-code/k8s-vault-config/variables.tf index 12c310a27..cc594a88a 100644 --- a/infrastructure-as-code/k8s-vault-config/variables.tf +++ b/infrastructure-as-code/k8s-vault-config/variables.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + variable "tfe_organization" { description = "TFE organization" default = "RogerBerlind" diff --git a/infrastructure-as-code/s3-buckets-and-policies/main.tf b/infrastructure-as-code/s3-buckets-and-policies/main.tf index 8673c6f7e..4dec5d1a8 100644 --- a/infrastructure-as-code/s3-buckets-and-policies/main.tf +++ b/infrastructure-as-code/s3-buckets-and-policies/main.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + terraform { required_providers { aws = { diff --git a/infrastructure-as-code/sagemaker-notebook/main.tf b/infrastructure-as-code/sagemaker-notebook/main.tf index a722c9872..daa15ec38 100644 --- a/infrastructure-as-code/sagemaker-notebook/main.tf +++ b/infrastructure-as-code/sagemaker-notebook/main.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + terraform { required_providers { aws = { diff --git a/infrastructure-as-code/terraform-0.12-examples/advanced-dynamic-blocks/main.tf b/infrastructure-as-code/terraform-0.12-examples/advanced-dynamic-blocks/main.tf index 62ef913d8..224987fb3 100644 --- a/infrastructure-as-code/terraform-0.12-examples/advanced-dynamic-blocks/main.tf +++ b/infrastructure-as-code/terraform-0.12-examples/advanced-dynamic-blocks/main.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + variable "settings" { type = list(map(string)) } diff --git a/infrastructure-as-code/terraform-0.12-examples/advanced-dynamic-blocks/terraform.tfvars b/infrastructure-as-code/terraform-0.12-examples/advanced-dynamic-blocks/terraform.tfvars index 90b8081ec..a142be857 100644 --- a/infrastructure-as-code/terraform-0.12-examples/advanced-dynamic-blocks/terraform.tfvars +++ b/infrastructure-as-code/terraform-0.12-examples/advanced-dynamic-blocks/terraform.tfvars @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + settings = [ { namespace = "aws:ec2:vpc" diff --git a/infrastructure-as-code/terraform-0.12-examples/dynamic-blocks-and-splat-expressions/main.tf b/infrastructure-as-code/terraform-0.12-examples/dynamic-blocks-and-splat-expressions/main.tf index 798d04516..fe7fc59a1 100644 --- a/infrastructure-as-code/terraform-0.12-examples/dynamic-blocks-and-splat-expressions/main.tf +++ b/infrastructure-as-code/terraform-0.12-examples/dynamic-blocks-and-splat-expressions/main.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + terraform { required_version = ">= 0.12.0" } diff --git a/infrastructure-as-code/terraform-0.12-examples/first-class-expressions/main.tf b/infrastructure-as-code/terraform-0.12-examples/first-class-expressions/main.tf index 895a9e59c..2adc39517 100644 --- a/infrastructure-as-code/terraform-0.12-examples/first-class-expressions/main.tf +++ b/infrastructure-as-code/terraform-0.12-examples/first-class-expressions/main.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + terraform { required_version = ">= 0.12.0" } diff --git a/infrastructure-as-code/terraform-0.12-examples/for-each-for-resources/main.tf b/infrastructure-as-code/terraform-0.12-examples/for-each-for-resources/main.tf index 0141e312c..64964dc14 100644 --- a/infrastructure-as-code/terraform-0.12-examples/for-each-for-resources/main.tf +++ b/infrastructure-as-code/terraform-0.12-examples/for-each-for-resources/main.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + terraform { required_version = ">= 0.12.6" } diff --git a/infrastructure-as-code/terraform-0.12-examples/for-expressions/lists-and-maps-with-for.tf b/infrastructure-as-code/terraform-0.12-examples/for-expressions/lists-and-maps-with-for.tf index 6972934b4..6fb482754 100644 --- a/infrastructure-as-code/terraform-0.12-examples/for-expressions/lists-and-maps-with-for.tf +++ b/infrastructure-as-code/terraform-0.12-examples/for-expressions/lists-and-maps-with-for.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + terraform { required_version = ">= 0.12.0" } diff --git a/infrastructure-as-code/terraform-0.12-examples/for-expressions/main.tf b/infrastructure-as-code/terraform-0.12-examples/for-expressions/main.tf index 5d235eddf..dcf68488d 100644 --- a/infrastructure-as-code/terraform-0.12-examples/for-expressions/main.tf +++ b/infrastructure-as-code/terraform-0.12-examples/for-expressions/main.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + terraform { required_version = ">= 0.12.0" } diff --git a/infrastructure-as-code/terraform-0.12-examples/new-template-syntax/main.tf b/infrastructure-as-code/terraform-0.12-examples/new-template-syntax/main.tf index 9d82dac3f..bbaf37b31 100644 --- a/infrastructure-as-code/terraform-0.12-examples/new-template-syntax/main.tf +++ b/infrastructure-as-code/terraform-0.12-examples/new-template-syntax/main.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + terraform { required_version = ">= 0.12.0" } diff --git a/infrastructure-as-code/terraform-0.12-examples/rich-value-types/main.tf b/infrastructure-as-code/terraform-0.12-examples/rich-value-types/main.tf index 48bfe4f12..fa7d43d8e 100644 --- a/infrastructure-as-code/terraform-0.12-examples/rich-value-types/main.tf +++ b/infrastructure-as-code/terraform-0.12-examples/rich-value-types/main.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + terraform { required_version = ">= 0.12.0" } diff --git a/infrastructure-as-code/terraform-0.12-examples/rich-value-types/network/main.tf b/infrastructure-as-code/terraform-0.12-examples/rich-value-types/network/main.tf index 2f653b61d..217b850b7 100644 --- a/infrastructure-as-code/terraform-0.12-examples/rich-value-types/network/main.tf +++ b/infrastructure-as-code/terraform-0.12-examples/rich-value-types/network/main.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + resource "aws_vpc" "my_vpc" { cidr_block = var.network_config.vpc_cidr tags = { diff --git a/infrastructure-as-code/terraform-0.12-examples/rich-value-types/network/outputs.tf b/infrastructure-as-code/terraform-0.12-examples/rich-value-types/network/outputs.tf index b09c07bbd..a081ff1b3 100644 --- a/infrastructure-as-code/terraform-0.12-examples/rich-value-types/network/outputs.tf +++ b/infrastructure-as-code/terraform-0.12-examples/rich-value-types/network/outputs.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + output "vpc" { value = aws_vpc.my_vpc } diff --git a/infrastructure-as-code/terraform-0.12-examples/rich-value-types/network/variables.tf b/infrastructure-as-code/terraform-0.12-examples/rich-value-types/network/variables.tf index 2b7eef8bb..553738c92 100644 --- a/infrastructure-as-code/terraform-0.12-examples/rich-value-types/network/variables.tf +++ b/infrastructure-as-code/terraform-0.12-examples/rich-value-types/network/variables.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + variable "network_config" { type = object({ vpc_name = string diff --git a/infrastructure-as-code/terraform-0.13-examples/module-depends-on/main-1.tf b/infrastructure-as-code/terraform-0.13-examples/module-depends-on/main-1.tf index 8cf78bb27..8dbf0636e 100644 --- a/infrastructure-as-code/terraform-0.13-examples/module-depends-on/main-1.tf +++ b/infrastructure-as-code/terraform-0.13-examples/module-depends-on/main-1.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + terraform { required_version = ">= 0.13.0" } diff --git a/infrastructure-as-code/terraform-0.13-examples/module-depends-on/modules/read-files-complicated/main.tf b/infrastructure-as-code/terraform-0.13-examples/module-depends-on/modules/read-files-complicated/main.tf index ac9b59cf4..2ec0c1ff5 100644 --- a/infrastructure-as-code/terraform-0.13-examples/module-depends-on/modules/read-files-complicated/main.tf +++ b/infrastructure-as-code/terraform-0.13-examples/module-depends-on/modules/read-files-complicated/main.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + terraform { required_version = ">= 0.13.0" } diff --git a/infrastructure-as-code/terraform-0.13-examples/module-depends-on/modules/read-files/main.tf b/infrastructure-as-code/terraform-0.13-examples/module-depends-on/modules/read-files/main.tf index 09a5fdc50..97f3ce87e 100644 --- a/infrastructure-as-code/terraform-0.13-examples/module-depends-on/modules/read-files/main.tf +++ b/infrastructure-as-code/terraform-0.13-examples/module-depends-on/modules/read-files/main.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + terraform { required_version = ">= 0.13.0" } diff --git a/infrastructure-as-code/terraform-0.13-examples/module-depends-on/modules/write-files-complicated/main.tf b/infrastructure-as-code/terraform-0.13-examples/module-depends-on/modules/write-files-complicated/main.tf index ec24f99bb..353fd0ac5 100644 --- a/infrastructure-as-code/terraform-0.13-examples/module-depends-on/modules/write-files-complicated/main.tf +++ b/infrastructure-as-code/terraform-0.13-examples/module-depends-on/modules/write-files-complicated/main.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + terraform { required_version = ">= 0.13.0" } diff --git a/infrastructure-as-code/terraform-0.13-examples/module-depends-on/modules/write-files/main.tf b/infrastructure-as-code/terraform-0.13-examples/module-depends-on/modules/write-files/main.tf index 0812e364c..f5ca86c38 100644 --- a/infrastructure-as-code/terraform-0.13-examples/module-depends-on/modules/write-files/main.tf +++ b/infrastructure-as-code/terraform-0.13-examples/module-depends-on/modules/write-files/main.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + terraform { required_version = ">= 0.13.0" } diff --git a/infrastructure-as-code/terraform-gcp-cloudsql/examples/prod-and-dev/main.tf b/infrastructure-as-code/terraform-gcp-cloudsql/examples/prod-and-dev/main.tf index d36360a85..161d00592 100644 --- a/infrastructure-as-code/terraform-gcp-cloudsql/examples/prod-and-dev/main.tf +++ b/infrastructure-as-code/terraform-gcp-cloudsql/examples/prod-and-dev/main.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + variable "gcp_credentials" { description = "GCP credentials needed by Google Terraform provider" } diff --git a/infrastructure-as-code/terraform-gcp-cloudsql/examples/simple/main.tf b/infrastructure-as-code/terraform-gcp-cloudsql/examples/simple/main.tf index f76e7dc79..cc5912600 100644 --- a/infrastructure-as-code/terraform-gcp-cloudsql/examples/simple/main.tf +++ b/infrastructure-as-code/terraform-gcp-cloudsql/examples/simple/main.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + variable "gcp_credentials" { description = "GCP credentials needed by Google Terraform provider" } diff --git a/infrastructure-as-code/terraform-gcp-cloudsql/main.tf b/infrastructure-as-code/terraform-gcp-cloudsql/main.tf index f3060c6aa..5508b0b6f 100644 --- a/infrastructure-as-code/terraform-gcp-cloudsql/main.tf +++ b/infrastructure-as-code/terraform-gcp-cloudsql/main.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + provider "google" { credentials = "${var.gcp_credentials}" project = "${var.gcp_project}" diff --git a/infrastructure-as-code/terraform-gcp-cloudsql/outputs.tf b/infrastructure-as-code/terraform-gcp-cloudsql/outputs.tf index 443ef0bf3..cfde24f1e 100644 --- a/infrastructure-as-code/terraform-gcp-cloudsql/outputs.tf +++ b/infrastructure-as-code/terraform-gcp-cloudsql/outputs.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + output "connection_name" { value = "${google_sql_database_instance.cloudsql-postgres-master.connection_name}" } diff --git a/infrastructure-as-code/terraform-gcp-cloudsql/variables.tf b/infrastructure-as-code/terraform-gcp-cloudsql/variables.tf index 5989150dc..fb3d3c83b 100644 --- a/infrastructure-as-code/terraform-gcp-cloudsql/variables.tf +++ b/infrastructure-as-code/terraform-gcp-cloudsql/variables.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + variable "gcp_credentials" { description = "GCP credentials needed by Google Terraform provider" } diff --git a/operations/automation-script/config/main.tf b/operations/automation-script/config/main.tf index 577cbaab8..fbdc24603 100644 --- a/operations/automation-script/config/main.tf +++ b/operations/automation-script/config/main.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + variable "name" { default = "Walter" } diff --git a/operations/automation-script/deleteWorkspace.sh b/operations/automation-script/deleteWorkspace.sh index 03300f2b6..d135aba04 100755 --- a/operations/automation-script/deleteWorkspace.sh +++ b/operations/automation-script/deleteWorkspace.sh @@ -1,4 +1,7 @@ #!/bin/bash +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + # Script to delete the workspace created by the loadAndRunWorkspace.sh script # Make sure TFE_TOKEN and TFE_ORG environment variables are set diff --git a/operations/automation-script/loadAndRunWorkspace-jq.sh b/operations/automation-script/loadAndRunWorkspace-jq.sh index f24a87aae..d84a32343 100755 --- a/operations/automation-script/loadAndRunWorkspace-jq.sh +++ b/operations/automation-script/loadAndRunWorkspace-jq.sh @@ -1,4 +1,7 @@ #!/bin/bash +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + # Script that clones Terraform configuration from a git repository # creates a workspace if it does not already exist, uploads the # Terraform configuration to it, adds variables to the workspace, diff --git a/operations/automation-script/loadAndRunWorkspace-python.sh b/operations/automation-script/loadAndRunWorkspace-python.sh index d633e021b..779ce4bf9 100755 --- a/operations/automation-script/loadAndRunWorkspace-python.sh +++ b/operations/automation-script/loadAndRunWorkspace-python.sh @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + policy sets#!/bin/bash # Script that clones Terraform configuration from a git repository # creates a workspace if it does not already exist, uploads the diff --git a/operations/sentinel-policies-scripts/create-policy-set-version.sh b/operations/sentinel-policies-scripts/create-policy-set-version.sh index 44a9f0262..c2a4b5b51 100755 --- a/operations/sentinel-policies-scripts/create-policy-set-version.sh +++ b/operations/sentinel-policies-scripts/create-policy-set-version.sh @@ -1,4 +1,7 @@ #!/bin/bash +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + # This script creates a Sentinel policy set version for an existing policy set # and then uploads sentinel.hcl, policies, and modules into it. diff --git a/operations/sentinel-policies-scripts/delete_policies.sh b/operations/sentinel-policies-scripts/delete_policies.sh index 94439bf76..43d548eb7 100755 --- a/operations/sentinel-policies-scripts/delete_policies.sh +++ b/operations/sentinel-policies-scripts/delete_policies.sh @@ -1,4 +1,7 @@ #!/bin/bash +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + # This script deletes all policies from the specified organization # of the specified TFE server diff --git a/operations/sentinel-policies-scripts/export_policies.sh b/operations/sentinel-policies-scripts/export_policies.sh index ec9550e49..400eeccc8 100755 --- a/operations/sentinel-policies-scripts/export_policies.sh +++ b/operations/sentinel-policies-scripts/export_policies.sh @@ -1,4 +1,7 @@ #!/bin/bash +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + # This script exports all policies from the specified organization # of the specified TFE server to the current directory diff --git a/operations/sentinel-policies-scripts/import_policies.sh b/operations/sentinel-policies-scripts/import_policies.sh index 418ee2b22..a1f081b54 100755 --- a/operations/sentinel-policies-scripts/import_policies.sh +++ b/operations/sentinel-policies-scripts/import_policies.sh @@ -1,4 +1,7 @@ #!/bin/bash +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + # This script imports all policies in the current directory into a # specific policy set within a specific organization on a TFE server. diff --git a/operations/sentinel-policies-scripts/policy-set/sentinel.hcl b/operations/sentinel-policies-scripts/policy-set/sentinel.hcl index 5bfa0a3f3..f8431e6b1 100644 --- a/operations/sentinel-policies-scripts/policy-set/sentinel.hcl +++ b/operations/sentinel-policies-scripts/policy-set/sentinel.hcl @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + module "tfplan-functions" { source = "https://raw.githubusercontent.com/hashicorp/terraform-guides/master/governance/third-generation/common-functions/tfplan-functions/tfplan-functions.sentinel" } diff --git a/operations/variable-scripts/delete-variables.sh b/operations/variable-scripts/delete-variables.sh index c31b95a35..d4a0bee71 100755 --- a/operations/variable-scripts/delete-variables.sh +++ b/operations/variable-scripts/delete-variables.sh @@ -1,4 +1,7 @@ #!/bin/bash +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + # Script that deletes all Terraform and environment variables in a Terraform Enterprise (TFE) workspace # Make sure TFE_TOKEN and TFE_ORG environment variables are set diff --git a/operations/variable-scripts/set-variables.sh b/operations/variable-scripts/set-variables.sh index 61281b7ab..e4dad4687 100755 --- a/operations/variable-scripts/set-variables.sh +++ b/operations/variable-scripts/set-variables.sh @@ -1,4 +1,7 @@ #!/bin/bash +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + # Script that sets Terraform and environment variables in a # Terraform Enterprise (TFE) workspace # The variables must be set in .csv, variables.csv or in a similar diff --git a/self-serve-infrastructure/cats-and-dogs/backend/Dockerfile b/self-serve-infrastructure/cats-and-dogs/backend/Dockerfile index 350c344ba..cc34e9151 100644 --- a/self-serve-infrastructure/cats-and-dogs/backend/Dockerfile +++ b/self-serve-infrastructure/cats-and-dogs/backend/Dockerfile @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + FROM redis RUN apt-get update diff --git a/self-serve-infrastructure/cats-and-dogs/backend/vote-db/start_redis.sh b/self-serve-infrastructure/cats-and-dogs/backend/vote-db/start_redis.sh index d2814d457..8d727abc4 100755 --- a/self-serve-infrastructure/cats-and-dogs/backend/vote-db/start_redis.sh +++ b/self-serve-infrastructure/cats-and-dogs/backend/vote-db/start_redis.sh @@ -1,4 +1,7 @@ #!/bin/bash +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + # Authenticate against Vault login_result=$(curl --request POST --data '{"role": "demo", "jwt": "'"${K8S_TOKEN}"'"}' ${VAULT_ADDR}/v1/auth/${VAULT_K8S_BACKEND}/login) diff --git a/self-serve-infrastructure/cats-and-dogs/frontend/Dockerfile b/self-serve-infrastructure/cats-and-dogs/frontend/Dockerfile index 68ba95fec..f361462d8 100644 --- a/self-serve-infrastructure/cats-and-dogs/frontend/Dockerfile +++ b/self-serve-infrastructure/cats-and-dogs/frontend/Dockerfile @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + FROM tiangolo/uwsgi-nginx-flask:python3.6 RUN pip install redis hvac diff --git a/self-serve-infrastructure/cats-and-dogs/frontend/azure-vote/main.py b/self-serve-infrastructure/cats-and-dogs/frontend/azure-vote/main.py index 2d86d3f06..289b24d11 100644 --- a/self-serve-infrastructure/cats-and-dogs/frontend/azure-vote/main.py +++ b/self-serve-infrastructure/cats-and-dogs/frontend/azure-vote/main.py @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + from flask import Flask, request, render_template import os import random diff --git a/self-serve-infrastructure/cats-and-dogs/frontend/azure-vote/static/default.css b/self-serve-infrastructure/cats-and-dogs/frontend/azure-vote/static/default.css index 02f1cc55b..31f46439c 100644 --- a/self-serve-infrastructure/cats-and-dogs/frontend/azure-vote/static/default.css +++ b/self-serve-infrastructure/cats-and-dogs/frontend/azure-vote/static/default.css @@ -1,3 +1,8 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + body { background-color:#F8F8F8; } diff --git a/self-serve-infrastructure/cats-and-dogs/frontend/azure-vote/templates/index.html b/self-serve-infrastructure/cats-and-dogs/frontend/azure-vote/templates/index.html index 603e11002..692e470e5 100644 --- a/self-serve-infrastructure/cats-and-dogs/frontend/azure-vote/templates/index.html +++ b/self-serve-infrastructure/cats-and-dogs/frontend/azure-vote/templates/index.html @@ -1,4 +1,9 @@ + + diff --git a/self-serve-infrastructure/getting-started/terraform-aws/_interface.tf b/self-serve-infrastructure/getting-started/terraform-aws/_interface.tf index a473bc6a6..cb24e2368 100644 --- a/self-serve-infrastructure/getting-started/terraform-aws/_interface.tf +++ b/self-serve-infrastructure/getting-started/terraform-aws/_interface.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + variable "region" { default = "" description = "The default AZ to provision to for the provider" diff --git a/self-serve-infrastructure/getting-started/terraform-aws/main.tf b/self-serve-infrastructure/getting-started/terraform-aws/main.tf index 21af21e77..f4741517e 100644 --- a/self-serve-infrastructure/getting-started/terraform-aws/main.tf +++ b/self-serve-infrastructure/getting-started/terraform-aws/main.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + provider "aws" { region = "${var.region}" } diff --git a/self-serve-infrastructure/getting-started/terraform-aws/outputs.tf b/self-serve-infrastructure/getting-started/terraform-aws/outputs.tf index 3cef362d4..b6b48366d 100644 --- a/self-serve-infrastructure/getting-started/terraform-aws/outputs.tf +++ b/self-serve-infrastructure/getting-started/terraform-aws/outputs.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + output "vpc_id_consumable" { value = "${aws_vpc.demo_vpc.id}" description = "This is the VPC ID for later use" diff --git a/self-serve-infrastructure/getting-started/terraform-aws/terraform.auto.tfvars b/self-serve-infrastructure/getting-started/terraform-aws/terraform.auto.tfvars index 7b5bf6eba..f604f47b8 100644 --- a/self-serve-infrastructure/getting-started/terraform-aws/terraform.auto.tfvars +++ b/self-serve-infrastructure/getting-started/terraform-aws/terraform.auto.tfvars @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + # name = "self-serve-getting-started-override" # Override "name" variable default # instance_type = "t2.small" # Override "instance_type" variable default # tags = { foo = "bar" fizz = "buzz" } # Override "tags" variable default diff --git a/self-serve-infrastructure/getting-started/terraform-azure/_interface.tf b/self-serve-infrastructure/getting-started/terraform-azure/_interface.tf index b334f8f7f..5e451ee63 100644 --- a/self-serve-infrastructure/getting-started/terraform-azure/_interface.tf +++ b/self-serve-infrastructure/getting-started/terraform-azure/_interface.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + variable "rg_name" { default = "" description = "The default name for the Resource Group" diff --git a/self-serve-infrastructure/getting-started/terraform-azure/main.tf b/self-serve-infrastructure/getting-started/terraform-azure/main.tf index 8fda37959..00c574454 100644 --- a/self-serve-infrastructure/getting-started/terraform-azure/main.tf +++ b/self-serve-infrastructure/getting-started/terraform-azure/main.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + provider "azurerm" { subscription_id = "" client_id = "" diff --git a/self-serve-infrastructure/getting-started/terraform-azure/outputs.tf b/self-serve-infrastructure/getting-started/terraform-azure/outputs.tf index f8fa885a6..0bf08a45e 100644 --- a/self-serve-infrastructure/getting-started/terraform-azure/outputs.tf +++ b/self-serve-infrastructure/getting-started/terraform-azure/outputs.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + output "resource_group_consumable" { value = "${azurerm_resource_group.demo_resource_group.name}" description = "The Demo VPC Name for later use" diff --git a/self-serve-infrastructure/getting-started/terraform-azure/terraform.auto.tfvars b/self-serve-infrastructure/getting-started/terraform-azure/terraform.auto.tfvars index 26edac506..bea5b9772 100644 --- a/self-serve-infrastructure/getting-started/terraform-azure/terraform.auto.tfvars +++ b/self-serve-infrastructure/getting-started/terraform-azure/terraform.auto.tfvars @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + # name = "self-serve-getting-started-override" # Override "name" variable default # network_location = "westus" # Override "network_location" variable default # compute_location = "West US 2" # Override "compute_location" variable default diff --git a/self-serve-infrastructure/getting-started/terraform-gcp/_interface.tf b/self-serve-infrastructure/getting-started/terraform-gcp/_interface.tf index 5800e6f9c..8bdded74e 100644 --- a/self-serve-infrastructure/getting-started/terraform-gcp/_interface.tf +++ b/self-serve-infrastructure/getting-started/terraform-gcp/_interface.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + variable "gn_name" { default = "" description = "The default name for the Compute Network" diff --git a/self-serve-infrastructure/getting-started/terraform-gcp/main.tf b/self-serve-infrastructure/getting-started/terraform-gcp/main.tf index 585163db9..21ea47bec 100644 --- a/self-serve-infrastructure/getting-started/terraform-gcp/main.tf +++ b/self-serve-infrastructure/getting-started/terraform-gcp/main.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + provider "google" { project = "terraform-gcp-module-test" region = "us-central1" diff --git a/self-serve-infrastructure/getting-started/terraform-gcp/outputs.tf b/self-serve-infrastructure/getting-started/terraform-gcp/outputs.tf index 97dbc7a3c..b61f2cae4 100644 --- a/self-serve-infrastructure/getting-started/terraform-gcp/outputs.tf +++ b/self-serve-infrastructure/getting-started/terraform-gcp/outputs.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + output "compute_network_consumable" { value = "${google_compute_network.demo_network.name}" description = "The Network Name" diff --git a/self-serve-infrastructure/getting-started/terraform-gcp/terraform.auto.tfvars b/self-serve-infrastructure/getting-started/terraform-gcp/terraform.auto.tfvars index 6197c7ae1..23cc39184 100644 --- a/self-serve-infrastructure/getting-started/terraform-gcp/terraform.auto.tfvars +++ b/self-serve-infrastructure/getting-started/terraform-gcp/terraform.auto.tfvars @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + # name = "self-serve-getting-started-override" # Override "name" variable default # region = "us-west1" # Override "region" variable default # zone = "us-west1-a" # Override "zone" variable default diff --git a/self-serve-infrastructure/k8s-services-openshift/cats-and-dogs.yaml b/self-serve-infrastructure/k8s-services-openshift/cats-and-dogs.yaml index 7f219c012..33fac5e8b 100644 --- a/self-serve-infrastructure/k8s-services-openshift/cats-and-dogs.yaml +++ b/self-serve-infrastructure/k8s-services-openshift/cats-and-dogs.yaml @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + apiVersion: v1 kind: ServiceAccount metadata: diff --git a/self-serve-infrastructure/k8s-services-openshift/main.tf b/self-serve-infrastructure/k8s-services-openshift/main.tf index bae5442fd..74325b1bf 100644 --- a/self-serve-infrastructure/k8s-services-openshift/main.tf +++ b/self-serve-infrastructure/k8s-services-openshift/main.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + terraform { required_version = ">= 0.11.7" } diff --git a/self-serve-infrastructure/k8s-services-openshift/outputs.tf b/self-serve-infrastructure/k8s-services-openshift/outputs.tf index 588e0e643..b6d3cbdf4 100644 --- a/self-serve-infrastructure/k8s-services-openshift/outputs.tf +++ b/self-serve-infrastructure/k8s-services-openshift/outputs.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + output "cats_and_dogs_dns" { value = "http://cats-and-dogs-frontend.${data.terraform_remote_state.k8s_cluster.master_public_ip}.xip.io" } diff --git a/self-serve-infrastructure/k8s-services-openshift/variables.tf b/self-serve-infrastructure/k8s-services-openshift/variables.tf index 348ad94d2..b950056c0 100644 --- a/self-serve-infrastructure/k8s-services-openshift/variables.tf +++ b/self-serve-infrastructure/k8s-services-openshift/variables.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + variable "tfe_organization" { description = "TFE organization" } diff --git a/self-serve-infrastructure/k8s-services/main.tf b/self-serve-infrastructure/k8s-services/main.tf index b437d06f3..521c09996 100644 --- a/self-serve-infrastructure/k8s-services/main.tf +++ b/self-serve-infrastructure/k8s-services/main.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + terraform { required_version = ">= 0.11.11" } diff --git a/self-serve-infrastructure/k8s-services/outputs.tf b/self-serve-infrastructure/k8s-services/outputs.tf index 97f8b21d6..acc8c50e2 100644 --- a/self-serve-infrastructure/k8s-services/outputs.tf +++ b/self-serve-infrastructure/k8s-services/outputs.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + output "cats_and_dogs_ip" { value = "${kubernetes_service.cats-and-dogs-frontend.load_balancer_ingress.0.ip}" } diff --git a/self-serve-infrastructure/k8s-services/variables.tf b/self-serve-infrastructure/k8s-services/variables.tf index 3cd00b6dd..16d4ac7ed 100644 --- a/self-serve-infrastructure/k8s-services/variables.tf +++ b/self-serve-infrastructure/k8s-services/variables.tf @@ -1,3 +1,6 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + variable "tfe_organization" { description = "TFE organization" default = "RogerBerlind"