Skip to content

Commit 49706d3

Browse files
hashicorp-copywrite[bot]roncodingenthusiastjosh
authored
[COMPLIANCE] Add Copyright and License Headers (hashicorp#85)
* [COMPLIANCE] Add Copyright and License Headers * add copyright to test files * Remove all template/test lines with license/copyright headers * exempt generated files from copyright headers autogeneration --------- Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com> Co-authored-by: Ronald Ekambi <ronekambi@gmail.com> Co-authored-by: josh <josh.timmons@hashicorp.com>
1 parent caf1406 commit 49706d3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+235
-1
lines changed

.copywrite.hcl

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
schema_version = 1
2+
3+
project {
4+
license = "MPL-2.0"
5+
copyright_year = 2021
6+
7+
# (OPTIONAL) A list of globs that should not have copyright/license headers.
8+
# Supports doublestar glob patterns for more flexibility in defining which
9+
# files or folders should be ignored
10+
header_ignore = [
11+
# tests file and generated files
12+
"hcp-ui-templates/ec2-existing-vpc/main.tf",
13+
"hcp-ui-templates/ec2/main.tf",
14+
"hcp-ui-templates/ecs-existing-vpc/main.tf",
15+
"hcp-ui-templates/ecs/main.tf",
16+
"hcp-ui-templates/eks-existing-vpc/main.tf",
17+
"hcp-ui-templates/eks/main.tf",
18+
"test/hcp/testdata/ec2-existing-vpc.golden",
19+
"test/hcp/testdata/ec2.golden",
20+
"test/hcp/testdata/ecs-existing-vpc.golden",
21+
"test/hcp/testdata/ecs.golden",
22+
"test/hcp/testdata/eks-existing-vpc.golden",
23+
"test/hcp/testdata/eks.golden",
24+
]
25+
}

examples/existing-vpc/main.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) HashiCorp, Inc.
2+
# SPDX-License-Identifier: MPL-2.0
3+
14
terraform {
25
required_providers {
36
aws = {

examples/hcp-ec2-demo/main.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) HashiCorp, Inc.
2+
# SPDX-License-Identifier: MPL-2.0
3+
14
data "aws_availability_zones" "available" {
25
filter {
36
name = "zone-type"

examples/hcp-ec2-demo/output.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) HashiCorp, Inc.
2+
# SPDX-License-Identifier: MPL-2.0
3+
14
output "consul_root_token" {
25
value = hcp_consul_cluster_root_token.token.secret_id
36
sensitive = true

examples/hcp-ec2-demo/providers.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) HashiCorp, Inc.
2+
# SPDX-License-Identifier: MPL-2.0
3+
14
terraform {
25
required_providers {
36
aws = {

examples/hcp-ec2-demo/variables.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) HashiCorp, Inc.
2+
# SPDX-License-Identifier: MPL-2.0
3+
14
variable "cluster_id" {
25
type = string
36
description = "The name of your HCP Consul cluster"

examples/hcp-ecs-demo/main.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) HashiCorp, Inc.
2+
# SPDX-License-Identifier: MPL-2.0
3+
14
data "aws_availability_zones" "available" {
25
filter {
36
name = "zone-type"

examples/hcp-ecs-demo/output.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) HashiCorp, Inc.
2+
# SPDX-License-Identifier: MPL-2.0
3+
14
output "consul_root_token" {
25
value = hcp_consul_cluster_root_token.token.secret_id
36
sensitive = true

examples/hcp-ecs-demo/providers.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) HashiCorp, Inc.
2+
# SPDX-License-Identifier: MPL-2.0
3+
14
terraform {
25
required_providers {
36
aws = {

examples/hcp-ecs-demo/variables.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) HashiCorp, Inc.
2+
# SPDX-License-Identifier: MPL-2.0
3+
14
variable "cluster_id" {
25
type = string
36
description = "The name of your HCP Consul cluster"

examples/hcp-eks-demo/main.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) HashiCorp, Inc.
2+
# SPDX-License-Identifier: MPL-2.0
3+
14
data "aws_availability_zones" "available" {
25
filter {
36
name = "zone-type"

examples/hcp-eks-demo/output.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) HashiCorp, Inc.
2+
# SPDX-License-Identifier: MPL-2.0
3+
14
output "consul_root_token" {
25
value = hcp_consul_cluster_root_token.token.secret_id
36
sensitive = true

examples/hcp-eks-demo/providers.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) HashiCorp, Inc.
2+
# SPDX-License-Identifier: MPL-2.0
3+
14
terraform {
25
required_providers {
36
aws = {

examples/hcp-eks-demo/variables.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) HashiCorp, Inc.
2+
# SPDX-License-Identifier: MPL-2.0
3+
14
variable "cluster_id" {
25
type = string
36
description = "The name of your HCP Consul cluster"

hcp-ui-templates/ec2-existing-vpc/main.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ locals {
1010
ssm = true
1111
}
1212

13+
1314
terraform {
1415
required_providers {
1516
aws = {
@@ -40,6 +41,7 @@ provider "nomad" {
4041
}
4142

4243

44+
4345
resource "hcp_hvn" "main" {
4446
hvn_id = local.hvn_id
4547
cloud_provider = "aws"
@@ -114,6 +116,7 @@ module "hashicups" {
114116
module.aws_ec2_consul_client
115117
]
116118
}
119+
117120
output "consul_root_token" {
118121
value = hcp_consul_cluster_root_token.token.secret_id
119122
sensitive = true

hcp-ui-templates/ec2/main.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ locals {
77
ssm = true
88
}
99

10+
1011
terraform {
1112
required_providers {
1213
aws = {
@@ -36,6 +37,7 @@ provider "nomad" {
3637
http_auth = "nomad:${hcp_consul_cluster_root_token.token.secret_id}"
3738
}
3839

40+
3941
data "aws_availability_zones" "available" {
4042
filter {
4143
name = "zone-type"
@@ -129,6 +131,7 @@ module "hashicups" {
129131
module.aws_ec2_consul_client
130132
]
131133
}
134+
132135
output "consul_root_token" {
133136
value = hcp_consul_cluster_root_token.token.secret_id
134137
sensitive = true

hcp-ui-templates/ecs-existing-vpc/main.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ locals {
1212
private_subnet2 = "{{ .PrivateSubnet2 }}"
1313
}
1414

15+
1516
terraform {
1617
required_providers {
1718
aws = {
@@ -36,6 +37,7 @@ provider "consul" {
3637
token = hcp_consul_cluster_root_token.token.secret_id
3738
}
3839

40+
3941
resource "hcp_hvn" "main" {
4042
hvn_id = local.hvn_id
4143
cloud_provider = "aws"
@@ -85,6 +87,7 @@ module "aws_ecs_cluster" {
8587
security_group_id = module.aws_hcp_consul.security_group_id
8688
vpc_id = local.vpc_id
8789
}
90+
8891
output "consul_root_token" {
8992
value = hcp_consul_cluster_root_token.token.secret_id
9093
sensitive = true

hcp-ui-templates/ecs/main.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ locals {
66
install_demo_app = true
77
}
88

9+
910
terraform {
1011
required_providers {
1112
aws = {
@@ -30,6 +31,7 @@ provider "consul" {
3031
token = hcp_consul_cluster_root_token.token.secret_id
3132
}
3233

34+
3335
data "aws_availability_zones" "available" {
3436
filter {
3537
name = "zone-type"
@@ -100,6 +102,7 @@ module "aws_ecs_cluster" {
100102
security_group_id = module.aws_hcp_consul.security_group_id
101103
vpc_id = module.vpc.vpc_id
102104
}
105+
103106
output "consul_root_token" {
104107
value = hcp_consul_cluster_root_token.token.secret_id
105108
sensitive = true

hcp-ui-templates/eks-existing-vpc/main.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ locals {
1010
install_eks_cluster = true
1111
}
1212

13+
1314
terraform {
1415
required_providers {
1516
aws = {
@@ -64,6 +65,7 @@ provider "kubectl" {
6465
token = local.install_eks_cluster ? data.aws_eks_cluster_auth.cluster[0].token : ""
6566
load_config_file = false
6667
}
68+
6769
data "aws_eks_cluster" "cluster" {
6870
count = local.install_eks_cluster ? 1 : 0
6971
name = module.eks[0].cluster_id
@@ -156,6 +158,7 @@ module "demo_app" {
156158

157159
depends_on = [module.eks_consul_client]
158160
}
161+
159162
output "consul_root_token" {
160163
value = hcp_consul_cluster_root_token.token.secret_id
161164
sensitive = true

hcp-ui-templates/eks/main.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ locals {
77
install_eks_cluster = true
88
}
99

10+
1011
terraform {
1112
required_providers {
1213
aws = {
@@ -61,6 +62,7 @@ provider "kubectl" {
6162
token = local.install_eks_cluster ? data.aws_eks_cluster_auth.cluster[0].token : ""
6263
load_config_file = false
6364
}
65+
6466
data "aws_availability_zones" "available" {
6567
filter {
6668
name = "zone-type"
@@ -174,6 +176,7 @@ module "demo_app" {
174176

175177
depends_on = [module.eks_consul_client]
176178
}
179+
177180
output "consul_root_token" {
178181
value = hcp_consul_cluster_root_token.token.secret_id
179182
sensitive = true

main.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) HashiCorp, Inc.
2+
# SPDX-License-Identifier: MPL-2.0
3+
14
terraform {
25
required_version = ">= 1.0.0"
36
required_providers {

modules/ec2-demo-app/intentions.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) HashiCorp, Inc.
2+
# SPDX-License-Identifier: MPL-2.0
3+
14
resource "consul_config_entry" "service_intentions_deny" {
25
name = "*"
36
kind = "service-intentions"

modules/ec2-demo-app/nomad.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) HashiCorp, Inc.
2+
# SPDX-License-Identifier: MPL-2.0
3+
14
resource "nomad_job" "hashicups" {
25
jobspec = file("${path.module}/templates/hashicups.nomad")
36
deregister_on_destroy = false

modules/ec2-demo-app/templates/hashicups-frontend-v2.nomad

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) HashiCorp, Inc.
2+
# SPDX-License-Identifier: MPL-2.0
3+
14
variable "frontend_port" {
25
type = number
36
default = 3001

modules/ec2-demo-app/templates/hashicups-frontend.nomad

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) HashiCorp, Inc.
2+
# SPDX-License-Identifier: MPL-2.0
3+
14
variable "frontend_port" {
25
type = number
36
default = 3000

modules/ec2-demo-app/templates/hashicups.nomad

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) HashiCorp, Inc.
2+
# SPDX-License-Identifier: MPL-2.0
3+
14
variable "public_api_port" {
25
type = number
36
default = 7070

modules/ec2-demo-app/templates/ingress.nomad

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) HashiCorp, Inc.
2+
# SPDX-License-Identifier: MPL-2.0
3+
14
job "ingress-demo" {
25

36
datacenters = ["dc1"]

modules/hcp-ec2-client/main.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) HashiCorp, Inc.
2+
# SPDX-License-Identifier: MPL-2.0
3+
14
data "aws_ami" "ubuntu" {
25
most_recent = true
36

modules/hcp-ec2-client/output.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) HashiCorp, Inc.
2+
# SPDX-License-Identifier: MPL-2.0
3+
14
output "host_id" {
25
value = aws_instance.host.id
36
}

modules/hcp-ec2-client/services.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) HashiCorp, Inc.
2+
# SPDX-License-Identifier: MPL-2.0
3+
14
# This is needed for a tutorial on blue green deployments.
25
# This helps show the functionality to make it happen and
36
# hide some of the complexity like service defaults

modules/hcp-ec2-client/templates/setup.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
#!/usr/bin/env bash
2+
# Copyright (c) HashiCorp, Inc.
3+
# SPDX-License-Identifier: MPL-2.0
4+
25
set -ex
36

47
start_service () {

modules/hcp-ec2-client/templates/user_data.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
#!/usr/bin/env bash
2+
# Copyright (c) HashiCorp, Inc.
3+
# SPDX-License-Identifier: MPL-2.0
4+
25

36
cd /home/ubuntu
47
echo "${setup}" | base64 -d | zcat > setup.sh

modules/hcp-ec2-client/variables.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) HashiCorp, Inc.
2+
# SPDX-License-Identifier: MPL-2.0
3+
14
variable "allowed_http_cidr_blocks" {
25
description = "A list of CIDR-formatted IP address ranges from which the EC2 Instances will allow connections over 8080"
36
type = list(string)

modules/hcp-ecs-client/intentions.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) HashiCorp, Inc.
2+
# SPDX-License-Identifier: MPL-2.0
3+
14
resource "consul_config_entry" "service_intentions_deny" {
25
name = "*"
36
kind = "service-intentions"

modules/hcp-ecs-client/loadbalancer.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) HashiCorp, Inc.
2+
# SPDX-License-Identifier: MPL-2.0
3+
14
resource "aws_lb" "ingress" {
25
name = "${local.secret_prefix}-ingress"
36
internal = false

modules/hcp-ecs-client/main.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) HashiCorp, Inc.
2+
# SPDX-License-Identifier: MPL-2.0
3+
14
locals {
25
secret_prefix = random_id.id.dec
36
scope = random_id.id.dec

modules/hcp-ecs-client/output.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) HashiCorp, Inc.
2+
# SPDX-License-Identifier: MPL-2.0
3+
14
output "hashicups_url" {
25
value = aws_lb.ingress.dns_name
36
}

modules/hcp-ecs-client/services.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) HashiCorp, Inc.
2+
# SPDX-License-Identifier: MPL-2.0
3+
14
module "acl-controller" {
25
source = "hashicorp/consul-ecs/aws//modules/acl-controller"
36
version = "0.4.2"

modules/hcp-ecs-client/variables.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) HashiCorp, Inc.
2+
# SPDX-License-Identifier: MPL-2.0
3+
14
variable "private_subnet_ids" {
25
type = list(string)
36
description = "The private subnet IDs to create ECS services in"

0 commit comments

Comments
 (0)