Skip to content

Commit

Permalink
Merge branch 'master' into v2-policies-support
Browse files Browse the repository at this point in the history
  • Loading branch information
swcolley authored Mar 21, 2023
2 parents 0bd613d + 70f0bf6 commit 2dc4776
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 19 deletions.
1 change: 0 additions & 1 deletion examples/ibm-secrets-manager/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ resource "sm_iam_credentials_secret" "sm_iam_credentials_secret_instance" {
secret_group_id = var.sm_iam_credentials_secret_secret_group_id
ttl = var.sm_iam_credentials_secret_ttl
access_groups = var.sm_iam_credentials_secret_access_groups
service_id = var.sm_iam_credentials_secret_service_id
reuse_api_key = var.sm_iam_credentials_secret_reuse_api_key
rotation = var.sm_iam_credentials_secret_rotation
}
Expand Down
4 changes: 1 addition & 3 deletions examples/ibm-secrets-manager/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ resource "ibm_sm_public_certificate" "sm_public_certificate_instance" {
secret_group_id = var.sm_public_certificate_secret_group_id
rotation {
auto_rotate = true
interval = 1
unit = "day"
rotate_keys = false
}
}

Expand Down Expand Up @@ -68,7 +67,6 @@ resource "ibm_sm_iam_credentials_secret" "sm_iam_credentials_secret_instance" {
secret_group_id = var.sm_iam_credentials_secret_secret_group_id
ttl = var.sm_iam_credentials_secret_ttl
access_groups = var.sm_iam_credentials_secret_access_groups
service_id = var.sm_iam_credentials_secret_service_id
rotation {
auto_rotate = true
interval = 1
Expand Down
5 changes: 0 additions & 5 deletions examples/ibm-secrets-manager/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,6 @@ variable "sm_iam_credentials_secret_access_groups" {
type = list(string)
default = [ "AccessGroupId-45884031-54be-4dd7-86ff-112511e92699" ]
}
variable "sm_iam_credentials_secret_service_id" {
description = "The service ID under which the API key (see the `api_key` field) is created.If you omit this parameter, Secrets Manager generates a new service ID for your secret at its creation and adds it to the access groups that you assign.Optionally, you can use this field to provide your own service ID if you prefer to manage its access directly or retain the service ID after your secret expires, is rotated, or deleted. If you provide a service ID, do not include the `access_groups` parameter."
type = string
default = "ServiceId-bb4ccc31-bd31-493a-bb58-52ec399800be"
}
variable "sm_iam_credentials_secret_reuse_api_key" {
description = "Determines whether to use the same service ID and API key for future read operations on an`iam_credentials` secret.If it is set to `true`, the service reuses the current credentials. If it is set to `false`, a new service ID and API key are generated each time that the secret is read or accessed."
type = bool
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -177,4 +177,4 @@ replace github.com/softlayer/softlayer-go v1.0.3 => github.com/IBM-Cloud/softlay

replace github.com/dgrijalva/jwt-go v3.2.0+incompatible => github.com/golang-jwt/jwt v3.2.1+incompatible

replace github.com/IBM/secrets-manager-go-sdk v1.0.49 => github.com/IBM/secrets-manager-go-sdk v1.0.50-0.20230305091308-c49f01893314
replace github.com/IBM/secrets-manager-go-sdk v1.0.49 => github.com/IBM/secrets-manager-go-sdk v1.0.50-0.20230316070833-1e1d44fe67be
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ github.com/IBM/schematics-go-sdk v0.2.1 h1:byATysGD+Z1k/wdtNqQmKALcAPjgSLuSyzcab
github.com/IBM/schematics-go-sdk v0.2.1/go.mod h1:Tw2OSAPdpC69AxcwoyqcYYaGTTW6YpERF9uNEU+BFRQ=
github.com/IBM/secrets-manager-go-sdk v1.0.50-0.20230305091308-c49f01893314 h1:OeaVcMvEYYIAl9A/86A3be8DXUKEzd5jSEa3z1pgh94=
github.com/IBM/secrets-manager-go-sdk v1.0.50-0.20230305091308-c49f01893314/go.mod h1:QyDSznC6gJEXIGaj+JPxoEVtyXfkaxzId87mxcEb+vM=
github.com/IBM/secrets-manager-go-sdk v1.0.50-0.20230316070833-1e1d44fe67be h1:fSMzsH48lTFPWFi4ulS0DYa6uK/l2oz5JiJEbFhwdjc=
github.com/IBM/secrets-manager-go-sdk v1.0.50-0.20230316070833-1e1d44fe67be/go.mod h1:qv+tQg8Z3Vb11DQYxDjEGeROHDtTLQxUWuOIrIdWg6E=
github.com/IBM/vpc-go-sdk v0.32.0 h1:LDuU8xkeBISvLc6/artN7aQ1YsdKvDWRXalfsPHUBu4=
github.com/IBM/vpc-go-sdk v0.32.0/go.mod h1:jYjS3EySPkC7DuOg33gMHtm8DcIf75Tc+Gxo3zmMBTQ=
github.com/IBM/vpc-go-sdk v0.33.0 h1:HU0yEQmMGQoODlFJIAiQAOp2vE4i2PUvnjdcd8/9Kyw=
github.com/IBM/vpc-go-sdk v0.33.0/go.mod h1:Ozn0YBCs284Qvy+CNAmoLhh2eD48NnobiAyfgVd8wmA=
github.com/Logicalis/asn1 v0.0.0-20190312173541-d60463189a56 h1:vuquMR410psHNax14XKNWa0Ae/kYgWJcXi0IFuX60N0=
Expand Down
1 change: 1 addition & 0 deletions ibm/service/vpc/resource_ibm_is_instance_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,7 @@ func resourceIBMISInstanceGroupRead(d *schema.ResourceData, meta interface{}) er
d.Set("name", *instanceGroup.Name)
d.Set("instance_template", *instanceGroup.InstanceTemplate.ID)
d.Set("instances", *instanceGroup.MembershipCount)
d.Set("instance_count", *instanceGroup.MembershipCount)
d.Set("resource_group", *instanceGroup.ResourceGroup.ID)
if instanceGroup.ApplicationPort != nil {
d.Set("application_port", *instanceGroup.ApplicationPort)
Expand Down
8 changes: 3 additions & 5 deletions ibm/service/vpc/resource_ibm_is_instance_group_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func testAccCheckIBMISInstanceGrouplbConfig(vpcname, subnetname, zone, cidr, nam
resource "ibm_is_instance_template" "instancetemplate1" {
name = "%s"
image = "r134-63363662-a4ee-4ba4-a6c4-92e6c78c6b58"
image = "%s"
profile = "bx2-8x32"
primary_network_interface {
Expand All @@ -182,15 +182,13 @@ func testAccCheckIBMISInstanceGrouplbConfig(vpcname, subnetname, zone, cidr, nam
load_balancer_pool = ibm_is_lb_pool.testacc_lb_pool.pool_id
application_port = "2364"
}
`, vpcname, subnetname, zone, cidr, name, poolName, algorithm, protocol, delay, retries, timeout, healthType, sshKeyName, publicKey, templateName, zone, instanceGroupName)
`, vpcname, subnetname, zone, cidr, name, poolName, algorithm, protocol, delay, retries, timeout, healthType, sshKeyName, publicKey, templateName, acc.IsImage, zone, instanceGroupName)

}

func testAccCheckIBMISInstanceGroupConfig(vpcName, subnetName, sshKeyName, publicKey, templateName, instanceGroupName string) string {
return fmt.Sprintf(`
provider "ibm" {
generation = 2
}
resource "ibm_is_vpc" "vpc2" {
name = "%s"
Expand Down
4 changes: 2 additions & 2 deletions website/docs/d/sm_secret_group.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Provides a read-only data source for a secret group. You can then reference the
data "ibm_sm_secret_group" "secret_group" {
instance_id = "6ebc4224-e983-496a-8a54-f40a0bfa9175"
region = "us-south"
secret_grouop_id = ibm_sm_secret_group.sm_secret_group_instance.secretGroup_id
secret_group_id = ibm_sm_secret_group.sm_secret_group_instance.secret_group_id
}
```

Expand All @@ -28,7 +28,7 @@ Review the argument reference that you can specify for your data source.
* `region` - (Optional, Forces new resource, String) The region of the Secrets Manager instance. If not provided defaults to the region defined in the IBM provider configuration.
* `endpoint_type` - (Optional, String) - The endpoint type. If not provided the endpoint type is determined by the `visibility` argument provided in the provider configuration.
* Constraints: Allowable values are: `private`, `public`.
* `secret_grouop_id` - (Required, String) The ID of the secret group.
* `secret_group_id` - (Required, String) The ID of the secret group.
* Constraints: The maximum length is `36` characters. The minimum length is `7` characters. The value must match regular expression `/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/`.

## Attribute Reference
Expand Down
4 changes: 2 additions & 2 deletions website/docs/r/cos_bucket.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description:
# ibm_cos_bucket
Create or delete an IBM Cloud Object Storage bucket. The bucket is used to store your data. For more information, about configuration options, see [Create some buckets to store your data](https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-getting-started-cloud-object-storage#gs-create-buckets).

To create a bucket, you must provision an IBM Cloud Object Storage instance first by using the [`ibm_resource_instance`](https://cloud.ibm.com/docs/ibm-cloud-provider-for-terraform?topic=ibm-cloud-provider-for-terraform-resource-mgmt-resources#resource-instance) resource.
To create a bucket, you must provision an IBM Cloud Object Storage instance first by using the [`ibm_resource_instance`](https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/resource_instance) resource.

## Example usage
The following example creates an instance of IBM Cloud Object Storage, IBM Cloud Activity Tracker, and IBM Cloud Monitoring. Then, multiple buckets are created and configured to send audit events and metrics to your service instances.
Expand Down Expand Up @@ -497,7 +497,7 @@ Review the argument references that you can specify for your resource.
- `noncurrent_days` - (Optional, Integer) Configuration parameter in your policy that says how long to retain a non-current version before deleting it. Must be greater than 0.
- `prefix` - (Optional, String) The rule applies to any objects with keys that match this prefix. You can use multiple rules for different actions for different prefixes within the same bucket.
- `rule_id` - (Optional, String) Unique identifier for the rule. Rules allow you to remove versions from objects. Set Rule ID for cos bucket.
- `object_versioning` - (List) Object Versioning allows the COS user to keep multiple versions of an objet in a bucke to protect against accidental deletion or overwrites. With versioning, you can easilyrecover from both unintended user actions and application failure. Nested block have the following structure:
- `object_versioning` - (Object) Object Versioning allows the COS user to keep multiple versions of an object in a bucket to protect against accidental deletion or overwrites. With versioning, you can easily recover from both unintended user actions and application failure. Nested block have the following structure:

Nested scheme for `object_versioning`:
- `enable` : (Optional, Bool) Specifies Versioning status either enable or Suspended for the objects in the bucket.Default value set to false.
Expand Down

0 comments on commit 2dc4776

Please sign in to comment.