This message was deleted.
# general
s
This message was deleted.
w
The Terraform lifecycle block is not supported, but the similar Pulumi resource options supports an
ignoreChanges
property.
p
thanks - an hour of and on google searching didnt turn that up...
might be good to find a way to link to that instead of linking to the tf reference
w
Indeed. Opened https://github.com/pulumi/tf2pulumi/issues/104 which might help a bit here.
p
(and some example of what the structure looks like would be nice. 🙂)
that would definitely help! though if you try to do the tf thing directly, it's
Copy code
lifecycle {
      ignore_changes = ["desired_count"]
    }
which blows up 🙂
should I be adding
ignoreChanges { "desired_count" }
?
(it's friday, so I might be blind too. )
w
You can see an example in this issue: https://github.com/pulumi/pulumi-aws/issues/553
p
thanks, I just found that one.
{ parent: this, ignoreChanges: ['desired_count'] }
on line 139 results in
Copy code
TSError: ⨯ Unable to compile TypeScript:
    index.ts(139,5): error TS1136: Property assignment expected.
    index.ts(140,1): error TS1005: ',' expected.
    index.ts(140,2): error TS1128: Declaration or statement expected.
    index.ts(139,5): error TS2345: Argument of type '{ parent: typeof globalThis; ignoreChanges: string[]; }' is not assignable to parameter of type 'ComponentResourceOptions'.
      Types of property 'parent' are incompatible.
        Type 'typeof globalThis' is missing the following properties from type 'Resource': urn, getProvider
though
w
You do not need to provide
parent
- that’s an unrelated other resource option that you probably don’t need in your use case.
p
oh, I may be to far up in the {}'s
yep, there it goes (at least, no errors)
Copy code
desiredCount: +config.containerCount!,
  }, 
  { ignoreChanges: ['desired_count'] }
);
thanks!