-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: Added ability to load terraform registry url and credentials fo… #1
base: master
Are you sure you want to change the base?
Conversation
// Terraform credentials | ||
TerraformCredentials = "credentials.tfrc.json" | ||
// Terraform Registry | ||
TerraformRegistry = "terraformrc" |
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.
Why the var is named TerraformRegistry?
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.
the variable in named terraformregistry because the secret contains the details of the custom terraform registry URL we want to connect to.
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.
But this rc file can contains other configurations too. Only TerraformRegistry
is inaccurate.
needSecretKeys := []string{TerraformRegistry, TerraformCredentials} | ||
for _, key := range needSecretKeys { | ||
if _, ok := secret.Data[key]; !ok { | ||
err := errors.Errorf("'%s' not in git credentials secret", key) |
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.
error message not right.
terraformCredentialsSecretVolume := corev1.Volume{Name: TerraformCredentialsConfigVolumeName} | ||
terraformCredentialsSecretVolume.Secret = &corev1.SecretVolumeSource{ | ||
SecretName: "terraform-credentials", | ||
DefaultMode: &gitSecretDefaultMode, |
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.
Maybe introduce another var.
Also let's send the PR to https://github.com/kubevela/terraform-controller |
62520e5
to
6a1232f
Compare
…rm a kubernetes secret. Signed-off-by: raradhakrishnan <[email protected]>
Signed-off-by: raradhakrishnan <[email protected]>
Signed-off-by: raradhakrishnan <[email protected]>
Signed-off-by: raradhakrishnan <[email protected]>
Signed-off-by: raradhakrishnan <[email protected]>
…tials-helper form configmaps. Signed-off-by: raradhakrishnan <[email protected]>
…ry as per review commments. Signed-off-by: raradhakrishnan <[email protected]>
… or configMap. Review comment fixed. Signed-off-by: raradhakrishnan <[email protected]>
…fixed review comment. Signed-off-by: raradhakrishnan <[email protected]>
…tent for secret and configmaps check. Fixed review comments. Signed-off-by: raradhakrishnan <[email protected]>
Signed-off-by: raradhakrishnan <[email protected]>
Signed-off-by: raradhakrishnan <[email protected]>
Signed-off-by: raradhakrishnan <[email protected]>
Co-authored-by: qiaozp <[email protected]> Signed-off-by: raradhakrishnan <[email protected]>
Co-authored-by: qiaozp <[email protected]> Signed-off-by: raradhakrishnan <[email protected]>
6a6cb4c
to
5b3fffb
Compare
…rm a kubernetes secret.