question: is the terraform `lifecycle` block actu...
# general
question: is the terraform
block actually supported? how would it be passed? a lot of docu references it, but I also realize that docu is generated from the tf docs.
Copy code
You can utilize the generic Terraform resource lifecycle configuration block with ignore_changes to create an ECS service with an initial count of running instances, then ignore any changes to that count caused externally
...the example in the tf docs for this section shows the lifecycle block, but the example in the pulumi version lacks it, making me thing it's being excluded in the autogen somewhere.......
The Terraform lifecycle block is not supported, but the similar Pulumi resource options supports an
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
Indeed. Opened which might help a bit here.
(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. )
You can see an example in this issue:
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
You do not need to provide
- that’s an unrelated other resource option that you probably don’t need in your use case.
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'] }