Code Monkey home page Code Monkey logo

Comments (6)

andyt530 avatar andyt530 commented on August 22, 2024 2

ok posted a fix

from py-az2tf.

andyt530 avatar andyt530 commented on August 22, 2024

Hi
Could you please post the debug output by using:

./az2tf.sh -s yoursub -r kubernetes -g wavy-whatsapp -d yes -v yes

from py-az2tf.

tiago-cruz-movile avatar tiago-cruz-movile commented on August 22, 2024

Hello Andy!

Follow:

$ ./az2tf.sh -s 8c2a2cbd-6bdc-4094-bfa1-8ca3b7f2c7ea -r kubernetes -g wavy-whatsapp -d yes -v yes 
Subscription ID = 8c2a2cbd-6bdc-4094-bfa1-8ca3b7f2c7ea
Azure Resource Group Filter = wavy-whatsapp
Terraform Resource Type Filter = kubernetes
Get Subscription Policies & RBAC = no
Extract Key Vault Secrets to .tf files (insecure) = no
Fast Forward = no
Validate Only = yes
Debug = no
 
rm: cannot remove '*kubernetes*.tf': No such file or directory
python2.7 ../../scripts/az2tf.py -s 8c2a2cbd-6bdc-4094-bfa1-8ca3b7f2c7ea -g wavy-whatsapp -r kubernetes -d yes 2>&1 | tee -a import.log
resource group=wavy-whatsapp
resource filter=kubernetes
Debug=True
Get Access Token from CLI
Subscription: 8c2a2cbd-6bdc-4094-bfa1-8ca3b7f2c7ea
Found subscription 8c2a2cbd-6bdc-4094-bfa1-8ca3b7f2c7ea proceeding ...
Found Resource Groupwavy-whatsapp
# azurerm_kubernetes_cluster 1
{
    "name": "wavy-aks-whatsapp-single",
    "tags": {
        "Environment": "Production"
    },
    "id": "/subscriptions/8c2a2cbd-6bdc-4094-bfa1-8ca3b7f2c7ea/resourcegroups/wavy-whatsapp/providers/Microsoft.ContainerService/managedClusters/wavy-aks-whatsapp-single",
    "location": "eastus2",
    "type": "Microsoft.ContainerService/ManagedClusters",
    "properties": {
        "enablePodSecurityPolicy": false,
        "networkProfile": {
            "serviceCidr": "10.20.0.0/16",
            "networkPolicy": "azure",
            "dockerBridgeCidr": "172.17.0.1/16",
            "networkPlugin": "azure",
            "loadBalancerSku": "standard",
            "dnsServiceIP": "10.20.0.10"
        },
        "kubernetesVersion": "1.14.6",
        "agentPoolProfiles": [
            {
                "count": 4,
                "availabilityZones": [
                    "1",
                    "2",
                    "3"
                ],
                "name": "agentpool",
                "vmSize": "Standard_D4s_v3",
                "orchestratorVersion": "1.14.6",
                "maxPods": 110,
                "osType": "Linux",
                "enableAutoScaling": false,
                "vnetSubnetID": "/subscriptions/8c2a2cbd-6bdc-4094-bfa1-8ca3b7f2c7ea/resourceGroups/wavy-whatsapp/providers/Microsoft.Network/virtualNetworks/k8s-vnet/subnets/k8s-subnet",
                "type": "VirtualMachineScaleSets",
                "osDiskSizeGB": 128,
                "provisioningState": "Succeeded"
            }
        ],
        "maxAgentPools": 8,
        "fqdn": "wavy-aks-whatsapp-single-48a9294e.hcp.eastus2.azmk8s.io",
        "nodeResourceGroup": "MC_wavy-whatsapp_wavy-aks-whatsapp-single_eastus2",
        "enableRBAC": true,
        "linuxProfile": {
            "adminUsername": "ubuntu",
            "ssh": {
                "publicKeys": [
                    {
                        "keyData": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC5RN2nU0ZUGpl8UsiRJWpvhZe0KgiyFEBa+73vdWpCHhzRyjxoJuh9E2bXWYp2CDsFbytNKGhLOng+gbDuJKeLEOjjvgq0sxobIF6BFRAovDNvAitc6pxES9PKg40L24UGv9bg9WfWvd4Kfwl3UOvHc9pMambAl37WXVCowp16E1wICpidAs2+IUipKH/++usyNpW8BCRCqlG7WD6ypYi2cPsluNmH3fOOfc57L0XvMXqvdfKNj9PmQzGCqMZPxcay6nvpAIVWEqZ3HHD0x5rsw1TjdYtVZCK1bDpGahclLROu/xXxxKuAHGNrVMaci9FfjPIjKbjhHvSW+tznzkpv daniel.cano@NOTE-660\n"
                    }
                ]
            }
        },
        "dnsPrefix": "wavy-aks-whatsapp-single",
        "servicePrincipalProfile": {
            "clientId": "96e871ef-aa2d-4b48-835c-79ff04a4a855"
        },
        "addonProfiles": {
            "omsagent": {
                "config": {
                    "logAnalyticsWorkspaceResourceID": "/subscriptions/8c2a2cbd-6bdc-4094-bfa1-8ca3b7f2c7ea/resourcegroups/wavy-whatsapp/providers/microsoft.operationalinsights/workspaces/wavyakswavywhatsappdcaworkspace"
                },
                "enabled": true
            }
        },
        "provisioningState": "Succeeded"
    }
}
# File generated by py-az2tf see: https://github.com/andyt530/py-az2tf 
resource azurerm_kubernetes_cluster wavy-whatsapp__wavy-aks-whatsapp-single {
	 name = "wavy-aks-whatsapp-single"
	 location = "eastus2"
	 resource_group_name = "wavy-whatsapp"
	 dns_prefix = "wavy-aks-whatsapp-single"
	 kubernetes_version = "1.14.6"
	 linux_profile {
		 admin_username =  "ubuntu"
		 ssh_key {
			 key_data =    "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC5RN2nU0ZUGpl8UsiRJWpvhZe0KgiyFEBa+73vdWpCHhzRyjxoJuh9E2bXWYp2CDsFbytNKGhLOng+gbDuJKeLEOjjvgq0sxobIF6BFRAovDNvAitc6pxES9PKg40L24UGv9bg9WfWvd4Kfwl3UOvHc9pMambAl37WXVCowp16E1wICpidAs2+IUipKH/++usyNpW8BCRCqlG7WD6ypYi2cPsluNmH3fOOfc57L0XvMXqvdfKNj9PmQzGCqMZPxcay6nvpAIVWEqZ3HHD0x5rsw1TjdYtVZCK1bDpGahclLROu/xXxxKuAHGNrVMaci9FfjPIjKbjhHvSW+tznzkpv daniel.cano@NOTE-660
"
		 }
	 }
	 agent_pool_profile {
		 name =  "agentpool"
		 vm_size =  "Standard_D4s_v3"
		 count =  "4"
		 os_type =  "Linux"
	 }
	 service_principal { 
		 client_id =  "96e871ef-aa2d-4b48-835c-79ff04a4a855"
		 client_secret =  "ChangeME"
	 }
tags = { 
	 "Environment"="Production"
}
}

terraform init
There are some problems with the configuration, described below.

The Terraform configuration must be valid before initialization so that
Terraform can determine which modules and providers need to be installed.

Error: Invalid multi-line string

  on azurerm_kubernetes_cluster.wavy-whatsapp__wavy-aks-whatsapp-single.tf line 11, in resource "azurerm_kubernetes_cluster" "wavy-whatsapp__wavy-aks-whatsapp-single":
  11: 
  12: 

Quoted strings may not be split over multiple lines. To produce a multi-line
string, either use the \n escape to represent a newline character or use the
"heredoc" multi-line template syntax.


Error: Unterminated template string

  on azurerm_kubernetes_cluster.wavy-whatsapp__wavy-aks-whatsapp-single.tf line 11, in resource "azurerm_kubernetes_cluster" "wavy-whatsapp__wavy-aks-whatsapp-single":
  11: 
  12: 

No closing marker was found for the string.

Error: Invalid multi-line string
Error: Unterminated template string
Error with terraform init

Thanks!

from py-az2tf.

andyt530 avatar andyt530 commented on August 22, 2024

from py-az2tf.

andyt530 avatar andyt530 commented on August 22, 2024

There's a newline at the end of the key - really it shouldn't of been included/pasted.

I'll look to catch it and code it out.

from py-az2tf.

tiago-cruz-movile avatar tiago-cruz-movile commented on August 22, 2024

Worked, thanks!

from py-az2tf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.