-
Notifications
You must be signed in to change notification settings - Fork 763
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
'github_repository_file' overwriting existing files even after 'overwrite_on_create' is set to 'false' #906
Comments
Any change we can get more debug output? Adding |
Hi @jcudit ! Of course I'm using
output: |
same thing here... anything else you need? |
@parag-neve-db @marianobntz-silohub This looks like the intended behaviour to me. I think you want to add this to your
|
You are right @parag-neve-db , adding that does the trick, when I update the content the plan is not updated. THANKS! |
I got below error when doing the following task. Error: [ERROR] Refusing to overwrite existing file. Configure I want to add a file to all terraform managed repos, but there is already a file with the exact name/content in a number of repos. I planned to have Or what does "overwrite_on_create" really do? @jcudit |
IIUC
|
gotcha, thanks for the reply |
👋 Hey Friends, this issue has been automatically marked as |
'github_repository_file' overwriting existing files even after 'overwrite_on_create' is set to 'false'
We are creating github repository and creating some files within the repository after the repo has been created. Some of the files we are creating like config should not be overwritten if it already exists and to achieve this we are using the
overwrite_on_create
attribute and set it to false. However, we are noticing that thegithub_repository_file
is still overwriting the file on every terraform plan/apply.GitHub Provider Version
v4.12.0
Terraform Version
v0.14.11
Affected Resource(s)
Please list the resources as a list, for example:
If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.
Terraform Configuration Files
Expected Behavior
On subsequent runs the
config.yaml
file should not get overwritten as it has overwrite_on_create' is set to 'false'Actual Behavior
When we run the plan again, the
github_repository_file
is overwriting the config.yaml file in the repositorySteps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply
terraform plan
againReferences
github_repository_file
#459The text was updated successfully, but these errors were encountered: