-
Notifications
You must be signed in to change notification settings - Fork 161
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
Add default project to organization default settings #1603
base: main
Are you sure you want to change the base?
Conversation
4779a2f
to
369256f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we be setting values for default_agent_pool_id
and default_project_id
in the resourceTFEOrganizationDefaultSettingsRead
method?
Something like:
if organization.DefaultAgentPool != nil {
d.Set("default_agent_pool_id", organization.DefaultAgentPool.ID)
}
if organization.DefaultProject != nil {
d.Set("default_project_id", organization.DefaultProject.ID)
}
When I was smoke testing I noticed that manual drift is not detected by the provider, and I think this is the reason why. I know that default_agent_pool_id
is out of the scope of this PR, but if we include it here we will probably be patching a bug that hasn't been reported yet.
The manual drift scenario is probably worth including in an acceptance test as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ctrombley What do you mean by create a test for manual drift scenario?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ctrombley I tried testing this out and the states is out of sync with config, so you need to apply again. It leads to a non-empty apply.
Description
In atlas, we can now update the default project hence we need to add default project id to the organization default settings.
Note:
Remember to:
External links
Include any links here that might be helpful for people reviewing your PR. If there are none, feel free to delete this section.
Output from Documentation Preview
Output from acceptance tests
Please run applicable acceptance tests locally and include the output here. See testing.md to learn how to run acceptance tests.
If you are an external contributor, your contribution(s) will first be reviewed before running them against the project's CI pipeline.