by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Ashok Kumar
    @ashokkumarn81_twitter

    Hi Guys ,

    We are trying to assign IP to the vm in Vmware using the below code, But yet the the IPs are not assigned to the created VMs.

    Vms are created by cloning a template.

    Does anything needs to be done apart from this part.

    resource "vsphere_virtual_machine" "vm" {
      name             = "cloned_vm"
    #  resource_pool_id = "${data.vsphere_compute_cluster.cluster.resource_pool_id}"
      resource_pool_id = "${data.vsphere_host.host.resource_pool_id}"
      datastore_id     = "${data.vsphere_datastore.datastore.id}"
    
      num_cpus = "1"
      memory   = "1024"
      guest_id = "${data.vsphere_virtual_machine.template.guest_id}"
      scsi_type = "${data.vsphere_virtual_machine.template.scsi_type}"
    
      network_interface {
        network_id = "${data.vsphere_network.network.id}"
        adapter_type = "${data.vsphere_virtual_machine.template.network_interface_types[0]}"
      }
    
      wait_for_guest_net_timeout = 5
      wait_for_guest_ip_timeout = 5
      wait_for_guest_net_routable =true
    
      disk {
        label            = "disk0"
        size             = "${data.vsphere_virtual_machine.template.disks.0.size}"
        eagerly_scrub    = "${data.vsphere_virtual_machine.template.disks.0.eagerly_scrub}"
        thin_provisioned = true    
      }
    
      clone {
        template_uuid = "${data.vsphere_virtual_machine.template.id}"
    
        customize {
          linux_options {
            host_name = "terraform-test"
            domain    = "test.internal"
          }
          network_interface {
            ipv4_address = "10.101.65.100"
            ipv4_netmask = 24
    
          }
           ipv4_gateway = "10.101.65.1"
        }
    }
    }
    Abhinaya
    @abhinaya04
    Hello team
    Is anyone available online
    I have an issue where im creating IAM roles based on condition but not able to

    resource "aws_iam_role_policy_attachment" "sto-readonly-role-policy-attach" {
    role = "${aws_iam_role.sto-test-role.name}"
    policy_arn = "arn:aws:iam::aws:policy/ReadOnlyAccess"
    }

    resource "aws_iam_role" "sto-test-role" {
    name = "awsconfigiamrole"
    count = "${var.enablelogging == "yes" ? 1 : 0}"
    path = "/"
    assume_role_policy = <<EOF
    {
    "Statement": [
    {
    "Effect": "Allow",
    "Principal": { "Service": [ "config.amazonaws.com" ] },
    "Action": [ "sts:AssumeRole" ]
    }
    ]
    }
    EOF
    }

    this is the template
    image.png
    Ashok Kumar
    @ashokkumarn81_twitter

    Hi Folks,

    How to increase the timeout setting in terraform for vmware, As am getting "error cloning virtual machine: timeout waiting for clone to complete" error after applying.

    gowthamakanthan
    @gowthamakanthan
    @ashokkumarn81_twitter which provider you using ?
    Ashok Kumar
    @ashokkumarn81_twitter
    vmware
    gowthamakanthan
    @gowthamakanthan
    Could you please share the code to check ?
    Kent 'picat' Gruber
    @picatz
    @ashokkumarn81_twitter If you're using the vmware terraform provider, you should be able to use a customize block with a custom timeout value: https://www.terraform.io/docs/providers/vsphere/r/virtual_machine.html#virtual-machine-customization
    Kalyan chakravarthy
    @kalyan088_twitter
    Hi guys,
    I am using a external data source to create target group for network loadbalancer
    I am using some conditional statements to trigger that external data source and capturing the targetgrup_arn and using it outside the module
    but when the load balancer is not network, we are using the default target group and creating the resource but in outputs the workaround for is not working
    resource not found for variable
 --> "${element(concat(aws_instance.example..private_ip, list("")), 0)}"
    Can any one please suggest any way this can work?
    output "target-group-arn" {
    value = "${var.load_balancer_type == "network" ? element(concat(data.external.tg_arn.result["tg_arn"], list("")), 0) : aws_lb_target_group.alb_target_group.
    .arn }"
    }
    Thanks in advance
    Ashok Kumar
    @ashokkumarn81_twitter
    Hi How to reconnect to remote machine through ssh even after executing reboot command through remote-exec command. Terraform version 11.13 ,provider vmware
    Niels Baltodano
    @niels581
    Has anyone seen this error
    ´´´
    aws_lambda_permission.isimani_api: Error adding new Lambda Permission for isimani-api: PolicyLengthExceededException: The final policy size (20795) is bigger than the limit (20480).
    status code: 400, request id: 48d79bfb-2cbc-44c1-aba2-2c9e19791f22
    ´´´
    Joseph Anthony Pasquale Holsten
    @josephholsten
    FYI: I don't have time to help this person, but terraform-providers/terraform-provider-ultradns#11 looks like it needs a change to https://github.com/terra-farm/udnssdk.
    @ringods @rowleyaj if you're still here, they may need commit privs.
    Felipe Zipitría
    @fzipi
    Hey! I'm that person :)
    Let me know how I can help
    Ringo De Smet
    @ringods
    @fzipi Please come over to https://gitter.im/terra-farm/community
    Geoff Lancaster
    @geofflancaster
    Within a provider, how can i lookup the information about another resource?
    Anton Patsev
    @patsevanton
    Hello!
    Aarat Nathwani
    @aaratn
    Hey ! I just open-sourced terraform and terragrunt version manager.
    Please feel free to try it here.
    https://github.com/aaratn/terraenv
    Rituraj12345
    @Rituraj12345
    Hi , Trying to do run azure databricks notebooks by using terraform.Any guidance please
    Ian Norton
    @idnorton
    Greetings peeps, just stumbled across a terraform-aws-rds-aurora release in progress and wondered if this might be the right place to ask a question? 1.20 has a feature merged and just released for specifying ca_cert_identifier but that's not merged into the v12 supported 2.x release yet. Anybody know if that's on the cards or indeed if there's a better place to ask?
    Buamod
    @Ibuamod_twitter
    This message was deleted
    Buamod
    @Ibuamod_twitter
    I am looking for a tutorail for terragrunt .. ? .. I have three modules .. how can I use terragrunt for them
    Arthur Burkart
    @artburkart
    @Ibuamod_twitter – I recommend the book by the creator of terragrunt. https://www.oreilly.com/library/view/terraform-up/9781492046899/
    Lukas M
    @lukasmrtvy
    guys? how to iterate (resource per iteration) over list of maps ?
    Arthur Burkart
    @artburkart
    @lukasmrtvy – can you provide an example of what you're iterating over?
    Buamod
    @Ibuamod_twitter
    @artburkart thanks
    can someone tell me how to share varaibles between two resources
    Arthur Burkart
    @artburkart
    what does share between two resources mean in this context
    Buamod
    @Ibuamod_twitter
    so in one example.tf file i have two resources
    how can use one input as the other output
    Arthur Burkart
    @artburkart
    @Ibuamod_twitter I don't think you can use one input as the other's output, but you can use one's output as the other's input. Is that what you're trying to do?
    Lukas M
    @lukasmrtvy
    any idea if jsondecode() can hide output if json is invalid ?
    Arthur Burkart
    @artburkart
    I think it just fails
    output "out" {
      value = jsondecode("{")
    }
    ❯ terraform apply
    
    Error: Error in function call
    
      on main.tf line 2, in output "out":
       2:   value = jsondecode("{")
    
    Call to function "jsondecode" failed: EOF.
    Lukas M
    @lukasmrtvy
    @artburkart it will output content.. :(
    I am using template, to template json, ( load secrets ), then jsondecode and use another resource
    if json is invalid, it will printout content of template
    Buamod
    @Ibuamod_twitter
    I have a terragrunt question?
    Lukas M
    @lukasmrtvy
    is possible to test if jsondecode() function will work? I dont want to paste output if json is invalida. Thanks
    Abhinaya
    @abhinaya04
    does terraform support aws event bridge?
    Aarat Nathwani
    @aaratn
    Checkout terraform version manager written by me, supports pip, docker and homebrew !!
    Its already becoming popular with 40 :star: .
    https://github.com/aaratn/terraenv
    Kalyan chakravarthy
    @kalyan088_twitter
    Hello everyone, need a small with for_each
    I'm using count for a resource and want to iterate it in a resource using for_each, getting this error
    for_each is iterated using a map.
    authorizer_id         = data.external.authorizer_ids[each.key].result["result"]
        |----------------
        | data.external.authorizer_ids is tuple with 2 elements
    
    The given key does not identify an element in this collection value: a number
    is required.
    Francois Pienaar
    @fhpienaar_twitter
    Hi folks, firstly, what a great platform, my first day here at gitter. Have a question related to terraform + Azure landing zone design. Have you used a separate subscription to store state, keys + secrets, *?
    ppapishe
    @ppapishe
    Hey guys. I am hitting big terraform-providers/terraform-provider-aws#1842 in version > 0.12.9 . Is there a fix for this in any f the versions?