Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Remove provider aliases from go templates #617

Merged
merged 1 commit into from
Jul 2, 2020

Conversation

knrt10
Copy link
Member

@knrt10 knrt10 commented Jun 11, 2020

Signed-off-by: knrt10 kautilya@kinvolk.io

@knrt10 knrt10 requested a review from invidian June 11, 2020 09:30
@knrt10 knrt10 linked an issue Jun 22, 2020 that may be closed by this pull request
@iaguis
Copy link
Contributor

iaguis commented Jun 26, 2020

Has this been tested successfully with upgrades?

I'd welcome a bit more context in the commit message.

@invidian
Copy link
Member

From my testing, this required running sed on terraform.tfstate file, which is not great.

From the official terraform docs, while the `provider` blocks can appear
in any module, it is recommended that they be placed only in root module
of a configuration, since this approach allows users to configure
providers just once and reuse them across all descendent modules

terraform.io/docs/configuration/modules.html#providers-within-modules
for more information

Fixes #539

Signed-off-by: knrt10 <kautilya@kinvolk.io>
@knrt10 knrt10 force-pushed the knrt10/provider-alias-fix branch from 390fdd9 to ffe986f Compare July 1, 2020 10:16
@knrt10
Copy link
Member Author

knrt10 commented Jul 1, 2020

@iaguis @invidian I tested for up-gradation and it worked fine. First I deployed cluster on packet using master branch and then applied the patch in this PR and reapplied the cluster and everything worked fine. You can check the final pic shown below. Also I have updated the commit message for more information

Initial

Initial

Final

Testing

@knrt10 knrt10 requested review from invidian and iaguis and removed request for invidian July 1, 2020 10:23
@invidian
Copy link
Member

invidian commented Jul 2, 2020

I'll test again now.

Copy link
Member

@invidian invidian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested the upgrade path from latest release (v0.2.1) to this PR and everything seems to be fine when doing the upgrade on AWS and Packet platforms, so I'm happy to merge it 👍 ✔️

However, I have no idea why it didn't work before 😂

@knrt10 knrt10 merged commit f9d3bc6 into master Jul 2, 2020
@knrt10 knrt10 deleted the knrt10/provider-alias-fix branch July 2, 2020 14:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't use provider aliases in Terraform code
3 participants