Hi ,
I am working on newrelic_one_dashboard in terraform and I have to create a newrelic dashboard with multiple pages .I am able to get it done successfully . Now I want to move the pages to different terraform file like page1.tf and page2.tf and create a single dashboard from it . I am not finding a way to do the same .Kindly help me .
Is it the wrong forum to ask this ?
Looking at the newrelic_one_dashboard
documentation shows that each page is specified as a block. A Terraform resource
cannot be split over multiple files, so unfortunately I don’t think there’s any good way to split your dashboard definition into multiple files.
(You could conceivably use dynamic
blocks but I expect this would be more complex and difficult to maintain than one large file, so I don’t recommend it.)
1 Like
Is there any other way to implement this ? as dynamic
block won’t do anything more rather moving all the pages to a separate .tfvars file . I tried to use override
but the page2 is removing the page1 and it is expected as said in the documentation . Please help if you find any other way to implement the same .
As previously mentioned the best you could do is use multiple local variables (created in different files) which are then combined together within the resource to use in dynamic blocks.
1 Like