Skip to content

Instantly share code, notes, and snippets.

@techiechap
Created April 14, 2020 23:47
Show Gist options
  • Save techiechap/11b888c1470a12cb1bd6cc456a1317a6 to your computer and use it in GitHub Desktop.
Save techiechap/11b888c1470a12cb1bd6cc456a1317a6 to your computer and use it in GitHub Desktop.
Create Automation
CI CD
Apply
@techiechap
Copy link
Author

020-04-14T23:29:12.9448961Z ##[debug]Evaluating condition for step: 'Terraform init' 2020-04-14T23:29:12.9450490Z ##[debug]Evaluating: succeeded() 2020-04-14T23:29:12.9450981Z ##[debug]Evaluating succeeded: 2020-04-14T23:29:12.9451849Z ##[debug]=> True 2020-04-14T23:29:12.9452346Z ##[debug]Result: True 2020-04-14T23:29:12.9452876Z ##[section]Starting: Terraform init 2020-04-14T23:29:12.9462800Z ============================================================================== 2020-04-14T23:29:12.9463128Z Task : Terraform 2020-04-14T23:29:12.9463541Z Description : Execute terraform commands to manage resources on AzureRM, Amazon Web Services(AWS) and Google Cloud Platform(GCP) 2020-04-14T23:29:12.9464077Z Version : 0.0.142 2020-04-14T23:29:12.9464341Z Author : Microsoft Corporation 2020-04-14T23:29:12.9464691Z Help : [Learn more about this task](https://aka.ms/AA5j5pf) 2020-04-14T23:29:12.9465087Z ============================================================================== 2020-04-14T23:29:13.0583915Z ##[debug]agent.TempDirectory=/home/vsts/work/_temp 2020-04-14T23:29:13.0605953Z ##[debug]loading inputs and endpoints 2020-04-14T23:29:13.0610659Z ##[debug]loading INPUT_PROVIDER 2020-04-14T23:29:13.0619168Z ##[debug]loading INPUT_COMMAND 2020-04-14T23:29:13.0621789Z ##[debug]loading INPUT_WORKINGDIRECTORY 2020-04-14T23:29:13.0622729Z ##[debug]loading INPUT_BACKENDSERVICEARM 2020-04-14T23:29:13.0623678Z ##[debug]loading INPUT_BACKENDAZURERMRESOURCEGROUPNAME 2020-04-14T23:29:13.0624447Z ##[debug]loading INPUT_BACKENDAZURERMSTORAGEACCOUNTNAME 2020-04-14T23:29:13.0625192Z ##[debug]loading INPUT_BACKENDAZURERMCONTAINERNAME 2020-04-14T23:29:13.0626008Z ##[debug]loading INPUT_BACKENDAZURERMKEY 2020-04-14T23:29:13.0627500Z ##[debug]loading ENDPOINT_AUTH_b16c4805-1028-4405-81fa-e639a6b6d743 2020-04-14T23:29:13.0628271Z ##[debug]loading ENDPOINT_AUTH_SCHEME_b16c4805-1028-4405-81fa-e639a6b6d743 2020-04-14T23:29:13.0629633Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_b16c4805-1028-4405-81fa-e639a6b6d743_SERVICEPRINCIPALID 2020-04-14T23:29:13.0633716Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_b16c4805-1028-4405-81fa-e639a6b6d743_AUTHENTICATIONTYPE 2020-04-14T23:29:13.0634620Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_b16c4805-1028-4405-81fa-e639a6b6d743_TENANTID 2020-04-14T23:29:13.0635257Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_b16c4805-1028-4405-81fa-e639a6b6d743_SERVICEPRINCIPALKEY 2020-04-14T23:29:13.0635882Z ##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION 2020-04-14T23:29:13.0636538Z ##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION 2020-04-14T23:29:13.0637137Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN 2020-04-14T23:29:13.0639090Z ##[debug]loaded 17 2020-04-14T23:29:13.0653573Z ##[debug]Agent.ProxyUrl=undefined 2020-04-14T23:29:13.0654507Z ##[debug]Agent.CAInfo=undefined 2020-04-14T23:29:13.0654906Z ##[debug]Agent.ClientCert=undefined 2020-04-14T23:29:13.0655399Z ##[debug]Agent.SkipCertValidation=undefined 2020-04-14T23:29:13.0713281Z ##[debug]check path : /home/vsts/work/_tasks/TerraformTaskV1_fe504acc-6115-40cb-89ff-191386b5e7bf/0.0.142/task.json 2020-04-14T23:29:13.0714242Z ##[debug]adding resource file: /home/vsts/work/_tasks/TerraformTaskV1_fe504acc-6115-40cb-89ff-191386b5e7bf/0.0.142/task.json 2020-04-14T23:29:13.0714858Z ##[debug]system.culture=en-US 2020-04-14T23:29:13.0728705Z ##[debug]provider=azurerm 2020-04-14T23:29:13.0733676Z ##[debug]command=init 2020-04-14T23:29:13.0741493Z ##[debug]workingDirectory=/home/vsts/work/r1/a/_tESTDeployment-MSDN-CI/drop/Terraform 2020-04-14T23:29:13.0742949Z ##[debug]commandOptions=null 2020-04-14T23:29:13.0744375Z ##[debug]which 'terraform' 2020-04-14T23:29:13.0752509Z ##[debug]found: '/opt/hostedtoolcache/terraform/0.12.3/x64/terraform' 2020-04-14T23:29:13.0753062Z ##[debug]which 'terraform' 2020-04-14T23:29:13.0753544Z ##[debug]found: '/opt/hostedtoolcache/terraform/0.12.3/x64/terraform' 2020-04-14T23:29:13.0754124Z ##[debug]which '/opt/hostedtoolcache/terraform/0.12.3/x64/terraform' 2020-04-14T23:29:13.0754681Z ##[debug]found: '/opt/hostedtoolcache/terraform/0.12.3/x64/terraform' 2020-04-14T23:29:13.0756270Z ##[debug]which '/opt/hostedtoolcache/terraform/0.12.3/x64/terraform' 2020-04-14T23:29:13.0756815Z ##[debug]found: '/opt/hostedtoolcache/terraform/0.12.3/x64/terraform' 2020-04-14T23:29:13.0757314Z ##[debug]/opt/hostedtoolcache/terraform/0.12.3/x64/terraform arg: init 2020-04-14T23:29:13.0759916Z ##[debug]backendServiceArm=b16c4805-1028-4405-81fa-e639a6b6d743 2020-04-14T23:29:13.0761478Z ##[debug]backendAzureRmStorageAccountName=testcmsaamsdn 2020-04-14T23:29:13.0763142Z ##[debug]backendAzureRmContainerName=terraform 2020-04-14T23:29:13.0764127Z ##[debug]backendAzureRmKey=terraform.tfstate 2020-04-14T23:29:13.0765421Z ##[debug]backendAzureRmResourceGroupName=rg-testtconfig-AMSDN 2020-04-14T23:29:13.0766033Z ##[debug]b16c4805-1028-4405-81fa-e639a6b6d743 data subscriptionid = 00000000-0000-0000-0000-000000000000 2020-04-14T23:29:13.0768452Z ##[debug]b16c4805-1028-4405-81fa-e639a6b6d743 auth param tenantid = *** 2020-04-14T23:29:13.0769730Z ##[debug]b16c4805-1028-4405-81fa-e639a6b6d743 auth param serviceprincipalid = *** 2020-04-14T23:29:13.0770765Z ##[debug]b16c4805-1028-4405-81fa-e639a6b6d743 auth param serviceprincipalkey = *** 2020-04-14T23:29:13.0772103Z ##[debug]/opt/hostedtoolcache/terraform/0.12.3/x64/terraform arg: -backend-config=storage_account_name=testetcmsaamsdn 2020-04-14T23:29:13.0774620Z ##[debug]/opt/hostedtoolcache/terraform/0.12.3/x64/terraform arg: -backend-config=container_name=terraform 2020-04-14T23:29:13.0775254Z ##[debug]/opt/hostedtoolcache/terraform/0.12.3/x64/terraform arg: -backend-config=key=terraform.tfstate 2020-04-14T23:29:13.0775899Z ##[debug]/opt/hostedtoolcache/terraform/0.12.3/x64/terraform arg: -backend-config=resource_group_name=rg-testtconfig-AMSDN 2020-04-14T23:29:13.0776600Z ##[debug]/opt/hostedtoolcache/terraform/0.12.3/x64/terraform arg: -backend-config=arm_subscription_id=7ee4e31b-1093-4482-b1a5-c54a02b6bcd3 2020-04-14T23:29:13.0777333Z ##[debug]/opt/hostedtoolcache/terraform/0.12.3/x64/terraform arg: -backend-config=arm_tenant_id=*** 2020-04-14T23:29:13.0780713Z ##[debug]/opt/hostedtoolcache/terraform/0.12.3/x64/terraform arg: -backend-config=arm_client_id=*** 2020-04-14T23:29:13.0781450Z ##[debug]/opt/hostedtoolcache/terraform/0.12.3/x64/terraform arg: -backend-config=arm_client_secret=*** 2020-04-14T23:29:13.0781973Z ##[debug]exec tool: /opt/hostedtoolcache/terraform/0.12.3/x64/terraform 2020-04-14T23:29:13.0782349Z ##[debug]arguments: 2020-04-14T23:29:13.0782635Z ##[debug] init 2020-04-14T23:29:13.0783055Z ##[debug] -backend-config=storage_account_name=testetcmsaamsdn 2020-04-14T23:29:13.0783536Z ##[debug] -backend-config=container_name=terraform 2020-04-14T23:29:13.0783999Z ##[debug] -backend-config=key=terraform.tfstate 2020-04-14T23:29:13.0785159Z ##[debug] -backend-config=resource_group_name=rg-testtconfig-AMSDN 2020-04-14T23:29:13.0785683Z ##[debug] -backend-config=arm_subscription_id=00000000 2020-04-14T23:29:13.0786245Z ##[debug] -backend-config=arm_tenant_id=*** 2020-04-14T23:29:13.0786758Z ##[debug] -backend-config=arm_client_id=*** 2020-04-14T23:29:13.0787280Z ##[debug] -backend-config=arm_client_secret=*** 2020-04-14T23:29:13.0788996Z [command]/opt/hostedtoolcache/terraform/0.12.3/x64/terraform init -backend-config=storage_account_name=vnetcmsaamsdn -backend-config=container_name=terraform -backend-config=key=terraform.tfstate -backend-config=resource_group_name=rg-vnetconfig-AMSDN -backend-config=arm_subscription_id=7ee4e31b-1093-4482-b1a5-c54a02b6bcd3 -backend-config=arm_tenant_id=*** -backend-config=arm_client_id=*** -backend-config=arm_client_secret=*** 2020-04-14T23:29:13.1122601Z 2020-04-14T23:29:13.1125567Z �[0m�[1mInitializing the backend...�[0m 2020-04-14T23:29:13.1161620Z �[0m�[32m 2020-04-14T23:29:13.1162318Z Successfully configured the backend "azurerm"! Terraform will automatically 2020-04-14T23:29:13.1163481Z use this backend unless the backend configuration changes.�[0m 2020-04-14T23:29:13.1164179Z �[33m 2020-04-14T23:29:13.1164944Z �[1m�[33mWarning: �[0m�[0m�[1m"arm_tenant_id": [DEPRECATED] arm_tenant_idhas been replaced bytenant_id�[0m 2020-04-14T23:29:13.1165611Z 2020-04-14T23:29:13.1173244Z �[0m�[0m�[0m 2020-04-14T23:29:13.1175107Z �[33m 2020-04-14T23:29:13.1209450Z �[1m�[33mWarning: �[0m�[0m�[1m"arm_subscription_id": [DEPRECATED] arm_subscription_idhas been replaced bysubscription_id�[0m 2020-04-14T23:29:13.1210053Z 2020-04-14T23:29:13.1210573Z �[0m�[0m�[0m 2020-04-14T23:29:13.1213037Z �[33m 2020-04-14T23:29:13.1213907Z �[1m�[33mWarning: �[0m�[0m�[1m"arm_client_id": [DEPRECATED] arm_client_idhas been replaced byclient_id�[0m 2020-04-14T23:29:13.1220292Z 2020-04-14T23:29:13.1220940Z �[0m�[0m�[0m 2020-04-14T23:29:13.1221393Z �[33m 2020-04-14T23:29:13.1222420Z �[1m�[33mWarning: �[0m�[0m�[1m"arm_client_secret": [DEPRECATED] arm_client_secrethas been replaced byclient_secret�[0m 2020-04-14T23:29:13.1222909Z 2020-04-14T23:29:13.1223370Z �[0m�[0m�[0m 2020-04-14T23:29:13.1223847Z �[31m **2020-04-14T23:29:13.1224843Z �[1m�[31mError: �[0m�[0m�[1m**Failed to get existing workspaces: Error creating storage client for storage account "tesetcmsaamsdn": azure: malformed storage account key: illegal base64 data at input byte 0�[0m**** 2020-04-14T23:29:13.1225511Z 2020-04-14T23:29:13.1225945Z ### �[0m�[0m�[0m 2020-04-14T23:29:13.1257014Z ##[debug]Exit code 1 received from tool '/opt/hostedtoolcache/terraform/0.12.3/x64/terraform' 2020-04-14T23:29:13.1265226Z ##[debug]STDIO streams have closed for tool '/opt/hostedtoolcache/terraform/0.12.3/x64/terraform' 2020-04-14T23:29:13.1322075Z ##[debug]task result: Failed 2020-04-14T23:29:13.1356855Z ##[error]Error: The process '/opt/hostedtoolcache/terraform/0.12.3/x64/terraform' failed with exit code 1 2020-04-14T23:29:13.1365674Z ##[debug]Processed: ##vso[task.issue type=error;]Error: The process '/opt/hostedtoolcache/terraform/0.12.3/x64/terraform' failed with exit code 1 2020-04-14T23:29:13.1369083Z ##[debug]Processed: ##vso[task.complete result=Failed;]Error: The process '/opt/hostedtoolcache/terraform/0.12.3/x64/terraform' failed with exit code 1 2020-04-14T23:29:13.1381686Z ##[section]Finishing: Terraform init

@techiechap
Copy link
Author

`Expected Behavior

2020-04-06T20:51:44.6804153Z ##[section]Starting: Terraform init
2020-04-06T20:51:44.6899722Z ==============================================================================
2020-04-06T20:51:44.6900046Z Task : Terraform
2020-04-06T20:51:44.6900412Z Description : Execute terraform commands to manage resources on AzureRM, Amazon Web Services(AWS) and Google Cloud Platform(GCP)
2020-04-06T20:51:44.6900793Z Version : 0.0.142
2020-04-06T20:51:44.6901012Z Author : Microsoft Corporation
2020-04-06T20:51:44.6901346Z Help : Learn more about this task
2020-04-06T20:51:44.6901695Z ==============================================================================
2020-04-06T20:51:44.9590647Z [command]C:\hostedtoolcache\windows\terraform\0.12.3\x64\terraform.exe init -backend-config=storage_account_name=saconfigstatestage -backend-config=container_name=terraform -backend-config=key=terraform.tfstate -backend-config=resource_group_name=rg-configstatemanagement-stage -backend-config=arm_subscription_id=00000000
-backend-config=arm_tenant_id=*** -backend-config=arm_client_id=*** -backend-config=arm_client_secret=***
2020-04-06T20:51:45.0929350Z
2020-04-06T20:51:45.0929883Z �[0m�[1mInitializing the backend...�[0m
2020-04-06T20:51:45.1005116Z �[0m�[32m
2020-04-06T20:51:45.1006019Z Successfully configured the backend "azurerm"! Terraform will automatically
2020-04-06T20:51:45.1007590Z use this backend unless the backend configuration changes.�[0m
2020-04-06T20:51:45.5075901Z
2020-04-06T20:51:45.5076411Z �[0m�[1mInitializing provider plugins...�[0m
2020-04-06T20:51:45.5076860Z - Checking for available provider plugins...
2020-04-06T20:51:45.6135268Z - Downloading plugin for provider "azurerm" (hashicorp/azurerm) 2.4.0...
2020-04-06T20:51:47.5546124Z
2020-04-06T20:51:47.5546874Z The following providers do not have any version constraints in configuration,
2020-04-06T20:51:47.5547417Z so the latest version was installed.
2020-04-06T20:51:47.5547786Z
2020-04-06T20:51:47.5548143Z To prevent automatic upgrades to new major versions that may contain breaking
2020-04-06T20:51:47.5548525Z changes, it is recommended to add version = "..." constraints to the
2020-04-06T20:51:47.5548922Z corresponding provider blocks in configuration, with the constraint strings
2020-04-06T20:51:47.5549263Z suggested below.
2020-04-06T20:51:47.5549458Z
2020-04-06T20:51:47.5554457Z * provider.azurerm: version = "~> 2.4"
2020-04-06T20:51:47.5564843Z
2020-04-06T20:51:47.5565403Z �[0m�[1m�[32mTerraform has been successfully initialized!�[0m�[32m�[0m
2020-04-06T20:51:47.5565782Z �[0m�[32m
2020-04-06T20:51:47.5566185Z You may now begin working with Terraform. Try running "terraform plan" to see
2020-04-06T20:51:47.5566694Z any changes that are required for your infrastructure. All Terraform commands
2020-04-06T20:51:47.5567087Z should now work.
2020-04-06T20:51:47.5567301Z
2020-04-06T20:51:47.5567661Z If you ever set or change modules or backend configuration for Terraform,
2020-04-06T20:51:47.5568261Z rerun this command to reinitialize your working directory. If you forget, other
2020-04-06T20:51:47.5568849Z commands will detect it and remind you to do so if necessary.�[0m
2020-04-06T20:51:47.5798834Z ##[section]Finishing: Terraform init
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment