Closed rarkins closed 7 years ago
Data sources are read only. Destroying them has no effect on anything, so the actual data in S3 will be unaffected.
The first/only time I tried it, it failed in its attempt to destroy and hence the comment itself failed, with the typical "terraform does not roll back" warning. I am pretty sure I needed to do some manual intervention before I could continue. Sorry but I don't have the log from that saved though. Maybe I'll try again and risk it
I'd have to see what the error says. Again, deleting a data source should have zero effect on the underlying data, so it was probably something different.
@brikis98 I think you're right about this topic. I destroyed another similar set of configurations and this time it didn't error on the remote data part. The previous time must have been coincidental/unrelated. Thanks.
I'm following the design approach in "Read-Only State" in Chapter 3, to pull in data from global IAM configuration. The problem I have is that if I try to destroy a configuration group, it also wants to destroy the remote state too. e.g. here is the destroy plan:
(check out the last line)
In the module's
main.tf
, the data source is configured like this:Is there a way to get this to work such that
destroy
will work?