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

SM docs fix #5080

Merged
merged 44 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
317590f
SC addition
Nov 15, 2023
babc0f9
SC addition
Nov 15, 2023
8071667
SC addition
Nov 15, 2023
60abaf9
update function updated
Nov 19, 2023
8477dde
SC unit tests added
Nov 22, 2023
2f38ba5
Merge branch 'IBM-Cloud:master' into master
yonatanyell Nov 22, 2023
972a9b9
SC unit tests added
Nov 28, 2023
59c5e72
d
Dec 6, 2023
2ff98ad
tests fixes
Dec 6, 2023
b9e8416
Merge remote-tracking branch 'origin/master'
Dec 6, 2023
40ea122
tests fixes
Dec 6, 2023
f3a195f
update sdk
TatyanaBol Dec 11, 2023
8fa09ae
.secrets.baseline update
Dec 11, 2023
a6b779c
.secrets.baseline update
Dec 11, 2023
1f1e01a
Merge branch 'master' into master
yonatanyell Dec 11, 2023
cea9bd4
.secrets.baseline update
Dec 11, 2023
0d333f9
Merge remote-tracking branch 'origin/master'
Dec 11, 2023
ad75820
Update sm_service_credentials_secret_metadata.html.markdown
IdanAdar Dec 13, 2023
5ece471
Merge branch 'master' of github.com:yonatanyell/terraform-provider-ibm
Dec 26, 2023
e91f429
bugs fixes
Dec 26, 2023
c44ff91
bugs fixes
Dec 26, 2023
74626d8
bugs fixes
Dec 26, 2023
bd730d7
Merge branch 'master' into master
yonatanyell Dec 28, 2023
fbf61c6
docs bugs fixes
Jan 3, 2024
fbc7294
Merge remote-tracking branch 'origin/master'
Jan 3, 2024
25f8094
Merge branch 'IBM-Cloud:master' into master
yonatanyell Jan 3, 2024
e63a564
preferred_chain added for public cert lets encrypt configuration
Jan 15, 2024
daa771b
Merge branch 'IBM-Cloud:master' into master
yonatanyell Jan 15, 2024
ef612d9
support for creating secret version for username password & version_c…
Jan 15, 2024
6e7b866
Merge remote-tracking branch 'origin/master'
Jan 15, 2024
3bb189a
support for creating secret version for username password & version_c…
Jan 15, 2024
47ea09c
support for creating secret version for username password & version_c…
Jan 17, 2024
27241e5
support for creating secret version for username password & version_c…
Jan 17, 2024
c1ca0e7
support for creating secret version for username password & version_c…
Jan 17, 2024
988d3df
support for creating secret version for username password & version_c…
Jan 17, 2024
fd3a343
Merge branch 'master' into master
yonatanyell Jan 21, 2024
61de984
preferred chain docs update
Jan 29, 2024
64e35ee
Merge remote-tracking branch 'origin/master'
Jan 29, 2024
4ca06c6
Merge branch 'master' of github.com:yonatanyell/terraform-provider-ibm
Jan 29, 2024
5396f65
support for creating secret version for username password & version_c…
Jan 29, 2024
1ea2493
support for creating secret version for username password & version_c…
Jan 29, 2024
1a16c08
support for creating secret version for username password & version_c…
Jan 29, 2024
86af4c0
fix public cert bug
Jan 29, 2024
7068a0e
Merge branch 'master' into master
hkantare Jan 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .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": "2024-01-27T06:56:14Z",
"generated_at": "2024-01-29T11:06:53Z",
"plugins_used": [
{
"name": "AWSKeyDetector"
Expand Down
29 changes: 16 additions & 13 deletions ibm/service/secretsmanager/resource_ibm_sm_public_certificate.go
Original file line number Diff line number Diff line change
Expand Up @@ -635,21 +635,24 @@ func resourceIbmSmPublicCertificateRead(context context.Context, d *schema.Resou
if err = d.Set("private_key", secret.PrivateKey); err != nil {
return diag.FromErr(fmt.Errorf("Error setting private_key: %s", err))
}
// Call get version metadata API to get the current version_custom_metadata
getVersionMetdataOptions := &secretsmanagerv2.GetSecretVersionMetadataOptions{}
getVersionMetdataOptions.SetSecretID(secretId)
getVersionMetdataOptions.SetID("current")

versionMetadataIntf, response, err := secretsManagerClient.GetSecretVersionMetadataWithContext(context, getVersionMetdataOptions)
if err != nil {
log.Printf("[DEBUG] GetSecretVersionMetadataWithContext failed %s\n%s", err, response)
return diag.FromErr(fmt.Errorf("GetSecretVersionMetadataWithContext failed %s\n%s", err, response))
}
if *secret.StateDescription == "active" {
// Call get version metadata API to get the current version_custom_metadata
getVersionMetdataOptions := &secretsmanagerv2.GetSecretVersionMetadataOptions{}
getVersionMetdataOptions.SetSecretID(secretId)
getVersionMetdataOptions.SetID("current")

versionMetadataIntf, response, err := secretsManagerClient.GetSecretVersionMetadataWithContext(context, getVersionMetdataOptions)
if err != nil {
log.Printf("[DEBUG] GetSecretVersionMetadataWithContext failed %s\n%s", err, response)
return diag.FromErr(fmt.Errorf("GetSecretVersionMetadataWithContext failed %s\n%s", err, response))
}

versionMetadata := versionMetadataIntf.(*secretsmanagerv2.PublicCertificateVersionMetadata)
if versionMetadata.VersionCustomMetadata != nil {
if err = d.Set("version_custom_metadata", versionMetadata.VersionCustomMetadata); err != nil {
return diag.FromErr(fmt.Errorf("Error setting version_custom_metadata: %s", err))
versionMetadata := versionMetadataIntf.(*secretsmanagerv2.PublicCertificateVersionMetadata)
if versionMetadata.VersionCustomMetadata != nil {
if err = d.Set("version_custom_metadata", versionMetadata.VersionCustomMetadata); err != nil {
return diag.FromErr(fmt.Errorf("Error setting version_custom_metadata: %s", err))
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ Review the argument reference that you can specify for your resource.
* Constraints: Allowable values are: `private`, `public`.
* `lets_encrypt_environment` - (Required, String) The configuration of the Let's Encrypt CA environment.
* Constraints: Allowable values are: `production`, `staging`.
* `lets_encrypt_preferred_chain` - (Optional, String) Prefer the chain with an issuer matching this Subject Common Name.
* Constraints: The maximum length is `30` characters. The minimum length is `2` characters. The value must match regular expression `/(.*?)/`.
* `lets_encrypt_preferred_chain` - (Optional, String) This field supports only the chains that Let's Encrypt provides. Keep empty to use the default or supply a valid Let's Encrypt-provided value. For a list of supported chains, see: https://letsencrypt.org/certificates/.
* Constraints: The value must match regular expression `/(.*?)/`.
* `lets_encrypt_private_key` - (Required, String) The PEM encoded private key of your Lets Encrypt account.
* Constraints: The maximum length is `100000` characters. The minimum length is `50` characters. The value must match regular expression `/(^-----BEGIN PRIVATE KEY-----.*?)/`.
* `name` - (Required, String) A human-readable unique name to assign to your configuration.
Expand Down
Loading