This message was deleted.
# bolt
s
This message was deleted.
c
I'm trying to run the pecdm destroy manually but not working:
Copy code
❯ /opt/puppetlabs/bin/bolt plan run pecdm::subplans::destroy provider=aws cloud_region=us-east-1
Starting: plan pecdm::subplans::destroy
Destroying Puppet Enterprise deployment on aws
Finished: plan pecdm::subplans::destroy in 0.64 sec
No name or uri for target: {"name"=>"", "uri"=>"10.224.11.177"} for group at ["peadm_nodes"]
d
@timidri any thoughts on this its confusing since it appears to have a uri
👀 1
t
Yeah what’s the output of
bolt inventory show
?
c
Copy code
❯ more inventory.yaml
---
config:
  transport: ssh
  ssh:
    host-key-check: false
    run-as: root
groups:
  - name: peadm_nodes
    targets:
      - _plugin: terraform
        dir: .terraform/aws_pe_arch
        resource_type: aws_instance.server
        target_mapping:
          name: public_dns
          uri: private_ip
      - _plugin: terraform
        dir: .terraform/aws_pe_arch
        resource_type: aws_instance.compiler
        target_mapping:
          name: public_dns
          uri: private_ip
      - _plugin: terraform
        dir: .terraform/aws_pe_arch
        resource_type: aws_instance.psql
        target_mapping:
          name: public_dns
          uri: private_ip
  - name: agent_nodes
    targets:
      - _plugin: terraform
        dir: .terraform/aws_pe_arch
        resource_type: aws_instance.node
        target_mapping:
          name: public_dns
          uri: private_ip
❯ bolt inventory show
No name or uri for target: {"name"=>"", "uri"=>"10.224.11.177"} for group at ["peadm_nodes"]
which it's getting the IP (uri) from the
.terrform/aws_pe_arch/terraform.tfstate
@timidri does that help?
t
@cdenneen Any reason why you are running
pecdm::subplans::destroy
instead of
pecdm::destroy
?
c
doesn't matter which I run
Copy code
❯ bolt plan run pecdm::destroy cloud_region=us-east-1 provider=aws
Starting: plan pecdm::destroy
Starting: plan pecdm::subplans::destroy
Destroying Puppet Enterprise deployment on aws
Finished: plan pecdm::subplans::destroy in 0.47 sec
Finished: plan pecdm::destroy in 0.48 sec
No name or uri for target: {"name"=>"", "uri"=>"10.224.11.177"} for group at ["peadm_nodes"]
@timidri any ideas?
why does it say "No name or uri" when it literally shows the uri?
t
I think the error message means that it needs the name as well as the uri. I am not sure why it cannot get the name
Can we do a screenshare? I see you are 6 hours earlier than I am, we could try a screenshare tomorrow?
Do instances have a public dns name?
c
private VPC so no public dns name
we don't register anything with Route53 for dns so we use IPs to connect but in this case TF should be able to destroy the assets it's not logging into them
the fact that it can't do a terraform destroy is a bit strange I would think
yes we can do a screenshare... it's 11am for me now
the message saying "name or uri" then is wrong if it needs both
t
Yeah it’s just how the terraform plug-in works, we can debug and create a PR if that’s the root cause
👍 1
Agree it’s strange, I am not sure why uri is not enough
I’ll try to reproduce locally
c
thanks
t
@cdenneen I've created a standard infra (PE primary only) with pecdm and I forced it not to map public IP addresses by passing the parameter
ssh_ip_mode=private
. This results in a different inventory file:
Copy code
cat inventory.yaml
---
config:
  transport: ssh
  ssh:
    host-key-check: false
    run-as: root
groups:
  - name: peadm_nodes
    targets:
      - _plugin: terraform
        dir: .terraform/aws_pe_arch
        resource_type: aws_instance.server
        target_mapping:
          name: tags.internalDNS
          uri: private_ip
      - _plugin: terraform
        dir: .terraform/aws_pe_arch
        resource_type: aws_instance.compiler
        target_mapping:
          name: tags.internalDNS
          uri: private_ip
      - _plugin: terraform
        dir: .terraform/aws_pe_arch
        resource_type: aws_instance.psql
        target_mapping:
          name: tags.internalDNS
          uri: private_ip
  - name: agent_nodes
    targets:
      - _plugin: terraform
        dir: .terraform/aws_pe_arch
        resource_type: aws_instance.node
        target_mapping:
          name: public_dns
          uri: private_ip
  - name: windows_agent_nodes
    targets:
      - _plugin: terraform
        dir: .terraform/aws_pe_arch
        resource_type: aws_instance.windows_node
        target_mapping:
          name: public_dns
          uri: private_ip
    config:
      transport: winrm
      winrm:
        ssl: false
The name of the node is now mapped to
tags.internalDNS
which is available. Was your infra created with pecdm? What parameters did you pass and also, what version of pecdm were you using?