热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

removingunfoundecsservicefromstatefile

Changesproposedinthispullrequest:Removingunfoundecsservicefromstat

Changes proposed in this pull request:

  • Removing unfound ecs service from statefile instead of throwing an error when running
    1
    terraform refresh

    to resolve drift


note about acceptance tests: my corporate aws account is not allowed to perform some actions required to run acceptance tests. below is the output, account id/profile have been scrubbed out

Output from acceptance testing:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
make testacc TEST=./aws TESTARGS='-run=TestAccAWSEcsService*'==> Checking that code complies with gofmt requirements...

TF_ACC=1 go test ./aws -v -run=TestAccAWSEcsService* -timeout 120m

=== RUN   TestAccAWSEcsServiceDataSource_basic

--- PASS: TestAccAWSEcsServiceDataSource_basic (52.43s)

=== RUN   TestAccAWSEcsService_withARN

--- PASS: TestAccAWSEcsService_withARN (77.58s)

=== RUN   TestAccAWSEcsService_basicImport

--- PASS: TestAccAWSEcsService_basicImport (44.08s)

=== RUN   TestAccAWSEcsService_withUnnormalizedPlacementStrategy

--- PASS: TestAccAWSEcsService_withUnnormalizedPlacementStrategy (48.04s)

=== RUN   TestAccAWSEcsService_withFamilyAndRevision

--- PASS: TestAccAWSEcsService_withFamilyAndRevision (89.89s)

=== RUN   TestAccAWSEcsService_withRenamedCluster

--- PASS: TestAccAWSEcsService_withRenamedCluster (82.52s)

=== RUN   TestAccAWSEcsService_healthCheckGracePeriodSeconds

--- FAIL: TestAccAWSEcsService_healthCheckGracePeriodSeconds (21.41s)

        testing.go:527: Step 2 error: Error applying: 2 errors occurred:

                        * aws_iam_role.ecs_service: 1 error occurred:

                        * aws_iam_role.ecs_service: Error creating IAM Role tf-acc-role-svc-w-hcgps-xvft7vse: AccessDenied: User: arn:aws:sts::aws_account_number:assumed-role/aws_profile is not authorized to perform: iam:CreateRole on resource: arn:aws:iam::aws_account_number:role/tf-acc-role-svc-w-hcgps-xvft7vse

                        status code: 403, request id: 8c8d5c95-c5bf-11e8-9d6d-435ec3fa931d





                        * aws_vpc.main: 1 error occurred:

                        * aws_vpc.main: Error creating VPC: UnauthorizedOperation: You are not authorized to perform this operation.

                        status code: 403, request id: 0dbb3119-7f40-4343-82a6-2a2595c01050









=== RUN   TestAccAWSEcsService_withIamRole

--- FAIL: TestAccAWSEcsService_withIamRole (16.24s)

        testing.go:527: Step 0 error: Error applying: 2 errors occurred:

                        * aws_iam_role.ecs_service: 1 error occurred:

                        * aws_iam_role.ecs_service: Error creating IAM Role tf-acc-role-svc-w-iam-role-4yc2quyc: AccessDenied: User: arn:aws:sts::aws_account_number:assumed-role/aws_profile is not authorized to perform: iam:CreateRole on resource: arn:aws:iam::aws_account_number:role/tf-acc-role-svc-w-iam-role-4yc2quyc

                        status code: 403, request id: 977b8482-c5bf-11e8-82b7-9513ec8e5604





                        * aws_elb.main: 1 error occurred:

                        * aws_elb.main: AccessDenied: User: arn:aws:sts::aws_account_number:assumed-role/aws_profile is not authorized to perform: ec2:CreateSecurityGroup

                        status code: 403, request id: 97a02447-c5bf-11e8-ad34-a9caa0ed026f









=== RUN   TestAccAWSEcsService_withDeploymentValues

--- PASS: TestAccAWSEcsService_withDeploymentValues (51.68s)

=== RUN   TestAccAWSEcsService_withLbChanges

--- FAIL: TestAccAWSEcsService_withLbChanges (67.02s)

        testing.go:527: Step 0 error: Error applying: 2 errors occurred:

                        * aws_iam_role.ecs_service: 1 error occurred:

                        * aws_iam_role.ecs_service: Error creating IAM Role tf-acc-role-svc-w-lbc-l9ziw4xb: AccessDenied: User: arn:aws:sts::aws_account_number:assumed-role/aws_profile is not authorized to perform: iam:CreateRole on resource: arn:aws:iam::aws_account_number:role/tf-acc-role-svc-w-lbc-l9ziw4xb

                        status code: 403, request id: c1862791-c5bf-11e8-8720-f72ce63c99cf





                        * aws_elb.main: 1 error occurred:

                        * aws_elb.main: AccessDenied: User: arn:aws:sts::aws_account_number:assumed-role/aws_profile is not authorized to perform: ec2:CreateSecurityGroup

                        status code: 403, request id: d5ab9fec-c5bf-11e8-afec-f737cfce2486









=== RUN   TestAccAWSEcsService_withEcsClusterName

--- PASS: TestAccAWSEcsService_withEcsClusterName (40.68s)

=== RUN   TestAccAWSEcsService_withAlb

--- FAIL: TestAccAWSEcsService_withAlb (29.47s)

        testing.go:527: Step 0 error: Error applying: 2 errors occurred:

                        * aws_iam_role.ecs_service: 1 error occurred:

                        * aws_iam_role.ecs_service: Error creating IAM Role tf-acc-role-svc-w-alb-jarde82x: AccessDenied: User: arn:aws:sts::aws_account_number:assumed-role/aws_profile is not authorized to perform: iam:CreateRole on resource: arn:aws:iam::aws_account_number:role/tf-acc-role-svc-w-alb-jarde82x

                        status code: 403, request id: 06df72a2-c5c0-11e8-9d6d-435ec3fa931d





                        * aws_vpc.main: 1 error occurred:

                        * aws_vpc.main: Error creating VPC: UnauthorizedOperation: You are not authorized to perform this operation.

                        status code: 403, request id: 186713db-f3c7-4b8b-a738-a3957b61d227









=== RUN   TestAccAWSEcsService_withPlacementStrategy

--- PASS: TestAccAWSEcsService_withPlacementStrategy (134.49s)

=== RUN   TestAccAWSEcsService_withPlacementConstraints

--- PASS: TestAccAWSEcsService_withPlacementConstraints (51.19s)

=== RUN   TestAccAWSEcsService_withPlacementConstraints_emptyExpression

--- PASS: TestAccAWSEcsService_withPlacementConstraints_emptyExpression (39.85s)

=== RUN   TestAccAWSEcsService_withLaunchTypeFargate

--- FAIL: TestAccAWSEcsService_withLaunchTypeFargate (56.44s)

        testing.go:527: Step 0 error: Error applying: 1 error occurred:

                        * aws_vpc.main: 1 error occurred:

                        * aws_vpc.main: Error creating VPC: UnauthorizedOperation: You are not authorized to perform this operation.

                        status code: 403, request id: 845c93fc-0f3e-49fc-8d23-4d2921157e2d









        testing.go:527: Step 0 error: Error applying: 1 error occurred:

                        * aws_vpc.main: 1 error occurred:

                        * aws_vpc.main: Error creating VPC: UnauthorizedOperation: You are not authorized to perform this operation.

                        status code: 403, request id: 0b9abc5b-3a8a-45b8-8a68-fc88590c4285









        testing.go:527: Step 0 error: Error applying: 1 error occurred:

                        * aws_vpc.main: 1 error occurred:

                        * aws_vpc.main: Error creating VPC: UnauthorizedOperation: You are not authorized to perform this operation.

                        status code: 403, request id: 01bf5345-9953-447f-af31-dd2e7c4b67aa









=== RUN   TestAccAWSEcsService_withLaunchTypeEC2AndNetworkConfiguration

--- FAIL: TestAccAWSEcsService_withLaunchTypeEC2AndNetworkConfiguration (56.57s)

        testing.go:527: Step 0 error: Error applying: 1 error occurred:

                        * aws_vpc.main: 1 error occurred:

                        * aws_vpc.main: Error creating VPC: UnauthorizedOperation: You are not authorized to perform this operation.

                        status code: 403, request id: 98fa3fdd-bcef-4080-8d05-3f3917811d28









=== RUN   TestAccAWSEcsService_withDaemonSchedulingStrategy

--- PASS: TestAccAWSEcsService_withDaemonSchedulingStrategy (49.64s)

=== RUN   TestAccAWSEcsService_withReplicaSchedulingStrategy

--- PASS: TestAccAWSEcsService_withReplicaSchedulingStrategy (52.12s)

=== RUN   TestAccAWSEcsService_withServiceRegistries

--- FAIL: TestAccAWSEcsService_withServiceRegistries (21.18s)

        testing.go:527: Step 0 error: Error applying: 1 error occurred:

                        * aws_vpc.test: 1 error occurred:

                        * aws_vpc.test: Error creating VPC: UnauthorizedOperation: You are not authorized to perform this operation.

                        status code: 403, request id: 1799a702-d690-4b34-b2d1-42fe65182355









=== RUN   TestAccAWSEcsService_withServiceRegistries_container

--- FAIL: TestAccAWSEcsService_withServiceRegistries_container (21.69s)

        testing.go:527: Step 0 error: Error applying: 1 error occurred:

                        * aws_vpc.test: 1 error occurred:

                        * aws_vpc.test: Error creating VPC: UnauthorizedOperation: You are not authorized to perform this operation.

                        status code: 403, request id: 4704308a-daa5-4902-b28d-d0ba9b30074a









FAIL

exit status 1

FAIL    github.com/terraform-providers/terraform-provider-aws/aws       1108.355s

make: *** [testacc] Error 1

该提问来源于开源项目:hashicorp/terraform-provider-aws

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.



If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!


   



推荐阅读
author-avatar
让生活洒满阳光_622
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有