Skip to content

Commit 55fa4e7

Browse files
author
github-actions[bot]
committed
fix: update ImportState method to use ImportStatePassthroughID for resource ID handling
1 parent b16f4ab commit 55fa4e7

File tree

3 files changed

+14
-71
lines changed

3 files changed

+14
-71
lines changed

.github/workflows/copilot-setup-steps.yml

Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,57 +3,45 @@ description: "Install tools needed for Copilot Agent"
33

44
on: workflow_dispatch
55

6+
67
jobs:
78
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
89
copilot-setup-steps:
910
runs-on: ubuntu-latest
1011

11-
permissions:
12-
contents: read
12+
permissions:
13+
contents: read
1314

1415
steps:
1516
- name: Checkout code
1617
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
17-
18-
- name: Setup Go
19-
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
18+
19+
- name: "Install Changie (changelog tool)"
20+
uses: miniscruff/changie-action@6dcc2533cac0495148ed4046c438487e4dceaa23 # v2
2021
with:
21-
go-version-file: 'go.mod'
22-
cache: true
23-
22+
version: "1.21.1"
23+
args: --version
24+
2425
- name: golangci-lint
2526
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
2627
with:
2728
version: v2.1.6
2829

29-
- name: "Install Changie (changelog tool)"
30-
uses: miniscruff/changie-action@v2
31-
with:
32-
version: "1.21.1"
33-
3430
- name: "Install Terraform"
35-
run: |
36-
TERRAFORM_VERSION=1.11.4
37-
OS=linux
38-
ARCH=amd64
39-
curl -LO https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_${OS}_${ARCH}.zip
40-
unzip terraform_${TERRAFORM_VERSION}_${OS}_${ARCH}.zip terraform
41-
sudo mv terraform /usr/local/bin/
42-
rm terraform_${TERRAFORM_VERSION}_${OS}_${ARCH}.zip
43-
terraform --version
31+
uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
32+
with:
33+
terraform_version: "1.11.4"
4434

4535
- name: "Install Go tools from tools.go"
4636
run: |
4737
go install github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs@0.21.0
4838
49-
- name: "Verify installation and setup Go modules"
39+
- name: "Verify installation"
5040
run: |
5141
echo "=== Installed Tools Verification ==="
5242
changie --version
5343
golangci-lint --version
5444
terraform --version
5545
tfplugindocs --version
5646
go version
57-
echo "=== Setting up Go modules ==="
58-
go mod tidy
5947
echo "=== Setup complete ==="

copilot-setup-steps.yml

Lines changed: 0 additions & 45 deletions
This file was deleted.

internal/services/application/resource_environment_application_admin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ func (r *EnvironmentApplicationAdminResource) ImportState(ctx context.Context, r
289289
return
290290
}
291291

292+
resource.ImportStatePassthroughID(ctx, path.Root("id"), req, resp)
292293
resp.Diagnostics.Append(resp.State.SetAttribute(ctx, path.Root("environment_id"), idParts[0])...)
293294
resp.Diagnostics.Append(resp.State.SetAttribute(ctx, path.Root("application_id"), idParts[1])...)
294-
resp.Diagnostics.Append(resp.State.SetAttribute(ctx, path.Root("id"), req.ID)...)
295295
}

0 commit comments

Comments
 (0)