Terraform Version
Terraform v1.3.5
on darwin_amd64
+ provider registry.terraform.io/outscale-dev/outscale v0.7.0
Terraform Configuration Files
resource "outscale_volume" "outscale_volume" {
subregion_name = "${var.region}a"
size = 40
}
resource "outscale_snapshot" "outscale_snapshot" {
volume_id = outscale_volume.outscale_volume.volume_id
}
resource "outscale_snapshot_attributes" "outscale_snapshot_attributes" {
snapshot_id = outscale_snapshot.outscale_snapshot.snapshot_id
permissions_to_create_volume_additions {
account_ids = ["123456789012"]
}
}
data "outscale_snapshot" "outscale_snapshot" {
depends_on = [outscale_snapshot_attributes.outscale_snapshot_attributes]
snapshot_id = outscale_snapshot.outscale_snapshot.snapshot_id
}
Updated Configuration file:
resource "outscale_volume" "outscale_volume" {
subregion_name = "${var.region}a"
size = 40
}
resource "outscale_snapshot" "outscale_snapshot" {
volume_id = outscale_volume.outscale_volume.volume_id
}
resource "outscale_snapshot_attributes" "outscale_snapshot_attributes" {
snapshot_id = outscale_snapshot.outscale_snapshot.snapshot_id
permissions_to_create_volume_additions {
account_ids = ["123456789012","123456789010"]
}
}
data "outscale_snapshot" "outscale_snapshot" {
depends_on = [outscale_snapshot_attributes.outscale_snapshot_attributes]
snapshot_id = outscale_snapshot.outscale_snapshot.snapshot_id
}
Debug Output
# outscale_snapshot_attributes.outscale_snapshot_attributes will be updated in-place
~ resource "outscale_snapshot_attributes" "outscale_snapshot_attributes" {
id = "snap-a816c9a2"
# (2 unchanged attributes hidden)
~ permissions_to_create_volume_additions {
~ account_ids = [
"123456789012",
+ "123456789010",
]
# (1 unchanged attribute hidden)
}
}
Plan: 0 to add, 1 to change, 0 to destroy.
outscale_snapshot_attributes.outscale_snapshot_attributes: Modifying... [id=snap-a816c9a2]
╷
│ Error: doesn't support update
│
│ with outscale_snapshot_attributes.outscale_snapshot_attributes,
│ on TestSnaps-Attributes.tf line 12, in resource "outscale_snapshot_attributes" "outscale_snapshot_attributes":
│ 12: resource "outscale_snapshot_attributes" "outscale_snapshot_attributes" {
│
╵
Crash Output
N/A
Expected Behavior
The resource "outscale_snapshot_attributes" is either updated or destroyed and recreated
Actual Behavior
terraform suggests to update "outscale_snapshot_attributes" resource but an error is raised.
Steps to Reproduce
- terraform init
- terraform apply
- update configuration file
- terraform apply (a second time)
Additional Context
NA
References
NA
Terraform Version
Terraform Configuration Files
Updated Configuration file:
Debug Output
Crash Output
N/A
Expected Behavior
The resource "outscale_snapshot_attributes" is either updated or destroyed and recreated
Actual Behavior
terraform suggests to update "outscale_snapshot_attributes" resource but an error is raised.
Steps to Reproduce
Additional Context
NA
References
NA