-
Notifications
You must be signed in to change notification settings - Fork 147
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
Kubektl stabilization: move provider to root #3095
Draft
annuay-google
wants to merge
16
commits into
GoogleCloudPlatform:develop
Choose a base branch
from
annuay-google:annuay/fix-orphaned-resource-states
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Kubektl stabilization: move provider to root #3095
annuay-google
wants to merge
16
commits into
GoogleCloudPlatform:develop
from
annuay-google:annuay/fix-orphaned-resource-states
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
annuay-google
force-pushed
the
annuay/fix-orphaned-resource-states
branch
from
October 3, 2024 14:41
19c5409
to
e53ee50
Compare
…kit into annuay/fix-orphaned-resource-states
annuay-google
added
the
release-improvements
Added to release notes under the "Improvements" heading.
label
Oct 3, 2024
Following changes need to be made to made to toolkit core: Add this provider to primary/providers.tf:
Add this provider version to primary/versions.tf:
|
annuay-google
force-pushed
the
annuay/fix-orphaned-resource-states
branch
2 times, most recently
from
October 3, 2024 15:50
e4390e3
to
0fbd519
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue Description
We have a blueprint that applied some manifests with kubectl-apply module, if we remove a kubectl-apply block from the blueprint fully, we will get 'Error: Provider configuration not present'.
For example, if we have a block like the below:
Removing workload_manager_config and recreating and redeploying gives us the error:
Root Cause
Defining the provider file, modules/management/kubectl-apply/providers.tf inside the module is the root cause. We define all other terraform providers at root. That's not the case here, it's in a child module.
When you delete the blueprint config for the child module, the corresponding module and provider code is also removed (the folder is still there, but terraform doesn't know about it).
So it does not know which provider to use to delete the resources associated with the module you're trying to destroy (kubectl_apply_manifests in this case). See this answer for more details: https://stackoverflow.com/a/58403262
Approach
Move kubectl provider to root module
Testing
Submission Checklist
NOTE: Community submissions can take up to 2 weeks to be reviewed.
Please take the following actions before submitting this pull request.