Skip to content

Instantly share code, notes, and snippets.

View bernadinm's full-sized avatar

Miguel Bernadin bernadinm

  • San Francisco, California
  • 01:27 (UTC -07:00)
View GitHub Profile
@bernadinm
bernadinm / providerVariableDescription.tsv
Last active December 12, 2018 19:52
dcos-terraform: Provisioner Variable Descriptions for major convenience wrappers
Variables Description AWS Appendix GCP Appendix Azure Appendix
additional_listener List of additional listeners
additional_rules List of additional rules
admin Firewall rules for debuging access
admin_ips List of CIDR admin IPs
admin_username SSH User
agent_cidr_range Agent CIDR Range
agent_subnetwork_name Agent Subnetwork Name
allow_ports ports to allow
allow_stopping_for_update If true, allows Terraform to stop the instance to update its properties
{
"outputs": {
"masterFQDN": {
"value": "[reference(concat('Microsoft.Network/publicIPAddresses/', variables('masterPublicIPAddressName'))).dnsSettings.fqdn]",
"type": "string"
},
"diagnosticsStorageAccountUri": {
"value": "[reference(concat('Microsoft.Storage/storageAccounts/', variables('diagnosticsStorageAccountName')), variables('apiVersionStorage')).primaryEndpoints.blob]",
"type": "string"
},
{
"outputs": {
"masterFQDN": {
"value": "[reference(concat('Microsoft.Network/publicIPAddresses/', variables('masterPublicIPAddressName'))).dnsSettings.fqdn]",
"type": "string"
},
"diagnosticsStorageAccountUri": {
"value": "[reference(concat('Microsoft.Storage/storageAccounts/', variables('diagnosticsStorageAccountName')), variables('apiVersionStorage')).primaryEndpoints.blob]",
"type": "string"
},
@bernadinm
bernadinm / terraform-0.11.3
Created March 29, 2018 22:02
Terraform 0.11.3 working successfully
2018/03/29 14:58:44 [INFO] Terraform version: 0.11.3
2018/03/29 14:58:44 [INFO] Go runtime version: go1.9.3
2018/03/29 14:58:44 [INFO] CLI args: []string{"/usr/local/Cellar/terraform/0.11.3/bin/terraform", "apply", "-var-file", "desired_cluster_profile.tfvars.example", "--auto-approve"}
2018/03/29 14:58:44 [DEBUG] Attempting to open CLI config file: /Users/mbernadin/.terraformrc
2018/03/29 14:58:44 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2018/03/29 14:58:44 [INFO] CLI command args: []string{"apply", "-var-file", "desired_cluster_profile.tfvars.example", "--auto-approve"}
2018/03/29 14:58:44 [INFO] command: empty terraform config, returning nil
2018/03/29 14:58:44 [DEBUG] command: no data state file found for backend config
2018/03/29 14:58:44 [DEBUG] New state was assigned lineage "ac6cf248-d8a4-4912-a48d-e16d4f2aa110"
2018/03/29 14:58:44 [INFO] command: backend initialized: <nil>
@bernadinm
bernadinm / terraform-0.11.5
Created March 29, 2018 21:32
Debug Output for Terraform Bug Regression
2018/03/29 14:27:28 [INFO] Terraform version: 0.11.5
2018/03/29 14:27:28 [INFO] Go runtime version: go1.10
2018/03/29 14:27:28 [INFO] CLI args: []string{"/usr/local/Cellar/terraform/0.11.5/bin/terraform", "apply", "-var-file", "desired_cluster_profile.tfvars.example", "--auto-approve"}
2018/03/29 14:27:28 [DEBUG] Attempting to open CLI config file: /Users/mbernadin/.terraformrc
2018/03/29 14:27:28 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2018/03/29 14:27:28 [INFO] CLI command args: []string{"apply", "-var-file", "desired_cluster_profile.tfvars.example", "--auto-approve"}
2018/03/29 14:27:28 [INFO] command: empty terraform config, returning nil
2018/03/29 14:27:28 [DEBUG] command: no data state file found for backend config
2018/03/29 14:27:28 [DEBUG] New state was assigned lineage "699b4df2-eed8-3474-6c40-9c98ee5843cc"
2018/03/29 14:27:28 [INFO] command: backend initialized: <nil>
$ terraform init -from-module '[email protected]:github-repo/github-folder/aws' -upgrade=true
The working directory already contains files. The -from-module option requires
an empty directory into which a copy of the referenced module will be placed.
To initialize the configuration already in this working directory, omit the
-from-module option.
@bernadinm
bernadinm / transit-vpc-secondary-account.template
Created November 30, 2017 06:35
Modified Cisco CSR To Help Delete S3 Buckets and Disable Termination Protection By Default
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "(SO0001) - Transit VPC: This template creates a dedicated transit VPC with Cisco CSRs for routing traffic. ***NOTE*** You must first subscribe to the appropriate Cisco CSR marketplace BYOL or License Included AMI from the AWS Marketplace before you launch this template. Version 5",
"Parameters" : {
"KeyName" : {
"Description" : "Name of an existing EC2 KeyPair to enable SSH access to the instances",
"Type" : "AWS::EC2::KeyPair::KeyName",
"Default" : "Lab"
@bernadinm
bernadinm / target.null_resource.log
Created November 3, 2017 21:33
Terraform destroy fails on taint.
$ terraform destroy --target=aws_instance.agent[2] --target=null_resource.agent[2]
data.external.whoami: Refreshing state...
data.template_file.os-setup: Refreshing state...
data.template_file.aws_ami: Refreshing state...
data.template_file.aws_ami_user: Refreshing state...
aws_vpc.default: Refreshing state... (ID: vpc-66567f00)
aws_security_group.any_access_internal: Refreshing state... (ID: sg-8c8ed7f1)
aws_subnet.private: Refreshing state... (ID: subnet-bb51c2f3)
aws_security_group.admin: Refreshing state... (ID: sg-3582db48)
aws_security_group.private_slave: Refreshing state... (ID: sg-fa84dd87)
@bernadinm
bernadinm / panic.log
Created September 29, 2017 07:15
panic output
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

data.external.whoami: Refreshing state...
data.template_file.azure_sku: Refreshing state...
data.template_file.traditional_os_user: Refreshing state...
data.template_file.os-setup: Refreshing state...
data.template_file.azure_version: Refreshing state...
data.template_file.azure_publisher: Refreshing state...
@bernadinm
bernadinm / debug.log
Created September 29, 2017 07:10
Cannot replace all masters
This file has been truncated, but you can view the full file.
2017/09/29 00:03:52 [WARN] Invalid log level: "true". Defaulting to level: TRACE. Valid levels are: [TRACE DEBUG INFO WARN ERROR]
2017/09/29 00:03:52 [INFO] Terraform version: 0.10.6
2017/09/29 00:03:52 [INFO] Go runtime version: go1.9
2017/09/29 00:03:52 [INFO] CLI args: []string{"/usr/local/Cellar/terraform/0.10.6/bin/terraform", "plan", "--var", "dcos_master_discovery=master_http_loadbalancer", "--var", "dcos_exhibitor_storage_backend=azure", "--var", "expiration=6h"}
2017/09/29 00:03:52 [DEBUG] Attempting to open CLI config file: /Users/mbernadin/.terraformrc
2017/09/29 00:03:52 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2017/09/29 00:03:52 [INFO] CLI command args: []string{"plan", "--var", "dcos_master_discovery=master_http_loadbalancer", "--var", "dcos_exhibitor_storage_backend=azure", "--var", "expiration=6h"}
2017/09/29 00:03:52 [INFO] command: empty terraform config, returning nil
2017/09/29 00:03:52 [DEBUG] command: no data state file found for backend config
2017/09/29 00:03:52 [D