{"id":1103,"date":"2019-05-20T13:52:08","date_gmt":"2019-05-20T10:52:08","guid":{"rendered":"https:\/\/artem.services\/?p=1103"},"modified":"2019-05-20T13:52:08","modified_gmt":"2019-05-20T10:52:08","slug":"fix-error-terraform-instance-profile-already-exists","status":"publish","type":"post","link":"https:\/\/artem.services\/?p=1103","title":{"rendered":"FIX ERROR &#8212; Terraform: Instance Profile already exists"},"content":{"rendered":"<p>\u041f\u0440\u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c &quot;<strong>terraform apply<\/strong>&quot; \u0432 \u0445\u043e\u0434\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043d\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 &quot;<strong>IAM Profile<\/strong>&quot; \u043e\u043d \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044f \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043e\u0448\u0438\u0431\u043a\u043e\u0439:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n\t* aws_iam_instance_profile.ecs_profile: 1 error occurred:\r\n\t* aws_iam_instance_profile.ecs_profile: Error creating IAM instance profile stg-artem-service-profile: EntityAlreadyExists: Instance Profile stg-artem-service-profile already exists.\r\n\tstatus code: 409, request id: a77fec43-7ad2-11e9-9e4e-7744dbc7b890\r\n<\/pre>\n<p>&nbsp;<\/p>\n<h3>\u0420\u0435\u0448\u0435\u043d\u0438\u0435:<\/h3>\n<p>\u041f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 <strong>AWS Cli<\/strong> \u043d\u0430\u0439\u0442\u0438 <strong>IAM Profile<\/strong> \u0438 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0435\u0433\u043e.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\naws --profile artem iam list-instance-profiles\r\n<\/pre>\n<p>\u0421\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 <strong>IAM Profile<\/strong>:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n{\r\n    &quot;InstanceProfiles&quot;: [\r\n        {\r\n            &quot;Path&quot;: &quot;\/&quot;,\r\n            &quot;InstanceProfileName&quot;: &quot;stg-artem-service-profile&quot;,\r\n            &quot;InstanceProfileId&quot;: &quot;YYYYYYYYYYYYYYYYYYYYY&quot;,\r\n            &quot;Arn&quot;: &quot;arn:aws:iam::XXXXXXXXXXXX:instance-profile\/stg-artem-service-profile&quot;,\r\n            &quot;CreateDate&quot;: &quot;2019-05-17T14:06:27Z&quot;,\r\n            &quot;Roles&quot;: []\r\n        }\r\n    ]\r\n}\r\n<\/pre>\n<p>\u0423\u0434\u0430\u043b\u044f\u0435\u043c \u043d\u0435\u043d\u0443\u0436\u043d\u044b\u0439 <strong>IAM Profile<\/strong>:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\naws iam delete-instance-profile --instance-profile-name stg-artem-service-profile\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u041f\u0440\u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c &quot;terraform apply&quot; \u0432 \u0445\u043e\u0434\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043d\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 &quot;IAM Profile&quot; \u043e\u043d \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044f \u0441\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043e\u0448\u0438\u0431\u043a\u043e\u0439: &nbsp; \u0420\u0435\u0448\u0435\u043d\u0438\u0435: \u041f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 AWS Cli \u043d\u0430\u0439\u0442\u0438 IAM Profile \u0438 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0435\u0433\u043e. \u0421\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 IAM Profile: \u0423\u0434\u0430\u043b\u044f\u0435\u043c \u043d\u0435\u043d\u0443\u0436\u043d\u044b\u0439 IAM Profile:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[49],"tags":[25,51,50,835,14],"_links":{"self":[{"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts\/1103"}],"collection":[{"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1103"}],"version-history":[{"count":1,"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts\/1103\/revisions"}],"predecessor-version":[{"id":1104,"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts\/1103\/revisions\/1104"}],"wp:attachment":[{"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1103"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1103"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1103"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}