Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
feat: use external kms key #131
base: main
Are you sure you want to change the base?
feat: use external kms key #131
Changes from 5 commits
63d287e
f15491d
dd385ee
66e77da
f423d6f
9b8a2ad
3dea95d
8cdd9df
5ee35e3
9e8be14
d1d7dc2
4d16ae2
3d2e2b6
87b7fba
405bedc
a925492
f8451f6
52cdeb2
735cabb
7fd6a27
028ca0d
7f426b9
334b6f0
dba95e5
2ff05dc
1685537
a5aca1d
55e62aa
a51d196
47ca80b
b34526e
95ede9d
127b4f1
536f305
b4ef48f
5f3615b
fee6c76
36de7b1
a159a91
be6de2e
e1e5d60
e9582bf
8222506
a40ad15
9b7ccc5
db696cd
b0fe94e
8fb4f03
5e39528
b1cf2aa
58d73ad
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When adding an auth policy, you should add a time sleep before trying to deploy the service. For example, see https://github.com/terraform-ibm-modules/terraform-ibm-secrets-manager/blob/dbc64683a586dc0034ce61bc47d66d96cf0a9f3b/main.tf#L74-L79
Once the time sleep exists, you need to add an depends_on it for the call to cos module
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I understand the COS needs to already exist to create this auth policy so adding a sleep would create a cycle. Am I misunderstanding where the depends_on go?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kierramarie The auth policy has to exist before the COS bucket can be created. But the instance has to exist before the auth policy can be created. Unfortunately we are creating both instance and bucket in the COS module call, so I don't think we can apply the time sleep workaround here. If we used a different resource for creating the bucket (such as the buckets submodule), this would not be the case.
There might be a race condition here though.. what if the bucket creation started to happen before the auth policy was created. We have no way to control that.
We may need to split bucket creation into its own resource to fix this, but we would need to ensure not to break current consumers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we found issues when using
- 3
- do not use minus when parsing. Go forwards. There is now a CRN parser module at https://github.com/terraform-ibm-modules/terraform-ibm-common-utilities/tree/main/modules/crn-parser so can you use this instead?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think Steve found a bug with CRN parser that prevents it being used here currently, so for now, proceed with this approach, but don't work backwards