Comments (7)
We've solved it with a separate build step in our pipeline.
We're using gomplate
and template the .tf files and put something like this in them
{{ $domains := (datasource "config").domains }}{{range $domains }}
domain = { name = "{{.}}" }
{{- end}}
The steps would be something like
/gomplate -f fastly.tf.tmpl -o fastly.tf -d config=config/dev.yml
terraform plan ...
from terraform-provider-fastly.
this issue is a duplicate of https://github.com/terraform-providers/terraform-provider-fastly/issues/2
from terraform-provider-fastly.
The same problem (no count
support) also applies to... basically all the fastly resources, AFAICT. Which is rather limiting, here are some use cases:
- We want to not configure logging (bigquerylogging/gcslogging) for our staging system, but as I understand it,
count
is the only way to achieve an effect likeif terraform.workspace == "production"
with terraform.
(For this concrete problem I'm going to try a workaround with acondition
on the logging resource that always evaluates to false in staging, but that feels rather clumsy.) - We have three
backend
servers for our service, whose configuration (which is quite lengthy, with SSL certificates etc.) is exactly the same, except for the hostname. It would be nice if we didn't have to copy&paste all of it three times.
from terraform-provider-fastly.
why not just allow a csv value in for now until terraform properly supports count?
from terraform-provider-fastly.
We would really like for this to be implemented we we use a large list of domains and it is becoming very unwieldy to maintain
from terraform-provider-fastly.
Could you do something like...
dynamic "domain" {
for_each = var.domains
content {
name = "${domain.value}"
}
}
with
variable "domains" {
type = list(string)
default = [ "localhost" ]
}
?
from terraform-provider-fastly.
Yes, this shouldn't be a blocker these days. Please consider using dynamic blocks.
https://www.terraform.io/docs/language/expressions/dynamic-blocks.html
Closing this issue.
from terraform-provider-fastly.
Related Issues (20)
- plugin crashes when rate_limiter with action to "log_only" is set HOT 1
- product_enablement image_optimizer changes not applying. HOT 7
- rate_limiter: uri dictionary must exist bug HOT 3
- package required for compute service HOT 8
- Terraform apply does not report error if snippet VCL is invalid
- Manual Service activation/deactivation ignored by TF HOT 3
- fastly_service_acl_entries only save 100 entries in statefile HOT 1
- cannot enable brotli without impacting image optimization HOT 2
- Feature Request - automation token creation HOT 1
- Dynamic snippet breaks versioning
- Fastly TLS Subscription Read doesn't use the Current Value (Uses original)
- Marking vcl backends as sensitive HOT 5
- Terraform plan shows the removal of a backend that doesn't exist in the active version. HOT 3
- fastly_service_vcl.logging_bigquery always shows change HOT 2
- fastly_service_vcl Overly verbose Snippets diff
- Problems modifying stale_if_error HOT 1
- Change engineer to any other role
- gcp project_id change not applying on update to logging_gcs
- Default origin healthcheck timeout seconds is too short
- Provider crash invalid memory address HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-provider-fastly.