Skip to content

Commit

Permalink
Merge pull request #1167 from ulucinar/fix-firewall-update
Browse files Browse the repository at this point in the history
Fix the update loop in Firewall.networkfirewall resource
  • Loading branch information
ulucinar authored Feb 28, 2024
2 parents b9c1516 + e059d5c commit cbef5d5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export SUBPACKAGES := $(SUBPACKAGES)
KIND_VERSION = v0.21.0
UP_VERSION = v0.20.0
UP_CHANNEL = stable
UPTEST_VERSION = v0.11.0
UPTEST_VERSION = v0.11.1
KUSTOMIZE_VERSION = v5.3.0
YQ_VERSION = v4.40.5

Expand Down
3 changes: 3 additions & 0 deletions config/networkfirewall/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ func Configure(p *config.Provider) { // nolint:gocyclo
}
}
}
if diff.Attributes != nil {
delete(diff.Attributes, "firewall_status.#")
}
return diff, nil
}
})
Expand Down
13 changes: 11 additions & 2 deletions examples/networkfirewall/v1beta1/firewall.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ metadata:
annotations:
uptest.upbound.io/timeout: "3600"
meta.upbound.io/example-id: networkfirewall/v1beta1/firewall
uptest.upbound.io/update-parameter: '{"tags":{"update-test-tag":"val"}}'
labels:
testing.upbound.io/example-name: example
name: firewallname
spec:
forProvider:
firewallPolicyChangeProtection: true
subnetChangeProtection: true
firewallPolicyArnSelector:
matchLabels:
testing.upbound.io/example-name: example
Expand Down Expand Up @@ -113,6 +116,8 @@ spec:
apiVersion: ec2.aws.upbound.io/v1beta1
kind: VPC
metadata:
annotations:
meta.upbound.io/example-id: networkfirewall/v1beta1/firewall
labels:
testing.upbound.io/example-name: example
name: sample-vpc
Expand All @@ -128,6 +133,8 @@ spec:
apiVersion: ec2.aws.upbound.io/v1beta1
kind: Subnet
metadata:
annotations:
meta.upbound.io/example-id: networkfirewall/v1beta1/firewall
labels:
testing.upbound.io/example-name: example
name: sample-subnet1
Expand All @@ -145,7 +152,7 @@ apiVersion: networkfirewall.aws.upbound.io/v1beta1
kind: LoggingConfiguration
metadata:
annotations:
meta.upbound.io/example-id: networkfirewall/v1beta1/loggingconfiguration
meta.upbound.io/example-id: networkfirewall/v1beta1/firewall
labels:
testing.upbound.io/example-name: example
name: example
Expand All @@ -168,9 +175,11 @@ spec:
apiVersion: s3.aws.upbound.io/v1beta1
kind: Bucket
metadata:
name: uptest-networkfirewall-logging
annotations:
meta.upbound.io/example-id: networkfirewall/v1beta1/firewall
labels:
testing.upbound.io/example-name: s3-networkfirewall
name: uptest-networkfirewall-logging
spec:
deletionPolicy: Orphan
forProvider:
Expand Down

0 comments on commit cbef5d5

Please sign in to comment.