crossplane-contrib / provider-jet-aws

AWS Provider for Crossplane that is built with Terrajet.
https://crossplane.io
Apache License 2.0
37 stars 30 forks source link

S3 bucket status is not synced #101

Closed luebken closed 2 years ago

luebken commented 2 years ago

I've used the example to create a bucket but after waiting for 13m it was still reported as not ready & not synced:

kubectl get bucket sample-bucket
NAME            READY   SYNCED   EXTERNAL-NAME                   AGE
sample-bucket   False   False    crossplane-example-bucket-123   13m

I was able to see it in AWS:

aws s3 ls
2021-10-13 17:34:30 crossplane-example-bucket-123
kubectl describe bucket sample-bucket

 Name:         sample-bucket
Namespace:    
Labels:       <none>
Annotations:  crossplane.io/external-create-failed: 2021-10-13T15:48:39Z
              crossplane.io/external-create-pending: 2021-10-13T15:47:48Z
              crossplane.io/external-name: crossplane-example-bucket-123
API Version:  s3.aws.tf.crossplane.io/v1alpha1
Kind:         Bucket
Metadata:
  Creation Timestamp:  2021-10-13T15:32:08Z
  Finalizers:
    finalizer.managedresource.crossplane.io
  Generation:  1
  Managed Fields:
    API Version:  s3.aws.tf.crossplane.io/v1alpha1
    Fields Type:  FieldsV1
    fieldsV1:
      f:metadata:
        f:annotations:
          .:
          f:crossplane.io/external-name:
      f:spec:
        .:
        f:deletionPolicy:
        f:forProvider:
          .:
          f:acl:
          f:region:
          f:tags:
            .:
            f:Name:
        f:providerConfigRef:
          .:
          f:name:
    Manager:      kubectl-create
    Operation:    Update
    Time:         2021-10-13T15:32:08Z
    API Version:  s3.aws.tf.crossplane.io/v1alpha1
    Fields Type:  FieldsV1
    fieldsV1:
      f:metadata:
        f:annotations:
          f:crossplane.io/external-create-failed:
          f:crossplane.io/external-create-pending:
        f:finalizers:
          .:
          v:"finalizer.managedresource.crossplane.io":
      f:status:
        .:
        f:atProvider:
        f:conditions:
    Manager:         crossplane-provider
    Operation:       Update
    Time:            2021-10-13T15:36:25Z
  Resource Version:  317070
  UID:               5db635c8-d0f3-4f17-8d87-c0c6850fbc51
Spec:
  Deletion Policy:  Delete
  For Provider:
    Acl:     private
    Region:  us-west-1
    Tags:
      Name:  SampleBucket
  Provider Config Ref:
    Name:  default
Status:
  At Provider:
  Conditions:
    Last Transition Time:  2021-10-13T15:48:39Z
    Message:               create failed: cannot apply: cannot apply: {"@level":"info","@message":"Terraform 1.0.5","@module":"terraform.ui","@timestamp":"2021-10-13T15:47:48.682170Z","terraform":"1.0.5","type":"version","ui":"0.1.0"}
{"@level":"info","@message":"aws_s3_bucket.sample-bucket: Plan to create","@module":"terraform.ui","@timestamp":"2021-10-13T15:48:32.851619Z","change":{"resource":{"addr":"aws_s3_bucket.sample-bucket","module":"","resource":"aws_s3_bucket.sample-bucket","implied_provider":"aws","resource_type":"aws_s3_bucket","resource_name":"sample-bucket","resource_key":null},"action":"create"},"type":"planned_change"}
{"@level":"info","@message":"Plan: 1 to add, 0 to change, 0 to destroy.","@module":"terraform.ui","@timestamp":"2021-10-13T15:48:32.857075Z","changes":{"add":1,"change":0,"remove":0,"operation":"plan"},"type":"change_summary"}
{"@level":"info","@message":"aws_s3_bucket.sample-bucket: Creating...","@module":"terraform.ui","@timestamp":"2021-10-13T15:48:37.853785Z","hook":{"resource":{"addr":"aws_s3_bucket.sample-bucket","module":"","resource":"aws_s3_bucket.sample-bucket","implied_provider":"aws","resource_type":"aws_s3_bucket","resource_name":"sample-bucket","resource_key":null},"action":"create"},"type":"apply_start"}
{"@level":"info","@message":"aws_s3_bucket.sample-bucket: Creation errored after 1s","@module":"terraform.ui","@timestamp":"2021-10-13T15:48:39.444251Z","hook":{"resource":{"addr":"aws_s3_bucket.sample-bucket","module":"","resource":"aws_s3_bucket.sample-bucket","implied_provider":"aws","resource_type":"aws_s3_bucket","resource_name":"sample-bucket","resource_key":null},"action":"create","elapsed_seconds":1},"type":"apply_errored"}
{"@level":"error","@message":"Error: Error creating S3 bucket: BucketAlreadyOwnedByYou: Your previous request to create the named bucket succeeded and you already own it.\n\tstatus code: 409, request id: 5T6ZJP4APNFG7PCN, host id: rOA3JK1MncRBuJYHn2xJjEQZqYel6V+MW/3mmAjWSh2ROuwqSmnax1eqgpE0DBj4jgLL42HvWxo=","@module":"terraform.ui","@timestamp":"2021-10-13T15:48:39.458290Z","diagnostic":{"severity":"error","summary":"Error creating S3 bucket: BucketAlreadyOwnedByYou: Your previous request to create the named bucket succeeded and you already own it.\n\tstatus code: 409, request id: 5T6ZJP4APNFG7PCN, host id: rOA3JK1MncRBuJYHn2xJjEQZqYel6V+MW/3mmAjWSh2ROuwqSmnax1eqgpE0DBj4jgLL42HvWxo=","detail":"","address":"aws_s3_bucket.sample-bucket","range":{"filename":"main.tf.json","start":{"line":1,"column":325,"byte":324},"end":{"line":1,"column":326,"byte":325}},"snippet":{"context":"resource.aws_s3_bucket.sample-bucket.tags","code":"{\"provider\":{\"tf-provider\":{\"access_key\":\"AKIAUWV6MNN2FJ3KORSO\",\"region\":\"us-west-1\",\"secret_key\":\"HiEPv706uUb+0iVwtgfrS1jEO/YQ6lUFeQPXQQG6\",\"token\":\"\"}},\"resource\":{\"aws_s3_bucket\":{\"sample-bucket\":{\"acl\":\"private\",\"bucket\":\"crossplane-example-bucket-123\",\"lifecycle\":{\"prevent_destroy\":true},\"tags\":{\"Name\":\"SampleBucket\"}}}},\"terraform\":{\"required_providers\":{\"tf-provider\":{\"source\":\"hashicorp/aws\",\"version\":\"3.56.0\"}}}}","start_line":1,"highlight_start_offset":324,"highlight_end_offset":325,"values":[]}},"type":"diagnostic"}
: exit status 1
    Reason:                ReconcileError
    Status:                False
    Type:                  Synced
    Last Transition Time:  2021-10-13T15:36:25Z
    Reason:                Creating
    Status:                False
    Type:                  Ready
Events:
  Type     Reason                         Age   From                                                   Message
  ----     ------                         ----  ----                                                   -------
  Warning  CannotObserveExternalResource  16m   managed/s3.aws.tf.crossplane.io/v1alpha1, kind=bucket  cannot run refresh: cannot refresh: {"@level":"info","@message":"Terraform 1.0.5","@module":"terraform.ui","@timestamp":"2021-10-13T15:32:35.171801Z","terraform":"1.0.5","type":"version","ui":"0.1.0"}
{"@level":"error","@message":"Error: Could not load plugin","@module":"terraform.ui","@timestamp":"2021-10-13T15:32:38.626814Z","diagnostic":{"severity":"error","summary":"Could not load plugin","detail":"\nPlugin reinitialization required. Please run \"terraform init\".\n\nPlugins are external binaries that Terraform uses to access and manipulate\nresources. The configuration provided requires plugins which can't be located,\ndon't satisfy the version constraints, or are otherwise incompatible.\n\nTerraform automatically discovers provider requirements from your\nconfiguration, including providers used in child modules. To see the\nrequirements and constraints, run \"terraform providers\".\n\nfailed to instantiate provider \"registry.terraform.io/hashicorp/aws\" to obtain schema: Unrecognized remote plugin message: \n\nThis usually means that the plugin is either invalid or simply\nneeds to be recompiled to support the latest protocol.\n"},"type":"diagnostic"}
: exit status 1
  Warning  CannotObserveExternalResource  16m  managed/s3.aws.tf.crossplane.io/v1alpha1, kind=bucket  cannot run refresh: cannot refresh: {"@level":"info","@message":"Terraform 1.0.5","@module":"terraform.ui","@timestamp":"2021-10-13T15:33:02.831465Z","terraform":"1.0.5","type":"version","ui":"0.1.0"}
{"@level":"error","@message":"Error: Unrecognized remote plugin message: \n\nThis usually means that the plugin is either invalid or simply\nneeds to be recompiled to support the latest protocol.","@module":"terraform.ui","@timestamp":"2021-10-13T15:33:08.420862Z","diagnostic":{"severity":"error","summary":"Unrecognized remote plugin message: \n\nThis usually means that the plugin is either invalid or simply\nneeds to be recompiled to support the latest protocol.","detail":""},"type":"diagnostic"}
: exit status 1
  Warning  CannotObserveExternalResource  15m  managed/s3.aws.tf.crossplane.io/v1alpha1, kind=bucket  cannot run refresh: cannot refresh: {"@level":"info","@message":"Terraform 1.0.5","@module":"terraform.ui","@timestamp":"2021-10-13T15:33:13.048380Z","terraform":"1.0.5","type":"version","ui":"0.1.0"}
{"@level":"error","@message":"Error: Unrecognized remote plugin message: \n\nThis usually means that the plugin is either invalid or simply\nneeds to be recompiled to support the latest protocol.","@module":"terraform.ui","@timestamp":"2021-10-13T15:33:18.856354Z","diagnostic":{"severity":"error","summary":"Unrecognized remote plugin message: \n\nThis usually means that the plugin is either invalid or simply\nneeds to be recompiled to support the latest protocol.","detail":""},"type":"diagnostic"}
: exit status 1
  Warning  CannotCreateExternalResource  12m  managed/s3.aws.tf.crossplane.io/v1alpha1, kind=bucket  cannot apply: cannot apply: {"@level":"info","@message":"Terraform 1.0.5","@module":"terraform.ui","@timestamp":"2021-10-13T15:33:40.380621Z","terraform":"1.0.5","type":"version","ui":"0.1.0"}
{"@level":"info","@message":"aws_s3_bucket.sample-bucket: Plan to create","@module":"terraform.ui","@timestamp":"2021-10-13T15:34:23.152588Z","change":{"resource":{"addr":"aws_s3_bucket.sample-bucket","module":"","resource":"aws_s3_bucket.sample-bucket","implied_provider":"aws","resource_type":"aws_s3_bucket","resource_name":"sample-bucket","resource_key":null},"action":"create"},"type":"planned_change"}
{"@level":"info","@message":"Plan: 1 to add, 0 to change, 0 to destroy.","@module":"terraform.ui","@timestamp":"2021-10-13T15:34:23.154791Z","changes":{"add":1,"change":0,"remove":0,"operation":"plan"},"type":"change_summary"}
{"@level":"info","@message":"aws_s3_bucket.sample-bucket: Creating...","@module":"terraform.ui","@timestamp":"2021-10-13T15:34:28.325140Z","hook":{"resource":{"addr":"aws_s3_bucket.sample-bucket","module":"","resource":"aws_s3_bucket.sample-bucket","implied_provider":"aws","resource_type":"aws_s3_bucket","resource_name":"sample-bucket","resource_key":null},"action":"create"},"type":"apply_start"}
{"@level":"info","@message":"aws_s3_bucket.sample-bucket: Still creating... [10s elapsed]","@module":"terraform.ui","@timestamp":"2021-10-13T15:34:38.326416Z","hook":{"resource":{"addr":"aws_s3_bucket.sample-bucket","module":"","resource":"aws_s3_bucket.sample-bucket","implied_provider":"aws","resource_type":"aws_s3_bucket","resource_name":"sample-bucket","resource_key":null},"action":"create","elapsed_seconds":10},"type":"apply_progress"}
{"@level":"info","@message":"aws_s3_bucket.sample-bucket: Still creating... [20s elapsed]","@module":"terraform.ui","@timestamp":"2021-10-13T15:34:48.329553Z","hook":{"resource":{"addr":"aws_s3_bucket.sample-bucket","module":"","resource":"aws_s3_bucket.sample-bucket","implied_provider":"aws","resource_type":"aws_s3_bucket","resource_name":"sample-bucket","resource_key":null},"action":"create","elapsed_seconds":20},"type":"apply_progress"}
{"@level":"info","@message":"aws_s3_bucket.sample-bucket: Still creating... [30s elapsed]","@module":"terraform.ui","@timestamp":"2021-10-13T15:34:58.330074Z","hook":{"resource":{"addr":"aws_s3_bucket.sample-bucket","module":"","resource":"aws_s3_bucket.sample-bucket","implied_provider":"aws","resource_type":"aws_s3_bucket","resource_name":"sample-bucket","resource_key":null},"action":"create","elapsed_seconds":30},"type":"apply_progress"}
{"@level":"info","@message":"aws_s3_bucket.sample-bucket: Still creating... [40s elapsed]","@module":"terraform.ui","@timestamp":"2021-10-13T15:35:08.330819Z","hook":{"resource":{"addr":"aws_s3_bucket.sample-bucket","module":"","resource":"aws_s3_bucket.sample-bucket","implied_provider":"aws","resource_type":"aws_s3_bucket","resource_name":"sample-bucket","resource_key":null},"action":"create","elapsed_seconds":40},"type":"apply_progress"}
{"@level":"info","@message":"aws_s3_bucket.sample-bucket: Still creating... [50s elapsed]","@module":"terraform.ui","@timestamp":"2021-10-13T15:35:18.332036Z","hook":{"resource":{"addr":"aws_s3_bucket.sample-bucket","module":"","resource":"aws_s3_bucket.sample-bucket","implied_provider":"aws","resource_type":"aws_s3_bucket","resource_name":"sample-bucket","resource_key":null},"action":"create","elapsed_seconds":50},"type":"apply_progress"}
{"@level":"info","@message":"aws_s3_bucket.sample-bucket: Still creating... [1m0s elapsed]","@module":"terraform.ui","@timestamp":"2021-10-13T15:35:28.332761Z","hook":{"resource":{"addr":"aws_s3_bucket.sample-bucket","module":"","resource":"aws_s3_bucket.sample-bucket","implied_provider":"aws","resource_type":"aws_s3_bucket","resource_name":"sample-bucket","resource_key":null},"action":"create","elapsed_seconds":60},"type":"apply_progress"}
{"@level":"info","@message":"aws_s3_bucket.sample-bucket: Still creating... [1m10s elapsed]","@module":"terraform.ui","@timestamp":"2021-10-13T15:35:38.333640Z","hook":{"resource":{"addr":"aws_s3_bucket.sample-bucket","module":"","resource":"aws_s3_bucket.sample-bucket","implied_provider":"aws","resource_type":"aws_s3_bucket","resource_name":"sample-bucket","resource_key":null},"action":"create","elapsed_seconds":70},"type":"apply_progress"}
{"@level":"info","@message":"aws_s3_bucket.sample-bucket: Still creating... [1m20s elapsed]","@module":"terraform.ui","@timestamp":"2021-10-13T15:35:48.335330Z","hook":{"resource":{"addr":"aws_s3_bucket.sample-bucket","module":"","resource":"aws_s3_bucket.sample-bucket","implied_provider":"aws","resource_type":"aws_s3_bucket","resource_name":"sample-bucket","resource_key":null},"action":"create","elapsed_seconds":80},"type":"apply_progress"}
{"@level":"info","@message":"aws_s3_bucket.sample-bucket: Still creating... [1m30s elapsed]","@module":"terraform.ui","@timestamp":"2021-10-13T15:35:58.336838Z","hook":{"resource":{"addr":"aws_s3_bucket.sample-bucket","module":"","resource":"aws_s3_bucket.sample-bucket","implied_provider":"aws","resource_type":"aws_s3_bucket","resource_name":"sample-bucket","resource_key":null},"action":"create","elapsed_seconds":90},"type":"apply_progress"}
{"@level":"info","@message":"aws_s3_bucket.sample-bucket: Still creating... [1m40s elapsed]","@module":"terraform.ui","@timestamp":"2021-10-13T15:36:08.338816Z","hook":{"resource":{"addr":"aws_s3_bucket.sample-bucket","module":"","resource":"aws_s3_bucket.sample-bucket","implied_provider":"aws","resource_type":"aws_s3_bucket","resource_name":"sample-bucket","resource_key":null},"action":"create","elapsed_seconds":100},"type":"apply_progress"}
{"@level":"info","@message":"aws_s3_bucket.sample-bucket: Still creating... [1m50s elapsed]","@module":"terraform.ui","@timestamp":"2021-10-13T15:36:18.340250Z","hook":{"resource":{"addr":"aws_s3_bucket.sample-bucket","module":"","resource":"aws_s3_bucket.sample-bucket","implied_provider":"aws","resource_type":"aws_s3_bucket","resource_name":"sample-bucket","resource_key":null},"action":"create","elapsed_seconds":110},"type":"apply_progress"}
: signal: killed
  Warning  CannotObserveExternalResource  12m  managed/s3.aws.tf.crossplane.io/v1alpha1, kind=bucket  cannot run refresh: cannot refresh: {"@level":"info","@message":"Terraform 1.0.5","@module":"terraform.ui","@timestamp":"2021-10-13T15:36:56.771267Z","terraform":"1.0.5","type":"version","ui":"0.1.0"}
{"@level":"error","@message":"Error: Could not load plugin","@module":"terraform.ui","@timestamp":"2021-10-13T15:37:00.130002Z","diagnostic":{"severity":"error","summary":"Could not load plugin","detail":"\nPlugin reinitialization required. Please run \"terraform init\".\n\nPlugins are external binaries that Terraform uses to access and manipulate\nresources. The configuration provided requires plugins which can't be located,\ndon't satisfy the version constraints, or are otherwise incompatible.\n\nTerraform automatically discovers provider requirements from your\nconfiguration, including providers used in child modules. To see the\nrequirements and constraints, run \"terraform providers\".\n\nfailed to instantiate provider \"registry.terraform.io/hashicorp/aws\" to obtain schema: Unrecognized remote plugin message: \n\nThis usually means that the plugin is either invalid or simply\nneeds to be recompiled to support the latest protocol.\n"},"type":"diagnostic"}
: exit status 1
  Warning  CannotObserveExternalResource  11m  managed/s3.aws.tf.crossplane.io/v1alpha1, kind=bucket  cannot run refresh: cannot refresh: {"@level":"info","@message":"Terraform 1.0.5","@module":"terraform.ui","@timestamp":"2021-10-13T15:37:04.450951Z","terraform":"1.0.5","type":"version","ui":"0.1.0"}
: signal: segmentation fault (core dumped)
  Warning  CannotCreateExternalResource  11m  managed/s3.aws.tf.crossplane.io/v1alpha1, kind=bucket  cannot apply: cannot apply: {"@level":"info","@message":"Terraform 1.0.5","@module":"terraform.ui","@timestamp":"2021-10-13T15:37:58.212957Z","terraform":"1.0.5","type":"version","ui":"0.1.0"}
{"@level":"error","@message":"Error: Unrecognized remote plugin message: \n\nThis usually means that the plugin is either invalid or simply\nneeds to be recompiled to support the latest protocol.","@module":"terraform.ui","@timestamp":"2021-10-13T15:38:06.429419Z","diagnostic":{"severity":"error","summary":"Unrecognized remote plugin message: \n\nThis usually means that the plugin is either invalid or simply\nneeds to be recompiled to support the latest protocol.","detail":""},"type":"diagnostic"}
: exit status 1
  Warning  CannotObserveExternalResource  10m  managed/s3.aws.tf.crossplane.io/v1alpha1, kind=bucket  cannot run refresh: cannot refresh: {"@level":"info","@message":"Terraform 1.0.5","@module":"terraform.ui","@timestamp":"2021-10-13T15:38:38.870292Z","terraform":"1.0.5","type":"version","ui":"0.1.0"}
{"@level":"error","@message":"Error: Unrecognized remote plugin message: \n\nThis usually means that the plugin is either invalid or simply\nneeds to be recompiled to support the latest protocol.","@module":"terraform.ui","@timestamp":"2021-10-13T15:38:47.576235Z","diagnostic":{"severity":"error","summary":"Unrecognized remote plugin message: \n\nThis usually means that the plugin is either invalid or simply\nneeds to be recompiled to support the latest protocol.","detail":""},"type":"diagnostic"}
: exit status 1
  Warning  CannotCreateExternalResource  10m  managed/s3.aws.tf.crossplane.io/v1alpha1, kind=bucket  cannot apply: cannot apply: {"@level":"info","@message":"Terraform 1.0.5","@module":"terraform.ui","@timestamp":"2021-10-13T15:39:01.336992Z","terraform":"1.0.5","type":"version","ui":"0.1.0"}
{"@level":"error","@message":"Error: Unrecognized remote plugin message: \n\nThis usually means that the plugin is either invalid or simply\nneeds to be recompiled to support the latest protocol.","@module":"terraform.ui","@timestamp":"2021-10-13T15:39:07.274431Z","diagnostic":{"severity":"error","summary":"Unrecognized remote plugin message: \n\nThis usually means that the plugin is either invalid or simply\nneeds to be recompiled to support the latest protocol.","detail":""},"type":"diagnostic"}
: exit status 1
  Warning  CannotCreateExternalResource  9m43s  managed/s3.aws.tf.crossplane.io/v1alpha1, kind=bucket  cannot apply: cannot apply: {"@level":"info","@message":"Terraform 1.0.5","@module":"terraform.ui","@timestamp":"2021-10-13T15:39:21.257250Z","terraform":"1.0.5","type":"version","ui":"0.1.0"}
{"@level":"error","@message":"Error: Plugin did not respond","@module":"terraform.ui","@timestamp":"2021-10-13T15:39:28.751909Z","diagnostic":{"severity":"error","summary":"Plugin did not respond","detail":"The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).GetProviderSchema call. The plugin logs may contain more details.","address":"provider[\"registry.terraform.io/hashicorp/aws\"]","range":{"filename":"main.tf.json","start":{"line":1,"column":152,"byte":151},"end":{"line":1,"column":153,"byte":152}},"snippet":{"context":"provider.tf-provider","code":"{\"provider\":{\"tf-provider\":{\"access_key\":\"AKIAUWV6MNN2FJ3KORSO\",\"region\":\"us-west-1\",\"secret_key\":\"HiEPv706uUb+0iVwtgfrS1jEO/YQ6lUFeQPXQQG6\",\"token\":\"\"}},\"resource\":{\"aws_s3_bucket\":{\"sample-bucket\":{\"acl\":\"private\",\"bucket\":\"crossplane-example-bucket-123\",\"lifecycle\":{\"prevent_destroy\":true},\"tags\":{\"Name\":\"SampleBucket\"}}}},\"terraform\":{\"required_providers\":{\"tf-provider\":{\"source\":\"hashicorp/aws\",\"version\":\"3.56.0\"}}}}","start_line":1,"highlight_start_offset":151,"highlight_end_offset":152,"values":[]}},"type":"diagnostic"}
: exit status 1
  Warning  CannotObserveExternalResource  9m38s  managed/s3.aws.tf.crossplane.io/v1alpha1, kind=bucket  cannot run refresh: cannot refresh: {"@level":"info","@message":"Terraform 1.0.5","@module":"terraform.ui","@timestamp":"2021-10-13T15:39:29.366131Z","terraform":"1.0.5","type":"version","ui":"0.1.0"}
{"@level":"error","@message":"Error: Could not load plugin","@module":"terraform.ui","@timestamp":"2021-10-13T15:39:33.315374Z","diagnostic":{"severity":"error","summary":"Could not load plugin","detail":"\nPlugin reinitialization required. Please run \"terraform init\".\n\nPlugins are external binaries that Terraform uses to access and manipulate\nresources. The configuration provided requires plugins which can't be located,\ndon't satisfy the version constraints, or are otherwise incompatible.\n\nTerraform automatically discovers provider requirements from your\nconfiguration, including providers used in child modules. To see the\nrequirements and constraints, run \"terraform providers\".\n\nfailed to instantiate provider \"registry.terraform.io/hashicorp/aws\" to obtain schema: Unrecognized remote plugin message: \n\nThis usually means that the plugin is either invalid or simply\nneeds to be recompiled to support the latest protocol.\n"},"type":"diagnostic"}
: exit status 1
  Warning  CannotCreateExternalResource  7m35s  managed/s3.aws.tf.crossplane.io/v1alpha1, kind=bucket  cannot apply: cannot apply: {"@level":"info","@message":"Terraform 1.0.5","@module":"terraform.ui","@timestamp":"2021-10-13T15:40:17.677789Z","terraform":"1.0.5","type":"version","ui":"0.1.0"}
{"@level":"info","@message":"aws_s3_bucket.sample-bucket: Plan to create","@module":"terraform.ui","@timestamp":"2021-10-13T15:41:30.536035Z","change":{"resource":{"addr":"aws_s3_bucket.sample-bucket","module":"","resource":"aws_s3_bucket.sample-bucket","implied_provider":"aws","resource_type":"aws_s3_bucket","resource_name":"sample-bucket","resource_key":null},"action":"create"},"type":"planned_change"}
{"@level":"info","@message":"Plan: 1 to add, 0 to change, 0 to destroy.","@module":"terraform.ui","@timestamp":"2021-10-13T15:41:30.539459Z","changes":{"add":1,"change":0,"remove":0,"operation":"plan"},"type":"change_summary"}
{"@level":"info","@message":"aws_s3_bucket.sample-bucket: Creating...","@module":"terraform.ui","@timestamp":"2021-10-13T15:41:35.328323Z","hook":{"resource":{"addr":"aws_s3_bucket.sample-bucket","module":"","resource":"aws_s3_bucket.sample-bucket","implied_provider":"aws","resource_type":"aws_s3_bucket","resource_name":"sample-bucket","resource_key":null},"action":"create"},"type":"apply_start"}
{"@level":"info","@message":"aws_s3_bucket.sample-bucket: Creation errored after 1s","@module":"terraform.ui","@timestamp":"2021-10-13T15:41:36.377023Z","hook":{"resource":{"addr":"aws_s3_bucket.sample-bucket","module":"","resource":"aws_s3_bucket.sample-bucket","implied_provider":"aws","resource_type":"aws_s3_bucket","resource_name":"sample-bucket","resource_key":null},"action":"create","elapsed_seconds":1},"type":"apply_errored"}
{"@level":"error","@message":"Error: Error creating S3 bucket: BucketAlreadyOwnedByYou: Your previous request to create the named bucket succeeded and you already own it.\n\tstatus code: 409, request id: 9QR3M075TQT6P0XN, host id: 1snPeXxt+TplHVf5OoB1QHpU7mkZKITJw6+kS0Wgmj53jCuVpifGPHYGs/ZGc3Ch05PhHaugL9A=","@module":"terraform.ui","@timestamp":"2021-10-13T15:41:36.388433Z","diagnostic":{"severity":"error","summary":"Error creating S3 bucket: BucketAlreadyOwnedByYou: Your previous request to create the named bucket succeeded and you already own it.\n\tstatus code: 409, request id: 9QR3M075TQT6P0XN, host id: 1snPeXxt+TplHVf5OoB1QHpU7mkZKITJw6+kS0Wgmj53jCuVpifGPHYGs/ZGc3Ch05PhHaugL9A=","detail":"","address":"aws_s3_bucket.sample-bucket","range":{"filename":"main.tf.json","start":{"line":1,"column":325,"byte":324},"end":{"line":1,"column":326,"byte":325}},"snippet":{"context":"resource.aws_s3_bucket.sample-bucket.tags","code":"{\"provider\":{\"tf-provider\":{\"access_key\":\"AKIAUWV6MNN2FJ3KORSO\",\"region\":\"us-west-1\",\"secret_key\":\"HiEPv706uUb+0iVwtgfrS1jEO/YQ6lUFeQPXQQG6\",\"token\":\"\"}},\"resource\":{\"aws_s3_bucket\":{\"sample-bucket\":{\"acl\":\"private\",\"bucket\":\"crossplane-example-bucket-123\",\"lifecycle\":{\"prevent_destroy\":true},\"tags\":{\"Name\":\"SampleBucket\"}}}},\"terraform\":{\"required_providers\":{\"tf-provider\":{\"source\":\"hashicorp/aws\",\"version\":\"3.56.0\"}}}}","start_line":1,"highlight_start_offset":324,"highlight_end_offset":325,"values":[]}},"type":"diagnostic"}
: exit status 1
  Warning  CannotObserveExternalResource  7m12s  managed/s3.aws.tf.crossplane.io/v1alpha1, kind=bucket  cannot run refresh: cannot refresh: : signal: segmentation fault (core dumped)
  Warning  CannotCreateExternalResource   5m51s  managed/s3.aws.tf.crossplane.io/v1alpha1, kind=bucket  cannot apply: cannot apply: {"@level":"info","@message":"Terraform 1.0.5","@module":"terraform.ui","@timestamp":"2021-10-13T15:43:14.491834Z","terraform":"1.0.5","type":"version","ui":"0.1.0"}
{"@level":"error","@message":"Error: Unrecognized remote plugin message: \n\nThis usually means that the plugin is either invalid or simply\nneeds to be recompiled to support the latest protocol.","@module":"terraform.ui","@timestamp":"2021-10-13T15:43:20.319540Z","diagnostic":{"severity":"error","summary":"Unrecognized remote plugin message: \n\nThis usually means that the plugin is either invalid or simply\nneeds to be recompiled to support the latest protocol.","detail":""},"type":"diagnostic"}
: exit status 1
  Warning  CannotObserveExternalResource  5m11s  managed/s3.aws.tf.crossplane.io/v1alpha1, kind=bucket  cannot run refresh: cannot refresh: {"@level":"info","@message":"Terraform 1.0.5","@module":"terraform.ui","@timestamp":"2021-10-13T15:43:52.349830Z","terraform":"1.0.5","type":"version","ui":"0.1.0"}
{"@level":"error","@message":"Error: Unrecognized remote plugin message: \n\nThis usually means that the plugin is either invalid or simply\nneeds to be recompiled to support the latest protocol.","@module":"terraform.ui","@timestamp":"2021-10-13T15:44:00.646503Z","diagnostic":{"severity":"error","summary":"Unrecognized remote plugin message: \n\nThis usually means that the plugin is either invalid or simply\nneeds to be recompiled to support the latest protocol.","detail":""},"type":"diagnostic"}
: exit status 1
  Warning  CannotCreateExternalResource  4m13s  managed/s3.aws.tf.crossplane.io/v1alpha1, kind=bucket  cannot apply: cannot apply: {"@level":"info","@message":"Terraform 1.0.5","@module":"terraform.ui","@timestamp":"2021-10-13T15:44:52.403132Z","terraform":"1.0.5","type":"version","ui":"0.1.0"}
{"@level":"error","@message":"Error: Unrecognized remote plugin message: \n\nThis usually means that the plugin is either invalid or simply\nneeds to be recompiled to support the latest protocol.","@module":"terraform.ui","@timestamp":"2021-10-13T15:44:58.131033Z","diagnostic":{"severity":"error","summary":"Unrecognized remote plugin message: \n\nThis usually means that the plugin is either invalid or simply\nneeds to be recompiled to support the latest protocol.","detail":""},"type":"diagnostic"}
: exit status 1
  Warning  CannotCreateExternalResource  3m24s  managed/s3.aws.tf.crossplane.io/v1alpha1, kind=bucket  cannot apply: cannot apply: {"@level":"info","@message":"Terraform 1.0.5","@module":"terraform.ui","@timestamp":"2021-10-13T15:45:44.560264Z","terraform":"1.0.5","type":"version","ui":"0.1.0"}
: signal: segmentation fault (core dumped)
  Warning  CannotObserveExternalResource  102s (x4 over 4m40s)  managed/s3.aws.tf.crossplane.io/v1alpha1, kind=bucket  (combined from similar events): cannot run refresh: cannot refresh: {"@level":"info","@message":"Terraform 1.0.5","@module":"terraform.ui","@timestamp":"2021-10-13T15:47:26.192319Z","terraform":"1.0.5","type":"version","ui":"0.1.0"}
{"@level":"error","@message":"Error: Could not load plugin","@module":"terraform.ui","@timestamp":"2021-10-13T15:47:29.860134Z","diagnostic":{"severity":"error","summary":"Could not load plugin","detail":"\nPlugin reinitialization required. Please run \"terraform init\".\n\nPlugins are external binaries that Terraform uses to access and manipulate\nresources. The configuration provided requires plugins which can't be located,\ndon't satisfy the version constraints, or are otherwise incompatible.\n\nTerraform automatically discovers provider requirements from your\nconfiguration, including providers used in child modules. To see the\nrequirements and constraints, run \"terraform providers\".\n\nfailed to instantiate provider \"registry.terraform.io/hashicorp/aws\" to obtain schema: Unrecognized remote plugin message: \n\nThis usually means that the plugin is either invalid or simply\nneeds to be recompiled to support the latest protocol.\n"},"type":"diagnostic"}
: exit status 1
  Warning  CannotCreateExternalResource  32s  managed/s3.aws.tf.crossplane.io/v1alpha1, kind=bucket  cannot apply: cannot apply: {"@level":"info","@message":"Terraform 1.0.5","@module":"terraform.ui","@timestamp":"2021-10-13T15:47:48.682170Z","terraform":"1.0.5","type":"version","ui":"0.1.0"}
{"@level":"info","@message":"aws_s3_bucket.sample-bucket: Plan to create","@module":"terraform.ui","@timestamp":"2021-10-13T15:48:32.851619Z","change":{"resource":{"addr":"aws_s3_bucket.sample-bucket","module":"","resource":"aws_s3_bucket.sample-bucket","implied_provider":"aws","resource_type":"aws_s3_bucket","resource_name":"sample-bucket","resource_key":null},"action":"create"},"type":"planned_change"}
{"@level":"info","@message":"Plan: 1 to add, 0 to change, 0 to destroy.","@module":"terraform.ui","@timestamp":"2021-10-13T15:48:32.857075Z","changes":{"add":1,"change":0,"remove":0,"operation":"plan"},"type":"change_summary"}
{"@level":"info","@message":"aws_s3_bucket.sample-bucket: Creating...","@module":"terraform.ui","@timestamp":"2021-10-13T15:48:37.853785Z","hook":{"resource":{"addr":"aws_s3_bucket.sample-bucket","module":"","resource":"aws_s3_bucket.sample-bucket","implied_provider":"aws","resource_type":"aws_s3_bucket","resource_name":"sample-bucket","resource_key":null},"action":"create"},"type":"apply_start"}
{"@level":"info","@message":"aws_s3_bucket.sample-bucket: Creation errored after 1s","@module":"terraform.ui","@timestamp":"2021-10-13T15:48:39.444251Z","hook":{"resource":{"addr":"aws_s3_bucket.sample-bucket","module":"","resource":"aws_s3_bucket.sample-bucket","implied_provider":"aws","resource_type":"aws_s3_bucket","resource_name":"sample-bucket","resource_key":null},"action":"create","elapsed_seconds":1},"type":"apply_errored"}
{"@level":"error","@message":"Error: Error creating S3 bucket: BucketAlreadyOwnedByYou: Your previous request to create the named bucket succeeded and you already own it.\n\tstatus code: 409, request id: 5T6ZJP4APNFG7PCN, host id: rOA3JK1MncRBuJYHn2xJjEQZqYel6V+MW/3mmAjWSh2ROuwqSmnax1eqgpE0DBj4jgLL42HvWxo=","@module":"terraform.ui","@timestamp":"2021-10-13T15:48:39.458290Z","diagnostic":{"severity":"error","summary":"Error creating S3 bucket: BucketAlreadyOwnedByYou: Your previous request to create the named bucket succeeded and you already own it.\n\tstatus code: 409, request id: 5T6ZJP4APNFG7PCN, host id: rOA3JK1MncRBuJYHn2xJjEQZqYel6V+MW/3mmAjWSh2ROuwqSmnax1eqgpE0DBj4jgLL42HvWxo=","detail":"","address":"aws_s3_bucket.sample-bucket","range":{"filename":"main.tf.json","start":{"line":1,"column":325,"byte":324},"end":{"line":1,"column":326,"byte":325}},"snippet":{"context":"resource.aws_s3_bucket.sample-bucket.tags","code":"{\"provider\":{\"tf-provider\":{\"access_key\":\"AKIAUWV6MNN2FJ3KORSO\",\"region\":\"us-west-1\",\"secret_key\":\"HiEPv706uUb+0iVwtgfrS1jEO/YQ6lUFeQPXQQG6\",\"token\":\"\"}},\"resource\":{\"aws_s3_bucket\":{\"sample-bucket\":{\"acl\":\"private\",\"bucket\":\"crossplane-example-bucket-123\",\"lifecycle\":{\"prevent_destroy\":true},\"tags\":{\"Name\":\"SampleBucket\"}}}},\"terraform\":{\"required_providers\":{\"tf-provider\":{\"source\":\"hashicorp/aws\",\"version\":\"3.56.0\"}}}}","start_line":1,"highlight_start_offset":324,"highlight_end_offset":325,"values":[]}},"type":"diagnostic"}
: exit status 1
turkenh commented 2 years ago

At a first look, it looks like this has the same root cause as https://github.com/crossplane-contrib/terrajet/issues/114 but happened during the creation of the resource.

luebken commented 2 years ago

Fixed with https://github.com/crossplane-contrib/provider-tf-aws/releases/tag/v0.2.2

thanks a lot