Skip to content

Commit

Permalink
Update docs for SC secret (IBM-Cloud#5241)
Browse files Browse the repository at this point in the history
* SC addition

* SC addition

* SC addition

* update function updated

* SC unit tests added

* SC unit tests added

* d

* tests fixes

* tests fixes

* update sdk

* .secrets.baseline update

* .secrets.baseline update

* .secrets.baseline update

* Update sm_service_credentials_secret_metadata.html.markdown

* bugs fixes

* bugs fixes

* bugs fixes

* docs bugs fixes

* preferred_chain added for public cert lets encrypt configuration

* support for creating secret version for username password & version_custom_metadata for all

* support for creating secret version for username password & version_custom_metadata for all

* support for creating secret version for username password & version_custom_metadata for all

* support for creating secret version for username password & version_custom_metadata for all

* support for creating secret version for username password & version_custom_metadata for all

* support for creating secret version for username password & version_custom_metadata for all

* preferred chain docs update

* support for creating secret version for username password & version_custom_metadata for all

* support for creating secret version for username password & version_custom_metadata for all

* support for creating secret version for username password & version_custom_metadata for all

* fix public cert bug

* update docs

---------

Co-authored-by: Yonathan-Yellin <yonathan.yellin@ibm.com>
Co-authored-by: Avi Ribchinsky <avir@il.ibm.com>
Co-authored-by: Tatyana <tatyanab@il.ibm.com>
Co-authored-by: Idan Adar <iadar@il.ibm.com>
  • Loading branch information
5 people authored and ismirlia committed Apr 11, 2024
1 parent 176c0a9 commit 6df7413
Showing 1 changed file with 31 additions and 2 deletions.
33 changes: 31 additions & 2 deletions website/docs/r/sm_service_credentials_secret.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ resource "ibm_sm_service_credentials_secret" "sm_service_credentials_secret" {
secret_group_id = ibm_sm_secret_group.sm_secret_group.secret_group_id
source_service {
instance {
crn = "crn:v1:staging:public:cloud-object-storage:global:a/111f5fb10986423e9saa8512f1db7e65:111133c8-49ea-41xe-8c40-122038246f5b::"
crn = "crn:v1:bluemix:public:cloud-object-storage:global:a/111f5fb10986423e9saa8512f1db7e65:111133c8-49ea-41xe-8c40-122038246f5b::"
}
role {
crn = "crn:v1:bluemix:public:iam::::serviceRole:Writer"
Expand All @@ -39,6 +39,35 @@ resource "ibm_sm_service_credentials_secret" "sm_service_credentials_secret" {
}
```

## Example Usage with existing service ID

```hcl
resource "ibm_sm_service_credentials_secret" "sm_service_credentials_secret" {
instance_id = ibm_resource_instance.sm_instance.guid
region = "us-south"
name = "secret-name"
custom_metadata = {"key":"value"}
description = "Extended description for this secret."
labels = ["my-label"]
rotation {
auto_rotate = true
interval = 1
unit = "day"
}
secret_group_id = ibm_sm_secret_group.sm_secret_group.secret_group_id
source_service {
instance {
crn = "crn:v1:bluemix:public:cloud-object-storage:global:a/111f5fb10986423e9saa8512f1db7e65:111133c8-49ea-41xe-8c40-122038246f5b::"
}
role {
crn = "crn:v1:bluemix:public:iam::::serviceRole:Writer"
}
parameters = {"HMAC": true, "serviceid_crn": "crn:v1:bluemix:public:iam-identity::a/22222f3c34444ff155555d15ca616946::serviceid:ServiceId-1234f56e-1d23-45e6-123c-cfb456b87fyb"}
}
ttl = "1800"
}
```

### Example to access resource credentials using credentials attribute:

```terraform
Expand All @@ -48,7 +77,7 @@ resource "ibm_sm_service_credentials_secret" "sm_service_credentials_secret" {
name = "secret-name"
source_service {
instance {
crn = "crn:v1:staging:public:cloud-object-storage:global:a/111f5fb10986423e9saa8512f1db7e65:111133c8-49ea-41xe-8c40-122038246f5b::"
crn = "crn:v1:bluemix:public:cloud-object-storage:global:a/111f5fb10986423e9saa8512f1db7e65:111133c8-49ea-41xe-8c40-122038246f5b::"
}
role {
crn = "crn:v1:bluemix:public:iam::::serviceRole:Writer"
Expand Down

0 comments on commit 6df7413

Please sign in to comment.