remove duplicates from real world corpus

This commit is contained in:
mhoffm
2021-06-25 15:17:25 +02:00
parent 7182e1745c
commit 77b51d1b78
123 changed files with 0 additions and 2780 deletions

View File

@@ -1,3 +0,0 @@
output "ip_addresses" {
value = "${aws_instance.etcd_node.*.private_ip}"
}

View File

@@ -1,179 +0,0 @@
resource "aws_security_group" "worker" {
vpc_id = "${data.aws_vpc.cluster_vpc.id}"
tags = "${merge(map(
"Name", "${var.cluster_name}_worker_sg",
"kubernetes.io/cluster/${var.cluster_name}", "owned",
"tectonicClusterID", "${var.cluster_id}"
), var.extra_tags)}"
}
resource "aws_security_group_rule" "worker_egress" {
type = "egress"
security_group_id = "${aws_security_group.worker.id}"
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = ["0.0.0.0/0"]
}
resource "aws_security_group_rule" "worker_ingress_icmp" {
type = "ingress"
security_group_id = "${aws_security_group.worker.id}"
protocol = "icmp"
cidr_blocks = ["0.0.0.0/0"]
from_port = 0
to_port = 0
}
resource "aws_security_group_rule" "worker_ingress_ssh" {
type = "ingress"
security_group_id = "${aws_security_group.worker.id}"
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
from_port = 22
to_port = 22
}
resource "aws_security_group_rule" "worker_ingress_http" {
type = "ingress"
security_group_id = "${aws_security_group.worker.id}"
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
from_port = 80
to_port = 80
}
resource "aws_security_group_rule" "worker_ingress_https" {
type = "ingress"
security_group_id = "${aws_security_group.worker.id}"
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
from_port = 443
to_port = 443
}
resource "aws_security_group_rule" "worker_ingress_heapster" {
type = "ingress"
security_group_id = "${aws_security_group.worker.id}"
protocol = "tcp"
from_port = 4194
to_port = 4194
self = true
}
resource "aws_security_group_rule" "worker_ingress_heapster_from_master" {
type = "ingress"
security_group_id = "${aws_security_group.worker.id}"
source_security_group_id = "${aws_security_group.master.id}"
protocol = "tcp"
from_port = 4194
to_port = 4194
}
resource "aws_security_group_rule" "worker_ingress_flannel" {
type = "ingress"
security_group_id = "${aws_security_group.worker.id}"
protocol = "udp"
from_port = 4789
to_port = 4789
self = true
}
resource "aws_security_group_rule" "worker_ingress_flannel_from_master" {
type = "ingress"
security_group_id = "${aws_security_group.worker.id}"
source_security_group_id = "${aws_security_group.master.id}"
protocol = "udp"
from_port = 4789
to_port = 4789
}
resource "aws_security_group_rule" "worker_ingress_node_exporter" {
type = "ingress"
security_group_id = "${aws_security_group.worker.id}"
protocol = "tcp"
from_port = 9100
to_port = 9100
self = true
}
resource "aws_security_group_rule" "worker_ingress_node_exporter_from_master" {
type = "ingress"
security_group_id = "${aws_security_group.worker.id}"
source_security_group_id = "${aws_security_group.master.id}"
protocol = "tcp"
from_port = 9100
to_port = 9100
}
resource "aws_security_group_rule" "worker_ingress_kubelet_insecure" {
type = "ingress"
security_group_id = "${aws_security_group.worker.id}"
protocol = "tcp"
from_port = 10250
to_port = 10250
self = true
}
resource "aws_security_group_rule" "worker_ingress_kubelet_insecure_from_master" {
type = "ingress"
security_group_id = "${aws_security_group.worker.id}"
source_security_group_id = "${aws_security_group.master.id}"
protocol = "tcp"
from_port = 10250
to_port = 10250
}
resource "aws_security_group_rule" "worker_ingress_kubelet_secure" {
type = "ingress"
security_group_id = "${aws_security_group.worker.id}"
protocol = "tcp"
from_port = 10255
to_port = 10255
self = true
}
resource "aws_security_group_rule" "worker_ingress_kubelet_secure_from_master" {
type = "ingress"
security_group_id = "${aws_security_group.worker.id}"
source_security_group_id = "${aws_security_group.master.id}"
protocol = "tcp"
from_port = 10255
to_port = 10255
}
resource "aws_security_group_rule" "worker_ingress_services" {
type = "ingress"
security_group_id = "${aws_security_group.worker.id}"
protocol = "tcp"
from_port = 30000
to_port = 32767
self = true
}
resource "aws_security_group_rule" "worker_ingress_services_from_console" {
type = "ingress"
security_group_id = "${aws_security_group.worker.id}"
source_security_group_id = "${aws_security_group.console.id}"
protocol = "tcp"
from_port = 30000
to_port = 32767
}

View File

@@ -1,19 +0,0 @@
variable "release_channel" {
type = "string"
description = <<EOF
The Container Linux update channel.
Examples: `stable`, `beta`, `alpha`
EOF
}
variable "release_version" {
type = "string"
description = <<EOF
The Container Linux version to use. Set to `latest` to select the latest available version for the selected update channel.
Examples: `latest`, `1465.6.0`
EOF
}

View File

@@ -1,8 +0,0 @@
resource "aws_route53_record" "master_nodes" {
count = "${var.elb_alias_enabled ? 0 : var.master_count}"
zone_id = "${data.aws_route53_zone.tectonic.zone_id}"
name = "${var.cluster_name}-master-${count.index}"
type = "A"
ttl = "60"
records = ["${var.master_ip_addresses[count.index]}"]
}

View File

@@ -1,18 +0,0 @@
resource "aws_route53_record" "worker_nodes" {
count = "${var.elb_alias_enabled ? 0 : var.worker_count}"
zone_id = "${data.aws_route53_zone.tectonic.zone_id}"
name = "${var.cluster_name}-worker-${count.index}"
type = "A"
ttl = "60"
records = ["${var.worker_ip_addresses[count.index]}"]
}
resource "aws_route53_record" "worker_nodes_public" {
// hack: worker_public_ips_enabled is a workaround for https://github.com/hashicorp/terraform/issues/10857
count = "${var.worker_public_ips_enabled ? var.worker_count : 0}"
zone_id = "${data.aws_route53_zone.tectonic.zone_id}"
name = "${var.cluster_name}-worker-${count.index}-public"
type = "A"
ttl = "60"
records = ["${var.worker_public_ips[count.index]}"]
}

View File

@@ -1,25 +0,0 @@
resource "aws_s3_bucket_object" "ignition_etcd" {
count = "${length(var.external_endpoints) == 0 ? var.instance_count : 0}"
bucket = "${var.s3_bucket}"
key = "ignition_etcd_${count.index}.json"
content = "${data.ignition_config.etcd.*.rendered[count.index]}"
acl = "private"
server_side_encryption = "AES256"
tags = "${merge(map(
"Name", "${var.cluster_name}-ignition-etcd-${count.index}",
"KubernetesCluster", "${var.cluster_name}",
"tectonicClusterID", "${var.cluster_id}"
), var.extra_tags)}"
}
data "ignition_config" "s3" {
count = "${length(var.external_endpoints) == 0 ? var.instance_count : 0}"
replace {
source = "${format("s3://%s/%s", var.s3_bucket, aws_s3_bucket_object.ignition_etcd.*.key[count.index])}"
verification = "sha512-${sha512(data.ignition_config.etcd.*.rendered[count.index])}"
}
}

View File

@@ -1,3 +0,0 @@
output "ip_addresses" {
value = "${aws_instance.etcd_node.*.private_ip}"
}

View File

@@ -1,21 +0,0 @@
resource "aws_s3_bucket_object" "ignition_worker" {
bucket = "${var.s3_bucket}"
key = "ignition_worker.json"
content = "${data.ignition_config.main.rendered}"
acl = "private"
server_side_encryption = "AES256"
tags = "${merge(map(
"Name", "${var.cluster_name}-ignition-worker",
"KubernetesCluster", "${var.cluster_name}",
"tectonicClusterID", "${var.cluster_id}"
), var.extra_tags)}"
}
data "ignition_config" "s3" {
replace {
source = "${format("s3://%s/%s", var.s3_bucket, aws_s3_bucket_object.ignition_worker.key)}"
verification = "sha512-${sha512(data.ignition_config.main.rendered)}"
}
}

View File

@@ -1,7 +0,0 @@
variable "secgroup_id" {
type = "string"
}
variable "cluster_cidr" {
type = "string"
}

View File

@@ -1,17 +0,0 @@
# Cryptographically-secure ramdon strings used by various components.
resource "random_id" "admin_user_id" {
byte_length = 16
}
resource "random_id" "kubectl_secret" {
byte_length = 16
}
resource "random_id" "console_secret" {
byte_length = 16
}
resource "random_id" "tectonic_monitoring_auth_cookie_secret" {
byte_length = 16
}

View File

@@ -1,65 +0,0 @@
data "aws_region" "current" {
current = true
}
resource "aws_s3_bucket" "tectonic" {
# Buckets must start with a lower case name and are limited to 63 characters,
# so we prepend the letter 'a' and use the md5 hex digest for the case of a long domain
# leaving 29 chars for the cluster name.
bucket = "${var.tectonic_aws_assets_s3_bucket_name == "" ? format("%s%s-%s", "a", var.tectonic_cluster_name, md5(format("%s-%s", data.aws_region.current.name , var.tectonic_base_domain))) : var.tectonic_aws_assets_s3_bucket_name }"
acl = "private"
tags = "${merge(map(
"Name", "${var.tectonic_cluster_name}-tectonic",
"KubernetesCluster", "${var.tectonic_cluster_name}",
"tectonicClusterID", "${module.tectonic.cluster_id}"
), var.tectonic_aws_extra_tags)}"
lifecycle {
ignore_changes = ["*"]
}
}
# Bootkube / Tectonic assets
resource "aws_s3_bucket_object" "tectonic_assets" {
bucket = "${aws_s3_bucket.tectonic.bucket}"
key = "assets.zip"
source = "${data.archive_file.assets.output_path}"
acl = "private"
# To be on par with the current Tectonic installer, we only do server-side
# encryption, using AES256. Eventually, we should start using KMS-based
# client-side encryption.
server_side_encryption = "AES256"
tags = "${merge(map(
"Name", "${var.tectonic_cluster_name}-tectonic-assets",
"KubernetesCluster", "${var.tectonic_cluster_name}",
"tectonicClusterID", "${module.tectonic.cluster_id}"
), var.tectonic_aws_extra_tags)}"
lifecycle {
ignore_changes = ["*"]
}
}
# kubeconfig
resource "aws_s3_bucket_object" "kubeconfig" {
bucket = "${aws_s3_bucket.tectonic.bucket}"
key = "kubeconfig"
content = "${module.bootkube.kubeconfig}"
acl = "private"
# The current Tectonic installer stores bits of the kubeconfig in KMS. As we
# do not support KMS yet, we at least offload it to S3 for now. Eventually,
# we should consider using KMS-based client-side encryption, or uploading it
# to KMS.
server_side_encryption = "AES256"
tags = "${merge(map(
"Name", "${var.tectonic_cluster_name}-kubeconfig",
"KubernetesCluster", "${var.tectonic_cluster_name}",
"tectonicClusterID", "${module.tectonic.cluster_id}"
), var.tectonic_aws_extra_tags)}"
}

View File

@@ -1,533 +0,0 @@
terraform {
required_version = ">= 0.10.7"
}
provider "archive" {
version = "1.0.0"
}
provider "external" {
version = "1.0.0"
}
provider "ignition" {
version = "1.0.0"
}
provider "local" {
version = "1.0.0"
}
provider "null" {
version = "1.0.0"
}
provider "random" {
version = "1.0.0"
}
provider "template" {
version = "1.0.0"
}
provider "tls" {
version = "1.0.0"
}
locals {
// The total amount of public CA certificates present in Tectonic.
// That is all custom CAs + kube CA + etcd CA + ingress CA
// This is a local constant, which needs to be dependency inject because TF cannot handle length() on computed values,
// see https://github.com/hashicorp/terraform/issues/10857#issuecomment-268289775.
tectonic_ca_count = "${length(var.tectonic_custom_ca_pem_list) + 3}"
}
variable "tectonic_config_version" {
description = <<EOF
(internal) This declares the version of the global configuration variables.
It has no impact on generated assets but declares the version contract of the configuration.
EOF
default = "1.0"
}
variable "tectonic_image_re" {
description = <<EOF
(internal) Regular expression used to extract repo and tag components
EOF
type = "string"
default = "/^([^/]+/[^/]+/[^/]+):(.*)$/"
}
variable "tectonic_container_images" {
description = "(internal) Container images to use"
type = "map"
default = {
addon_resizer = "gcr.io/google_containers/addon-resizer:2.1"
awscli = "quay.io/coreos/awscli:025a357f05242fdad6a81e8a6b520098aa65a600"
gcloudsdk = "google/cloud-sdk:178.0.0-alpine"
bootkube = "quay.io/coreos/bootkube:v0.8.1"
calico = "quay.io/calico/node:v2.6.3"
calico_cni = "quay.io/calico/cni:v1.11.1"
console = "quay.io/coreos/tectonic-console:v2.4.0"
error_server = "quay.io/coreos/tectonic-error-server:1.0"
etcd = "quay.io/coreos/etcd:v3.1.8"
etcd_operator = "quay.io/coreos/etcd-operator:v0.5.0"
flannel = "quay.io/coreos/flannel:v0.8.0-amd64"
flannel_cni = "quay.io/coreos/flannel-cni:v0.2.0"
heapster = "gcr.io/google_containers/heapster:v1.4.1"
hyperkube = "quay.io/coreos/hyperkube:v1.8.2_coreos.0"
identity = "quay.io/coreos/dex:v2.8.1"
ingress_controller = "quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.9.0-beta.17"
kenc = "quay.io/coreos/kenc:0.0.2"
kubedns = "gcr.io/google_containers/k8s-dns-kube-dns-amd64:1.14.5"
kubednsmasq = "gcr.io/google_containers/k8s-dns-dnsmasq-nanny-amd64:1.14.5"
kubedns_sidecar = "gcr.io/google_containers/k8s-dns-sidecar-amd64:1.14.5"
kube_version = "quay.io/coreos/kube-version:0.1.0"
kube_version_operator = "quay.io/coreos/kube-version-operator:v1.7.9-kvo.6"
node_agent = "quay.io/coreos/node-agent:cd69b4a0f65b0d3a3b30edfce3bb184fd2a22c26"
pod_checkpointer = "quay.io/coreos/pod-checkpointer:e22cc0e3714378de92f45326474874eb602ca0ac"
stats_emitter = "quay.io/coreos/tectonic-stats:6e882361357fe4b773adbf279cddf48cb50164c1"
stats_extender = "quay.io/coreos/tectonic-stats-extender:487b3da4e175da96dabfb44fba65cdb8b823db2e"
tectonic_channel_operator = "quay.io/coreos/tectonic-channel-operator:0.5.4"
tectonic_etcd_operator = "quay.io/coreos/tectonic-etcd-operator:v0.0.2"
tectonic_prometheus_operator = "quay.io/coreos/tectonic-prometheus-operator:v1.8.0"
tectonic_cluo_operator = "quay.io/coreos/tectonic-cluo-operator:v0.2.5"
tectonic_torcx = "quay.io/coreos/tectonic-torcx:v0.2.0"
kubernetes_addon_operator = "quay.io/coreos/kubernetes-addon-operator:54a613dae60a068aa83c0361319c804ee366a228"
}
}
variable "tectonic_container_base_images" {
description = "(internal) Base images of the components to use"
type = "map"
default = {
tectonic_monitoring_auth = "quay.io/coreos/tectonic-monitoring-auth"
config_reload = "quay.io/coreos/configmap-reload"
addon_resizer = "quay.io/coreos/addon-resizer"
kube_state_metrics = "quay.io/coreos/kube-state-metrics"
grafana = "quay.io/coreos/grafana-monitoring"
grafana_watcher = "quay.io/coreos/grafana-watcher"
prometheus_operator = "quay.io/coreos/prometheus-operator"
prometheus_config_reload = "quay.io/coreos/prometheus-config-reloader"
prometheus = "quay.io/prometheus/prometheus"
alertmanager = "quay.io/prometheus/alertmanager"
node_exporter = "quay.io/prometheus/node-exporter"
}
}
variable "tectonic_versions" {
description = "(internal) Versions of the components to use"
type = "map"
default = {
etcd = "3.1.8"
kubernetes = "1.7.9+tectonic.2"
monitoring = "1.8.0"
tectonic = "1.8.2-tectonic.1"
tectonic-etcd = "0.0.1"
cluo = "0.2.5"
kubernetes_addon = "0.0.0"
}
}
variable "tectonic_service_cidr" {
type = "string"
default = "10.3.0.0/16"
description = <<EOF
(optional) This declares the IP range to assign Kubernetes service cluster IPs in CIDR notation.
The maximum size of this IP range is /12
EOF
}
variable "tectonic_cluster_cidr" {
type = "string"
default = "10.2.0.0/16"
description = "(optional) This declares the IP range to assign Kubernetes pod IPs in CIDR notation."
}
variable "tectonic_master_count" {
type = "string"
default = "1"
description = <<EOF
The number of master nodes to be created.
This applies only to cloud platforms.
EOF
}
variable "tectonic_worker_count" {
type = "string"
default = "3"
description = <<EOF
The number of worker nodes to be created.
This applies only to cloud platforms.
EOF
}
variable "tectonic_etcd_count" {
type = "string"
default = "0"
description = <<EOF
The number of etcd nodes to be created.
If set to zero, the count of etcd nodes will be determined automatically.
Note: This is not supported on bare metal.
EOF
}
variable "tectonic_etcd_servers" {
description = <<EOF
(optional) List of external etcd v3 servers to connect with (hostnames/IPs only).
Needs to be set if using an external etcd cluster.
Note: If this variable is defined, the installer will not create self-signed certs.
To provide a CA certificate to trust the etcd servers, set "tectonic_etcd_ca_cert_path".
Example: `["etcd1", "etcd2", "etcd3"]`
EOF
type = "list"
default = []
}
variable "tectonic_etcd_tls_enabled" {
default = true
description = <<EOF
(optional) If set to `true`, all etcd endpoints will be configured to use the "https" scheme.
Note: If `tectonic_experimental` is set to `true` this variable has no effect, because the experimental self-hosted etcd always uses TLS.
EOF
}
variable "tectonic_etcd_ca_cert_path" {
type = "string"
default = "/dev/null"
description = <<EOF
(optional) The path of the file containing the CA certificate for TLS communication with etcd.
Note: This works only when used in conjunction with an external etcd cluster.
If set, the variable `tectonic_etcd_servers` must also be set.
EOF
}
variable "tectonic_etcd_client_cert_path" {
type = "string"
default = "/dev/null"
description = <<EOF
(optional) The path of the file containing the client certificate for TLS communication with etcd.
Note: This works only when used in conjunction with an external etcd cluster.
If set, the variables `tectonic_etcd_servers`, `tectonic_etcd_ca_cert_path`, and `tectonic_etcd_client_key_path` must also be set.
EOF
}
variable "tectonic_etcd_client_key_path" {
type = "string"
default = "/dev/null"
description = <<EOF
(optional) The path of the file containing the client key for TLS communication with etcd.
Note: This works only when used in conjunction with an external etcd cluster.
If set, the variables `tectonic_etcd_servers`, `tectonic_etcd_ca_cert_path`, and `tectonic_etcd_client_cert_path` must also be set.
EOF
}
variable "tectonic_base_domain" {
type = "string"
description = <<EOF
The base DNS domain of the cluster. It must NOT contain a trailing period. Some
DNS providers will automatically add this if necessary.
Example: `openstack.dev.coreos.systems`.
Note: This field MUST be set manually prior to creating the cluster.
This applies only to cloud platforms.
[Azure-specific NOTE]
To use Azure-provided DNS, `tectonic_base_domain` should be set to `""`
If using DNS records, ensure that `tectonic_base_domain` is set to a properly configured external DNS zone.
Instructions for configuring delegated domains for Azure DNS can be found here: https://docs.microsoft.com/en-us/azure/dns/dns-delegate-domain-azure-dns
EOF
}
variable "tectonic_cluster_name" {
type = "string"
description = <<EOF
The name of the cluster.
If used in a cloud-environment, this will be prepended to `tectonic_base_domain` resulting in the URL to the Tectonic console.
Note: This field MUST be set manually prior to creating the cluster.
Warning: Special characters in the name like '.' may cause errors on OpenStack platforms due to resource name constraints.
EOF
}
variable "tectonic_pull_secret_path" {
type = "string"
default = ""
description = <<EOF
The path the pull secret file in JSON format.
This is known to be a "Docker pull secret" as produced by the docker login [1] command.
A sample JSON content is shown in [2].
You can download the pull secret from your Account overview page at [3].
[1] https://docs.docker.com/engine/reference/commandline/login/
[2] https://coreos.com/os/docs/latest/registry-authentication.html#manual-registry-auth-setup
[3] https://account.coreos.com/overview
Note: This field MUST be set manually prior to creating the cluster unless `tectonic_vanilla_k8s` is set to `true`.
EOF
}
variable "tectonic_license_path" {
type = "string"
default = ""
description = <<EOF
The path to the tectonic licence file.
You can download the Tectonic license file from your Account overview page at [1].
[1] https://account.coreos.com/overview
Note: This field MUST be set manually prior to creating the cluster unless `tectonic_vanilla_k8s` is set to `true`.
EOF
}
variable "tectonic_container_linux_channel" {
type = "string"
default = "stable"
description = <<EOF
(optional) The Container Linux update channel.
Examples: `stable`, `beta`, `alpha`
EOF
}
variable "tectonic_container_linux_version" {
type = "string"
default = "latest"
description = <<EOF
The Container Linux version to use. Set to `latest` to select the latest available version for the selected update channel.
Examples: `latest`, `1465.6.0`
EOF
}
variable "tectonic_update_server" {
type = "string"
default = "https://tectonic.update.core-os.net"
description = "(internal) The URL of the Tectonic Omaha update server"
}
variable "tectonic_update_channel" {
type = "string"
default = "tectonic-1.7-production"
description = "(internal) The Tectonic Omaha update channel"
}
variable "tectonic_update_app_id" {
type = "string"
default = "6bc7b986-4654-4a0f-94b3-84ce6feb1db4"
description = "(internal) The Tectonic Omaha update App ID"
}
variable "tectonic_admin_email" {
type = "string"
description = <<EOF
(internal) The e-mail address used to:
1. login as the admin user to the Tectonic Console.
2. generate DNS zones for some providers.
Note: This field MUST be in all lower-case e-mail address format and set manually prior to creating the cluster.
EOF
}
variable "tectonic_admin_password" {
type = "string"
description = <<EOF
(internal) The admin user password to login to the Tectonic Console.
Note: This field MUST be set manually prior to creating the cluster. Backslashes and double quotes must
also be escaped.
EOF
}
variable "tectonic_ca_cert" {
type = "string"
default = ""
description = <<EOF
(optional) The content of the PEM-encoded CA certificate, used to generate Tectonic Console's server certificate.
If left blank, a CA certificate will be automatically generated.
EOF
}
variable "tectonic_ca_key" {
type = "string"
default = ""
description = <<EOF
(optional) The content of the PEM-encoded CA key, used to generate Tectonic Console's server certificate.
This field is mandatory if `tectonic_ca_cert` is set.
EOF
}
variable "tectonic_ca_key_alg" {
type = "string"
default = "RSA"
description = <<EOF
(optional) The algorithm used to generate tectonic_ca_key.
The default value is currently recommended.
This field is mandatory if `tectonic_ca_cert` is set.
EOF
}
variable "tectonic_tls_validity_period" {
type = "string"
default = "26280"
description = <<EOF
Validity period of the self-signed certificates (in hours).
Default is 3 years.
This setting is ignored if user provided certificates are used.
EOF
}
variable "tectonic_vanilla_k8s" {
default = false
description = <<EOF
If set to true, a vanilla Kubernetes cluster will be deployed, omitting any Tectonic assets.
EOF
}
variable "tectonic_stats_url" {
type = "string"
default = "https://stats-collector.tectonic.com"
description = "(internal) The Tectonic statistics collection URL to which to report."
}
variable "tectonic_ddns_server" {
type = "string"
default = ""
description = <<EOF
(optional) This only applies if you use the modules/dns/ddns module.
Specifies the RFC2136 Dynamic DNS server IP/host to register IP addresses to.
EOF
}
variable "tectonic_ddns_key_name" {
type = "string"
default = ""
description = <<EOF
(optional) This only applies if you use the modules/dns/ddns module.
Specifies the RFC2136 Dynamic DNS server key name.
EOF
}
variable "tectonic_ddns_key_algorithm" {
type = "string"
default = ""
description = <<EOF
(optional) This only applies if you use the modules/dns/ddns module.
Specifies the RFC2136 Dynamic DNS server key algorithm.
EOF
}
variable "tectonic_ddns_key_secret" {
type = "string"
default = ""
description = <<EOF
(optional) This only applies if you use the modules/dns/ddns module.
Specifies the RFC2136 Dynamic DNS server key secret.
EOF
}
variable "tectonic_networking" {
default = "flannel"
description = <<EOF
(optional) Configures the network to be used in Tectonic. One of the following values can be used:
- "flannel": enables overlay networking only. This is implemented by flannel using VXLAN.
- "canal": [ALPHA] enables overlay networking including network policy. Overlay is implemented by flannel using VXLAN. Network policy is implemented by Calico.
- "calico": [ALPHA] enables BGP based networking. Routing and network policy is implemented by Calico. Note this has been tested on baremetal installations only.
EOF
}
variable "tectonic_self_hosted_etcd" {
default = ""
description = <<EOF
(internal) [ALPHA] If set to one of the following values, self-hosted etcd is deployed:
- "enabled": Deploys a self-hosted etcd cluster.
- "pv_backup": Deploys a self-hosted etcd cluster including backups to Persistence Volumes.
`tectonic_etcd_backup_size` and `tectonic_etcd_backup_storage_class` must be configured when using this setting.
EOF
}
variable "tectonic_etcd_backup_size" {
type = "string"
description = "(optional) The size in MB of the PersistentVolume used for handling etcd backups."
default = "512"
}
variable "tectonic_etcd_backup_storage_class" {
type = "string"
default = ""
description = "(optional) The name of an existing Kubernetes StorageClass that will be used for handling etcd backups."
}
variable "tectonic_bootstrap_upgrade_cl" {
type = "string"
default = "true"
description = "(internal) Whether to trigger a ContainerLinux upgrade on node bootstrap."
}
variable "tectonic_kubelet_debug_config" {
type = "string"
default = ""
description = "(internal) debug flags for the kubelet (used in CI only)"
}
variable "tectonic_custom_ca_pem_list" {
type = "list"
default = []
description = <<EOF
(optional) A list of PEM encoded CA files that will be installed in /etc/ssl/certs on etcd, master, and worker nodes.
EOF
}

View File

@@ -1,36 +0,0 @@
# This file is generated by Consul Terraform Sync.
#
# The HCL blocks, arguments, variables, and values are derived from the
# operator configuration for Sync. Any manual changes to this file
# may not be preserved and could be overwritten by a subsequent update.
#
# Task: boundary
# Description:
terraform {
required_version = ">= 0.13.0, < 0.15"
required_providers {
boundary = {
source = "hashicorp/boundary"
version = "1.0.2"
}
}
backend "consul" {
address = "localhost:8500"
gzip = true
path = "consul-terraform-sync/terraform"
}
}
provider "boundary" {
addr = var.boundary.addr
recovery_kms_hcl = var.boundary.recovery_kms_hcl
}
provider "http" {
}
module "boundary" {
source = "./boundary"
services = var.services
}

View File

@@ -1,9 +0,0 @@
terraform {
required_version = ">= 0.14"
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 3.38"
}
}
}

View File

@@ -1,13 +0,0 @@
terraform {
required_version = ">= 0.14"
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 3.38"
}
random = {
source = "hashicorp/random"
version = "~> 3.1"
}
}
}

View File

@@ -1,9 +0,0 @@
terraform {
required_version = ">= 0.14"
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 3.38"
}
}
}

View File

@@ -1,9 +0,0 @@
terraform {
required_version = ">= 0.14"
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 3.38"
}
}
}

View File

@@ -1,9 +0,0 @@
terraform {
required_version = ">= 0.14"
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 3.38"
}
}
}

View File

@@ -1,9 +0,0 @@
terraform {
required_version = ">= 0.14"
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 3.38"
}
}
}

View File

@@ -1,9 +0,0 @@
terraform {
required_version = ">= 0.14"
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 3.38"
}
}
}

View File

@@ -1,9 +0,0 @@
terraform {
required_version = ">= 0.14"
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 3.38"
}
}
}

View File

@@ -1,21 +0,0 @@
# Application
# -----------
output "tfe_application_url" {
value = module.tfe.tfe_application_url
description = "Terraform Enterprise Application URL"
}
output "login_url" {
value = module.tfe.login_url
description = "Login URL to setup the TFE instance once it is initialized"
}
# SSH
# ---
output "instance_user_name" {
value = module.tfe.instance_user_name
}
output "instance_private_key" {
value = module.tfe.instance_private_key
}

View File

@@ -1,57 +0,0 @@
# General
# -------
variable "friendly_name_prefix" {
type = string
description = "(Required) Name prefix used for resources"
}
variable "domain_name" {
default = ""
type = string
description = "Domain to create Terraform Enterprise subdomain within"
}
variable "tfe_subdomain" {
default = ""
type = string
description = "Subdomain for TFE"
}
# Provider
# --------
variable "location" {
default = "East US"
type = string
description = "Azure location name e.g. East US"
}
variable "resource_group_name" {
default = ""
type = string
description = "Azure resource group name"
}
variable "resource_group_name_dns" {
default = ""
type = string
description = "Name of resource group which contains desired DNS zone"
}
variable "key_vault_name" {
default = ""
type = string
description = "(recommended) Azure Key Vault name containing required certificate"
}
variable "certificate_name" {
default = ""
type = string
description = "(recommended) Azure Key Vault Certificate name for Application Gateway"
}
# Tagging
variable "tags" {
default = {}
type = map(string)
description = "Map of tags for resource"
}

View File

@@ -1,21 +0,0 @@
# Application
# -----------
output "tfe_application_url" {
value = module.tfe.tfe_application_url
description = "Terraform Enterprise Application URL"
}
output "login_url" {
value = module.tfe.login_url
description = "Login URL to setup the TFE instance once it is initialized"
}
# SSH
# ---
output "instance_user_name" {
value = module.tfe.instance_user_name
}
output "instance_private_key" {
value = module.tfe.instance_private_key
}

View File

@@ -1,21 +0,0 @@
# Application
# -----------
output "tfe_application_url" {
value = module.tfe.tfe_application_url
description = "Terraform Enterprise Application URL"
}
output "login_url" {
value = module.tfe.login_url
description = "Login URL to setup the TFE instance once it is initialized"
}
# SSH
# ---
output "instance_user_name" {
value = module.tfe.instance_user_name
}
output "instance_private_key" {
value = module.tfe.instance_private_key
}

View File

@@ -1,21 +0,0 @@
# Application
# -----------
output "tfe_application_url" {
value = module.tfe.tfe_application_url
description = "Terraform Enterprise Application URL"
}
output "login_url" {
value = module.tfe.login_url
description = "Login URL to setup the TFE instance once it is initialized"
}
# SSH
# ---
output "instance_user_name" {
value = module.tfe.instance_user_name
}
output "instance_private_key" {
value = module.tfe.instance_private_key
}

View File

@@ -1,21 +0,0 @@
# Application
# -----------
output "tfe_application_url" {
value = module.tfe.tfe_application_url
description = "Terraform Enterprise Application URL"
}
output "login_url" {
value = module.tfe.login_url
description = "Login URL to setup the TFE instance once it is initialized"
}
# SSH
# ---
output "instance_user_name" {
value = module.tfe.instance_user_name
}
output "instance_private_key" {
value = module.tfe.instance_private_key
}

View File

@@ -1,21 +0,0 @@
# Application
# -----------
output "tfe_application_url" {
value = module.tfe.tfe_application_url
description = "Terraform Enterprise Application URL"
}
output "login_url" {
value = module.tfe.login_url
description = "Login URL to setup the TFE instance once it is initialized"
}
# SSH
# ---
output "instance_user_name" {
value = module.tfe.instance_user_name
}
output "instance_private_key" {
value = module.tfe.instance_private_key
}

View File

@@ -1,21 +0,0 @@
# Application
# -----------
output "tfe_application_url" {
value = module.tfe.tfe_application_url
description = "Terraform Enterprise Application URL"
}
output "login_url" {
value = module.tfe.login_url
description = "Login URL to setup the TFE instance once it is initialized"
}
# SSH
# ---
output "instance_user_name" {
value = module.tfe.instance_user_name
}
output "instance_private_key" {
value = module.tfe.instance_private_key
}

View File

@@ -1,9 +0,0 @@
output "lb_address" {
value = module.tfe.lb_address
description = "Load Balancer Address"
}
output "login_url" {
value = module.tfe.login_url
description = "Login URL to setup the TFE instance once it is initialized"
}

View File

@@ -1,90 +0,0 @@
provider "google" {
credentials = file(var.credentials_file)
project = var.project
region = var.region
}
provider "google-beta" {
credentials = file(var.credentials_file)
project = var.project
region = var.region
}
resource "tls_locally_signed_cert" "main" {
cert_request_pem = tls_cert_request.main.cert_request_pem
ca_key_algorithm = tls_private_key.ca.algorithm
ca_private_key_pem = tls_private_key.ca.private_key_pem
ca_cert_pem = tls_self_signed_cert.ca.cert_pem
validity_period_hours = 24 * 30 * 6
allowed_uses = [
"key_encipherment",
"digital_signature",
]
}
resource "tls_cert_request" "main" {
key_algorithm = tls_private_key.main.algorithm
private_key_pem = tls_private_key.main.private_key_pem
subject {
common_name = var.fqdn
organization = "Terraform Enterprise Private Certificate"
}
dns_names = [var.fqdn]
}
resource "tls_private_key" "ca" {
algorithm = "RSA"
}
resource "tls_self_signed_cert" "ca" {
key_algorithm = tls_private_key.ca.algorithm
private_key_pem = tls_private_key.ca.private_key_pem
validity_period_hours = 24 * 30 * 6
subject {
organization = "HashiCorp (NonTrusted)"
common_name = "HashiCorp (NonTrusted) Private Certificate Authority"
country = "US"
}
is_ca_certificate = true
allowed_uses = [
"cert_signing",
"key_encipherment",
"digital_signature"
]
}
resource "tls_private_key" "main" {
algorithm = "RSA"
}
resource "google_compute_region_ssl_certificate" "main" {
certificate = "${tls_locally_signed_cert.main.cert_pem}\n${tls_self_signed_cert.ca.cert_pem}"
private_key = tls_private_key.main.private_key_pem
description = "The regional SSL certificate of the private load balancer for TFE."
name_prefix = "ptfe-"
lifecycle {
create_before_destroy = true
}
}
module "tfe" {
source = "../../"
namespace = var.namespace
node_count = var.node_count
tfe_license_path = var.tfe_license_path
tfe_license_name = var.tfe_license_name
fqdn = var.fqdn
ssl_certificate_name = google_compute_region_ssl_certificate.main.name
network = var.network
subnetwork = var.subnetwork
dns_zone_name = var.dns_zone_name
}

View File

@@ -1,14 +0,0 @@
output "replicated_console_password" {
value = module.tfe.replicated_console_password
description = "Generated password for replicated dashboard"
}
output "lb_address" {
value = module.tfe.lb_address
description = "Load Balancer Address"
}
output "login_url" {
value = module.tfe.login_url
description = "Login URL to setup the TFE instance once it is initialized"
}

View File

@@ -1,4 +0,0 @@
variable "dns_zone_name" {}
variable "fqdn" {}
variable "namespace" {}
variable "tfe_license_path" {}

View File

@@ -1,9 +0,0 @@
output "lb_address" {
value = module.tfe.lb_address
description = "Load Balancer Address"
}
output "login_url" {
value = module.tfe.login_url
description = "Login URL to setup the TFE instance once it is initialized"
}

View File

@@ -1,3 +0,0 @@
output "address" {
value = google_compute_address.internal.address
}

View File

@@ -1,7 +0,0 @@
variable "namespace" {}
variable "fqdn" {}
variable "instance_group" {}
variable "ssl_certificate_name" {}
variable "dns_zone_name" {}
variable "subnet" {}
variable "dns_create_record" {}

View File

@@ -1,7 +0,0 @@
module "child_c" {
# In the unit test where this fixture is used, we treat the source strings
# as relative paths from the fixture directory rather than as source
# addresses as we would in a real module walker.
source = "./child_c"
}

View File

@@ -1,9 +0,0 @@
module "child" {
source = "./child"
}
resource "aws_instance" "a" {
ami = "parent"
depends_on = ["module.child"]
}

View File

@@ -1,7 +0,0 @@
resource "aws_instance" "foo" {
num = "2"
}
resource "aws_instance" "bar" {
num = "2"
}

View File

@@ -1,7 +0,0 @@
variable "key" {}
provider "test" {
test_string = "${var.key}"
}
resource "test_object" "foo" {}

View File

@@ -1,8 +0,0 @@
variable "foo" {
default = "3"
}
module "child" {
source = "./child"
value = "${var.foo}"
}

View File

@@ -1,5 +0,0 @@
variable "value" {}
resource "aws_instance" "foo" {
count = "${var.value}"
}

View File

@@ -1,5 +0,0 @@
variable "input" {}
resource "aws_instance" "foo" {
foo = "${var.input}"
}

View File

@@ -1,5 +0,0 @@
variable "input" {}
resource "aws_instance" "foo" {
foo = "${var.input}"
}

View File

@@ -1,11 +0,0 @@
module "child" {
source = "./child"
}
provider "aws" {
from = "root"
}
resource "aws_instance" "foo" {
from = "root"
}

View File

@@ -1,8 +0,0 @@
provider "aws" {
from = "child"
to = "child"
}
resource "aws_instance" "foo" {
from = "child"
}

View File

@@ -1,7 +0,0 @@
resource "test_resource" "for_output" {
required = "val"
}
output "object" {
value = test_resource.for_output
}

View File

@@ -1,7 +0,0 @@
variable "key" {}
provider "null" {
key = "${var.key}"
}
resource "null_resource" "foo" {}

View File

@@ -1,5 +0,0 @@
variable "value" {}
output "result" {
value = "${var.value}"
}

View File

@@ -1,11 +0,0 @@
terraform {
required_providers {
my-aws = {
source = "hashicorp/aws"
}
}
}
resource "aws_instance" "web" {
provider = "my-aws"
}

View File

@@ -1,11 +0,0 @@
provider "aws" {
alias = "foo"
value = "config"
}
module "child" {
source = "./child"
providers = {
aws.bar = aws.foo
}
}

View File

@@ -1,38 +0,0 @@
/*Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
The Universal Permissive License (UPL), Version 1.0*/
variable "compartment_ocid" {
description = "Compartment name"
}
variable "availability_domain" {
description = "Availability domain"
type = "list"
}
variable "AD" {
description = "Availability domain"
type= "list"
}
# Bastion host variables
variable "bastion_hostname_prefix" {
description = "Prefix for bastion hostname"
}
variable "bastion_instance_shape" {
description = "Instance shape of bastion host"
}
variable "bastion_subnet" {
description = "Subnet for Bastion host"
type = "list"
}
variable "bastion_image" {
description ="Bation Operating System Image"
}
variable "bastion_ssh_public_key" {
description = "Bastion Host SSH public key"
}

View File

@@ -1,70 +0,0 @@
/*Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
The Universal Permissive License (UPL), Version 1.0*/
variable "compartment_ocid" {
description = "Compartment name"
}
variable "availability_domain" {
description = "Availability domain"
type = "list"
}
variable "AD" {
description = "Availability domain"
type= "list"
}
variable "db_subnet" {
description = "Subnet for Bastion host"
type = "list"
}
# Database System variables
variable "db_edition" {
description = "Database Edition"
}
variable "db_version" {
description = "Database version"
}
variable "db_admin_password" {
description = "Database admin password"
}
variable "db_name" {
description = "Database Name"
}
variable "db_disk_redundancy" {
description = "Database disk redundancy for Bare Metal DB System"
default="NORMAL"
}
variable "db_hostname_prefix" {
description = "Database hostname prefix"
}
variable "db_instance_shape" {
description = "Database system shape"
}
variable "db_ssh_public_key" {
description = "Database public ssh key"
}
variable "db_characterset" {
description = "Database characterset"
}
variable "db_nls_characterset" {
description = "Database National characterset"
}
variable "db_workload" {
description = "Database Workload"
default = "OLTP"
}
variable "db_pdb_name" {
}
variable "db_size_in_gb" {
description = "Database size in gb"
}
variable "db_license_model" {
description = "Database License Model"
}
variable "db_node_count" {
description = "Database Node count"
}

View File

@@ -1,29 +0,0 @@
/*Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
The Universal Permissive License (UPL), Version 1.0*/
output "vcnid" {
description = "ocid of VCN"
value = "${oci_core_virtual_network.vcn.id}"
}
output "default_dhcp_id" {
description = "ocid of default DHCP options"
value = "${oci_core_virtual_network.vcn.default_dhcp_options_id}"
}
output "igw_id" {
description = "ocid of internet gateway"
value = "${oci_core_internet_gateway.igw.id}"
}
output "natgtw_id" {
description = "ocid of service gateway"
value = "${oci_core_nat_gateway.natgtw.id}"
}
output "svcgtw_id" {
description = "ocid of service gateway"
value = "${oci_core_service_gateway.svcgtw.id}"
}

View File

@@ -1,50 +0,0 @@
/*Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
The Universal Permissive License (UPL), Version 1.0*/
# Virtual Cloud Network (VCN)
resource "oci_core_virtual_network" "vcn" {
compartment_id = "${var.compartment_ocid}"
cidr_block = "${var.vcn_cidr}"
dns_label = "${var.vcn_dns_label}"
display_name = "${var.vcn_dns_label}"
}
# Internet Gateway
resource "oci_core_internet_gateway" "igw" {
compartment_id = "${var.compartment_ocid}"
vcn_id = "${oci_core_virtual_network.vcn.id}"
display_name = "${var.vcn_dns_label}igw"
}
# NAT (Network Address Translation) Gateway
resource "oci_core_nat_gateway" "natgtw" {
compartment_id = "${var.compartment_ocid}"
vcn_id = "${oci_core_virtual_network.vcn.id}"
display_name = "${var.vcn_dns_label}natgtw"
}
# Service Gateway
resource "oci_core_service_gateway" "svcgtw" {
compartment_id = "${var.compartment_ocid}"
services {
service_id = "${lookup(data.oci_core_services.svcgtw_services.services[0], "id")}"
}
vcn_id = "${oci_core_virtual_network.vcn.id}"
display_name = "${var.vcn_dns_label}svcgtw"
}
# Dynamic Routing Gateway (DRG)
resource "oci_core_drg" "drg" {
compartment_id = "${var.compartment_ocid}"
display_name = "${var.vcn_dns_label}drg"
}
resource "oci_core_drg_attachment" "drg_attachment" {
drg_id = "${oci_core_drg.drg.id}"
vcn_id = "${oci_core_virtual_network.vcn.id}"
display_name = "${var.vcn_dns_label}drgattchmt"
}

View File

@@ -1,20 +0,0 @@
/*Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
The Universal Permissive License (UPL), Version 1.0*/
# Terraform version
terraform {
required_version = ">= 0.11.8"
}
# Oracle Cloud Infrastructure (OCI) Provider
provider "oci" {
version = "=3.5.0"
tenancy_ocid = "${var.tenancy_ocid}"
user_ocid = "${var.user_ocid}"
fingerprint = "${var.fingerprint}"
private_key_path = "${var.private_key_path}"
region = "${var.region}"
}

View File

@@ -1,20 +0,0 @@
/*Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
The Universal Permissive License (UPL), Version 1.0*/
# Terraform version
terraform {
required_version = ">= 0.11.8"
}
# Oracle Cloud Infrastructure (OCI) Provider
provider "oci" {
version = "=3.5.0"
tenancy_ocid = "${var.tenancy_ocid}"
user_ocid = "${var.user_ocid}"
fingerprint = "${var.fingerprint}"
private_key_path = "${var.private_key_path}"
region = "${var.region}"
}

View File

@@ -1,20 +0,0 @@
/*Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
The Universal Permissive License (UPL), Version 1.0*/
# Terraform version
terraform {
required_version = ">= 0.11.8"
}
# Oracle Cloud Infrastructure (OCI) Provider
provider "oci" {
version = "=3.5.0"
tenancy_ocid = "${var.tenancy_ocid}"
user_ocid = "${var.user_ocid}"
fingerprint = "${var.fingerprint}"
private_key_path = "${var.private_key_path}"
region = "${var.region}"
}

View File

@@ -1,8 +0,0 @@
/*Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
The Universal Permissive License (UPL), Version 1.0*/
output "Bastion_Public_IPs" {
value = ["${oci_core_instance.bastion.*.public_ip}"]
}

View File

@@ -1,14 +0,0 @@
/*Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
The Universal Permissive License (UPL), Version 1.0*/
# Get CPU and node and node count for a db shape
data "oci_database_db_system_shapes" "db_system_shapes" {
availability_domain = "${element(var.availability_domain, count.index)}"
compartment_id = "${var.compartment_ocid}"
filter {
name = "name"
values = ["${var.db_instance_shape}"]
}
}

View File

@@ -1,19 +0,0 @@
/*Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
The Universal Permissive License (UPL), Version 1.0*/
output "FilesystemPrivateIPs" {
description = "FSS Private IPs"
value = "${data.template_file.fss_ips.*.rendered}"
}
output "FilesystemExports" {
description = "FSS Exports"
value = "${local.fss_exports}"
}
output "FilesystemFstabs" {
description = "FSS /etc/fstab Entries"
value = "${local.fss_fstabs}"
}

View File

@@ -1,12 +0,0 @@
/*Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
The Universal Permissive License (UPL), Version 1.0*/
output "subnetid" {
value = ["${oci_core_subnet.subnet.*.id}"]
}
output "cidr_block" {
value = ["${oci_core_subnet.subnet.*.cidr_block}"]
}

View File

@@ -1,13 +0,0 @@
/*Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
The Universal Permissive License (UPL), Version 1.0*/
# Get name of object storage
data "oci_core_services" "svcgtw_services" {
filter {
name = "name"
values = [".*Object.*Storage"]
regex = true
}
}

View File

@@ -1,47 +0,0 @@
/*Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
The Universal Permissive License (UPL), Version 1.0*/
# Virtual Cloud Network (VCN)
resource "oci_core_virtual_network" "vcn" {
compartment_id = "${var.compartment_ocid}"
cidr_block = "${var.vcn_cidr}"
dns_label = "${var.vcn_dns_label}"
display_name = "${var.vcn_dns_label}"
}
# Internet Gateway
resource "oci_core_internet_gateway" "igw" {
compartment_id = "${var.compartment_ocid}"
display_name = "${var.vcn_dns_label}igw"
vcn_id = "${oci_core_virtual_network.vcn.id}"
}
# NAT (Network Address Translation) Gateway
resource "oci_core_nat_gateway" "natgtw" {
compartment_id = "${var.compartment_ocid}"
vcn_id = "${oci_core_virtual_network.vcn.id}"
display_name = "${var.vcn_dns_label}natgtw"
}
# Service Gateway
resource "oci_core_service_gateway" "svcgtw" {
compartment_id = "${var.compartment_ocid}"
services {
service_id = "${lookup(data.oci_core_services.svcgtw_services.services[0], "id")}"
}
vcn_id = "${oci_core_virtual_network.vcn.id}"
display_name = "${var.vcn_dns_label}svcgtw"
}
# Dynamic Routing Gateway (DRG)
resource "oci_core_drg" "drg" {
compartment_id = "${var.compartment_ocid}"
display_name = "${var.vcn_dns_label}drg"
}
resource "oci_core_drg_attachment" "drg_attachment" {
drg_id = "${oci_core_drg.drg.id}"
vcn_id = "${oci_core_virtual_network.vcn.id}"
display_name = "${var.vcn_dns_label}drgattch"
}

View File

@@ -1,15 +0,0 @@
/*Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
The Universal Permissive License (UPL), Version 1.0*/
variable "compartment_ocid" {
description = "Compartment OCID"
}
# VCN Variables
variable "vcn_cidr" {
description = "VCN CIDR"
}
variable "vcn_dns_label" {
description = "VCN DNS Label"
}

View File

@@ -1,8 +0,0 @@
/*Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
The Universal Permissive License (UPL), Version 1.0*/
output "Bastion_Public_IPs" {
value = ["${oci_core_instance.bastion.*.public_ip}"]
}

View File

@@ -1,12 +0,0 @@
/*Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
The Universal Permissive License (UPL), Version 1.0*/
output "subnetid" {
value = ["${oci_core_subnet.subnet.*.id}"]
}
output "cidr_block" {
value = ["${oci_core_subnet.subnet.*.cidr_block}"]
}

View File

@@ -1,19 +0,0 @@
/*Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
The Universal Permissive License (UPL), Version 1.0*/
# Create subnet
resource "oci_core_subnet" "subnet" {
count = "${length(var.availability_domain)}"
availability_domain = "${element(var.availability_domain, count.index)}"
compartment_id = "${var.compartment_ocid}"
vcn_id = "${var.vcn_id}"
cidr_block = "${var.vcn_subnet_cidr[count.index]}"
display_name = "${var.dns_label}${var.AD[count.index]}"
dns_label = "${var.dns_label}${var.AD[count.index]}"
dhcp_options_id = "${var.dhcp_options_id}"
route_table_id = "${var.route_table_id}"
security_list_ids = ["${var.security_list_ids}"]
prohibit_public_ip_on_vnic = "${var.private_subnet}"
}

View File

@@ -1,45 +0,0 @@
/*Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
The Universal Permissive License (UPL), Version 1.0*/
/*
variable "tenancy_ocid" {
description = "OCI Tenancy OCID"
}*/
variable "compartment_ocid" {
description = "Compartment name"
}
variable "availability_domain" {
description = "Availability domain"
type = "list"
}
variable "AD" {
description = "Availability domain"
type = "list"
}
# Virtual Cloud Network (VCN) variables
variable "vcn_id" {
description = "VCN OCID"
}
variable "route_table_id" {
description = "VCN Route Table OCID"
}
variable "dhcp_options_id" {
description = "VCN DHCP options OCID"
}
variable "vcn_subnet_cidr" {
description = "CIDR for VCN subnet"
type = "list"
}
variable "security_list_ids" {
description = "Security List OCID"
type = "list"
}
variable "dns_label" {
description = "VCN DNS Label"
}
variable "private_subnet" {
description = "Whether private or public subnet"
}

View File

@@ -1,13 +0,0 @@
/*Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
The Universal Permissive License (UPL), Version 1.0*/
# Get name of object storage
data "oci_core_services" "svcgtw_services" {
filter {
name = "name"
values = [".*Object.*Storage"]
regex = true
}
}

View File

@@ -1,21 +0,0 @@
/*Copyright © 2018, Oracle and/or its affiliates. All rights reserved.
The Universal Permissive License (UPL), Version 1.0*/
# Terraform version
terraform {
required_version = ">= 0.11.8"
}
# Oracle Cloud Infrastructure (OCI) Provider
provider "oci" {
version = "=3.5.0"
tenancy_ocid = "${var.tenancy_ocid}"
user_ocid = "${var.user_ocid}"
fingerprint = "${var.fingerprint}"
private_key_path = "${var.private_key_path}"
region = "${var.region}"
}

View File

@@ -1,67 +0,0 @@
# OCI Service
variable "tenancy_ocid" {
}
variable "compartment_ocid" {
}
variable "user_count" {
default = 1
}
variable "availability_domain_count" {
default = 3
}
variable "gold_image_ocid" {
default = "na"
}
variable "vm_subnet_id1" {
default = "na"
}
variable "vm_subnet_id2" {
default = "na"
}
variable "vm_subnet_id3" {
default = "na"
}
variable "vm_subnet_id" {
default = ["na1","na2", "na3"]
}
variable "ssh_public_key" {
default = "keys/atpkey.pub"
}
variable "user_ocid" {
}
variable "fingerprint" {
}
variable "private_key_path" {
}
variable "region" {
default = "eu-frankfurt-1"
}
variable "disable_auto_retries" {
default = "false"
}
variable "private_key_password" {
default = ""
}
variable "compute_shape" {
default = "VM.Standard2.1"
}
variable "VM_vcn_id" {
default = ""
}

View File

@@ -1,22 +0,0 @@
provider "oci" {
version = ">= 3.27.0"
tenancy_ocid = var.tenancy_ocid
user_ocid = var.user_ocid
fingerprint = var.fingerprint
private_key_path = var.private_key_path
private_key_password = var.private_key_password
region = var.region
disable_auto_retries = var.disable_auto_retries
}
# Get a list of Availability Domains
data "oci_identity_availability_domains" "ads" {
compartment_id = var.tenancy_ocid
}
# Get a list of subdomains
data "oci_core_subnets" "mysubnets" {
compartment_id = var.compartment_ocid
vcn_id = var.VM_vcn_id
}

View File

@@ -1,15 +0,0 @@
# OCI authentication
tenancy_ocid = "ocid1.tenancy.oc1..your_ocid"
compartment_ocid = "ocid1.compartment.oc1..your_ocid"
fingerprint = "69:your_fingerprint:02"
private_key_path = "/Users/your_local_private_key.pem"
user_ocid = "ocid1.user.oc1..your_ocid"
region = "eu-frankfurt-1"
# Compute Shape of the VM's
compute_shape = "VM.Standard2.1"
# Virtual Network to use - OCID to be provided
VM_vcn_id = "ocid1.vcn.oc1.eu-frankfurt-1.your_ocid"

View File

@@ -1,67 +0,0 @@
# OCI Service
variable "tenancy_ocid" {
}
variable "compartment_ocid" {
}
variable "user_count" {
default = 1
}
variable "availability_domain_count" {
default = 3
}
variable "gold_image_ocid" {
default = "na"
}
variable "vm_subnet_id1" {
default = "na"
}
variable "vm_subnet_id2" {
default = "na"
}
variable "vm_subnet_id3" {
default = "na"
}
variable "vm_subnet_id" {
default = ["na1","na2", "na3"]
}
variable "ssh_public_key" {
default = "keys/atpkey.pub"
}
variable "user_ocid" {
}
variable "fingerprint" {
}
variable "private_key_path" {
}
variable "region" {
default = "eu-frankfurt-1"
}
variable "disable_auto_retries" {
default = "false"
}
variable "private_key_password" {
default = ""
}
variable "compute_shape" {
default = "VM.Standard2.1"
}
variable "VM_vcn_id" {
default = ""
}

View File

@@ -1,22 +0,0 @@
provider "oci" {
version = ">= 3.27.0"
tenancy_ocid = var.tenancy_ocid
user_ocid = var.user_ocid
fingerprint = var.fingerprint
private_key_path = var.private_key_path
private_key_password = var.private_key_password
region = var.region
disable_auto_retries = var.disable_auto_retries
}
# Get a list of Availability Domains
data "oci_identity_availability_domains" "ads" {
compartment_id = var.tenancy_ocid
}
# Get a list of subdomains
data "oci_core_subnets" "mysubnets" {
compartment_id = var.compartment_ocid
vcn_id = var.VM_vcn_id
}

View File

@@ -1,140 +0,0 @@
// Copyright (c) 2019, 2020 Oracle and/or its affiliates. All rights reserved.
/*
* This is an example of a marketplace agreement
*/
# DATA 1 - Get a list of element in Marketplace, using filters, eg name of the stack
data "oci_marketplace_listings" "test_listings" {
name = ["Oracle WebLogic Server Enterprise Edition UCM"]
#name = ["Oracle Cloud Developer Image"]
compartment_id = var.compartment_ocid
}
# DATA 2 - Get details cf the specific listing you are interested in and which you obtained through generic listing
data "oci_marketplace_listing" "test_listing" {
listing_id = data.oci_marketplace_listings.test_listings.listings[0].id
compartment_id = var.compartment_ocid
}
# DATA 3 - Get the list of versions for the specific entry (11.3, 12.2.1, ....)
data "oci_marketplace_listing_packages" "test_listing_packages" {
#Required
listing_id = data.oci_marketplace_listing.test_listing.id
#Optional
compartment_id = var.compartment_ocid
#package_version = "WLS 10.3.6.0.200714.05(11.1.1.7)"
package_version = data.oci_marketplace_listing.test_listing.default_package_version
}
# DATA 4 - Get details about a specfic version
data "oci_marketplace_listing_package" "test_listing_package" {
#Required
listing_id = data.oci_marketplace_listing.test_listing.id
package_version = data.oci_marketplace_listing_packages.test_listing_packages.package_version
#Optional
compartment_id = var.compartment_ocid
}
# DATA 5 - agreement for a specific version
data "oci_marketplace_listing_package_agreements" "test_listing_package_agreements" {
#Required
listing_id = data.oci_marketplace_listing.test_listing.id
package_version = data.oci_marketplace_listing_packages.test_listing_packages.package_version
#Optional
compartment_id = var.compartment_ocid
}
# RESOURCE 1 - agreement for a specific version
resource "oci_marketplace_listing_package_agreement" "test_listing_package_agreement" {
#Required
agreement_id = data.oci_marketplace_listing_package_agreements.test_listing_package_agreements.agreements[0].id
listing_id = data.oci_marketplace_listing.test_listing.id
package_version = data.oci_marketplace_listing_packages.test_listing_packages.package_version
}
# RESOURCE 2 - Accepted agreement
resource "oci_marketplace_accepted_agreement" "test_accepted_agreement" {
#Required
agreement_id = oci_marketplace_listing_package_agreement.test_listing_package_agreement.agreement_id
compartment_id = var.compartment_ocid
listing_id = data.oci_marketplace_listing.test_listing.id
package_version = data.oci_marketplace_listing_packages.test_listing_packages.package_version
signature = oci_marketplace_listing_package_agreement.test_listing_package_agreement.signature
}
# DATA 1 : list of entry in Marketplace
output "data_1_oci_marketplace_listings" {
sensitive = false
value = [
# For debugging, show full data field
# data.oci_marketplace_listings.test_listings,
format("Listing name: %s", data.oci_marketplace_listings.test_listings.listings[0].name),
format("Package Type: %s", data.oci_marketplace_listings.test_listings.listings[0].package_type)
]
}
# DATA 2 : single entry in Marketplace (wls EE UCM)
output "data_2_oci_marketplace_listing" {
sensitive = false
value = [
# For debugging, show full data field
# data.oci_marketplace_listing.test_listing,
format("Listing name: %s", data.oci_marketplace_listing.test_listing.name),
format("Default version: %s", data.oci_marketplace_listing.test_listing.default_package_version)
]
}
# DATA 4 : Single version of an entry (11g)
output "DATA_4_oci_marketplace_listing_package" {
sensitive = false
value = [
# For debugging, show full data field
# data.oci_marketplace_listing_package.test_listing_package,
format("Resource Link: %s", data.oci_marketplace_listing_package.test_listing_package.resource_link),
format("Version: %s", data.oci_marketplace_listing_package.test_listing_package.version)
]
}
output "DATA_5_oci_marketplace_listing_package_agreements" {
sensitive = false
value = [
# For debugging, show full data field
# data.oci_marketplace_listing_package_agreements.test_listing_package_agreements,
format("Package Version: %s", data.oci_marketplace_listing_package_agreements.test_listing_package_agreements.package_version)
]
}
output "RESOURCE_1_oci_marketplace_listing_package_agreement" {
sensitive = false
value = [
# For debugging, show full data field
# oci_marketplace_listing_package_agreement.test_listing_package_agreement,
format("Package Version: %s", oci_marketplace_listing_package_agreement.test_listing_package_agreement.package_version),
format("Author: %s", oci_marketplace_listing_package_agreement.test_listing_package_agreement.author)
]
}
output "RESOURCE_2_oci_marketplace_accepted_agreement" {
sensitive = false
value = [
# For debugging, show full data field
# oci_marketplace_accepted_agreement.test_accepted_agreement,
format("Package Version: %s", oci_marketplace_accepted_agreement.test_accepted_agreement.package_version),
format("Date Accepted: %s", oci_marketplace_accepted_agreement.test_accepted_agreement.time_accepted)
]
}

View File

@@ -1,10 +0,0 @@
# Copyright 2017, 2019, Oracle Corporation and/or affiliates. All rights reserved.
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl
data "template_file" "deps_check_template" {
template = "${file("${path.module}/scripts/deps_check.template.sh")}"
vars = {
oracle_base = "${var.oracle_base}"
}
}

View File

@@ -1,6 +0,0 @@
# Copyright 2017, 2019, Oracle Corporation and/or affiliates. All rights reserved.
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl
output "rendered_deps_check" {
value = "${data.template_file.deps_check_template.rendered}"
}

View File

@@ -1,10 +0,0 @@
# Copyright 2017, 2019, Oracle Corporation and/or affiliates. All rights reserved.
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl
data "template_file" "deps_check_template" {
template = "${file("${path.module}/scripts/deps_check.template.sh")}"
vars = {
oracle_base = "${var.oracle_base}"
}
}

View File

@@ -1,6 +0,0 @@
# Copyright 2017, 2019, Oracle Corporation and/or affiliates. All rights reserved.
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl
output "rendered_deps_check" {
value = "${data.template_file.deps_check_template.rendered}"
}

View File

@@ -1,10 +0,0 @@
// Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
provider oci {
tenancy_ocid = var.tenancy_ocid
user_ocid = var.user_ocid
fingerprint = var.fingerprint
private_key_path = var.private_key_path
region = var.region
}

View File

@@ -1,51 +0,0 @@
// Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
# COMMON DATA SOURCES
data oci_identity_tenancy tenancy {
tenancy_id = var.tenancy_ocid
}
data oci_identity_regions regions {
}
# Availability Domains
data oci_identity_availability_domains ADs {
compartment_id = var.tenancy_ocid
}
# Oracle Linux VM Image
data oci_core_images oraclelinux {
compartment_id = var.compartment_ocid
operating_system = "Oracle Linux"
operating_system_version = "7.7"
# exclude GPU specific images
filter {
name = "display_name"
values = ["^Oracle-Linux-7.7-([\\.0-9]+)-([\\.0-9-]+)$"]
regex = true
}
}
/*
* Remote State Dependencies
*/
data "terraform_remote_state" "configuration" {
backend = "local"
config = {
path = "../../common/state/common/configuration/terraform.tfstate"
}
}
data "terraform_remote_state" "compartments" {
backend = "local"
config = {
path = "../../common/state/common/compartments/terraform.tfstate"
}
}

View File

@@ -1,20 +0,0 @@
// Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
provider oci {
tenancy_ocid = var.tenancy_ocid
user_ocid = var.user_ocid
fingerprint = var.fingerprint
private_key_path = var.private_key_path
region = var.region
}
// provider for home region for IAM resource provisioning
provider oci {
alias = "home"
tenancy_ocid = var.tenancy_ocid
user_ocid = var.user_ocid
fingerprint = var.fingerprint
private_key_path = var.private_key_path
region = local.home_region
}

View File

@@ -1,10 +0,0 @@
// Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
provider oci {
tenancy_ocid = var.tenancy_ocid
user_ocid = var.user_ocid
fingerprint = var.fingerprint
private_key_path = var.private_key_path
region = var.region
}

View File

@@ -1,10 +0,0 @@
// Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
provider oci {
tenancy_ocid = var.tenancy_ocid
user_ocid = var.user_ocid
fingerprint = var.fingerprint
private_key_path = var.private_key_path
region = var.region
}

Some files were not shown because too many files have changed in this diff Show More