Open janis-ax opened 10 months ago
Maybe it's worth taking a look into this https://support.oracle.com/knowledge/Oracle%20Cloud/2854208_1.html There was the same problem, but with certificates
Thank you for reporting the issue. We have raised an internal ticket to track this. Our service engineers will get back to you.
Had this issue in a resource "oci_kms_vault"
.
For me it was a wrong written value vault_type = "Default"
, which must be vault_type = "DEFAULT"
.
Hi All, I am from OCI Budgets team.
This issue is generally due to date argument provided in incorrect RFC 3339 format. This format is enforced and validated by OCI Terraform Provider and is not by Budgets Service. So, we cannot change the format from Budgets Service side.
We have recently updated the Budgets Public Documentation with examples on how to provide date in correct format. Please refer to https://docs.oracle.com/en-us/iaas/api/#/en/budgets/20190111/Budget/. Also, we are aware of the wrong examples provided in https://registry.terraform.io/providers/oracle/oci/latest/docs/data-sources/budget_budgets. We are working with Terraform Provider team towards updating the examples here.
To unblock yourself, please try to match your date format with this example 2023-08-12T16:01:19.847222+05:30
.
Hm, something seems definitely wrong there. I tried your suggestion and provided the date in the format.
I can create the budget, but it seems on the OCI side it uses 23:59:59.999Z
for the end date and 00:00:00Z
for the start date.
tofu apply tf.plan
....
Apply complete! Resources: 1 added, 1 changed, 0 destroyed.
2. Another plan shows changes:
```bash
tofu plan -out tf.plan
...
OpenTofu used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
~ update in-place
OpenTofu will perform the following actions:
# module.seminar_base.oci_budget_budget.seminar_budget will be updated in-place
~ resource "oci_budget_budget" "seminar_budget" {
~ end_date = "2024-05-11T23:59:59.999Z" -> "2024-05-11T16:01:19.847222+05:30"
~ start_date = "2024-05-09T00:00:00Z" -> "2024-05-09T16:01:19.847222+05:30"
# (17 unchanged attributes hidden)
}
Plan: 0 to add, 1 to change, 0 to destroy.
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Saved the plan to: tf.plan
To perform exactly these actions, run the following command to apply:
tofu apply "tf.plan"....
Apply complete! Resources: 1 added, 1 changed, 0 destroyed.
So I added your time, but OCI does not recognize it correctly. So every time I do a plan
it shows changes.
I think that is expected. From Budgets service side, we always change time in start date to start of the day and time in end date to end of the day. So your state file saves the updated start and end date. Now whenever you plan again, it will show changes to the start and end date. But ultimately, the start and end dates will remain the same.
Do you have any ideas how we can avoid this, or create a workaround?
If you can change the time in start_date to start of the day and time in end_date to end of the day, then terraform plan will not show changes again. I am trying to find some examples on this. If I do, I will share them here.
Community Note
Terraform Version and Provider Version
Affected Resource(s)
Terraform Configuration Files
Debug Output
Panic Output
Expected Behavior
Should create a budget with the start and end date because it's in the correct format.
Actual Behavior
Cannot create the budget
Steps to Reproduce
terraform apply
Important Factoids
References