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
Branch planner PR's assume empty state #1163
Comments
I just ran into this too, it looks like it's due to how For a Terraform object named This can be worked around with the default backend by manually specifying apiVersion: infra.contrib.fluxcd.io/v1alpha2
kind: Terraform
metadata:
name: helloworld
namespace: flux-system
spec:
interval: 1m
approvePlan: auto
path: ./
backendConfig:
secretSuffix: helloworld
sourceRef:
kind: GitRepository
name: helloworld
namespace: flux-system |
I remember an issue about it, or similar to this issue, but I can't find it. I have no idea if we fixed it (thought we fix) or just wanted to fix it. |
It looks like this is the commit that should fixe the issue e93dc5e |
Thank you. Yes it's related. I don't know yet why it doesn't help the way we expect. if spec.BackendConfig == nil {
spec.BackendConfig = &infrav1.BackendConfigSpec{
SecretSuffix: originalTF.Name,
InClusterConfig: true,
}
} One issue with this that I can see instantly, it only changes things if In other cases it literally does the same as the suggested workaround:
It sets the |
Ah, never mind. The mentioned commit landed on So I guess it's fixed, but the fix is not released yet only merged. |
I set up the tf-controller in my cluster and it works without issue for applying changes in the 'main' branch. But using the branch planner functionality I noticed that on every PR I create, it starts from an empty state instead of from the state from the main branch. This results in all resources seemingly being created for the first time, not changed or added.
The text was updated successfully, but these errors were encountered: