Jananath Banuka
Jananath Banuka

Reputation: 3963

How to convert an existing resource to terraform in azure

I have an azure APIM (API management) and I need to convert this to terraform code.

Is there a way I can do this? I tried terraform import but only it updates the terraform state and I can't get the terraform code. When I do a terraform apply it says, the resource definition is not found and it is going to delete it.

Can someone help me? Thank you!

Upvotes: 0

Views: 196

Answers (1)

4c74356b41
4c74356b41

Reputation: 72191

there is no way of doing that. you'd need to create your definition from the existing resource and import the resource

Upvotes: 1

Related Questions