Skip to content

Commit

Permalink
feat(partner center sell): merge conflict resolved
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Harasztia <[email protected]>
  • Loading branch information
HarasztiaPeter committed Jan 22, 2025
2 parents b829252 + d912364 commit 8a84152
Show file tree
Hide file tree
Showing 89 changed files with 5,587 additions and 2,161 deletions.
6 changes: 3 additions & 3 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"files": "go.mod|go.sum|.*.map|^.secrets.baseline$",
"lines": null
},
"generated_at": "2025-01-06T04:50:55Z",
"generated_at": "2025-01-08T04:55:16Z",
"plugins_used": [
{
"name": "AWSKeyDetector"
Expand Down Expand Up @@ -926,15 +926,15 @@
"hashed_secret": "c8b6f5ef11b9223ac35a5663975a466ebe7ebba9",
"is_secret": false,
"is_verified": false,
"line_number": 2352,
"line_number": 2355,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "8abf4899c01104241510ba87685ad4de76b0c437",
"is_secret": false,
"is_verified": false,
"line_number": 2358,
"line_number": 2361,
"type": "Secret Keyword",
"verified_result": null
}
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# 1.75.0-beta0 (Jan 10, 2025)
* Support for Cloud logs
- **Datasources**
- ibm_logs_stream
- ibm_logs_streams
- **Resources**
- ibm_logs_stream
* Support for Power System
- **Datasources**
- ibm_pi_instance_snapshot

# 1.74.0 (Jan 09, 2025)
* Support for Power System
- **Datasources**
Expand Down
52 changes: 51 additions & 1 deletion examples/ibm-cis/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,7 @@ data "ibm_cis_bot_analytics" "tests" {
}

# CIS Logpush Job
# logdna
resource "ibm_cis_logpush_job" "test" {
cis_id = data.ibm_cis.cis.id
domain_id = data.ibm_cis_domain.cis_domain.domain_id
Expand All @@ -519,16 +520,65 @@ resource "ibm_cis_logpush_job" "test" {
frequency = "high"
logdna =<<LOG
{
"hostname": "cistest-load.com",
"hostname": "cistest-load.com",
"ingress_key": "e2f7xxxxx73a251caxxxxxxxxxxxx",
"region": "in-che"
}
LOG
}

# IBM Cloud Logs
resource "ibm_cis_logpush_job" "test" {
cis_id = "crn:v1:staging:public:internet-svcs-ci:global:a/01652b251c3ae2787110a995d8db0135:1a9174b6-0106-417a-844b-c8eb43a72f63::"
domain_id = "601b728b86e630c744c81740f72570c3"
name = "MylogpushJob"
enabled = false
logpull_options = "timestamps=rfc3339&timestamps=rfc3339"
dataset = "http_requests"
frequency = "high"
ibmcl {
instance_id ="604a309c-585c-4a42-955d-76239ccc1905"
api_key = "zxzeNQI22dxxxxxxxxxxxxxtn1EVK"
region = "us-south"
}
}

# COS
resource "ibm_cis_logpush_job" "test" {
cis_id = "crn:v1:staging:public:internet-svcs-ci:global:a/01652b251c3ae2787110a995d8db0135:1a9174b6-0106-417a-844b-c8eb43a72f63::"
domain_id = "601b728b86e630c744c81740f72570c3"
name = "MylogpushJob"
enabled = false
logpull_options = "timestamps=rfc3339&timestamps=rfc3339"
dataset = "http_requests"
frequency = "high"
ownership_challenge = "xxx"
cos =<<COS
{
"bucket_name": "examplse.cistest-load.com",
"id": "e2f72cxxxxxxxxxxxxa0b87859e",
"region": "in-che"
}
COS
}

# Genral destination
resource "ibm_cis_logpush_job" "test" {
cis_id = "crn:v1:staging:public:internet-svcs-ci:global:a/01652b251c3ae2787110a995d8db0135:1a9174b6-0106-417a-844b-c8eb43a72f63::"
domain_id = "601b728b86e630c744c81740f72570c3"
name = "MylogpushJob"
enabled = false
logpull_options = "timestamps=rfc3339&timestamps=rfc3339"
dataset = "http_requests"
frequency = "high"
destination_conf = "s3://mybucket/logs?region=us-west-2"
}
# CIS Logpush Job Data source

data "ibm_cis_logpush_jobs" "test" {
cis_id = data.ibm_cis.cis.id
domain_id = data.ibm_cis_domain.cis_domain.domain_id
job_id = data.ibm_cis_domain.job.job_id
}

#CIS MTLS instance
Expand Down
18 changes: 10 additions & 8 deletions examples/ibm-private-dns/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ resource "ibm_dns_custom_resolver" "test" {
name = "testCR-TF"
instance_id = ibm_resource_instance.test-pdns-instance.guid
description = "testdescription-CR"
profile = "essential"
allow_disruptive_updates = false
locations {
subnet_crn = "crn:v1:staging:public:is:us-south-1:a/01652b251c3ae2787110a995d8db0135::subnet:0716-6c3a997d-72b2-47f6-8788-6bd95e1bdb03"
enabled = false
Expand All @@ -203,6 +205,8 @@ resource "ibm_dns_custom_resolver" "test" {
description = "new test CR TF-1"
high_availability = true
enabled = true
profile = "essential"
allow_disruptive_updates = false
locations {
subnet_crn = "crn:v1:staging:public:is:us-south-1:a/01652b251c3ae2787110a995d8db0135::subnet:0716-a094c4e8-02cd-4b04-858d-3432"
enabled = false
Expand All @@ -221,21 +225,19 @@ output "ibm_dns_custom_resolvers_output" {
value = data.ibm_dns_custom_resolvers.test-cr.custom_resolvers
}

resource "ibm_dns_custom_resolver_location" "test" {
instance_id = ibm_resource_instance.test-pdns-instance.guid
resolver_id = ibm_dns_custom_resolver.test.custom_resolver_id
subnet_crn = "crn:v1:staging:public:is:us-south-1:a/01652b251c3ae2787110a995d8db0135::subnet:0716-a094c4e8-02cd-4b04-858d-343"
enabled = true
cr_enabled = true
}

resource "ibm_dns_custom_resolver_forwarding_rule" "test" {
instance_id = ibm_resource_instance.test-pdns-instance.guid
resolver_id = ibm_dns_custom_resolver.test.custom_resolver_id
description = "test forward rule"
type = "zone"
match = "test.example.com"
forward_to = ["168.20.22.122"]
views {
name = "view-example-name"
description = "view description"
expression = "ipInRange(source.ip, '10.240.0.0/24') || ipInRange(source.ip, '10.240.1.0/24')"
forward_to = ["10.240.2.6","10.240.2.7"]
}
}

data "ibm_dns_custom_resolver_forwarding_rules" "test-fr" {
Expand Down
98 changes: 98 additions & 0 deletions examples/ibm-sdsaas/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# Examples for sdsaas

These examples illustrate how to use the resources and data sources associated with sdsaas.

The following resources are supported:
* ibm_sds_volume
* ibm_sds_host

## Usage

To run this example, execute the following commands:

```bash
$ terraform init
$ terraform plan
$ terraform apply
```

Run `terraform destroy` when you don't need these resources.

## sdsaas resources

### Resource: ibm_sds_volume

```hcl
resource "ibm_sds_volume" "sds_volume_instance" {
sds_endpoint = var.sds_endpoint
hostnqnstring = var.sds_volume_hostnqnstring
capacity = var.sds_volume_capacity
name = var.sds_volume_name
}
```

#### Inputs

| Name | Description | Type | Required |
|------|-------------|------|---------|
| ibmcloud\_api\_key | IBM Cloud API key | `string` | true |
| sds_endpoint | IBM Cloud Endpoint | `string` | false |
| hostnqnstring | The host nqn. | `string` | false |
| capacity | The capacity of the volume (in gigabytes). | `number` | true |
| name | The name of the volume. | `string` | false |

#### Outputs

| Name | Description |
|------|-------------|
| bandwidth | The maximum bandwidth (in megabits per second) for the volume. |
| created_at | The date and time that the volume was created. |
| hosts | List of host details that volume is mapped to. |
| iops | Iops The maximum I/O operations per second (IOPS) for this volume. |
| resource_type | The resource type of the volume. |
| status | The current status of the volume. |
| status_reasons | Reasons for the current status of the volume. |

### Resource: ibm_sds_host

```hcl
resource "ibm_sds_host" "sds_host_instance" {
sds_endpoint = var.sds_endpoint
name = var.sds_host_name
nqn = var.sds_host_nqn
volumes = var.sds_host_volumes
}
```

#### Inputs

| Name | Description | Type | Required |
|------|-------------|------|---------|
| ibmcloud\_api\_key | IBM Cloud API key | `string` | true |
| sds_endpoint | IBM Cloud Endpoint | `string` | false |
| name | The name for this host. The name must not be used by another host. If unspecified, the name will be a hyphenated list of randomly-selected words. | `string` | false |
| nqn | The NQN of the host configured in customer's environment. | `string` | true |
| volumes | The host-to-volume map. | `list()` | false |

#### Outputs

| Name | Description |
|------|-------------|
| created_at | The date and time that the host was created. |


## Assumptions

The `IBMCLOUD_SDS_ENDPOINT` can optionally be set instead of setting `sds_endpoint` in each of the resources. This is the endpoint provided to customers to perform operations against their service.

## Requirements

| Name | Version |
|------|---------|
| terraform | ~> 0.12 |

## Providers

| Name | Version |
|------|---------|
| ibm | 1.13.1 |
37 changes: 37 additions & 0 deletions examples/ibm-sdsaas/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
provider "ibm" {
ibmcloud_api_key = var.ibmcloud_api_key
}

// Provision sds_volume resource instance
resource "ibm_sds_volume" "sds_volume_instance_1" {
sds_endpoint = var.sds_endpoint

hostnqnstring = var.sds_volume_hostnqnstring
capacity = var.sds_volume_capacity
name = var.sds_volume_name_1
}

// Provision sds_volume resource instance
resource "ibm_sds_volume" "sds_volume_instance_2" {
sds_endpoint = var.sds_endpoint

hostnqnstring = var.sds_volume_hostnqnstring
capacity = var.sds_volume_capacity
name = var.sds_volume_name_2
}

// Provision sds_host resource instance
resource "ibm_sds_host" "sds_host_instance" {
sds_endpoint = var.sds_endpoint

name = var.sds_host_name
nqn = var.sds_host_nqn
volumes {
volume_id = ibm_sds_volume.sds_volume_instance_1.id
volume_name = ibm_sds_volume.sds_volume_instance_1.name
}
volumes {
volume_id = ibm_sds_volume.sds_volume_instance_2.id
volume_name = ibm_sds_volume.sds_volume_instance_2.name
}
}
12 changes: 12 additions & 0 deletions examples/ibm-sdsaas/outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// This output allows sds_volume data to be referenced by other resources and the terraform CLI
// Modify this output if only certain data should be exposed
output "ibm_sds_volume" {
value = [ibm_sds_volume.sds_volume_instance_1, ibm_sds_volume.sds_volume_instance_2]
description = "sds_volume resource instance"
}
// This output allows sds_host data to be referenced by other resources and the terraform CLI
// Modify this output if only certain data should be exposed
output "ibm_sds_host" {
value = ibm_sds_host.sds_host_instance
description = "sds_host resource instance"
}
43 changes: 43 additions & 0 deletions examples/ibm-sdsaas/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
variable "ibmcloud_api_key" {
description = "IBM Cloud API key"
type = string
}

variable "sds_endpoint" {
description = "IBM SDS Endpoint"
type = string
default = "<endpoint>"
}

variable "sds_volume_hostnqnstring" {
description = "The host nqn."
type = string
default = "nqn.2014-06.org:9345"
}
variable "sds_volume_capacity" {
description = "The capacity of the volume (in gigabytes)."
type = number
default = 10
}
variable "sds_volume_name_1" {
description = "The name of the volume."
type = string
default = "demo-volume-1"
}

variable "sds_volume_name_2" {
description = "The name of the volume."
type = string
default = "demo-volume-2"
}

variable "sds_host_name" {
description = "The name for this host. The name must not be used by another host. If unspecified, the name will be a hyphenated list of randomly-selected words."
type = string
default = "demo-host"
}
variable "sds_host_nqn" {
description = "The NQN of the host configured in customer's environment."
type = string
default = "nqn.2014-06.org:9345"
}
9 changes: 9 additions & 0 deletions examples/ibm-sdsaas/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
terraform {
required_version = ">= 1.0"
required_providers {
ibm = {
source = "IBM-Cloud/ibm"
version = "1.71.0-beta1"
}
}
}
Loading

0 comments on commit 8a84152

Please sign in to comment.