-
Notifications
You must be signed in to change notification settings - Fork 677
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/IBM-Cloud/terraform-provi…
…der-ibm into vmrm
- Loading branch information
Showing
187 changed files
with
3,729 additions
and
4,595 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# OpenPages example | ||
|
||
This example shows 1 usage scenario. | ||
|
||
#### Scenario 1: Create an OpenPages service instance. | ||
|
||
```terraform | ||
resource "ibm_resource_instance" "openpages_instance" { | ||
name = "terraform-automation" | ||
service = "openpages" | ||
plan = "essentials" | ||
location = "global" | ||
resource_group_id = data.ibm_resource_group.default_group.id | ||
parameters_json = <<EOF | ||
{ | ||
"aws_region": "us-east-1", | ||
"baseCurrency": "USD", | ||
"initialContentType": "_no_samples", | ||
"selectedSolutions": ["ORM"] | ||
} | ||
EOF | ||
timeouts { | ||
create = "200m" | ||
} | ||
} | ||
To provison your instance with the correct configuration, update the `parameters_json` field with the appropriate values. | ||
``` | ||
|
||
## Dependencies | ||
|
||
- The owner of the `ibmcloud_api_key` has permission to create an OpenPages instance under the specified resource group. | ||
|
||
## Configuration | ||
|
||
- `ibmcloud_api_key` - An API key for IBM Cloud services. If you don't have one already, go to https://cloud.ibm.com/iam/#/apikeys and create a new key. | ||
|
||
## Running the configuration | ||
|
||
For the planning phase | ||
|
||
```bash | ||
terraform init | ||
terraform plan | ||
``` | ||
|
||
For the apply phase | ||
|
||
```bash | ||
terraform apply | ||
``` | ||
|
||
For the destroy | ||
|
||
```bash | ||
terraform destroy | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
data "ibm_resource_group" "default_group" { | ||
is_default = true | ||
} | ||
|
||
resource "ibm_resource_instance" "openpages_instance" { | ||
name = "terraform-automation" | ||
service = "openpages" | ||
plan = "essentials" | ||
location = "global" | ||
resource_group_id = data.ibm_resource_group.default_group.id | ||
parameters_json = <<EOF | ||
{ | ||
"aws_region": "us-east-1", | ||
"baseCurrency": "USD", | ||
"initialContentType": "_no_samples", | ||
"selectedSolutions": ["ORM"] | ||
} | ||
EOF | ||
|
||
timeouts { | ||
create = "200m" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
provider "ibm" { | ||
ibmcloud_api_key = var.ibmcloud_api_key | ||
region = var.region | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Enter your IBM Cloud API Key. If you don't have one already, go to IBM Cloud to get an API Key: https://cloud.ibm.com/iam#/apikeys | ||
# Use the global region | ||
ibmcloud_api_key = "" | ||
region = "global" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
variable "ibmcloud_api_key" { | ||
description = "IBM Cloud API key" | ||
type = string | ||
} | ||
|
||
variable "region" { | ||
description = "Region" | ||
type = string | ||
default = "global" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
terraform { | ||
required_providers { | ||
ibm = { | ||
source = "IBM-Cloud/ibm", | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.