Error Inappropriate value for attribute content string required

0 votes

Hi Guys,

I am trying to create one SSH key using terraform, but it is showing me the below error.

Error: Incorrect attribute value type
  on task1.tf line 13, in resource "local_file" "mypvkey":
  13:     content         =  tls_private_key.task1_key
    |----------------
    | tls_private_key.task1_key is object with 8 attributes
Inappropriate value for attribute "content": string required.
Jun 15, 2020 in Terraform by MD
• 95,440 points
2,313 views

1 answer to this question.

0 votes

Hi@MD,

You have to pass in which format you want your private key. There are two types of format available one is .ppk and another one is .pem.  If you want in .ppk format then set content=tls_private_key.task1_key.private_key_ppk or if you want in .pem format then  pass content=tls_private_key.task1_key.private_key_pem.

answered Jun 15, 2020 by akhtar
• 38,230 points

Related Questions In Terraform

0 votes
1 answer

Error: Error putting object in S3 bucket (example11225588): AccessDenied: Access Denied

Hi@akhtar, To upload your file in the s3 ...READ MORE

answered Jun 11, 2020 in Terraform by MD
• 95,440 points
2,603 views
0 votes
1 answer
0 votes
1 answer
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
3,503 views
+2 votes
1 answer
0 votes
1 answer

How to set an IAM policy for a project in GCP using Terraform?

Hi@akhtar, You can create a policy and give ...READ MORE

answered Sep 13, 2020 in Terraform by akhtar
• 38,230 points
1,324 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP