Skip to content

The ServiceVcl returns the service shape before the activation rather then after the activation #800

@JiriKovar

Description

@JiriKovar

Describe what happened

I have noticed that the output property activeVersion of the ServiceVCL contains the previously activated version throughout the Pulumi UP process.

Example:

  • I have a ServiceVCL resource and a separate resource that uses its activeVersion for the purpose of triggering update every time the ServiceVCL is updated (in the code below, its the Waf, which utilizes a dynamic provider)
  • Some changes to the ServiceVCL are made
  • pulumi up is triggered, ServiceVCL resource gets updated and a new version is activated.
  • upon running pulumi preview, the changes shows that the activeVersion was only now changed to the currently active one, which should have been reflected in the preceeding pulumi up.

Sample program

const serviceVcl = new fastly.ServiceVcl(
  name,
  {
    defaultTtl: 10,
    backends,
    domains: domains,
    snippets,
    conditions,
    loggingBlobstorages,
    headers,
    requestSettings,
    gzips,
    dictionaries: dictionaries,
    acls,
    dynamicsnippets: [],
  },
  {
    ignoreChanges: ['versionComment', 'dynamicsnippets'],
    import: args.importId ?? '',
  },
);

new Waf(
  `${name}-waf`,
  {
    ...wafConfig,
    serviceId: serviceVcl.id,
    vclVersion: serviceVcl.activeVersion,
  },
  {
    parent: serviceVcl,
  },
);

Log output

No response

Affected Resource(s)

No response

Output of pulumi about

CLI
Version 3.162.0
Go Version go1.24.2
Go Compiler gc

Plugins
KIND NAME VERSION
language nodejs 3.162.0

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSome behavior is incorrect or out of specneeds-reproNeeds repro steps before it can be triaged or fixed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions