Skip to content
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: Project import generated by Copybara. #130

Closed
26 changes: 26 additions & 0 deletions examples/sap_nw_ha_simple/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# SAP HANA HA example

This example illustrates how to use the latest release of the terraform module for SAP on Google Cloud
for provisioning SAP HANA with HA

<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| project\_id | Project id where the instances will be created. | `string` | n/a | yes |

## Outputs

| Name | Description |
|------|-------------|
| sap\_nw\_ha\_ers\_instance\_self\_link | Self-link for the primary SAP NW instance created. |
| sap\_nw\_ha\_scs\_instance\_self\_link | Self-link for the primary SAP NW instance created. |

<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

To provision this example, run the following from within this directory:
- `terraform init` to get the plugins
- `terraform plan` to see the infrastructure plan
- `terraform apply` to apply the infrastructure build
- `terraform destroy` to destroy the built infrastructure
36 changes: 36 additions & 0 deletions examples/sap_nw_ha_simple/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/**
* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

module "sap_nw_ha" {
source = "terraform-google-modules/sap/google//modules/sap_nw_ha"
version = "~> 1.0"

project_id = var.project_id
machine_type = "n1-highmem-32"
network = "default"
subnetwork = "default"
linux_image = "sles-15-sp2-sap"
linux_image_project = "suse-sap-cloud"

sap_primary_instance = "prd-nw1"
sap_primary_zone = "us-central1-b"

sap_secondary_instance = "prd-nw2"
sap_secondary_zone = "us-central1-c"

nfs_path = "1.2.3.4:/my_path"
sap_sid = "PE1"
}
23 changes: 23 additions & 0 deletions examples/sap_nw_ha_simple/outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
output "sap_nw_ha_scs_instance_self_link" {
description = "Self-link for the primary SAP NW instance created."
value = module.sap_nw_ha.scs_instance
}
output "sap_nw_ha_ers_instance_self_link" {
description = "Self-link for the primary SAP NW instance created."
value = module.sap_nw_ha.ers_instance
}
20 changes: 20 additions & 0 deletions examples/sap_nw_ha_simple/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**
* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

variable "project_id" {
type = string
description = "Project id where the instances will be created."
}
25 changes: 25 additions & 0 deletions examples/sap_nw_simple/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# SAP HANA HA example

This example illustrates how to use the latest release of the terraform module for SAP on Google Cloud
for provisioning SAP HANA with HA

<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| project\_id | Project id where the instances will be created. | `string` | n/a | yes |

## Outputs

| Name | Description |
|------|-------------|
| sap\_nw\_primary\_instance\_self\_link | Self-link for the primary SAP NW instance created. |

<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->

To provision this example, run the following from within this directory:
- `terraform init` to get the plugins
- `terraform plan` to see the infrastructure plan
- `terraform apply` to apply the infrastructure build
- `terraform destroy` to destroy the built infrastructure
28 changes: 28 additions & 0 deletions examples/sap_nw_simple/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/**
* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

module "sap_nw" {
source = "terraform-google-modules/sap/google//modules/sap_nw"
version = "~> 1.0"

project_id = var.project_id
zone = "us-east1-b"
machine_type = "n1-highmem-32"
subnetwork = "default"
linux_image = "rhel-8-4-sap-ha"
linux_image_project = "rhel-sap-cloud"
instance_name = "nw-instance"
}
19 changes: 19 additions & 0 deletions examples/sap_nw_simple/outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
output "sap_nw_primary_instance_self_link" {
description = "Self-link for the primary SAP NW instance created."
value = module.sap_nw.sap_nw_self_link
}
20 changes: 20 additions & 0 deletions examples/sap_nw_simple/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**
* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

variable "project_id" {
type = string
description = "Project id where the instances will be created."
}
Loading