-
Notifications
You must be signed in to change notification settings - Fork 89
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
ec_deployment_traffic_filter rules order #203
Comments
Hi, yeah, look at this one. It doesn't contain any associations explicitly and discovered change every time.
|
Interesting, that shouldn't be the case, I'll investigate and come back with an answer. |
@marclop perhaps is something with the ordering of collections handles rules under |
@wgebis I've tried to reproduce locally with some rules and I couldn't reproduce what you're seeing: variable "google_dns_rules" {
type = list(string)
default = ["8.8.8.8/24", "8.8.4.4/24"]
}
resource "ec_deployment" "example_minimal" {
name = "my_example_deployment"
# Mandatory fields
region = "us-east-1"
version = "7.10.1"
deployment_template_id = "aws-io-optimized-v2"
elasticsearch {}
kibana {}
traffic_filter = [
ec_deployment_traffic_filter.default.id,
ec_deployment_traffic_filter.google_dns.id,
ec_deployment_traffic_filter.secure_dns.id,
]
}
resource "ec_deployment_traffic_filter" "default" {
name = "all traffic"
region = "us-east-1"
type = "ip"
rule {
source = "0.0.0.0/0"
}
}
resource "ec_deployment_traffic_filter" "google_dns" {
name = "google dns"
region = "us-east-1"
type = "ip"
dynamic "rule" {
for_each = var.google_dns_rules
content {
source = rule.value
}
}
}
resource "ec_deployment_traffic_filter" "secure_dns" {
name = "secure dns"
region = "us-east-1"
type = "ip"
rule {
source = "1.1.1.1/24"
}
} $ terraform plan
terraform plan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.
ec_deployment_traffic_filter.default: Refreshing state... [id=ID]
ec_deployment_traffic_filter.google_dns: Refreshing state... [id=ID]
ec_deployment_traffic_filter.secure_dns: Refreshing state... [id=ID]
ec_deployment.example_minimal: Refreshing state... [id=ID]
------------------------------------------------------------------------
No changes. Infrastructure is up-to-date.
This means that Terraform did not detect any differences between your
configuration and real physical resources that exist. As a result, no
actions need to be performed. |
You have only two hosts here: |
Yep I was able to reproduce it with a bunch of rules more. I'll work on fixing it, thanks for reporting the bug. |
Current Behavior
After creation ec_deployment_traffic_filter rules, every
terraform plan/apply
detects change due to rules order.Possible Solution
Handling rules ordering.
Steps to Reproduce
Your Environment
The text was updated successfully, but these errors were encountered: