From dd07e6e8eb045ed10f9b34506d862717a26bebd2 Mon Sep 17 00:00:00 2001 From: Grace Miller Date: Wed, 26 Feb 2025 16:43:22 -0500 Subject: [PATCH 1/5] DOCSP-47585-untouched-vscode-includes --- source/includes/steps-configure-settings.yaml | 32 ----- .../steps-create-atlas-cluster-terraform.yaml | 65 ---------- .../steps-delete-atlas-cluster-terraform.yaml | 31 ----- .../steps-disconnect-mongodb-view.yaml | 11 -- source/includes/steps-install-vsce.yaml | 27 ---- ...eps-remove-connection-command-palette.yaml | 21 ---- .../steps-remove-connection-mdb-view.yaml | 14 --- source/includes/steps-rename-connection.yaml | 19 --- source/includes/terraform-apply-output.sh | 16 --- source/includes/terraform-init-output.sh | 17 --- source/includes/terraform-plan-output.sh | 116 ------------------ 11 files changed, 369 deletions(-) delete mode 100644 source/includes/steps-configure-settings.yaml delete mode 100644 source/includes/steps-create-atlas-cluster-terraform.yaml delete mode 100644 source/includes/steps-delete-atlas-cluster-terraform.yaml delete mode 100644 source/includes/steps-disconnect-mongodb-view.yaml delete mode 100644 source/includes/steps-install-vsce.yaml delete mode 100644 source/includes/steps-remove-connection-command-palette.yaml delete mode 100644 source/includes/steps-remove-connection-mdb-view.yaml delete mode 100644 source/includes/steps-rename-connection.yaml delete mode 100644 source/includes/terraform-apply-output.sh delete mode 100644 source/includes/terraform-init-output.sh delete mode 100644 source/includes/terraform-plan-output.sh diff --git a/source/includes/steps-configure-settings.yaml b/source/includes/steps-configure-settings.yaml deleted file mode 100644 index f7d2608f..00000000 --- a/source/includes/steps-configure-settings.yaml +++ /dev/null @@ -1,32 +0,0 @@ -title: Open the Settings View. -level: 4 -ref: open-settings -content: | - .. list-table:: - :header-rows: 1 - - * - Operating System - - Method - - Actions - - * - Any - - Visual Studio Code Menu - - :guilabel:`File` / :guilabel:`Code` > - :guilabel:`Preferences` > - :guilabel:`Settings` - - * - MacOS - - Keyboard Shortcut - - Press ``Command`` + ``,`` - - * - Windows and Linux - - Keyboard Shortcut - - Press ``Ctrl`` + ``,`` ---- -title: Search "MongoDB" in the :guilabel:`Settings` search bar. -level: 4 -ref: search-mongodb-in-settings -content: | - |vsce| extension settings are displayed. Changes you - make are saved automatically. -... diff --git a/source/includes/steps-create-atlas-cluster-terraform.yaml b/source/includes/steps-create-atlas-cluster-terraform.yaml deleted file mode 100644 index 00f379d8..00000000 --- a/source/includes/steps-create-atlas-cluster-terraform.yaml +++ /dev/null @@ -1,65 +0,0 @@ ---- -title: "Navigate to the directory in which you saved your ``main.tf`` file." -level: 4 -ref: nav-to-tf-file ---- -title: "Run the ``terraform init`` command to install the required providers." -level: 4 -ref: terraform-init -content: | - - .. code-block:: sh - - terraform init - - The following output indicates that the MongoDB Atlas - Terraform Provider is installed and ready for use: - - .. literalinclude:: /includes/terraform-init-output.sh - :linenos: - :language: sh ---- -title: "Run the ``terraform plan`` command to view what happens when you apply the configuration." -level: 4 -ref: terraform-plan -content: | - - .. code-block:: sh - - terraform plan - - The following output shows what happens when you apply the Terraform configuration: - - .. literalinclude:: /includes/terraform-plan-output.sh - :linenos: - :language: sh - - Proceed to the next step if the information is correct. - ---- -title: "Run the ``terraform apply`` command to create an |service| cluster from the Terraform configuration." -level: 4 -ref: terraform-apply -content: | - - .. code-block:: sh - - terraform apply - - Type ``yes`` when prompted to confirm that you want to apply the - configuration. - - .. note:: - - The ``terraform apply`` command might take several minutes to - complete. - - The following output indicates that your |service| cluster is created. - You can :ref:`create a connection ` to this - deployment using the |vsce| with the displayed connection strings: - - .. literalinclude:: /includes/terraform-apply-output.sh - :linenos: - :language: sh - -... diff --git a/source/includes/steps-delete-atlas-cluster-terraform.yaml b/source/includes/steps-delete-atlas-cluster-terraform.yaml deleted file mode 100644 index c4854111..00000000 --- a/source/includes/steps-delete-atlas-cluster-terraform.yaml +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: "Navigate to the directory in which you saved your ``main.tf`` file." -level: 4 -ref: nav-to-tf-file ---- -title: "Run the ``terraform destroy`` command to install the required providers." -level: 4 -ref: terraform-destroy -content: | - - .. code-block:: sh - - terraform destroy - - Type ``yes`` when prompted to confirm that you want to destroy the - resources defined in the configuration. - - .. note:: - - The ``terraform destroy`` command might take several minutes to - complete. - - The following output indicates that the |service| cluster and all - associated resources are deleted: - - .. code-block:: sh - :copyable: false - - Destroy complete! Resources: 4 destroyed. - -... diff --git a/source/includes/steps-disconnect-mongodb-view.yaml b/source/includes/steps-disconnect-mongodb-view.yaml deleted file mode 100644 index 8ffb1b1b..00000000 --- a/source/includes/steps-disconnect-mongodb-view.yaml +++ /dev/null @@ -1,11 +0,0 @@ ---- -source: - file: steps-open-mongodb-view.yaml - ref: open-mongodb-view -ref: disconnect-open-mongodb-view ---- -title: "Right-click the deployment from which you want to disconnect, then click :guilabel:`Disconnect`." -level: 4 -ref: vsce-disconnect - -... diff --git a/source/includes/steps-install-vsce.yaml b/source/includes/steps-install-vsce.yaml deleted file mode 100644 index 0f0f361e..00000000 --- a/source/includes/steps-install-vsce.yaml +++ /dev/null @@ -1,27 +0,0 @@ -title: Open the Extensions View. -level: 4 -ref: open-extensions -content: | - In Visual Studio Code, click the :guilabel:`Extensions` icon - in the left navigation. - - Alternatively, you can open the :guilabel:`Extensions` view by - pressing: - - - :guilabel:`Control + Shift + X` or - - - :guilabel:`Command + Shift + X`. - ---- -title: Search "MongoDB for VS Code" in the extension marketplace. -level: 4 -ref: search-mongodb-for-vscode ---- -title: Click :guilabel:`Install` on the "MongoDB for VS Code" extension. -level: 4 -ref: click-install -content: | - Once the installation is complete, the :guilabel:`Install` button - changes to the :guilabel:`Manage` gear button. - -... diff --git a/source/includes/steps-remove-connection-command-palette.yaml b/source/includes/steps-remove-connection-command-palette.yaml deleted file mode 100644 index 4d6eab2e..00000000 --- a/source/includes/steps-remove-connection-command-palette.yaml +++ /dev/null @@ -1,21 +0,0 @@ ---- -source: - file: steps-source-command-palette.yaml - ref: vsce-command-palette -ref: vsce-remove-command-palette ---- -title: "From the Command Palette, select - :guilabel:`MongoDB: Remove Connection...`." -level: 4 -ref: vsce-remove-remove -content: | - - .. include:: /includes/admonitions/tip-mongodb-command-palette.rst - - If you have more than one connection, select the connection you want - to remove from the Command Palette. ---- -title: "Click :guilabel:`Yes` to remove the connection." -ref: confirm-connection-remove -level: 4 -... diff --git a/source/includes/steps-remove-connection-mdb-view.yaml b/source/includes/steps-remove-connection-mdb-view.yaml deleted file mode 100644 index 679f8649..00000000 --- a/source/includes/steps-remove-connection-mdb-view.yaml +++ /dev/null @@ -1,14 +0,0 @@ ---- -source: - file: steps-open-mongodb-view.yaml - ref: open-mongodb-view -ref: disconnect-open-mongodb-view ---- -title: "Right-click the connection you want to remove, then click :guilabel:`Remove Connection`." -level: 4 -ref: remove-connection-mdb-view ---- -title: "Click :guilabel:`Yes` to remove the connection." -level: 4 -ref: remove-connection-confirm -... diff --git a/source/includes/steps-rename-connection.yaml b/source/includes/steps-rename-connection.yaml deleted file mode 100644 index 5b52a52b..00000000 --- a/source/includes/steps-rename-connection.yaml +++ /dev/null @@ -1,19 +0,0 @@ ---- -ref: nav-to-mdb-view -source: - file: steps-open-mongodb-view.yaml - ref: open-mongodb-view ---- -title: "Right-click the connection you want to activate, then click :guilabel:`Rename Connection`." -level: 4 -ref: click-rename-connection ---- -title: "Rename the connection." -level: 4 -ref: rename-collection. -content: | - - a. In the Command Palette, type a new name for the connection. - #. Press the **Enter** or **Return** key to rename the connection. - -... diff --git a/source/includes/terraform-apply-output.sh b/source/includes/terraform-apply-output.sh deleted file mode 100644 index a7441d84..00000000 --- a/source/includes/terraform-apply-output.sh +++ /dev/null @@ -1,16 +0,0 @@ -Apply complete! Resources: 4 added, 0 changed, 0 destroyed. - -Outputs: - -connection_strings = [ - [ - { - "aws_private_link" = {} - "aws_private_link_srv" = {} - "private" = "" - "private_srv" = "" - "standard" = "mongodb://myCluster-shard-00-00-xxxxx.mongodb.net:27017,myCluster-shard-00-01-xxxxx.mongodb.net:27017,myCluster-shard-00-02-xxxxx.mongodb.net:27017/?ssl=true&authSource=admin&replicaSet=myCluster-shard-0" - "standard_srv" = "mongodb+srv://myCluster-xxxxx.mongodb.net" - }, - ], -] \ No newline at end of file diff --git a/source/includes/terraform-init-output.sh b/source/includes/terraform-init-output.sh deleted file mode 100644 index 3e7eb68a..00000000 --- a/source/includes/terraform-init-output.sh +++ /dev/null @@ -1,17 +0,0 @@ -Initializing the backend... - -Initializing provider plugins... -- Checking for available provider plugins... -- Downloading plugin for provider "mongodbatlas" (terraform-providers/mongodbatlas) 0.5.1... - -The following providers do not have any version constraints in configuration, -so the latest version was installed. - -To prevent automatic upgrades to new major versions that may contain breaking -changes, it is recommended to add version = "..." constraints to the -corresponding provider blocks in configuration, with the constraint strings -suggested below. - -* provider.mongodbatlas: version = "~> 0.5" - -Terraform has been successfully initialized! \ No newline at end of file diff --git a/source/includes/terraform-plan-output.sh b/source/includes/terraform-plan-output.sh deleted file mode 100644 index 5e98e3aa..00000000 --- a/source/includes/terraform-plan-output.sh +++ /dev/null @@ -1,116 +0,0 @@ -Refreshing Terraform state in-memory prior to plan... -The refreshed state will be used to calculate this plan, but will not be -persisted to local or remote state storage. - - ------------------------------------------------------------------------- - -An execution plan has been generated and is shown below. -Resource actions are indicated with the following symbols: - + create - -Terraform will perform the following actions: - - # mongodbatlas_cluster.my_cluster will be created - + resource "mongodbatlas_cluster" "my_cluster" { - + advanced_configuration = (known after apply) - + auto_scaling_disk_gb_enabled = false - + backing_provider_name = "AWS" - + backup_enabled = false - + bi_connector = (known after apply) - + cluster_id = (known after apply) - + cluster_type = (known after apply) - + connection_strings = (known after apply) - + disk_size_gb = 2 - + encryption_at_rest_provider = (known after apply) - + id = (known after apply) - + mongo_db_major_version = "4.2" - + mongo_db_version = (known after apply) - + mongo_uri = (known after apply) - + mongo_uri_updated = (known after apply) - + mongo_uri_with_options = (known after apply) - + name = "atlasClusterName" - + num_shards = 1 - + paused = (known after apply) - + pit_enabled = (known after apply) - + project_id = (known after apply) - + provider_backup_enabled = false - + provider_disk_iops = (known after apply) - + provider_disk_type_name = (known after apply) - + provider_encrypt_ebs_volume = (known after apply) - + provider_instance_size_name = "M2" - + provider_name = "TENANT" - + provider_region_name = "providerRegionName" - + provider_volume_type = (known after apply) - + replication_factor = (known after apply) - + snapshot_backup_policy = (known after apply) - + srv_address = (known after apply) - + state_name = (known after apply) - - + labels { - + key = (known after apply) - + value = (known after apply) - } - - + replication_specs { - + id = (known after apply) - + num_shards = (known after apply) - + zone_name = (known after apply) - - + regions_config { - + analytics_nodes = (known after apply) - + electable_nodes = (known after apply) - + priority = (known after apply) - + read_only_nodes = (known after apply) - + region_name = (known after apply) - } - } - } - - # mongodbatlas_database_user.my_user will be created - + resource "mongodbatlas_database_user" "my_user" { - + auth_database_name = "admin" - + id = (known after apply) - + password = (sensitive value) - + project_id = (known after apply) - + username = "jww" - + x509_type = "NONE" - - + labels { - + key = (known after apply) - + value = (known after apply) - } - - + roles { - + collection_name = (known after apply) - + database_name = "admin" - + role_name = "atlasAdmin" - } - } - - # mongodbatlas_project.my_project will be created - + resource "mongodbatlas_project" "my_project" { - + cluster_count = (known after apply) - + created = (known after apply) - + id = (known after apply) - + name = "atlasProjectName" - + org_id = "5d3716bfcf09a21576d7983e" - } - - # mongodbatlas_project_ip_whitelist.my_ipaddress will be created - + resource "mongodbatlas_project_ip_whitelist" "my_ipaddress" { - + aws_security_group = (known after apply) - + cidr_block = (known after apply) - + comment = "My IP Address" - + id = (known after apply) - + ip_address = "204.210.139.18" - + project_id = (known after apply) - } - -Plan: 4 to add, 0 to change, 0 to destroy. - ------------------------------------------------------------------------- - -Note: You didn't specify an "-out" parameter to save this plan, so Terraform -can't guarantee that exactly these actions will be performed if -"terraform apply" is subsequently run. \ No newline at end of file From 79b0932b02cceb5bd94079ed40fe9cc0e8d19d17 Mon Sep 17 00:00:00 2001 From: Grace Miller Date: Wed, 26 Feb 2025 17:06:49 -0500 Subject: [PATCH 2/5] restore deleted yaml files --- source/includes/steps-configure-settings.yaml | 29 +++++++++++ .../steps-create-atlas-cluster-terraform.yaml | 49 +++++++++++++++++++ .../steps-delete-atlas-cluster-terraform.yaml | 22 +++++++++ .../steps-disconnect-mongodb-view.yaml | 11 +++++ source/includes/steps-install-vsce.yaml | 22 +++++++++ ...eps-remove-connection-command-palette.yaml | 19 +++++++ .../steps-remove-connection-mdb-view.yaml | 14 ++++++ source/includes/steps-rename-connection.yaml | 17 +++++++ 8 files changed, 183 insertions(+) create mode 100644 source/includes/steps-configure-settings.yaml create mode 100644 source/includes/steps-create-atlas-cluster-terraform.yaml create mode 100644 source/includes/steps-delete-atlas-cluster-terraform.yaml create mode 100644 source/includes/steps-disconnect-mongodb-view.yaml create mode 100644 source/includes/steps-install-vsce.yaml create mode 100644 source/includes/steps-remove-connection-command-palette.yaml create mode 100644 source/includes/steps-remove-connection-mdb-view.yaml create mode 100644 source/includes/steps-rename-connection.yaml diff --git a/source/includes/steps-configure-settings.yaml b/source/includes/steps-configure-settings.yaml new file mode 100644 index 00000000..b683fb4a --- /dev/null +++ b/source/includes/steps-configure-settings.yaml @@ -0,0 +1,29 @@ +title: Open the Settings View. +level: 4 +ref: open-settings +content: | + .. list-table:: + :header-rows: 1 + + * - Operating System + - Method + - Actions + * - Any + - Visual Studio Code Menu + - :guilabel:`File` / :guilabel:`Code` > + :guilabel:`Preferences` > + :guilabel:`Settings` + * - MacOS + - Keyboard Shortcut + - Press ``Command`` + ``,`` + * - Windows and Linux + - Keyboard Shortcut + - Press ``Ctrl`` + ``,`` +--- +title: Search "MongoDB" in the :guilabel:`Settings` search bar. +level: 4 +ref: search-mongodb-in-settings +content: | + |vsce| extension settings are displayed. Changes you + make are saved automatically. +... \ No newline at end of file diff --git a/source/includes/steps-create-atlas-cluster-terraform.yaml b/source/includes/steps-create-atlas-cluster-terraform.yaml new file mode 100644 index 00000000..13b9745c --- /dev/null +++ b/source/includes/steps-create-atlas-cluster-terraform.yaml @@ -0,0 +1,49 @@ + +--- +title: "Navigate to the directory in which you saved your ``main.tf`` file." +level: 4 +ref: nav-to-tf-file +--- +title: "Run the ``terraform init`` command to install the required providers." +level: 4 +ref: terraform-init +content: | + .. code-block:: sh + terraform init + The following output indicates that the MongoDB Atlas + Terraform Provider is installed and ready for use: + .. literalinclude:: /includes/terraform-init-output.sh + :linenos: + :language: sh +--- +title: "Run the ``terraform plan`` command to view what happens when you apply the configuration." +level: 4 +ref: terraform-plan +content: | + .. code-block:: sh + + terraform plan + The following output shows what happens when you apply the Terraform configuration: + .. literalinclude:: /includes/terraform-plan-output.sh + :linenos: + :language: sh + Proceed to the next step if the information is correct. +--- +title: "Run the ``terraform apply`` command to create an |service| cluster from the Terraform configuration." +level: 4 +ref: terraform-apply +content: | + .. code-block:: sh + terraform apply + Type ``yes`` when prompted to confirm that you want to apply the + configuration. + .. note:: + The ``terraform apply`` command might take several minutes to + complete. + The following output indicates that your |service| cluster is created. + You can :ref:`create a connection ` to this + deployment using the |vsce| with the displayed connection strings: + .. literalinclude:: /includes/terraform-apply-output.sh + :linenos: + :language: sh +... \ No newline at end of file diff --git a/source/includes/steps-delete-atlas-cluster-terraform.yaml b/source/includes/steps-delete-atlas-cluster-terraform.yaml new file mode 100644 index 00000000..de988379 --- /dev/null +++ b/source/includes/steps-delete-atlas-cluster-terraform.yaml @@ -0,0 +1,22 @@ +--- +title: "Navigate to the directory in which you saved your ``main.tf`` file." +level: 4 +ref: nav-to-tf-file +--- +title: "Run the ``terraform destroy`` command to install the required providers." +level: 4 +ref: terraform-destroy +content: | + .. code-block:: sh + terraform destroy + Type ``yes`` when prompted to confirm that you want to destroy the + resources defined in the configuration. + .. note:: + The ``terraform destroy`` command might take several minutes to + complete. + The following output indicates that the |service| cluster and all + associated resources are deleted: + .. code-block:: sh + :copyable: false + Destroy complete! Resources: 4 destroyed. +... \ No newline at end of file diff --git a/source/includes/steps-disconnect-mongodb-view.yaml b/source/includes/steps-disconnect-mongodb-view.yaml new file mode 100644 index 00000000..5ec4fcc7 --- /dev/null +++ b/source/includes/steps-disconnect-mongodb-view.yaml @@ -0,0 +1,11 @@ +--- +source: + file: steps-open-mongodb-view.yaml + ref: open-mongodb-view +ref: disconnect-open-mongodb-view +--- +title: "Right-click the deployment from which you want to disconnect, then click :guilabel:`Disconnect`." +level: 4 +ref: vsce-disconnect + +... \ No newline at end of file diff --git a/source/includes/steps-install-vsce.yaml b/source/includes/steps-install-vsce.yaml new file mode 100644 index 00000000..1fc55bf5 --- /dev/null +++ b/source/includes/steps-install-vsce.yaml @@ -0,0 +1,22 @@ +title: Open the Extensions View. +level: 4 +ref: open-extensions +content: | + In Visual Studio Code, click the :guilabel:`Extensions` icon + in the left navigation. + Alternatively, you can open the :guilabel:`Extensions` view by + pressing: + - :guilabel:`Control + Shift + X` or + - :guilabel:`Command + Shift + X`. +--- +title: Search "MongoDB for VS Code" in the extension marketplace. +level: 4 +ref: search-mongodb-for-vscode +--- +title: Click :guilabel:`Install` on the "MongoDB for VS Code" extension. +level: 4 +ref: click-install +content: | + Once the installation is complete, the :guilabel:`Install` button + changes to the :guilabel:`Manage` gear button. +... \ No newline at end of file diff --git a/source/includes/steps-remove-connection-command-palette.yaml b/source/includes/steps-remove-connection-command-palette.yaml new file mode 100644 index 00000000..5ff30311 --- /dev/null +++ b/source/includes/steps-remove-connection-command-palette.yaml @@ -0,0 +1,19 @@ +--- +source: + file: steps-source-command-palette.yaml + ref: vsce-command-palette +ref: vsce-remove-command-palette +--- +title: "From the Command Palette, select + :guilabel:`MongoDB: Remove Connection...`." +level: 4 +ref: vsce-remove-remove +content: | + .. include:: /includes/admonitions/tip-mongodb-command-palette.rst + If you have more than one connection, select the connection you want + to remove from the Command Palette. +--- +title: "Click :guilabel:`Yes` to remove the connection." +ref: confirm-connection-remove +level: 4 +... \ No newline at end of file diff --git a/source/includes/steps-remove-connection-mdb-view.yaml b/source/includes/steps-remove-connection-mdb-view.yaml new file mode 100644 index 00000000..2668b0c2 --- /dev/null +++ b/source/includes/steps-remove-connection-mdb-view.yaml @@ -0,0 +1,14 @@ +--- +source: + file: steps-open-mongodb-view.yaml + ref: open-mongodb-view +ref: disconnect-open-mongodb-view +--- +title: "Right-click the connection you want to remove, then click :guilabel:`Remove Connection`." +level: 4 +ref: remove-connection-mdb-view +--- +title: "Click :guilabel:`Yes` to remove the connection." +level: 4 +ref: remove-connection-confirm +... \ No newline at end of file diff --git a/source/includes/steps-rename-connection.yaml b/source/includes/steps-rename-connection.yaml new file mode 100644 index 00000000..af72bf4e --- /dev/null +++ b/source/includes/steps-rename-connection.yaml @@ -0,0 +1,17 @@ +--- +ref: nav-to-mdb-view +source: + file: steps-open-mongodb-view.yaml + ref: open-mongodb-view +--- +title: "Right-click the connection you want to activate, then click :guilabel:`Rename Connection`." +level: 4 +ref: click-rename-connection +--- +title: "Rename the connection." +level: 4 +ref: rename-collection. +content: | + a. In the Command Palette, type a new name for the connection. + #. Press the **Enter** or **Return** key to rename the connection. +... From 471e9171d3c08bcc0de17ba14ea26f57f447fa8b Mon Sep 17 00:00:00 2001 From: Grace Miller Date: Wed, 26 Feb 2025 17:14:33 -0500 Subject: [PATCH 3/5] spacing --- source/includes/steps-create-atlas-cluster-terraform.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/source/includes/steps-create-atlas-cluster-terraform.yaml b/source/includes/steps-create-atlas-cluster-terraform.yaml index 13b9745c..6101c6f7 100644 --- a/source/includes/steps-create-atlas-cluster-terraform.yaml +++ b/source/includes/steps-create-atlas-cluster-terraform.yaml @@ -1,4 +1,3 @@ - --- title: "Navigate to the directory in which you saved your ``main.tf`` file." level: 4 From 5ed8b4908db24b9dbe6ee28b30f90fc81bda9ada Mon Sep 17 00:00:00 2001 From: Grace Miller Date: Wed, 26 Feb 2025 17:20:35 -0500 Subject: [PATCH 4/5] restore files --- .../steps-create-atlas-cluster-terraform.yaml | 17 +++++++++++++++++ .../steps-delete-atlas-cluster-terraform.yaml | 9 +++++++++ ...steps-remove-connection-command-palette.yaml | 2 ++ 3 files changed, 28 insertions(+) diff --git a/source/includes/steps-create-atlas-cluster-terraform.yaml b/source/includes/steps-create-atlas-cluster-terraform.yaml index 6101c6f7..c0d496dc 100644 --- a/source/includes/steps-create-atlas-cluster-terraform.yaml +++ b/source/includes/steps-create-atlas-cluster-terraform.yaml @@ -7,10 +7,14 @@ title: "Run the ``terraform init`` command to install the required providers." level: 4 ref: terraform-init content: | + .. code-block:: sh + terraform init + The following output indicates that the MongoDB Atlas Terraform Provider is installed and ready for use: + .. literalinclude:: /includes/terraform-init-output.sh :linenos: :language: sh @@ -19,30 +23,43 @@ title: "Run the ``terraform plan`` command to view what happens when you apply t level: 4 ref: terraform-plan content: | + .. code-block:: sh terraform plan + The following output shows what happens when you apply the Terraform configuration: + .. literalinclude:: /includes/terraform-plan-output.sh :linenos: :language: sh + Proceed to the next step if the information is correct. + --- title: "Run the ``terraform apply`` command to create an |service| cluster from the Terraform configuration." level: 4 ref: terraform-apply content: | + .. code-block:: sh + terraform apply + Type ``yes`` when prompted to confirm that you want to apply the configuration. + .. note:: + The ``terraform apply`` command might take several minutes to complete. + The following output indicates that your |service| cluster is created. You can :ref:`create a connection ` to this deployment using the |vsce| with the displayed connection strings: + .. literalinclude:: /includes/terraform-apply-output.sh :linenos: :language: sh + ... \ No newline at end of file diff --git a/source/includes/steps-delete-atlas-cluster-terraform.yaml b/source/includes/steps-delete-atlas-cluster-terraform.yaml index de988379..c2829246 100644 --- a/source/includes/steps-delete-atlas-cluster-terraform.yaml +++ b/source/includes/steps-delete-atlas-cluster-terraform.yaml @@ -7,16 +7,25 @@ title: "Run the ``terraform destroy`` command to install the required providers. level: 4 ref: terraform-destroy content: | + .. code-block:: sh + terraform destroy + Type ``yes`` when prompted to confirm that you want to destroy the resources defined in the configuration. + .. note:: + The ``terraform destroy`` command might take several minutes to complete. + The following output indicates that the |service| cluster and all associated resources are deleted: + .. code-block:: sh :copyable: false + Destroy complete! Resources: 4 destroyed. + ... \ No newline at end of file diff --git a/source/includes/steps-remove-connection-command-palette.yaml b/source/includes/steps-remove-connection-command-palette.yaml index 5ff30311..813b4802 100644 --- a/source/includes/steps-remove-connection-command-palette.yaml +++ b/source/includes/steps-remove-connection-command-palette.yaml @@ -9,7 +9,9 @@ title: "From the Command Palette, select level: 4 ref: vsce-remove-remove content: | + .. include:: /includes/admonitions/tip-mongodb-command-palette.rst + If you have more than one connection, select the connection you want to remove from the Command Palette. --- From 3fbd99a265dc59b1c85d40cf18fab088fe8d182b Mon Sep 17 00:00:00 2001 From: Grace Miller Date: Wed, 26 Feb 2025 17:28:21 -0500 Subject: [PATCH 5/5] adding back in terraform --- source/includes/terraform-apply-output.sh | 16 +++ source/includes/terraform-init-output.sh | 17 ++++ source/includes/terraform-plan-output.sh | 116 ++++++++++++++++++++++ 3 files changed, 149 insertions(+) create mode 100644 source/includes/terraform-apply-output.sh create mode 100644 source/includes/terraform-init-output.sh create mode 100644 source/includes/terraform-plan-output.sh diff --git a/source/includes/terraform-apply-output.sh b/source/includes/terraform-apply-output.sh new file mode 100644 index 00000000..a7441d84 --- /dev/null +++ b/source/includes/terraform-apply-output.sh @@ -0,0 +1,16 @@ +Apply complete! Resources: 4 added, 0 changed, 0 destroyed. + +Outputs: + +connection_strings = [ + [ + { + "aws_private_link" = {} + "aws_private_link_srv" = {} + "private" = "" + "private_srv" = "" + "standard" = "mongodb://myCluster-shard-00-00-xxxxx.mongodb.net:27017,myCluster-shard-00-01-xxxxx.mongodb.net:27017,myCluster-shard-00-02-xxxxx.mongodb.net:27017/?ssl=true&authSource=admin&replicaSet=myCluster-shard-0" + "standard_srv" = "mongodb+srv://myCluster-xxxxx.mongodb.net" + }, + ], +] \ No newline at end of file diff --git a/source/includes/terraform-init-output.sh b/source/includes/terraform-init-output.sh new file mode 100644 index 00000000..3e7eb68a --- /dev/null +++ b/source/includes/terraform-init-output.sh @@ -0,0 +1,17 @@ +Initializing the backend... + +Initializing provider plugins... +- Checking for available provider plugins... +- Downloading plugin for provider "mongodbatlas" (terraform-providers/mongodbatlas) 0.5.1... + +The following providers do not have any version constraints in configuration, +so the latest version was installed. + +To prevent automatic upgrades to new major versions that may contain breaking +changes, it is recommended to add version = "..." constraints to the +corresponding provider blocks in configuration, with the constraint strings +suggested below. + +* provider.mongodbatlas: version = "~> 0.5" + +Terraform has been successfully initialized! \ No newline at end of file diff --git a/source/includes/terraform-plan-output.sh b/source/includes/terraform-plan-output.sh new file mode 100644 index 00000000..5e98e3aa --- /dev/null +++ b/source/includes/terraform-plan-output.sh @@ -0,0 +1,116 @@ +Refreshing Terraform state in-memory prior to plan... +The refreshed state will be used to calculate this plan, but will not be +persisted to local or remote state storage. + + +------------------------------------------------------------------------ + +An execution plan has been generated and is shown below. +Resource actions are indicated with the following symbols: + + create + +Terraform will perform the following actions: + + # mongodbatlas_cluster.my_cluster will be created + + resource "mongodbatlas_cluster" "my_cluster" { + + advanced_configuration = (known after apply) + + auto_scaling_disk_gb_enabled = false + + backing_provider_name = "AWS" + + backup_enabled = false + + bi_connector = (known after apply) + + cluster_id = (known after apply) + + cluster_type = (known after apply) + + connection_strings = (known after apply) + + disk_size_gb = 2 + + encryption_at_rest_provider = (known after apply) + + id = (known after apply) + + mongo_db_major_version = "4.2" + + mongo_db_version = (known after apply) + + mongo_uri = (known after apply) + + mongo_uri_updated = (known after apply) + + mongo_uri_with_options = (known after apply) + + name = "atlasClusterName" + + num_shards = 1 + + paused = (known after apply) + + pit_enabled = (known after apply) + + project_id = (known after apply) + + provider_backup_enabled = false + + provider_disk_iops = (known after apply) + + provider_disk_type_name = (known after apply) + + provider_encrypt_ebs_volume = (known after apply) + + provider_instance_size_name = "M2" + + provider_name = "TENANT" + + provider_region_name = "providerRegionName" + + provider_volume_type = (known after apply) + + replication_factor = (known after apply) + + snapshot_backup_policy = (known after apply) + + srv_address = (known after apply) + + state_name = (known after apply) + + + labels { + + key = (known after apply) + + value = (known after apply) + } + + + replication_specs { + + id = (known after apply) + + num_shards = (known after apply) + + zone_name = (known after apply) + + + regions_config { + + analytics_nodes = (known after apply) + + electable_nodes = (known after apply) + + priority = (known after apply) + + read_only_nodes = (known after apply) + + region_name = (known after apply) + } + } + } + + # mongodbatlas_database_user.my_user will be created + + resource "mongodbatlas_database_user" "my_user" { + + auth_database_name = "admin" + + id = (known after apply) + + password = (sensitive value) + + project_id = (known after apply) + + username = "jww" + + x509_type = "NONE" + + + labels { + + key = (known after apply) + + value = (known after apply) + } + + + roles { + + collection_name = (known after apply) + + database_name = "admin" + + role_name = "atlasAdmin" + } + } + + # mongodbatlas_project.my_project will be created + + resource "mongodbatlas_project" "my_project" { + + cluster_count = (known after apply) + + created = (known after apply) + + id = (known after apply) + + name = "atlasProjectName" + + org_id = "5d3716bfcf09a21576d7983e" + } + + # mongodbatlas_project_ip_whitelist.my_ipaddress will be created + + resource "mongodbatlas_project_ip_whitelist" "my_ipaddress" { + + aws_security_group = (known after apply) + + cidr_block = (known after apply) + + comment = "My IP Address" + + id = (known after apply) + + ip_address = "204.210.139.18" + + project_id = (known after apply) + } + +Plan: 4 to add, 0 to change, 0 to destroy. + +------------------------------------------------------------------------ + +Note: You didn't specify an "-out" parameter to save this plan, so Terraform +can't guarantee that exactly these actions will be performed if +"terraform apply" is subsequently run. \ No newline at end of file