Skip to content

Changes to site should recreate sigsci_edge_deployment_service resource #243

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
sjparkinson opened this issue Apr 2, 2025 · 0 comments

Comments

@sjparkinson
Copy link

Per https://docs.fastly.com/en/ngwaf/edge-waf-deployment-using-the-next-gen-waf-control-panel#re-mapping-a-fastly-vcl-service-to-a-new-site-workspace, in order to move a Fastly service between sites in Signal Sciences the provider should send a DELETE then a PUT request to the deliveryIntegration endpoint.

"site_short_name": {
Type: schema.TypeString,
Description: "Site short name",
Required: true,
},

I think this is solved by making use of ForceNew1.

Currently we're looking to work around this using:

# To enable the use of `replace_triggered_by` in the `sigsci_edge_deployment_service` resource.
resource "terraform_data" "sigsci_site" {
  input = var.sigsci_site
}

resource "sigsci_edge_deployment_service" "this" {
  site_short_name = terraform_data.sigsci_site
  fastly_sid      = fastly_service_vcl.this.id
  percent_enabled = 100

  lifecycle {
    replace_triggered_by = [
      # The provider does not correctly handle changes to the `site_short_name` attribute. A DELETE then PUT request
      # is required to move services between sites.
      terraform_data.sigsci_site,
    ]
  }
}

Footnotes

  1. https://developer.hashicorp.com/terraform/plugin/sdkv2/schemas/schema-behaviors#forcenew

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant