Skip to content
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

fix(data/repository): set name and full_name attributes as computed #780

Merged

Conversation

yann-soubeyrand
Copy link
Contributor

This avoids propagating null values when the evaluation of the data source is deferred.

In some rare situations where one is using the repository data source on a not yet existing repository (which will be created during terraform apply), the evaluation of this data source will be deferred. However, a resource using only its full_name attribute (if the name argument was set) or its name attribute (if the full_name argument was set), will immediately get a null value since these attributes are not set as computed. Setting these attributes to computed solves the problem.

@yann-soubeyrand yann-soubeyrand force-pushed the data-repository-computed-fields branch from 312ede7 to d100a5f Compare May 10, 2021 10:38
@cnuss
Copy link
Contributor

cnuss commented May 10, 2021

@yann-soubeyrand looks like I submitted additional fixes in #778, should we combine forces?

yann-soubeyrand added a commit to camptocamp/terraform-github-actions-runner-provisioner that referenced this pull request May 10, 2021
The modified provider includes the changes from
integrations/terraform-provider-github#780.
This avoids propagating null values when the evaluation of the data
source is deferred.

Signed-off-by: Yann Soubeyrand <yann.soubeyrand@camptocamp.com>
@yann-soubeyrand yann-soubeyrand force-pushed the data-repository-computed-fields branch from d100a5f to 53eb4a9 Compare May 11, 2021 16:22
yann-soubeyrand added a commit to camptocamp/terraform-github-actions-runner-provisioner that referenced this pull request May 11, 2021
The modified provider includes the changes from
integrations/terraform-provider-github#780.
@jcudit jcudit added this to the v4.10.0 milestone May 13, 2021
@yann-soubeyrand
Copy link
Contributor Author

@cnuss sorry, I didn’t see your PR. I’ve no strong opinion for or against joining forces, as long as these changes end up in a released provider ;-)

@jcudit
Copy link
Contributor

jcudit commented May 22, 2021

Closing in favour of #778. @yann-soubeyrand please let me know if the new release does not fix your use case and I can get this one re-opened.

@jcudit jcudit closed this May 22, 2021
@yann-soubeyrand yann-soubeyrand deleted the data-repository-computed-fields branch June 10, 2021 16:03
@yann-soubeyrand yann-soubeyrand restored the data-repository-computed-fields branch June 10, 2021 16:07
@yann-soubeyrand
Copy link
Contributor Author

@jcudit #778 doesn’t seem to include the changes of this PR, can we reopen this PR?

@jcudit jcudit reopened this Jun 10, 2021
@jcudit jcudit modified the milestones: v4.10.0, v4.12.0, v4.13.0 Jun 10, 2021
@jcudit jcudit merged commit 678ded7 into integrations:master Jun 30, 2021
@yann-soubeyrand yann-soubeyrand deleted the data-repository-computed-fields branch July 5, 2021 15:26
kfcampbell pushed a commit to kfcampbell/terraform-provider-github that referenced this pull request Jul 26, 2022
…ntegrations#780)

This avoids propagating null values when the evaluation of the data
source is deferred.

Signed-off-by: Yann Soubeyrand <yann.soubeyrand@camptocamp.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants