Commit 4239f14f authored by Matt Kasa's avatar Matt Kasa

Simplify Terraform module usage instructions

This changes the module instance name to an example string
to make it clear that the module instance name does not
need to be based on the package name.

Changelog: fixed

Closes https://gitlab.com/gitlab-org/gitlab/-/issues/334327
parent eda467fd
......@@ -14,8 +14,7 @@ export default {
computed: {
...mapState(['packageEntity', 'terraformHelpPath', 'gitlabHost', 'projectPath']),
provisionInstructions() {
// eslint-disable-next-line @gitlab/require-i18n-strings
return `module "${this.packageEntity.name}" {
return `module "my_module_name" {
source = "${this.gitlabHost}/${this.projectPath}/${this.packageEntity.name}"
version = "${this.packageEntity.version}"
}`;
......
......@@ -10,7 +10,7 @@ exports[`TerraformInstallation renders all the messages 1`] = `
<code-instruction-stub
copytext="Copy Terraform Command"
instruction="module \\"Test/system-22\\" {
instruction="module \\"my_module_name\\" {
source = \\"bar.dev/foo/Test/system-22\\"
version = \\"0.1\\"
}"
......
......@@ -42,7 +42,7 @@ describe('TerraformInstallation', () => {
describe('installation commands', () => {
it('renders the correct command', () => {
expect(findCodeInstructions().at(0).props('instruction')).toMatchInlineSnapshot(`
"module \\"Test/system-22\\" {
"module \\"my_module_name\\" {
source = \\"bar.dev/foo/Test/system-22\\"
version = \\"0.1\\"
}"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment