diff --git a/examples/ibm-is-ng/main.tf b/examples/ibm-is-ng/main.tf index 5882720865..4c34a38551 100644 --- a/examples/ibm-is-ng/main.tf +++ b/examples/ibm-is-ng/main.tf @@ -767,6 +767,7 @@ resource "ibm_is_instance" "instance8" { } catalog_offering { version_crn = data.ibm_is_images.imageslist.images.0.catalog_offering.0.version.0.crn + plan_crn = "crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e" } vpc = ibm_is_vpc.vpc2.id zone = "us-south-2" @@ -777,6 +778,7 @@ resource "ibm_is_instance_template" "instancetemplate3" { name = "instancetemplate-3" catalog_offering { version_crn = data.ibm_is_images.imageslist.images.0.catalog_offering.0.version.0.crn + plan_crn = "crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e" } profile = var.profile diff --git a/go.sum b/go.sum index d8964111c4..2e2d8af037 100644 --- a/go.sum +++ b/go.sum @@ -21,25 +21,16 @@ cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmW cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= -cloud.google.com/go v0.110.0 h1:Zc8gqp3+a9/Eyph2KDmcGaPtbKRIoqq4YTlL4NMD0Ys= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v1.19.1 h1:am86mquDUgjGNWxiGn+5PGLbmgiWXlE/yNWpIpNvuXY= -cloud.google.com/go/compute v1.19.1/go.mod h1:6ylj3a05WF8leseCdIf77NK0g1ey+nj5IKd5/kvShxE= -cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= -cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= -cloud.google.com/go/iam v0.13.0 h1:+CmB+K0J/33d0zSQ9SlFWUeCCEn5XJA0ZMZ3pHE9u8k= -cloud.google.com/go/iam v0.13.0/go.mod h1:ljOg+rcNfzZ5d6f1nAUJ8ZIxOaZUVoS14bKCtaLZ/D0= -cloud.google.com/go/kms v1.10.1 h1:7hm1bRqGCA1GBRQUrp831TwJ9TWhP+tvLuP497CQS2g= cloud.google.com/go/kms v1.10.1/go.mod h1:rIWk/TryCkR59GMC3YtHtXeLzd634lBbKenvyySAyYI= -cloud.google.com/go/monitoring v1.13.0 h1:2qsrgXGVoRXpP7otZ14eE1I568zAa92sJSDPyOJvwjM= cloud.google.com/go/monitoring v1.13.0/go.mod h1:k2yMBAB1H9JT/QETjNkgdCGD9bPF712XiLTVr+cBrpw= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= @@ -51,23 +42,16 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= code.cloudfoundry.org/gofileutils v0.0.0-20170111115228-4d0c80011a0f/go.mod h1:sk5LnIjB/nIEU7yP5sDQExVm62wu0pBh3yrElngUisI= -dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= -dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= git.apache.org/thrift.git v0.12.0/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= github.com/Azure/azure-sdk-for-go v36.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v67.2.0+incompatible h1:Uu/Ww6ernvPTrpq31kITVTIm/I5jlJ1wjtEH/bmSB2k= -github.com/Azure/azure-sdk-for-go v67.2.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= -github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= github.com/Azure/go-autorest/autorest v0.9.2/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= github.com/Azure/go-autorest/autorest v0.9.6/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= github.com/Azure/go-autorest/autorest v0.11.1/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw= github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= -github.com/Azure/go-autorest/autorest v0.11.28 h1:ndAExarwr5Y+GaHE6VCaY1kyS/HwwGGyuimVhWsHOEM= -github.com/Azure/go-autorest/autorest v0.11.28/go.mod h1:MrkzG3Y3AH668QyF9KRk5neJnGgmhQ6krbhR8Q5eMvA= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= github.com/Azure/go-autorest/autorest/adal v0.6.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= github.com/Azure/go-autorest/autorest/adal v0.7.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= @@ -75,17 +59,10 @@ github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMl github.com/Azure/go-autorest/autorest/adal v0.9.0/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg= github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= -github.com/Azure/go-autorest/autorest/adal v0.9.20 h1:gJ3E98kMpFB1MFqQCvA1yFab8vthOeD4VlFRQULxahg= -github.com/Azure/go-autorest/autorest/adal v0.9.20/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= github.com/Azure/go-autorest/autorest/azure/auth v0.4.0/go.mod h1:Oo5cRhLvZteXzI2itUm5ziqsoIxRkzrt3t61FeZaS18= -github.com/Azure/go-autorest/autorest/azure/auth v0.5.12 h1:wkAZRgT/pn8HhFyzfe9UnqOjJYqlembgCTi72Bm/xKk= -github.com/Azure/go-autorest/autorest/azure/auth v0.5.12/go.mod h1:84w/uV8E37feW2NCJ08uT9VBfjfUHpgLVnG2InYD6cg= github.com/Azure/go-autorest/autorest/azure/cli v0.3.0/go.mod h1:rNYMNAefZMRowqCV0cVhr/YDW5dD7afFq9nXAXL4ykE= -github.com/Azure/go-autorest/autorest/azure/cli v0.4.5 h1:0W/yGmFdTIT77fvdlGZ0LMISoLHFJ7Tx4U0yeB+uFs4= -github.com/Azure/go-autorest/autorest/azure/cli v0.4.5/go.mod h1:ADQAXrkgm7acgWVUNamOgh8YNrv4p27l3Wc55oVfpzg= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= -github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= @@ -93,24 +70,15 @@ github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/autorest/to v0.3.0/go.mod h1:MgwOyqaIuKdG4TL/2ywSsIWKAfJfgHDo8ObuUk3t5sA= -github.com/Azure/go-autorest/autorest/to v0.4.0 h1:oXVqrxakqqV1UZdSazDOPOLvOIz+XA683u8EctwboHk= -github.com/Azure/go-autorest/autorest/to v0.4.0/go.mod h1:fE8iZBn7LQR7zH/9XU2NcPR4o9jEImooCeWJcYV/zLE= github.com/Azure/go-autorest/autorest/validation v0.2.0/go.mod h1:3EEqHnBxQGHXRYq3HT1WyXAvT7LLY3tl70hw6tQIbjI= -github.com/Azure/go-autorest/autorest/validation v0.3.1 h1:AgyqjAd94fwNAoTjl/WQXg4VvFeRFpO+UhNyRXqF1ac= -github.com/Azure/go-autorest/autorest/validation v0.3.1/go.mod h1:yhLgjC0Wda5DYXl6JAsWyUe4KVNffhoDhG0zVzUMo3E= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= -github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+ZtXWSmf4Tg= github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= -github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/toml v1.2.0 h1:Rt8g24XnyGTyglgET/PRUNlrUeu9F5L+7FilkXfZgs0= -github.com/BurntSushi/toml v1.2.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DataDog/datadog-go v2.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.4.4/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= github.com/IBM-Cloud/bluemix-go v0.0.0-20240423071914-9e96525baef4 h1:43l8CU5cW4pOea10+jWtqRJj/4F4Ghfn6Oc82jB9RhM= @@ -192,28 +160,15 @@ github.com/IBM/vpc-beta-go-sdk v0.6.0 h1:wfM3AcW3zOM3xsRtZ+EA6+sESlGUjQ6Yf4n5QQy github.com/IBM/vpc-beta-go-sdk v0.6.0/go.mod h1:fzHDAQIqH/5yJmYsKodKHLcqxMDT+yfH6vZjdiw8CQA= github.com/IBM/vpc-go-sdk v0.52.0 h1:XZh28TQ0QXHZcHj6i269x/1fVfgJnv3B5e38fyr5aZo= github.com/IBM/vpc-go-sdk v0.52.0/go.mod h1:FoZljso53oB/A2mW7ExsfHXZ3T3XWV7c7R5JSgS4QfY= -github.com/Jeffail/gabs v1.1.1 h1:V0uzR08Hj22EX8+8QMhyI9sX2hwRu+/RJhJUmnwda/E= github.com/Jeffail/gabs v1.1.1/go.mod h1:6xMvQMK4k33lb7GUUpaAPh6nKMmemQeg5d4gn7/bOXc= github.com/Logicalis/asn1 v0.0.0-20190312173541-d60463189a56 h1:vuquMR410psHNax14XKNWa0Ae/kYgWJcXi0IFuX60N0= github.com/Logicalis/asn1 v0.0.0-20190312173541-d60463189a56/go.mod h1:Zb3OT4l0mf7P/GOs2w2Ilj5sdm5Whoq3pa24dAEBHFc= -github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= -github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= -github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= -github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc= -github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= -github.com/Masterminds/sprig v2.22.0+incompatible h1:z4yfnGrZ7netVz+0EDJ0Wi+5VZCSYp4Z0m2dk6cEM60= -github.com/Masterminds/sprig/v3 v3.2.1 h1:n6EPaDyLSvCEa3frruQvAiHuNp2dhBlMSmkEr+HuzGc= -github.com/Masterminds/sprig/v3 v3.2.1/go.mod h1:UoaO7Yp8KlPnJIYWTFkMaqPUYKTfGFPhxNuwnnxkKlk= github.com/Microsoft/go-winio v0.4.13/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= -github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= -github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= -github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/PromonLogicalis/asn1 v0.0.0-20190312173541-d60463189a56 h1:zL3Ph7RCZadAPb7QV0gMIDmjuZHFawNhoPZ5erh6TRw= github.com/PromonLogicalis/asn1 v0.0.0-20190312173541-d60463189a56/go.mod h1:nE9BGpMlMfM9Z3U+P+mWtcHNDwHcGctalMx1VTkODAY= github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 h1:kkhsdkhsCvIsutKu5zLMgWtgh9YxGCNAw8Ad8hjwfYg= github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= @@ -230,8 +185,6 @@ github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWX github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/abdullin/seq v0.0.0-20160510034733-d5467c17e7af/go.mod h1:5Jv4cbFiHJMsVxt52+i0Ha45fjshj6wxYr1r19tB9bw= -github.com/acomagu/bufpipe v1.0.4 h1:e3H4WUzM3npvo5uv95QuJM3cQspFNtFBzvJ2oNjKIDQ= -github.com/acomagu/bufpipe v1.0.4/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= github.com/agext/levenshtein v1.2.2 h1:0S/Yg6LYmFJ5stwQeRp6EeOcCbj7xiqQSdNelsXvaqE= github.com/agext/levenshtein v1.2.2/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= @@ -246,8 +199,6 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20190412020505-60e2075261b6/go.mod h1:T9M45xf79ahXVelWoOBmH0y4aC1t5kXO5BxwyakgIGA= github.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20190620160927-9418d7b0cd0f/go.mod h1:myCDvQSzCW+wB1WAlocEru4wMGJxy+vlxHdhegi1CDQ= -github.com/aliyun/alibaba-cloud-sdk-go v1.62.146 h1:zAH0YjWzonbKHvNkfbxqTmX51uHbkQYu+jJah2IAiCA= -github.com/aliyun/alibaba-cloud-sdk-go v1.62.146/go.mod h1:Api2AkmMgGaSUAhmk76oaFObkoeCPc/bKAqcyplPODs= github.com/aliyun/aliyun-oss-go-sdk v0.0.0-20190307165228-86c17b95fcd5/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8= github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129 h1:MzBOUgng9orim59UnfUTLRjMpd09C5uEVQ6RPGeCaVI= github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129/go.mod h1:rFgpPQZYZ8vdbc+48xibu8ALc3yeyd64IhHS+PU6Yyg= @@ -278,10 +229,7 @@ github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJ github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-proxyproto v0.0.0-20190211145416-68259f75880e/go.mod h1:QmP9hvJ91BbJmGVGSbutW19IC0Q9phDCLGaomwTJbgU= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= @@ -293,17 +241,12 @@ github.com/aws/aws-sdk-go v1.20.6/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN github.com/aws/aws-sdk-go v1.25.37/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.25.41/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48= -github.com/aws/aws-sdk-go v1.44.191 h1:GnbkalCx/AgobaorDMFCa248acmk+91+aHBQOk7ljzU= -github.com/aws/aws-sdk-go v1.44.191/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= -github.com/axiomhq/hyperloglog v0.0.0-20220105174342-98591331716a h1:eqjiAL3qooftPm8b9C1GsSSRcmlw7iOva8vdBTmV2PY= -github.com/axiomhq/hyperloglog v0.0.0-20220105174342-98591331716a/go.mod h1:2stgcRjl6QmW+gU2h5E7BQXg4HU0gzxKWDuT5HviN9s= github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U2H7sSsE2t6Kca0lfwTK8JdoNGS/yzM/4iH5I= github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f/go.mod h1:AuiFmCCPBSrqvVMvuqFuk0qogytodnVFVSN5CeJB8Gc= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bitly/go-hostpool v0.0.0-20171023180738-a3a6125de932/go.mod h1:NOuUCSz6Q9T7+igc/hlvDOUdtWKryOrtFyIVABv/p7k= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= @@ -312,20 +255,13 @@ github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnweb github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= -github.com/boombuler/barcode v1.0.1 h1:NDBbPmhS+EqABEs5Kg3n/5ZNjy73Pz7SIV+KCeqyXcs= -github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/briankassouf/jose v0.9.2-0.20180619214549-d2569464773f/go.mod h1:HQhVmdUf7dBNwIIdBTivnCDxcf6IZY3/zrb+uKSJz6Y= -github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= -github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= -github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v3 v3.0.0/go.mod h1:cIeZDE3IrqwwJl6VUwCN6trj1oXrTS4rc0ij+ULvLYs= github.com/cenkalti/backoff/v3 v3.2.2 h1:cfUAAO3yvKMYKPrvhDuHSwQnhZNk/RMHKdZqKTxfm6M= github.com/cenkalti/backoff/v3 v3.2.2/go.mod h1:cIeZDE3IrqwwJl6VUwCN6trj1oXrTS4rc0ij+ULvLYs= -github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= -github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/centrify/cloud-golang-sdk v0.0.0-20190214225812-119110094d0f/go.mod h1:C0rtzmGXgN78pYR0tGJFhtHgkbAs0lIbHwkB81VxDQE= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= @@ -337,9 +273,7 @@ github.com/chrismalek/oktasdk-go v0.0.0-20181212195951-3430665dfaa0/go.mod h1:5d github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible h1:C29Ae4G5GtYyYMm1aztcyj/J5ckgJm2zwdDajFbx1NY= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= -github.com/circonus-labs/circonusllhist v0.1.3 h1:TJH+oke8D16535+jHExHj4nQvzlZrj7ug5D7I/orNUA= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= @@ -381,8 +315,6 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:ma github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= -github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= @@ -390,34 +322,18 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8Yc github.com/dchest/bcrypt_pbkdf v0.0.0-20150205184540-83f37f9c154a h1:saTgr5tMLFnmy/yg3qDTft4rE5DY2uJ/cCxCe3q0XTU= github.com/dchest/bcrypt_pbkdf v0.0.0-20150205184540-83f37f9c154a/go.mod h1:Bw9BbhOJVNR+t0jCqx2GC6zv0TGBsShs56Y3gfSCvl0= github.com/denisenkom/go-mssqldb v0.0.0-20190412130859-3b1d194e553a/go.mod h1:zAg7JM8CkOJ43xKXIj7eRO9kmWm/TW578qo+oDO6tuM= -github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba h1:p6poVbjHDkKa+wtC8frBMwQtT3BmqGYBjzMwJ63tuR4= -github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0= -github.com/dgryski/go-metro v0.0.0-20180109044635-280f6062b5bc h1:8WFBn63wegobsYAX0YjD+8suexZDga5CctH4CCTx2+8= -github.com/dgryski/go-metro v0.0.0-20180109044635-280f6062b5bc/go.mod h1:c9O8+fpSOX1DM8cPNSkX/qsBWdkD4yd2dpciOWQjpBw= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/digitalocean/godo v1.65.0 h1:3SywGJBC18HaYtPQF+T36jYzXBi+a6eIMonSjDll7TA= -github.com/digitalocean/godo v1.65.0/go.mod h1:p7dOjjtSBqCTUksqtA5Fd3uaKs9kyTq2xcz76ulEJRU= github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8= -github.com/dimchansky/utfbom v1.1.1 h1:vV6w1AhK4VMnhBno/TPVCoK9U/LP0PkLCS9tbxHdi/U= -github.com/dimchansky/utfbom v1.1.1/go.mod h1:SxdoEBH5qIqFocHMyGOXVAybYJdr71b1Q/j0mACtrfE= github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= -github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= -github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v24.0.5+incompatible h1:WmgcE4fxyI6EEXxBRxsHnZXrO1pQ3smi0k/jho4HLeY= -github.com/docker/docker v24.0.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= -github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docker/spdystream v0.0.0-20181023171402-6480d4af844c/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dsnet/compress v0.0.1/go.mod h1:Aw8dCMJ7RioblQeTqt88akK31OvO8Dhf5JflhBbQEHo= github.com/dsnet/golib v0.0.0-20171103203638-1ea166775780/go.mod h1:Lj+Z9rebOhdfkVLjJ8T6VcRQv3SXugXy999NBtR9aFY= -github.com/duosecurity/duo_api_golang v0.0.0-20190308151101-6c680f768e74 h1:2MIhn2R6oXQbgW5yHfS+d6YqyMfXiu2L55rFZC4UD/M= github.com/duosecurity/duo_api_golang v0.0.0-20190308151101-6c680f768e74/go.mod h1:UqXY1lYT/ERa4OEAywUqdok1T4RCRdArkhic1Opuavo= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= @@ -432,15 +348,12 @@ github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFP github.com/elazarl/go-bindata-assetfs v1.0.0/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4= github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= -github.com/elazarl/goproxy v0.0.0-20191011121108-aa519ddbe484 h1:pEtiCjIXx3RvGjlUJuCNxNOw0MNblyR9Wi+vJGBFh+8= github.com/elazarl/goproxy v0.0.0-20191011121108-aa519ddbe484/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2/go.mod h1:gNh8nYJoAm43RfaxurUnxr+N1PwuFV3ZMl/efxlIlY8= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful/v3 v3.10.0 h1:X4gma4HM7hFm6WMeAsTfqA0GOfdNoCzBIkHGoRLGXuM= github.com/emicklei/go-restful/v3 v3.10.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= -github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= -github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -455,8 +368,6 @@ github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLi github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= -github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch/v5 v5.5.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= @@ -469,13 +380,10 @@ github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= -github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= -github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/frankban/quicktest v1.4.0/go.mod h1:36zfPVQyHxymz4cH7wlDmVwDrJuljRB60qkgn7rorfQ= github.com/frankban/quicktest v1.4.1/go.mod h1:36zfPVQyHxymz4cH7wlDmVwDrJuljRB60qkgn7rorfQ= github.com/frankban/quicktest v1.10.0/go.mod h1:ui7WezCLWMWxVWr1GETZY3smRy0G4KWq9vcPtJmFl7Y= github.com/frankban/quicktest v1.13.0/go.mod h1:qLE0fzW0VuyUAJgPU19zByoIr0HtCHN/r/VLSOOIySU= -github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= @@ -495,12 +403,6 @@ github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0 github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/go-asn1-ber/asn1-ber v1.3.1/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= -github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= -github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= -github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU= -github.com/go-git/go-billy/v5 v5.5.0/go.mod h1:hmexnoNsr2SJU1Ju67OaNz5ASJY3+sHgFRpCtpDCKow= -github.com/go-git/go-git/v5 v5.9.0 h1:cD9SFA7sHVRdJ7AYck1ZaAa/yeuBvGPxwXDL8cxrObY= -github.com/go-git/go-git/v5 v5.9.0/go.mod h1:RKIqga24sWdMGZF+1Ekv9kylsDz6LzdTSI2s/OsZWE0= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -528,12 +430,8 @@ github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ4 github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v0.1.0/go.mod h1:tabnROwaDl0UNxkVeFRbY8bwB37GwRv0P8lg6aAiEnk= -github.com/go-logr/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A= -github.com/go-logr/zapr v1.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa2oG4= github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= -github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= -github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= @@ -610,12 +508,8 @@ github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2K github.com/go-openapi/validate v0.19.5/go.mod h1:8DJv2CVJQ6kGNpFW6eV9N3JviE1C85nY1c2z52x1Gk4= github.com/go-openapi/validate v0.22.4 h1:5v3jmMyIPKTR8Lv9syBAIRxG6lY0RqeBPB1LKEijzk8= github.com/go-openapi/validate v0.22.4/go.mod h1:qm6O8ZIcPVdSY5219468Jv7kBdGvkiZLPOmqnqTUZ2A= -github.com/go-ozzo/ozzo-validation v3.6.0+incompatible h1:msy24VGS42fKO9K1vLz82/GeYW1cILu7Nuuj1N3BBkE= -github.com/go-ozzo/ozzo-validation v3.6.0+incompatible/go.mod h1:gsEKFIVnabGBt6mXmxK0MoFy+cZoTJY6mu5Ll3LVLBU= github.com/go-ozzo/ozzo-validation/v4 v4.3.0 h1:byhDUpfEwjsVQb1vBunvIjh2BHQ9ead57VkAEY4V+Es= github.com/go-ozzo/ozzo-validation/v4 v4.3.0/go.mod h1:2NKgrcHl3z6cJs+3Oo940FPRiTzuqKbvfrL2RxCj6Ew= -github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= -github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.12.1/go.mod h1:IUMDtCfWo/w/mtMfIE/IG2K+Ey3ygWanZIBtBW0W2TM= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= @@ -630,17 +524,12 @@ github.com/go-playground/validator/v10 v10.19.0 h1:ol+5Fu+cSq9JD7SoSqe04GMI92cbn github.com/go-playground/validator/v10 v10.19.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= -github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= -github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/go-test/deep v1.0.1/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/go-test/deep v1.0.2/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= -github.com/go-test/deep v1.1.0 h1:WOcxcdHcvdgThNXjw0t76K42FXTU7HpNQWHpA2HHNlg= -github.com/go-test/deep v1.1.0/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= github.com/go-yaml/yaml v2.1.0+incompatible/go.mod h1:w2MrLa16VYP0jy6N7M5kHaCkaLENm+P+Tv+MfurjSw0= github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= @@ -678,8 +567,6 @@ github.com/golang-jwt/jwt v3.2.1+incompatible h1:73Z+4BJcrTC+KczS6WvTPvRGOp1WmfE github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= -github.com/golang-jwt/jwt/v4 v4.4.2 h1:rcc4lwaZgFMCZ5jxF9ABolDcIHdBytAFgqFPbSJQAYs= -github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20180513044358-24b0969c4cb7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -687,7 +574,6 @@ github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4er github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= @@ -746,7 +632,6 @@ github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= -github.com/google/go-metrics-stackdriver v0.2.0 h1:rbs2sxHAPn2OtUj9JdR/Gij1YKGl0BTVD0augB+HEjE= github.com/google/go-metrics-stackdriver v0.2.0/go.mod h1:KLcPyp3dWJAFD+yHisGlJSZktIsTjb50eB72U2YZ9K0= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= @@ -771,8 +656,6 @@ github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20230510103437-eeec1cb781c3 h1:2XF1Vzq06X+inNqgJ9tRnGuw+ZVCB3FazXODD6JE1R8= -github.com/google/pprof v0.0.0-20230510103437-eeec1cb781c3/go.mod h1:79YE0hCXdHag9sBkw2o+N/YnZtTkXi0UT9Nnixa5eYk= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -781,19 +664,14 @@ github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/enterprise-certificate-proxy v0.2.3 h1:yk9/cqRKtT9wXZSsRH9aurXEpJX+U6FLtpYTdC3R06k= -github.com/googleapis/enterprise-certificate-proxy v0.2.3/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.7.1 h1:gF4c0zjUP2H/s/hEGyLA3I0fA2ZWjzYiONAD6cvPr8A= -github.com/googleapis/gax-go/v2 v2.7.1/go.mod h1:4orTrqY6hXxxaUL4LHIPl6lGo8vAE38/qKbhSAKP6QI= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.3.1/go.mod h1:on+2t9HRStVgn95RSsFWFz+6Q0Snyqv1awfrALZdbtU= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= -github.com/gophercloud/gophercloud v0.1.0 h1:P/nh25+rzXouhytV2pUHBb65fnds26Ghl8/391+sT5o= github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= github.com/gopherjs/gopherjs v0.0.0-20180628210949-0892b62f0d9f/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= @@ -817,7 +695,6 @@ github.com/grpc-ecosystem/grpc-gateway v1.6.2/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpg github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 h1:2VTzZjLZBgl62/EtslCrtky5vbi9dd7HrQPQIx6wqiw= github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI= github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed/go.mod h1:tMWxXQ9wFIaZeTI9F+hmhFiGpFmhOHzyShyFUhRm0H4= github.com/hashicorp/consul-template v0.25.0/go.mod h1:/vUsrJvDuuQHcxEw0zik+YXTS7ZKWZjQeaQhshBmfH0= @@ -828,8 +705,6 @@ github.com/hashicorp/consul/sdk v0.4.0/go.mod h1:fY08Y9z5SvJqevyZNy6WWPXiG3KwBPA github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/eventlogger v0.1.1 h1:zyCjxsy7KunFsMPZKU5PnwWEakSrp1zjj2vPFmrDaeo= -github.com/hashicorp/eventlogger v0.1.1/go.mod h1://CHt6/j+Q2lc0NlUB5af4aS2M0c0aVBg9/JfcpAyhM= github.com/hashicorp/go-checkpoint v0.5.0 h1:MFYpPZCnQqQTE18jFwSII6eUQrD/oxMFp3mlgcqk5mU= github.com/hashicorp/go-checkpoint v0.5.0/go.mod h1:7nfLNL10NsxqO4iWuW6tWW0HjZuDrwkBuEQsVcpCOgg= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= @@ -838,8 +713,6 @@ github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9n github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 h1:1/D3zfFHttUKaCaGKZ/dR2roBXv0vKbSCnssIldfQdI= github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320/go.mod h1:EiZBMaudVLy8fmjf9Npq1dq9RalhveqZG5w/yz3mHWs= -github.com/hashicorp/go-discover v0.0.0-20210818145131-c573d69da192 h1:eje2KOX8Sf7aYPiAsLnpWdAIrGRMcpFjN/Go/Exb7Zo= -github.com/hashicorp/go-discover v0.0.0-20210818145131-c573d69da192/go.mod h1:3/4dzY4lR1Hzt9bBqMhBzG7lngZ0GKx/nL6G/ad62wE= github.com/hashicorp/go-gatedio v0.5.0/go.mod h1:Lr3t8L6IyxD3DAeaUxGcgl2JnRUpWMCsmBl4Omu/2t4= github.com/hashicorp/go-gcp-common v0.5.0/go.mod h1:IDGUI2N/OS3PiU4qZcXJeWKPI6O/9Y8hOrbSiMcqyYw= github.com/hashicorp/go-gcp-common v0.6.0/go.mod h1:RuZi18562/z30wxOzpjeRrGcmk9Ro/rBzixaSZDhIhY= @@ -859,35 +732,12 @@ github.com/hashicorp/go-immutable-radix v1.1.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjh github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-kms-wrapping v0.0.0-20191129225826-634facde9f88/go.mod h1:Pm+Umb/6Gij6ZG534L7QDyvkauaOQWGb+arj9aFjCE0= -github.com/hashicorp/go-kms-wrapping v0.5.1 h1:Ed6Z5gV3LY3J9Ora4cwxVmV8Hyt6CPOTrQoGIPry2Ew= github.com/hashicorp/go-kms-wrapping v0.5.1/go.mod h1:cGIibZmMx9qlxS1pZTUrEgGqA+7u3zJyvVYMhjU2bDs= -github.com/hashicorp/go-kms-wrapping/entropy v0.1.0 h1:xuTi5ZwjimfpvpL09jDE71smCBRpnF5xfo871BSX4gs= github.com/hashicorp/go-kms-wrapping/entropy v0.1.0/go.mod h1:d1g9WGtAunDNpek8jUIEJnBlbgKS1N2Q61QkHiZyR1g= -github.com/hashicorp/go-kms-wrapping/entropy/v2 v2.0.0 h1:pSjQfW3vPtrOTcasTUKgCTQT7OGPPTTMVRrOfU6FJD8= github.com/hashicorp/go-kms-wrapping/entropy/v2 v2.0.0/go.mod h1:xvb32K2keAc+R8DSFG2IwDcydK9DBQE+fGA5fsw6hSk= -github.com/hashicorp/go-kms-wrapping/v2 v2.0.9-0.20230228100945-740d2999c798 h1:22yjMhn+kJ7u8RaP5qcYEn02zHWnIg1/JxE4BL8JLtQ= -github.com/hashicorp/go-kms-wrapping/v2 v2.0.9-0.20230228100945-740d2999c798/go.mod h1:iRHxwFG8L24HhemSuvDYtuwVkjkl+OkTLvQ5bmqzAqE= -github.com/hashicorp/go-kms-wrapping/wrappers/aead/v2 v2.0.7-1 h1:ZV26VJYcITBom0QqYSUOIj4HOHCVPEFjLqjxyXV/AbA= -github.com/hashicorp/go-kms-wrapping/wrappers/aead/v2 v2.0.7-1/go.mod h1:b99cDSA+OzcyRoBZroSf174/ss/e6gUuS45wue9ZQfc= -github.com/hashicorp/go-kms-wrapping/wrappers/alicloudkms/v2 v2.0.1 h1:ydUCtmr8f9F+mHZ1iCsvzqFTXqNVpewX3s9zcYipMKI= -github.com/hashicorp/go-kms-wrapping/wrappers/alicloudkms/v2 v2.0.1/go.mod h1:Sl/ffzV57UAyjtSg1h5Km0rN5+dtzZJm1CUztkoCW2c= -github.com/hashicorp/go-kms-wrapping/wrappers/awskms/v2 v2.0.7 h1:E3eEWpkofgPNrYyYznfS1+drq4/jFcqHQVNcL7WhUCo= -github.com/hashicorp/go-kms-wrapping/wrappers/awskms/v2 v2.0.7/go.mod h1:j5vefRoguQUG7iM4reS/hKIZssU1lZRqNPM5Wow6UnM= -github.com/hashicorp/go-kms-wrapping/wrappers/azurekeyvault/v2 v2.0.8-0.20230905162003-bfa3347a7c85 h1:yZqD2ZQ4kWyVI2reKGC8Hl78ywWBtl1iLz/Bb5GBvMA= -github.com/hashicorp/go-kms-wrapping/wrappers/azurekeyvault/v2 v2.0.8-0.20230905162003-bfa3347a7c85/go.mod h1:0mKsr+G70TGABNbdS5dGiZTVoXe9qM/mhEIQL3lOQRc= -github.com/hashicorp/go-kms-wrapping/wrappers/gcpckms/v2 v2.0.8 h1:16I8OqBEuxZIowwn3jiLvhlx+z+ia4dJc9stvz0yUBU= -github.com/hashicorp/go-kms-wrapping/wrappers/gcpckms/v2 v2.0.8/go.mod h1:6QUMo5BrXAtbzSuZilqmx0A4px2u6PeFK7vfp2WIzeM= -github.com/hashicorp/go-kms-wrapping/wrappers/ocikms/v2 v2.0.7 h1:KeG3QGrbxbr2qAqCJdf3NR4ijAYwdcWLTmwSbR0yusM= -github.com/hashicorp/go-kms-wrapping/wrappers/ocikms/v2 v2.0.7/go.mod h1:rXxYzjjGw4HltEwxPp9zYSRIo6R+rBf1MSPk01bvodc= -github.com/hashicorp/go-kms-wrapping/wrappers/transit/v2 v2.0.7 h1:G25tZFw/LrAzJWxvS0/BFI7V1xAP/UsAIsgBwiE0mwo= -github.com/hashicorp/go-kms-wrapping/wrappers/transit/v2 v2.0.7/go.mod h1:hxNA5oTfAvwPacWVg1axtF/lvTafwlAa6a6K4uzWHhw= github.com/hashicorp/go-memdb v1.0.2/go.mod h1:I6dKdmYhZqU0RJSheVEWgTNWdVQH5QvTgIUQ0t/t32M= -github.com/hashicorp/go-memdb v1.3.4 h1:XSL3NR682X/cVk2IeV0d70N4DZ9ljI885xAEU8IoK3c= -github.com/hashicorp/go-memdb v1.3.4/go.mod h1:uBTr1oQbtuMgd1SSGoR8YV27eT3sBHbYiNm53bMpgSg= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-msgpack v1.1.5 h1:9byZdVjKTe5mce63pRVNP1L7UAmdHOTEMGehn6KvJWs= -github.com/hashicorp/go-msgpack v1.1.5/go.mod h1:gWVc3sv/wbDmR3rQsj1CAktEZzoz1YNK9NfGLXJ69/4= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= @@ -896,7 +746,6 @@ github.com/hashicorp/go-plugin v1.0.1/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn github.com/hashicorp/go-plugin v1.4.3/go.mod h1:5fGEH17QVwTTcR0zV7yhDPLLmFX9YSZ38b18Udy6vYQ= github.com/hashicorp/go-plugin v1.5.1 h1:oGm7cWBaYIp3lJpx1RUEfLWophprE2EV/KUeqBYo+6k= github.com/hashicorp/go-plugin v1.5.1/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= -github.com/hashicorp/go-raftchunking v0.6.3-0.20191002164813-7e9e8525653a h1:FmnBDwGwlTgugDGbVxwV8UavqSMACbGrUpfc98yFLR4= github.com/hashicorp/go-raftchunking v0.6.3-0.20191002164813-7e9e8525653a/go.mod h1:xbXnmKqX9/+RhPkJ4zrEx4738HacP72aaUPlT2RZ4sU= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-retryablehttp v0.5.4/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= @@ -910,30 +759,17 @@ github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa github.com/hashicorp/go-rootcerts v1.0.1/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= -github.com/hashicorp/go-secure-stdlib/awsutil v0.1.6 h1:W9WN8p6moV1fjKLkeqEgkAMu5rauy9QeYDAmIaPuuiA= -github.com/hashicorp/go-secure-stdlib/awsutil v0.1.6/go.mod h1:MpCPSPGLDILGb4JMm94/mMi3YysIqsXzGCzkEZjcjXg= github.com/hashicorp/go-secure-stdlib/base62 v0.1.1/go.mod h1:EdWO6czbmthiwZ3/PUsDV+UD1D5IRU4ActiaWGwt0Yw= -github.com/hashicorp/go-secure-stdlib/base62 v0.1.2 h1:ET4pqyjiGmY09R5y+rSd70J2w45CtbWDNvGqWp/R3Ng= -github.com/hashicorp/go-secure-stdlib/base62 v0.1.2/go.mod h1:EdWO6czbmthiwZ3/PUsDV+UD1D5IRU4ActiaWGwt0Yw= github.com/hashicorp/go-secure-stdlib/mlock v0.1.1/go.mod h1:zq93CJChV6L9QTfGKtfBxKqD7BqqXx5O04A/ns2p5+I= -github.com/hashicorp/go-secure-stdlib/mlock v0.1.2 h1:p4AKXPPS24tO8Wc8i1gLvSKdmkiSY5xuju57czJ/IJQ= -github.com/hashicorp/go-secure-stdlib/mlock v0.1.2/go.mod h1:zq93CJChV6L9QTfGKtfBxKqD7BqqXx5O04A/ns2p5+I= github.com/hashicorp/go-secure-stdlib/parseutil v0.1.1/go.mod h1:QmrqtbKuxxSWTN3ETMPuB+VtEiBJ/A9XhoYGv8E1uD8= github.com/hashicorp/go-secure-stdlib/parseutil v0.1.6/go.mod h1:QmrqtbKuxxSWTN3ETMPuB+VtEiBJ/A9XhoYGv8E1uD8= github.com/hashicorp/go-secure-stdlib/parseutil v0.1.7 h1:UpiO20jno/eV1eVZcxqWnUohyKRe1g8FPV/xH1s/2qs= github.com/hashicorp/go-secure-stdlib/parseutil v0.1.7/go.mod h1:QmrqtbKuxxSWTN3ETMPuB+VtEiBJ/A9XhoYGv8E1uD8= -github.com/hashicorp/go-secure-stdlib/password v0.1.1 h1:6JzmBqXprakgFEHwBgdchsjaA9x3GyjdI568bXKxa60= github.com/hashicorp/go-secure-stdlib/password v0.1.1/go.mod h1:9hH302QllNwu1o2TGYtSk8I8kTAN0ca1EHpwhm5Mmzo= -github.com/hashicorp/go-secure-stdlib/plugincontainer v0.1.1 h1:1F0n5stk5uz4yIw2elN3k6bGbIv95OQaJVR2sVQ1kk0= -github.com/hashicorp/go-secure-stdlib/plugincontainer v0.1.1/go.mod h1:kRpzC4wHYXc2+sjXA9vuKawXYs0x0d0HuqqbaW1fj1w= -github.com/hashicorp/go-secure-stdlib/reloadutil v0.1.1 h1:SMGUnbpAcat8rIKHkBPjfv81yC46a8eCNZ2hsR2l1EI= -github.com/hashicorp/go-secure-stdlib/reloadutil v0.1.1/go.mod h1:Ch/bf00Qnx77MZd49JRgHYqHQjtEmTgGU2faufpVZb0= github.com/hashicorp/go-secure-stdlib/strutil v0.1.1/go.mod h1:gKOamz3EwoIoJq7mlMIRBpVTAUn8qPCrEclOKKWhD3U= github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 h1:kes8mmyCpxJsI7FTwtzRqEy9CdjCtrXrXGuOpxEA7Ts= github.com/hashicorp/go-secure-stdlib/strutil v0.1.2/go.mod h1:Gou2R9+il93BqX25LAKCLuM+y9U2T4hlwvT1yprcna4= github.com/hashicorp/go-secure-stdlib/tlsutil v0.1.1/go.mod h1:l8slYwnJA26yBz+ErHpp2IRCLr0vuOMGBORIz4rRiAs= -github.com/hashicorp/go-secure-stdlib/tlsutil v0.1.2 h1:phcbL8urUzF/kxA/Oj6awENaRwfWsjP59GW7u2qlDyY= -github.com/hashicorp/go-secure-stdlib/tlsutil v0.1.2/go.mod h1:l8slYwnJA26yBz+ErHpp2IRCLr0vuOMGBORIz4rRiAs= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-sockaddr v1.0.2 h1:ztczhD1jLxIRjVejw8gFomI1BQZOe2WoVOu0SyteCQc= github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= @@ -962,29 +798,16 @@ github.com/hashicorp/hcl v1.0.1-vault-5 h1:kI3hhbbyzr4dldA8UdTb7ZlVVlI2DACdCfz31 github.com/hashicorp/hcl v1.0.1-vault-5/go.mod h1:XYhtn6ijBSAj6n4YqAaf7RBPS4I06AItNorpy+MoQNM= github.com/hashicorp/hcl/v2 v2.19.1 h1://i05Jqznmb2EXqa39Nsvyan2o5XyMowW5fnCKW5RPI= github.com/hashicorp/hcl/v2 v2.19.1/go.mod h1:ThLC89FV4p9MPW804KVbe/cEXoQ8NZEh+JtMeeGErHE= -github.com/hashicorp/hcp-sdk-go v0.23.0 h1:3WarkQSK0VzxJaH6psHIGQagag3ujL+NjWagZZHpiZM= -github.com/hashicorp/hcp-sdk-go v0.23.0/go.mod h1:/9UoDY2FYYA8lFaKBb2HmM/jKYZGANmf65q9QRc/cVw= github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= -github.com/hashicorp/mdns v1.0.4 h1:sY0CMhFmjIPDMlTB+HfymFHCaYLhgifZ0QhjaYKD/UQ= -github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/memberlist v0.1.4/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/nomad/api v0.0.0-20191220223628-edc62acd919d/go.mod h1:WKCL+tLVhN1D+APwH3JiTRZoxcdwRk86bWu1LVCUPaE= github.com/hashicorp/raft v1.0.1/go.mod h1:DVSAWItjLjTOkVbSpWQ0j0kUADIvDaCtBxIcbNAQLkI= github.com/hashicorp/raft v1.1.2-0.20191002163536-9c6bd3e3eb17/go.mod h1:vPAJM8Asw6u8LxC3eJCUZmRP/E4QmUGE1R7g7k8sG/8= -github.com/hashicorp/raft v1.3.10 h1:LR5QZX1VQd0DFWZfeCwWawyeKfpS/Tm1yjnJIY5X4Tw= -github.com/hashicorp/raft v1.3.10/go.mod h1:J8naEwc6XaaCfts7+28whSeRvCqTd6e20BlCU3LtEO4= -github.com/hashicorp/raft-autopilot v0.2.0 h1:2/R2RPgamgRKgNWGQioULZvjeKXQZmDuw5Ty+6c+H7Y= -github.com/hashicorp/raft-autopilot v0.2.0/go.mod h1:q6tZ8UAZ5xio2gv2JvjgmtOlh80M6ic8xQYBe2Egkg8= -github.com/hashicorp/raft-boltdb v0.0.0-20171010151810-6e5ba93211ea h1:xykPFhrBAS2J0VBzVa5e80b5ZtYuNQtgXjN40qBZlD4= github.com/hashicorp/raft-boltdb v0.0.0-20171010151810-6e5ba93211ea/go.mod h1:pNv7Wc3ycL6F5oOWn+tPGo2gWD4a5X+yp/ntwdKLjRk= -github.com/hashicorp/raft-boltdb/v2 v2.0.0-20210421194847-a7e34179d62c h1:oiKun9QlrOz5yQxMZJ3tf1kWtFYuKSJzxzEDxDPevj4= -github.com/hashicorp/raft-boltdb/v2 v2.0.0-20210421194847-a7e34179d62c/go.mod h1:kiPs9g148eLShc2TYagUAyKDnD+dH9U+CQKsXzlY9xo= github.com/hashicorp/raft-snapshot v1.0.2-0.20190827162939-8117efcc5aab/go.mod h1:5sL9eUn72lH5DzsFIJ9jaysITbHksSSszImWSOTC8Ic= -github.com/hashicorp/raft-snapshot v1.0.4 h1:EuDuayAJPdiDmVk1ygTDnG2zDzrs0/6/yBuma1IYSow= -github.com/hashicorp/raft-snapshot v1.0.4/go.mod h1:5sL9eUn72lH5DzsFIJ9jaysITbHksSSszImWSOTC8Ic= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hashicorp/serf v0.8.3/go.mod h1:UpNcs7fFbpKIyZaUuSW6EPiH+eZC7OuyFD+wc1oal+k= github.com/hashicorp/terraform-exec v0.19.0 h1:FpqZ6n50Tk95mItTSS9BjeOVUb4eg81SpgVtZNNtFSM= @@ -1049,8 +872,6 @@ github.com/hashicorp/vault/sdk v0.3.0/go.mod h1:aZ3fNuL5VNydQk8GcLJ2TV8YCRVvyaak github.com/hashicorp/vault/sdk v0.6.0/go.mod h1:+DRpzoXIdMvKc88R4qxr+edwy/RvH5QK8itmxLiDHLc= github.com/hashicorp/vault/sdk v0.10.0 h1:dDAe1mMG7Qqor1h3i7TU70ykwJy8ijyWeZZkN2CB0j4= github.com/hashicorp/vault/sdk v0.10.0/go.mod h1:s9F8+FF/Q9HuChoi1OWnIPoHRU6V675qHhCYkXVPPQE= -github.com/hashicorp/vic v1.5.1-0.20190403131502-bbfe86ec9443 h1:O/pT5C1Q3mVXMyuqg7yuAWUg/jMZR1/0QTzTRdNR6Uw= -github.com/hashicorp/vic v1.5.1-0.20190403131502-bbfe86ec9443/go.mod h1:bEpDU35nTu0ey1EXjwNwPjI9xErAsoOCmcMb9GKvyxo= github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= @@ -1058,8 +879,6 @@ github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbg github.com/hokaccha/go-prettyjson v0.0.0-20170213120834-e6b9231a2b1c h1:vlXZsaTgJ55QZrAkOrpq0tsJmuuM4ky5OMZOvXnhvqE= github.com/hokaccha/go-prettyjson v0.0.0-20170213120834-e6b9231a2b1c/go.mod h1:pFlLw2CfqZiIBOx6BuCeRLCrfxBJipTY0nIOF/VbGcI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/huandu/xstrings v1.3.2 h1:L18LIDzqlW6xN2rEkpdV8+oL/IXWJ1APd+vsdYy4Wdw= -github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= @@ -1072,10 +891,7 @@ github.com/influxdata/influxdb v0.0.0-20190411212539-d24b7ba8c4c4/go.mod h1:qZna github.com/jackc/fake v0.0.0-20150926172116-812a484cc733/go.mod h1:WrMFNQdiFJ80sQsxDoMokWK1W5TQtxBFNpzWTD84ibQ= github.com/jackc/pgx v3.3.0+incompatible/go.mod h1:0ZGrqGqkRlliWnWB4zKnWtjbSWbGkVEFm4TeybAXq+I= github.com/jarcoal/httpmock v1.0.5/go.mod h1:ATjnClrvW/3tijVmpL/va5Z3aAyGvqU3gCT8nX0Txik= -github.com/jarcoal/httpmock v1.0.7 h1:d1a2VFpSdm5gtjhCPWsQHSnx8+5V3ms5431YwvmkuNk= github.com/jarcoal/httpmock v1.0.7/go.mod h1:ATjnClrvW/3tijVmpL/va5Z3aAyGvqU3gCT8nX0Txik= -github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= -github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jcmturner/aescts v1.0.1/go.mod h1:k9gJoDUf1GH5r2IBtBjwjDCoLELYxOcEhitdP8RL7qQ= github.com/jcmturner/aescts/v2 v2.0.0 h1:9YKLH6ey7H4eDBXW8khjYslgyqG2xZikXP0EQFKrle8= github.com/jcmturner/aescts/v2 v2.0.0/go.mod h1:AiaICIRyfYg35RUkr8yESTqvSy7csK90qZ5xfvvsoNs= @@ -1085,7 +901,6 @@ github.com/jcmturner/dnsutils/v2 v2.0.0/go.mod h1:b0TnjGOvI/n42bZa+hmXL+kFJZsFT7 github.com/jcmturner/gofork v1.0.0/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= github.com/jcmturner/gofork v1.7.6 h1:QH0l3hzAU1tfT3rZCnW5zXl+orbkNMMRGJfdJjHVETg= github.com/jcmturner/gofork v1.7.6/go.mod h1:1622LH6i/EZqLloHfE7IeZ0uEJwMSUyQ/nDd82IeqRo= -github.com/jcmturner/goidentity/v6 v6.0.1 h1:VKnZd2oEIMorCTsFBnJWbExfNN7yZr3EhJAxwOkZg6o= github.com/jcmturner/goidentity/v6 v6.0.1/go.mod h1:X1YW3bgtvwAXju7V3LCIMpY0Gbxyjn/mY9zx4tFonSg= github.com/jcmturner/gokrb5/v8 v8.0.0/go.mod h1:4/sqKY8Yzo/TIQ8MoCyk/EPcjb+czI9czxHcdXuZbFA= github.com/jcmturner/gokrb5/v8 v8.4.4 h1:x1Sv4HaTpepFkXbt2IkL29DXRf8sOfZXo8eRKh687T8= @@ -1094,29 +909,21 @@ github.com/jcmturner/rpc/v2 v2.0.2/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJk github.com/jcmturner/rpc/v2 v2.0.3 h1:7FXXj8Ti1IaVFpSAziCZWNzbNuZmnvw/i6CqLNdWfZY= github.com/jcmturner/rpc/v2 v2.0.3/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJki3ELg/Hc= github.com/jeffchao/backoff v0.0.0-20140404060208-9d7fd7aa17f2/go.mod h1:xkfESuHriIekR+4RoV+fu91j/CfnYM29Zi2tMFw5iD4= -github.com/jefferai/isbadcipher v0.0.0-20190226160619-51d2077c035f h1:E87tDTVS5W65euzixn7clSzK66puSt1H4I5SC0EmHH4= github.com/jefferai/isbadcipher v0.0.0-20190226160619-51d2077c035f/go.mod h1:3J2qVK16Lq8V+wfiL2lPeDZ7UWMxk5LemerHa1p6N00= -github.com/jefferai/jsonx v1.0.0 h1:Xoz0ZbmkpBvED5W9W1B5B/zc3Oiq7oXqiW7iRV3B6EI= github.com/jefferai/jsonx v1.0.0/go.mod h1:OGmqmi2tTeI/PS+qQfBDToLHHJIy/RMp24fPo8vFvoQ= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jhump/protoreflect v1.6.0/go.mod h1:eaTn3RZAmMBcV0fifFvlm6VHNz3wSkYyXYWUh7ymB74= -github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= -github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo= github.com/jinzhu/copier v0.3.2 h1:QdBOCbaouLDYaIPFfi1bKv5F5tPpeTwXe4sD0jqtz5w= github.com/jinzhu/copier v0.3.2/go.mod h1:24xnZezI2Yqac9J61UC6/dG/k76ttpq0DdJI3QmUvro= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= -github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/joyent/triton-go v0.0.0-20190112182421-51ffac552869/go.mod h1:U+RSyWxWd04xTqnuOQxnai7XGS2PrPY2cfGoDKtMHjA= -github.com/joyent/triton-go v1.7.1-0.20200416154420-6801d15b779f h1:ENpDacvnr8faw5ugQmEF1QYk+f/Y9lXFvuYmRxykago= -github.com/joyent/triton-go v1.7.1-0.20200416154420-6801d15b779f/go.mod h1:KDSfL7qe5ZfQqvlDMkVjCztbmcpp/c8M77vhQP8ZPvk= github.com/jpillora/backoff v0.0.0-20180909062703-3050d21c67d7/go.mod h1:2iMrUgbbvHEiQClaW2NsSzMyGHqN+rDFqY705q49KG0= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v0.0.0-20180701071628-ab8a2e0c74be/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= @@ -1138,10 +945,6 @@ github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8 github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= github.com/kelseyhightower/envconfig v1.3.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg= -github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dvMUtDTo2cv8= -github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg= -github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= -github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/keybase/go-crypto v0.0.0-20190403132359-d65b6b94177f/go.mod h1:ghbZscTyKdM07+Fw3KSi0hcJm+AlEUWj8QLlPtijN/M= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= @@ -1161,18 +964,13 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= -github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kube-object-storage/lib-bucket-provisioner v0.0.0-20221122204822-d1a8c34382f1 h1:dQEHhTfi+bSIOSViQrKY9PqJvZenD6tFz+3lPzux58o= github.com/kube-object-storage/lib-bucket-provisioner v0.0.0-20221122204822-d1a8c34382f1/go.mod h1:my+EVjOJLeQ9lUR9uVkxRvNNkhO2saSGIgzV8GZT9HY= github.com/kubernetes-csi/external-snapshotter/client/v4 v4.0.0/go.mod h1:YBCo4DoEeDndqvAn6eeu0vWM7QdXmHEeI9cFWplmBys= -github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= -github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= @@ -1184,10 +982,6 @@ github.com/libopenstorage/operator v0.0.0-20200725001727-48d03e197117/go.mod h1: github.com/libopenstorage/secrets v0.0.0-20220823020833-2ecadaf59d8a h1:dHCYranrn+6LzONAnhB3YPHBpMz4vP1IN8BsZNaY+IY= github.com/libopenstorage/secrets v0.0.0-20220823020833-2ecadaf59d8a/go.mod h1:JqaGrr4zerBaTqX04dajFE14AHcDDrxvCq8nZ5/r4AU= github.com/libopenstorage/stork v1.3.0-beta1.0.20200630005842-9255e7a98775/go.mod h1:qBSzYTJVHlOMg5RINNiHD1kBzlasnrc2uKLPZLgu1Qs= -github.com/linode/linodego v0.7.1 h1:4WZmMpSA2NRwlPZcc0+4Gyn7rr99Evk9bnr0B3gXRKE= -github.com/linode/linodego v0.7.1/go.mod h1:ga11n3ivecUrPCHN0rANxKmfWBJVkOXfLMZinAbj2sY= -github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= -github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -1233,13 +1027,9 @@ github.com/mholt/archiver v3.1.1+incompatible/go.mod h1:Dh2dOXnSdiLxRiPoVfIr/fI1 github.com/michaelklishin/rabbit-hole v0.0.0-20191008194146-93d9988f0cd5/go.mod h1:+pmbihVqjC3GPdfWv1V2TnRSuVvwrWLKfEP/MZVB/Wc= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.15/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/miekg/dns v1.1.41 h1:WMszZWJG0XmzbK9FEmzH2TVcqYzFesusSIB41b8KHxY= -github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= github.com/minsikl/netscaler-nitro-go v0.0.0-20170827154432-5b14ce3643e3 h1:PHPBYVeLuR7/2XSOfVwDpW+70KNuxMWygsyOZSKK15Y= github.com/minsikl/netscaler-nitro-go v0.0.0-20170827154432-5b14ce3643e3/go.mod h1:jh28TRFZwBumf7OjMQbRb8TNtDuuX7QNAGRjFEt+h6I= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/cli v1.1.5 h1:OxRIeJXpAMztws/XHlN2vu6imG5Dpq+j61AzAX5fLng= -github.com/mitchellh/cli v1.1.5/go.mod h1:v8+iFts2sPIKUV1ltktPXMCC8fumSKFItNcD2cLtRR4= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= @@ -1292,23 +1082,16 @@ github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uY github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/nicksnyder/go-i18n v1.10.0 h1:5AzlPKvXBH4qBzmZ09Ua9Gipyruv6uApMcrNZdo96+Q= github.com/nicksnyder/go-i18n v1.10.0/go.mod h1:HrK7VCrbOvQoUAQ7Vpy7i87N7JZZZ7R2xBGjv0j365Q= -github.com/nicolai86/scaleway-sdk v1.10.2-0.20180628010248-798f60e20bb2 h1:BQ1HW7hr4IVovMwWg0E0PYcyW8CzqDcVmaew9cujU4s= -github.com/nicolai86/scaleway-sdk v1.10.2-0.20180628010248-798f60e20bb2/go.mod h1:TLb2Sg7HQcgGdloNxkrmtgDNR9uVYF3lfdFIN4Ro6Sk= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nwaples/rardecode v1.0.0/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWkRpHbbfGS0= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= -github.com/nxadm/tail v1.4.11 h1:8feyoE3OzPrcshW5/MJ4sGESc5cqmGkGCWlco4l0bqY= -github.com/nxadm/tail v1.4.11/go.mod h1:OTaG3NK980DZzxbRq6lEuzgU+mug70nY11sMd4JXXHc= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/okta/okta-sdk-golang v1.0.1 h1:1DGm5+h2JvfdHz07yVVM7+LgUVSwxnk+6RoLUOB6CwI= github.com/okta/okta-sdk-golang v1.0.1/go.mod h1:8k//sN2mFTq8Ayo90DqGbcumCkSmYjF0+2zkIbZysec= -github.com/okta/okta-sdk-golang/v2 v2.12.1 h1:U+smE7trkHSZO8Mval3Ow85dbxawO+pMAr692VZq9gM= -github.com/okta/okta-sdk-golang/v2 v2.12.1/go.mod h1:KRoAArk1H216oiRnQT77UN6JAhBOnOWkK27yA1SM7FQ= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -1321,7 +1104,6 @@ github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9k github.com/onsi/ginkgo v1.14.2/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= -github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= @@ -1339,7 +1121,6 @@ github.com/onsi/ginkgo/v2 v2.9.5/go.mod h1:tvAoo1QUJwNEU2ITftXTpR7R1RbCzoZUOs3Ro github.com/onsi/ginkgo/v2 v2.9.7/go.mod h1:cxrmXWykAwTwhQsJOPfdIDiJ+l2RYq7U8hFU+M/1uw0= github.com/onsi/ginkgo/v2 v2.11.0/go.mod h1:ZhrRA5XmEE3x3rhlzamx/JJvujdZoJ2uvgI7kR0iZvM= github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= -github.com/onsi/ginkgo/v2 v2.15.0 h1:79HwNRBAZHOEwrczrgSOPy+eFTTlIGELKy5as+ClttY= github.com/onsi/ginkgo/v2 v2.15.0/go.mod h1:HlxMHtYF57y6Dpf+mc5529KKmSq9h2FpCF+/ZkwUxKM= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v0.0.0-20190113212917-5533ce8a0da3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= @@ -1373,14 +1154,8 @@ github.com/onsi/gomega v1.27.8/go.mod h1:2J8vzI/s+2shY9XHRApDkdgPo1TKT7P2u6fXeJK github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/onsi/gomega v1.31.1/go.mod h1:y40C95dwAD1Nz36SsEnxvfFe8FFfNxzI5eJ0EYGyAy0= -github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk= -github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= -github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= -github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b h1:YWuSjZCQAPM8UUBLkYUk1e+rZcvWHJmFb6i6rM44Xs8= -github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/openshift/api v0.0.0-20210105115604-44119421ec6b/go.mod h1:aqU5Cq+kqKKPbDMqxo9FojgDeSpNJI7iuskjXjtojDg= github.com/openshift/api v0.0.0-20230329202819-04d4fb776982 h1:WQ6AkeLlqh6OrGuric5yYJ7j29QpsDiDNkdMKIqq3Dc= @@ -1395,16 +1170,10 @@ github.com/openzipkin/zipkin-go v0.1.3/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTm github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= github.com/oracle/oci-go-sdk v7.0.0+incompatible/go.mod h1:VQb79nF8Z2cwLkLS35ukwStZIg5F66tcBccjip/j888= github.com/oracle/oci-go-sdk v12.5.0+incompatible/go.mod h1:VQb79nF8Z2cwLkLS35ukwStZIg5F66tcBccjip/j888= -github.com/oracle/oci-go-sdk v24.3.0+incompatible h1:x4mcfb4agelf1O4/1/auGlZ1lr97jXRSSN5MxTgG/zU= -github.com/oracle/oci-go-sdk/v60 v60.0.0 h1:EJAWjEi4SY5Raha6iUzq4LTQ0uM5YFw/wat/L1ehIEM= -github.com/oracle/oci-go-sdk/v60 v60.0.0/go.mod h1:krz+2gkSzlSL/L4PvP0Z9pZpag9HYLNtsMd1PmxlA2w= github.com/ory/dockertest v3.3.4+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= github.com/oxtoacart/bpool v0.0.0-20150712133111-4e1c5567d7c2/go.mod h1:L3UMQOThbttwfYRNFOWLLVXMhk5Lkio4GGOtw5UrxS0= -github.com/packethost/packngo v0.1.1-0.20180711074735-b9cb5096f54c h1:vwpFWvAO8DeIZfFeqASzZfsxuWPno9ncAebBEP0N3uE= -github.com/packethost/packngo v0.1.1-0.20180711074735-b9cb5096f54c/go.mod h1:otzZQXgoO96RTzDB/Hycg0qZcXZsWJGJRSXbmEIJ+4M= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/patrickmn/go-cache v0.0.0-20180815053127-5633e0862627/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= @@ -1416,8 +1185,6 @@ github.com/pelletier/go-toml v1.6.0/go.mod h1:5N711Q9dKgbdkxHL+MEfF31hpT7l0S0s/t github.com/pelletier/go-toml v1.7.0 h1:7utD74fnzVc/cpcyy8sjrlFr5vYpypUixARcHIMIGuI= github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= -github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 h1:q2e307iGHPdTGp0hoxKjt1H5pDo6utceo3dQVK3I5XQ= -github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pierrec/lz4 v2.2.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pierrec/lz4 v2.2.6+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= @@ -1426,10 +1193,6 @@ github.com/pierrec/lz4 v2.6.1+incompatible h1:9UY3+iC23yxF0UfGaYrGplQ+79Rg+h/q9F github.com/pierrec/lz4 v2.6.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pierrec/lz4/v4 v4.1.18 h1:xaKrnTkyoqfh1YItXl56+6KJNVYWlEEPuAQW9xsplYQ= github.com/pierrec/lz4/v4 v4.1.18/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= -github.com/pires/go-proxyproto v0.6.1 h1:EBupykFmo22SDjv4fQVQd2J9NOoLPmyZA/15ldOGkPw= -github.com/pires/go-proxyproto v0.6.1/go.mod h1:Odh9VFOZJCf9G8cLW5o435Xf1J95Jw9Gw5rnCjcwzAY= -github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= -github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -1443,13 +1206,8 @@ github.com/portworx/sched-ops v0.20.4-openstorage-rc3/go.mod h1:DpRDDqXWQrReFJ5S github.com/portworx/talisman v0.0.0-20191007232806-837747f38224/go.mod h1:OjpMH9Uh5o9ntVGktm4FbjLNwubJ3ITih2OfYrAeWtA= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/posener/complete v1.2.1/go.mod h1:6gapUrK/U1TAN7ciCoNRIdVC5sbdBTUh1DKN0g6uH7E= -github.com/posener/complete v1.2.3 h1:NP0eAhjcjImqslEwo/1hq7gpajME0fTLTezBKDqfXqo= -github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= -github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= -github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= -github.com/pquerna/otp v1.2.1-0.20191009055518-468c2dd2b58d h1:PinQItctnaL2LtkaSM678+ZLLy5TajwOeXzWvYC7tII= github.com/pquerna/otp v1.2.1-0.20191009055518-468c2dd2b58d/go.mod h1:dkJfzwRKNiegxyNb54X/3fLwhCynbMspSyWKnvi1AEg= github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.44.1/go.mod h1:3WYi4xqXxGGXWDdQIITnLNmuDzO5n6wYva9spVhR4fg= github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.46.0/go.mod h1:3WYi4xqXxGGXWDdQIITnLNmuDzO5n6wYva9spVhR4fg= @@ -1499,8 +1257,6 @@ github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1 github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/rboyer/safeio v0.2.1 h1:05xhhdRNAdS3apYm7JRjOqngf4xruaW959jmRxGDuSU= -github.com/rboyer/safeio v0.2.1/go.mod h1:Cq/cEPK+YXFn622lsQ0K4KsPZSPtaptHHEldsy7Fmig= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= @@ -1512,8 +1268,6 @@ github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= -github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/rook/rook v1.11.4 h1:V5+r8JnVpSCdWGZ8eV5zUX1SnMTgCnz3azux+7Jefzc= github.com/rook/rook v1.11.4/go.mod h1:RwQdIZvb7BGomy9yR9caWYCoT8pHngYsxBXg6Fl8LZk= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= @@ -1523,23 +1277,12 @@ github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFo github.com/ryanuber/go-glob v1.0.0 h1:iQh3xXAumdQ+4Ufa5b25cRpC5TYKlno6hsv6Cb3pkBk= github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= github.com/samuel/go-zookeeper v0.0.0-20180130194729-c4fab1ac1bec/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= -github.com/sasha-s/go-deadlock v0.2.0 h1:lMqc+fUb7RrFS3gQLtoQsJ7/6TV/pAIFvBsqX73DK8Y= -github.com/sasha-s/go-deadlock v0.2.0/go.mod h1:StQn567HiB1fF2yJ44N9au7wOhrPS3iZqiDbRupzT10= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= -github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/sethvargo/go-limiter v0.7.2 h1:FgC4N7RMpV5gMrUdda15FaFTkQ/L4fEqM7seXMs4oO8= -github.com/sethvargo/go-limiter v0.7.2/go.mod h1:C0kbSFbiriE5k2FFOe18M1YZbAR2Fiwf72uGu0CXCcU= -github.com/shirou/gopsutil v2.19.9+incompatible h1:IrPVlK4nfwW10DF7pW+7YJKws9NkgNzWozwwWv9FsgY= github.com/shirou/gopsutil v2.19.9+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= -github.com/shirou/gopsutil/v3 v3.22.6 h1:FnHOFOh+cYAM0C30P+zysPISzlknLC5Z1G4EAElznfQ= -github.com/shirou/gopsutil/v3 v3.22.6/go.mod h1:EdIubSnZhbAvBS1yJ7Xi+AShB/hxwLHOMz4MCYz7yMs= github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc= github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= -github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ= -github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= @@ -1548,8 +1291,6 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6Mwd github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/skeema/knownhosts v1.2.0 h1:h9r9cf0+u7wSE+M183ZtMGgOJKiL96brpaz5ekfJCpM= -github.com/skeema/knownhosts v1.2.0/go.mod h1:g4fPeYpque7P0xefxtGzV81ihjC8sX2IqpAoNkjxbMo= github.com/smartystreets/assertions v0.0.0-20180725160413-e900ae048470/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v1.0.0/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= @@ -1561,14 +1302,10 @@ github.com/smartystreets/gunit v1.0.0/go.mod h1:qwPWnhz6pn0NnRBP++URONOVyNkPyr4S github.com/softlayer/xmlrpc v0.0.0-20200409220501-5f089df7cb7e h1:3OgWYFw7jxCZPcvAg+4R8A50GZ+CCkARF10lxu2qDsQ= github.com/softlayer/xmlrpc v0.0.0-20200409220501-5f089df7cb7e/go.mod h1:fKZCUVdirrxrBpwd9wb+lSoVixvpwAu8eHzbQB2tums= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/sony/gobreaker v0.4.2-0.20210216022020-dd874f9dd33b h1:br+bPNZsJWKicw/5rALEo67QHs5weyD5tf8WST+4sJ0= -github.com/sony/gobreaker v0.4.2-0.20210216022020-dd874f9dd33b/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= -github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= @@ -1604,25 +1341,16 @@ github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/tencentcloud/tencentcloud-sdk-go v3.0.171+incompatible h1:K3fcS92NS8cRntIdu8Uqy2ZSePvX73nNhOkKuPGJLXQ= -github.com/tencentcloud/tencentcloud-sdk-go v3.0.171+incompatible/go.mod h1:0PfYow01SHPMhKY31xa+EFz2RStxIqj6JFAJS+IkCi4= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tj/assert v0.0.0-20171129193455-018094318fb0/go.mod h1:mZ9/Rh9oLWpLLDRpvE+3b7gP/C2YyLFYxNmcLnPTMe0= -github.com/tj/assert v0.0.3 h1:Df/BlaZ20mq6kuai7f5z2TvPFiwC3xaWJSDQNiIS3Rk= github.com/tj/assert v0.0.3/go.mod h1:Ne6X72Q+TB1AteidzQncjw9PabbMp4PBMZ1k+vd1Pvk= github.com/tj/go-buffer v1.1.0/go.mod h1:iyiJpfFcR2B9sXu7KvjbT9fpM4mOelRSDTbntVj52Uc= github.com/tj/go-elastic v0.0.0-20171221160941-36157cbbebc2/go.mod h1:WjeM0Oo1eNAjXGDx2yma7uG2XoyRZTq1uv3M/o7imD0= github.com/tj/go-kinesis v0.0.0-20171128231115-08b17f58cb1b/go.mod h1:/yhzCV0xPfx6jb1bBgRFjl5lytqVqZXEaeqWP8lTEao= github.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKwh4= -github.com/tklauser/go-sysconf v0.3.10 h1:IJ1AZGZRWbY8T5Vfk04D9WOA5WSejdflXxP03OUqALw= -github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk= -github.com/tklauser/numcpus v0.4.0 h1:E53Dm1HjH1/R2/aoCtXtPgzmElmn51aOkhCFSuZq//o= -github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hMwiKKqXCQ= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/tv42/httpunix v0.0.0-20191220191345-2ba4b9c3382c h1:u6SKchux2yDvFQnDHS3lPnIRmfVJ5Sxy3ao2SIdysLQ= -github.com/tv42/httpunix v0.0.0-20191220191345-2ba4b9c3382c/go.mod h1:hzIxponao9Kjc7aWznkXaL4U4TWaDSs8zcsY4Ka08nM= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ulikunitz/xz v0.5.6/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= @@ -1635,10 +1363,6 @@ github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9 github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= -github.com/vmware/govmomi v0.18.0 h1:f7QxSmP7meCtoAmiKZogvVbLInT+CZx6Px6K5rYsJZo= -github.com/vmware/govmomi v0.18.0/go.mod h1:URlwyTFZX72RmxtxuaFL2Uj3fD1JTvZdx59bHWk6aFU= -github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= -github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= @@ -1661,15 +1385,11 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= -github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= github.com/zclconf/go-cty v1.14.1 h1:t9fyA35fwjjUMcmL5hLER+e/rEPqrbCK1/OSE4SI9KA= github.com/zclconf/go-cty v1.14.1/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= -go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= -go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.etcd.io/etcd v0.5.0-alpha.5.0.20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= @@ -1695,12 +1415,8 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= -go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM= go.opentelemetry.io/otel v1.14.0/go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188WlggnNeU= -go.opentelemetry.io/otel/sdk v1.14.0 h1:PDCppFRDq8A1jL9v6KMI6dYesaq+DFcDZvjsoGvxGzY= -go.opentelemetry.io/otel/sdk v1.14.0/go.mod h1:bwIC5TjrNG6QDCHNWvW4HLHtUQ4I+VQDsnjhvyZCALM= go.opentelemetry.io/otel/trace v1.14.0 h1:wp2Mmvj41tDsyAJXiWDWpfNsOiIyd38fy85pyKcFq/M= go.opentelemetry.io/otel/trace v1.14.0/go.mod h1:8avnQLK+CG77yNLUae4ea2JDQ6iT+gozhnZjy/rw9G8= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= @@ -1708,17 +1424,11 @@ go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= -go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= -go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= go.uber.org/ratelimit v0.2.0 h1:UQE2Bgi7p2B85uP5dC2bbRtig0C+OeNRnNEafLjsLPA= go.uber.org/ratelimit v0.2.0/go.mod h1:YYBV4e4naJvhpitQrWJu1vCpgB7CboMe0qhltKt6mUg= go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60= -go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= golang.org/x/crypto v0.0.0-20180820150726-614d502a4dac/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1925,7 +1635,6 @@ golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= -golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -2167,7 +1876,6 @@ golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= golang.org/x/tools v0.9.3/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= golang.org/x/tools v0.12.0/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= -golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA= golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -2203,8 +1911,6 @@ google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34q google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= -google.golang.org/api v0.114.0 h1:1xQPji6cO2E2vLiI+C/XiFAnsn1WV3mjaEwGLhi3grE= -google.golang.org/api v0.114.0/go.mod h1:ifYI2ZsFK6/uGddGfAD5BMxlnkBqCmqHSDUVi45N5Yg= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -2263,10 +1969,6 @@ google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54 h1:9NWlQfY2ePejTmfwUH1OWwmznFa+0kKcHGPDvcPza9M= -google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54/go.mod h1:zqTuNwFlFRsw5zIts5VnzLQxSRqh+CGOTVMlYbY0Eyk= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9 h1:m8v1xLLLzMe1m5P+gCTF8nJB9epwZQUBERm20Oy1poQ= -google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9/go.mod h1:vHYtlOoi6TsQ3Uk2yxR7NI5z8uoV+3pZtR4jmHIkRig= google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 h1:0nDDozoAU19Qb2HwhXadU8OcsiO/09cnTqhUtq2MEOM= google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19/go.mod h1:66JfowdXAEgad5O9NnYcsNPLCPZJD++2L9X0PCMODrA= google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= @@ -2321,18 +2023,15 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/go-playground/assert.v1 v1.2.1 h1:xoYuJVE7KT85PYWrN730RguIQO0ePzVRfFMXadIrXTM= gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= gopkg.in/go-playground/validator.v9 v9.30.0/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ= gopkg.in/go-playground/validator.v9 v9.31.0 h1:bmXmP2RSNtFES+bn4uYuHT7iJFJv7Vj+an+ZQdDaD1M= gopkg.in/go-playground/validator.v9 v9.31.0/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ= gopkg.in/h2non/gock.v1 v1.0.15/go.mod h1:sX4zAkdYX1TRGJ2JY156cFspQn4yRWn6p9EMdODlynE= -gopkg.in/h2non/gock.v1 v1.1.2 h1:jBbHXgGBK/AoPVfJh5x4r/WxIrElvbLel8TCZkkZJoY= gopkg.in/h2non/gock.v1 v1.1.2/go.mod h1:n7UGz/ckNChHiK05rDoiC4MYSunEC/lyaUm2WWaDva0= gopkg.in/inf.v0 v0.9.0/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= @@ -2347,19 +2046,13 @@ gopkg.in/ldap.v3 v3.0.3/go.mod h1:oxD7NyBuxchC+SgJDE1Q5Od05eGt29SDQVBmV+HYbzw= gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/ory-am/dockertest.v3 v3.3.4/go.mod h1:s9mmoLkaGeAh97qygnNj4xWkiN7e1SKekYC6CovU+ek= -gopkg.in/resty.v1 v1.12.0 h1:CuXP0Pjfw9rOuY6EP+UvtNvt5DSqHpIxILZKT/quCZI= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/square/go-jose.v2 v2.3.0/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/square/go-jose.v2 v2.4.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/square/go-jose.v2 v2.6.0 h1:NGk74WTnPKBNUhNzQX7PYcTLUjoq7mzKk2OKbvwk2iI= -gopkg.in/square/go-jose.v2 v2.6.0/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= -gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -2402,8 +2095,6 @@ k8s.io/api v0.26.3/go.mod h1:PXsqwPMXBSBcL1lJ9CYDKy7kIReUydukS5JiRlxC3qE= k8s.io/apiextensions-apiserver v0.0.0-20190409022649-727a075fdec8/go.mod h1:IxkesAMoaCRoLrPJdZNZUQp9NfZnzqaVzLhb2VEQzXE= k8s.io/apiextensions-apiserver v0.18.3/go.mod h1:TMsNGs7DYpMXd+8MOCX8KzPOCx8fnZMoIGB24m03+JE= k8s.io/apiextensions-apiserver v0.20.1/go.mod h1:ntnrZV+6a3dB504qwC5PN/Yg9PBiDNt1EVqbW2kORVk= -k8s.io/apiextensions-apiserver v0.26.0 h1:Gy93Xo1eg2ZIkNX/8vy5xviVSxwQulsnUdQ00nEdpDo= -k8s.io/apiextensions-apiserver v0.26.0/go.mod h1:7ez0LTiyW5nq3vADtK6C3kMESxadD51Bh6uz3JOlqWQ= k8s.io/apimachinery v0.0.0-20190404173353-6a84e37a896d/go.mod h1:ccL7Eh7zubPUSh9A3USN90/OzHNSVN6zxzde07TDCL0= k8s.io/apimachinery v0.0.0-20190409092423-760d1845f48b/go.mod h1:FW86P8YXVLsbuplGMZeb20J3jYHscrDqw4jELaFJvRU= k8s.io/apimachinery v0.18.3/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko= @@ -2431,8 +2122,6 @@ k8s.io/code-generator v0.20.0/go.mod h1:UsqdF+VX4PU2g46NC2JRs4gc+IfrctnwHb76RNbW k8s.io/code-generator v0.20.1/go.mod h1:UsqdF+VX4PU2g46NC2JRs4gc+IfrctnwHb76RNbWHJg= k8s.io/component-base v0.18.3/go.mod h1:bp5GzGR0aGkYEfTj+eTY0AN/vXTgkJdQXjNTTVUaa3k= k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk= -k8s.io/component-base v0.26.1 h1:4ahudpeQXHZL5kko+iDHqLj/FSGAEUnSVO0EBbgDd+4= -k8s.io/component-base v0.26.1/go.mod h1:VHrLR0b58oC035w6YQiBSbtsf0ThuSwXP+p5dD/kAWU= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200114144118-36b2048a9120/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= @@ -2467,8 +2156,6 @@ k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/ k8s.io/utils v0.0.0-20230313181309-38a27ef9d749 h1:xMMXJlJbsU8w3V5N2FLDQ8YgU8s1EoULdbQBcAeNJkY= k8s.io/utils v0.0.0-20230313181309-38a27ef9d749/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= layeh.com/radius v0.0.0-20190322222518-890bc1058917/go.mod h1:fywZKyu//X7iRzaxLgPWsvc0L26IUpVvE/aeIL2JtIQ= -nhooyr.io/websocket v1.8.7 h1:usjR2uOr/zjjkVMy0lW+PPohFok7PCow5sDjLgX4P4g= -nhooyr.io/websocket v1.8.7/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/ibm/service/vpc/data_source_ibm_is_instance.go b/ibm/service/vpc/data_source_ibm_is_instance.go index 3932d3d64c..7650388cc4 100644 --- a/ibm/service/vpc/data_source_ibm_is_instance.go +++ b/ibm/service/vpc/data_source_ibm_is_instance.go @@ -281,6 +281,25 @@ func DataSourceIBMISInstance() *schema.Resource { Computed: true, Description: "Identifies a version of a catalog offering by a unique CRN property", }, + isInstanceCatalogOfferingPlanCrn: { + Type: schema.TypeString, + Computed: true, + Description: "The CRN for this catalog offering version's billing plan", + }, + "deleted": { + Type: schema.TypeList, + Computed: true, + Description: "If present, this property indicates the referenced resource has been deleted and provides some supplementary information.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "more_info": { + Type: schema.TypeString, + Computed: true, + Description: "Link to documentation about deleted resources.", + }, + }, + }, + }, }, }, }, @@ -1106,6 +1125,14 @@ func DataSourceIBMISInstance() *schema.Resource { } } +func resourceIbmIsInstanceCatalogOfferingVersionPlanReferenceDeletedToMap(catalogOfferingVersionPlanReferenceDeleted vpcv1.CatalogOfferingVersionPlanReferenceDeleted) map[string]interface{} { + catalogOfferingVersionPlanReferenceDeletedMap := map[string]interface{}{} + + catalogOfferingVersionPlanReferenceDeletedMap["more_info"] = catalogOfferingVersionPlanReferenceDeleted.MoreInfo + + return catalogOfferingVersionPlanReferenceDeletedMap +} + func dataSourceIBMISInstanceRead(context context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { name := d.Get(isInstanceName).(string) @@ -1145,6 +1172,15 @@ func instanceGetByName(d *schema.ResourceData, meta interface{}, name string) er catalogList := make([]map[string]interface{}, 0) catalogMap := map[string]interface{}{} catalogMap[isInstanceCatalogOfferingVersionCrn] = versionCrn + if instance.CatalogOffering.Plan != nil { + if instance.CatalogOffering.Plan.CRN != nil && *instance.CatalogOffering.Plan.CRN != "" { + catalogMap[isInstanceCatalogOfferingPlanCrn] = *instance.CatalogOffering.Plan.CRN + } + if instance.CatalogOffering.Plan.Deleted != nil { + deletedMap := resourceIbmIsInstanceCatalogOfferingVersionPlanReferenceDeletedToMap(*instance.CatalogOffering.Plan.Deleted) + catalogMap["deleted"] = []map[string]interface{}{deletedMap} + } + } catalogList = append(catalogList, catalogMap) d.Set(isInstanceCatalogOffering, catalogList) } diff --git a/ibm/service/vpc/data_source_ibm_is_instance_template.go b/ibm/service/vpc/data_source_ibm_is_instance_template.go index fdac7e39f5..b8db3afcac 100644 --- a/ibm/service/vpc/data_source_ibm_is_instance_template.go +++ b/ibm/service/vpc/data_source_ibm_is_instance_template.go @@ -232,6 +232,11 @@ func DataSourceIBMISInstanceTemplate() *schema.Resource { Computed: true, Description: "Identifies a version of a catalog offering by a unique CRN property", }, + isInstanceTemplateCatalogOfferingPlanCrn: { + Type: schema.TypeString, + Computed: true, + Description: "The CRN for this catalog offering version's billing plan", + }, }, }, }, @@ -442,6 +447,11 @@ func DataSourceIBMISInstanceTemplate() *schema.Resource { }, }, }, + "protocol_state_filtering_mode": { + Type: schema.TypeString, + Computed: true, + Description: "The protocol state filtering mode used for this virtual network interface.", + }, "resource_group": &schema.Schema{ Type: schema.TypeList, Computed: true, @@ -630,6 +640,11 @@ func DataSourceIBMISInstanceTemplate() *schema.Resource { }, }, }, + "protocol_state_filtering_mode": { + Type: schema.TypeString, + Computed: true, + Description: "The protocol state filtering mode used for this virtual network interface.", + }, "resource_group": &schema.Schema{ Type: schema.TypeList, Computed: true, @@ -894,6 +909,12 @@ func dataSourceIBMISInstanceTemplateRead(context context.Context, d *schema.Reso version := insTempCatalogOffering.Version.(*vpcv1.CatalogOfferingVersionIdentity) currentOffering[isInstanceTemplateCatalogOfferingVersionCrn] = *version.CRN } + if insTempCatalogOffering.Plan != nil { + plan := insTempCatalogOffering.Plan.(*vpcv1.CatalogOfferingVersionPlanIdentity) + if plan.CRN != nil && *plan.CRN != "" { + currentOffering[isInstanceTemplateCatalogOfferingPlanCrn] = *plan.CRN + } + } catOfferingList = append(catOfferingList, currentOffering) d.Set(isInstanceTemplateCatalogOffering, catOfferingList) } @@ -1198,6 +1219,12 @@ func dataSourceIBMISInstanceTemplateRead(context context.Context, d *schema.Reso version := insTempCatalogOffering.Version.(*vpcv1.CatalogOfferingVersionIdentity) currentOffering[isInstanceTemplateCatalogOfferingVersionCrn] = *version.CRN } + if insTempCatalogOffering.Plan != nil { + plan := insTempCatalogOffering.Plan.(*vpcv1.CatalogOfferingVersionPlanIdentity) + if plan.CRN != nil && *plan.CRN != "" { + currentOffering[isInstanceTemplateCatalogOfferingPlanCrn] = *plan.CRN + } + } catOfferingList = append(catOfferingList, currentOffering) d.Set(isInstanceTemplateCatalogOffering, catOfferingList) } @@ -1802,6 +1829,9 @@ func dataSourceIBMIsInstanceTemplateInstanceNetworkAttachmentPrototypeVirtualNet } modelMap["primary_ip"] = []map[string]interface{}{primaryIPMap} } + if model.ProtocolStateFilteringMode != nil { + modelMap["protocol_state_filtering_mode"] = model.ProtocolStateFilteringMode + } if model.ResourceGroup != nil { resourceGroupMap, err := dataSourceIBMIsInstanceTemplateResourceGroupIdentityToMap(model.ResourceGroup) if err != nil { @@ -1873,6 +1903,9 @@ func dataSourceIBMIsInstanceTemplateInstanceNetworkAttachmentPrototypeVirtualNet } modelMap["primary_ip"] = []map[string]interface{}{primaryIPMap} } + if model.ProtocolStateFilteringMode != nil { + modelMap["protocol_state_filtering_mode"] = model.ProtocolStateFilteringMode + } if model.ResourceGroup != nil { resourceGroupMap, err := dataSourceIBMIsInstanceTemplateResourceGroupIdentityToMap(model.ResourceGroup) if err != nil { diff --git a/ibm/service/vpc/data_source_ibm_is_instance_template_test.go b/ibm/service/vpc/data_source_ibm_is_instance_template_test.go index 9f6e075d6b..d1f560f3ba 100644 --- a/ibm/service/vpc/data_source_ibm_is_instance_template_test.go +++ b/ibm/service/vpc/data_source_ibm_is_instance_template_test.go @@ -149,6 +149,8 @@ func TestAccIBMISInstanceTemplate_data_catalog(t *testing.T) { "data.ibm_is_instance_template.instance_template_data", "catalog_offering.#"), resource.TestCheckResourceAttrSet( "data.ibm_is_instance_template.instance_template_data", "catalog_offering.0.version_crn"), + resource.TestCheckResourceAttrSet( + "data.ibm_is_instance_template.instance_template_data", "catalog_offering.0.plan_crn"), resource.TestCheckNoResourceAttr( "data.ibm_is_instance_template.instance_template_data", "image"), ), diff --git a/ibm/service/vpc/data_source_ibm_is_instance_templates.go b/ibm/service/vpc/data_source_ibm_is_instance_templates.go index b457f6fc5a..b80b299c8a 100644 --- a/ibm/service/vpc/data_source_ibm_is_instance_templates.go +++ b/ibm/service/vpc/data_source_ibm_is_instance_templates.go @@ -261,6 +261,11 @@ func DataSourceIBMISInstanceTemplates() *schema.Resource { Computed: true, Description: "Identifies a version of a catalog offering by a unique CRN property", }, + isInstanceTemplateCatalogOfferingPlanCrn: { + Type: schema.TypeString, + Computed: true, + Description: "The CRN for this catalog offering version's billing plan", + }, }, }, }, @@ -395,6 +400,11 @@ func DataSourceIBMISInstanceTemplates() *schema.Resource { }, }, }, + "protocol_state_filtering_mode": { + Type: schema.TypeString, + Computed: true, + Description: "The protocol state filtering mode used for this virtual network interface.", + }, "resource_group": &schema.Schema{ Type: schema.TypeList, Computed: true, @@ -583,6 +593,11 @@ func DataSourceIBMISInstanceTemplates() *schema.Resource { }, }, }, + "protocol_state_filtering_mode": { + Type: schema.TypeString, + Computed: true, + Description: "The protocol state filtering mode used for this virtual network interface.", + }, "resource_group": &schema.Schema{ Type: schema.TypeList, Computed: true, @@ -899,6 +914,12 @@ func dataSourceIBMISInstanceTemplatesRead(d *schema.ResourceData, meta interface version := insTempCatalogOffering.Version.(*vpcv1.CatalogOfferingVersionIdentity) currentOffering[isInstanceTemplateCatalogOfferingVersionCrn] = *version.CRN } + if insTempCatalogOffering.Plan != nil { + plan := insTempCatalogOffering.Plan.(*vpcv1.CatalogOfferingVersionPlanIdentity) + if plan.CRN != nil && *plan.CRN != "" { + currentOffering[isInstanceTemplateCatalogOfferingPlanCrn] = *plan.CRN + } + } catOfferingList = append(catOfferingList, currentOffering) template[isInstanceTemplateCatalogOffering] = catOfferingList } diff --git a/ibm/service/vpc/data_source_ibm_is_instance_templates_test.go b/ibm/service/vpc/data_source_ibm_is_instance_templates_test.go index 6c9431eefc..12526dd29a 100644 --- a/ibm/service/vpc/data_source_ibm_is_instance_templates_test.go +++ b/ibm/service/vpc/data_source_ibm_is_instance_templates_test.go @@ -123,6 +123,8 @@ func TestAccIBMISInstanceTemplates_dataCatalog(t *testing.T) { "data.ibm_is_instance_templates.instance_templates_data", "templates.0.catalog_offering.#"), resource.TestCheckResourceAttrSet( "data.ibm_is_instance_templates.instance_templates_data", "templates.0.catalog_offering.0.version_crn"), + resource.TestCheckResourceAttrSet( + "data.ibm_is_instance_templates.instance_templates_data", "templates.0.catalog_offering.0.plan_crn"), resource.TestCheckResourceAttr( "data.ibm_is_instance_templates.instance_templates_data", "templates.0.image", ""), ), diff --git a/ibm/service/vpc/data_source_ibm_is_instance_test.go b/ibm/service/vpc/data_source_ibm_is_instance_test.go index 848cbe89f2..89d3a62b7a 100644 --- a/ibm/service/vpc/data_source_ibm_is_instance_test.go +++ b/ibm/service/vpc/data_source_ibm_is_instance_test.go @@ -50,41 +50,30 @@ func TestAccIBMISInstanceDataSource_basic(t *testing.T) { }, }) } -func TestAccIBMISInstanceDataSource_concom(t *testing.T) { + +func TestAccIBMISInstanceDataSourceWithCatalogOffering(t *testing.T) { vpcname := fmt.Sprintf("tfins-vpc-%d", acctest.RandIntRange(10, 100)) subnetname := fmt.Sprintf("tfins-subnet-%d", acctest.RandIntRange(10, 100)) sshname := fmt.Sprintf("tfins-ssh-%d", acctest.RandIntRange(10, 100)) instanceName := fmt.Sprintf("tfins-name-%d", acctest.RandIntRange(10, 100)) resName := "data.ibm_is_instance.ds_instance" + planCrn := "crn:v1:staging:public:globalcatalog-collection:global::1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:plan:sw.1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.279a3cee-ba7d-42d5-ae88-6a0ebc56fa4a-global" + versionCrn := "crn:v1:staging:public:globalcatalog-collection:global::1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:4f8466eb-2218-42e3-a755-bf352b559c69-global/6a73aa69-5dd9-4243-a908-3b62f467cbf8-global" resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, Steps: []resource.TestStep{ { - Config: testAccCheckIBMISInstanceDataSourceConfig(vpcname, subnetname, sshname, instanceName), + Config: testAccCheckIBMISInstanceDataSourceConfigWithCatalogOffering(vpcname, subnetname, sshname, instanceName, planCrn, versionCrn), Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr( - resName, "name", instanceName), - resource.TestCheckResourceAttr( - resName, "tags.#", "1"), - resource.TestCheckResourceAttrSet( - resName, "primary_network_interface.0.port_speed"), - resource.TestCheckResourceAttrSet( - resName, "availability_policy_host_failure"), - resource.TestCheckResourceAttrSet( - resName, "lifecycle_state"), - resource.TestCheckResourceAttr( - resName, "lifecycle_reasons.#", "0"), resource.TestCheckResourceAttrSet( - resName, "vcpu.#"), + resName, "catalog_offering.#"), resource.TestCheckResourceAttrSet( - resName, "vcpu.0.manufacturer"), + resName, "catalog_offering.0.plan_crn"), resource.TestCheckResourceAttrSet( - resName, "confidential_compute_mode"), - resource.TestCheckResourceAttrSet( - resName, "enable_secure_boot"), + resName, "catalog_offering.0.version_crn"), ), }, }, @@ -250,6 +239,46 @@ data "ibm_is_instance" "ds_instance" { passphrase = "" }`, vpcname, subnetname, acc.ISZoneName, acc.ISCIDR, sshname, instanceName, acc.IsWinImage, acc.InstanceProfileName, acc.ISZoneName) } + +func testAccCheckIBMISInstanceDataSourceConfigWithCatalogOffering(vpcname, subnetname, sshname, instanceName, planCrn, versionCrn string) string { + return fmt.Sprintf(` + resource "ibm_is_vpc" "testacc_vpc" { + name = "%s" + } + + resource "ibm_is_subnet" "testacc_subnet" { + name = "%s" + vpc = ibm_is_vpc.testacc_vpc.id + zone = "%s" + total_ipv4_address_count = 16 + } + + resource "ibm_is_ssh_key" "testacc_sshkey" { + name = "%s" + public_key = file("./test-fixtures/.ssh/id_rsa.pub") + } + + resource "ibm_is_instance" "testacc_instance" { + name = "%s" + profile = "%s" + primary_network_interface { + subnet = ibm_is_subnet.testacc_subnet.id + } + vpc = ibm_is_vpc.testacc_vpc.id + zone = "%s" + keys = [ibm_is_ssh_key.testacc_sshkey.id] + boot_volume { + auto_delete_volume = false + } + catalog_offering { + version_crn = "%s" + plan_crn = "%s" + } + } +data "ibm_is_instance" "ds_instance" { + name = ibm_is_instance.testacc_instance.name +}`, vpcname, subnetname, acc.ISZoneName, sshname, instanceName, acc.InstanceProfileName, acc.ISZoneName, versionCrn, planCrn) +} func testAccCheckIBMISInstanceVniDataSourceConfig(vpcname, subnetname, sshname, vniname, instanceName string) string { return fmt.Sprintf(` resource "ibm_is_vpc" "testacc_vpc" { @@ -373,3 +402,44 @@ data "ibm_is_instance" "ds_instance" { name = ibm_is_instance.testacc_instance.name }`, vpcname, subnetname, acc.ISZoneName, acc.ISCIDR, sshname, publicKey, instanceName, acc.IsImage, acc.InstanceProfileName, acc.ISZoneName) } + +func TestAccIBMISInstanceDataSource_concom(t *testing.T) { + + vpcname := fmt.Sprintf("tfins-vpc-%d", acctest.RandIntRange(10, 100)) + subnetname := fmt.Sprintf("tfins-subnet-%d", acctest.RandIntRange(10, 100)) + sshname := fmt.Sprintf("tfins-ssh-%d", acctest.RandIntRange(10, 100)) + instanceName := fmt.Sprintf("tfins-name-%d", acctest.RandIntRange(10, 100)) + resName := "data.ibm_is_instance.ds_instance" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { acc.TestAccPreCheck(t) }, + Providers: acc.TestAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccCheckIBMISInstanceDataSourceConfig(vpcname, subnetname, sshname, instanceName), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr( + resName, "name", instanceName), + resource.TestCheckResourceAttr( + resName, "tags.#", "1"), + resource.TestCheckResourceAttrSet( + resName, "primary_network_interface.0.port_speed"), + resource.TestCheckResourceAttrSet( + resName, "availability_policy_host_failure"), + resource.TestCheckResourceAttrSet( + resName, "lifecycle_state"), + resource.TestCheckResourceAttr( + resName, "lifecycle_reasons.#", "0"), + resource.TestCheckResourceAttrSet( + resName, "vcpu.#"), + resource.TestCheckResourceAttrSet( + resName, "vcpu.0.manufacturer"), + resource.TestCheckResourceAttrSet( + resName, "confidential_compute_mode"), + resource.TestCheckResourceAttrSet( + resName, "enable_secure_boot"), + ), + }, + }, + }) +} diff --git a/ibm/service/vpc/data_source_ibm_is_instances.go b/ibm/service/vpc/data_source_ibm_is_instances.go index b3e829a3ed..0b544de1e0 100644 --- a/ibm/service/vpc/data_source_ibm_is_instances.go +++ b/ibm/service/vpc/data_source_ibm_is_instances.go @@ -259,6 +259,25 @@ func DataSourceIBMISInstances() *schema.Resource { Computed: true, Description: "Identifies a version of a catalog offering by a unique CRN property", }, + isInstanceCatalogOfferingPlanCrn: { + Type: schema.TypeString, + Computed: true, + Description: "The CRN for this catalog offering version's billing plan", + }, + "deleted": { + Type: schema.TypeList, + Computed: true, + Description: "If present, this property indicates the referenced resource has been deleted and provides some supplementary information.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "more_info": { + Type: schema.TypeString, + Computed: true, + Description: "Link to documentation about deleted resources.", + }, + }, + }, + }, }, }, }, @@ -1289,6 +1308,15 @@ func instancesList(d *schema.ResourceData, meta interface{}) error { catalogList := make([]map[string]interface{}, 0) catalogMap := map[string]interface{}{} catalogMap[isInstanceCatalogOfferingVersionCrn] = versionCrn + if instance.CatalogOffering.Plan != nil { + if instance.CatalogOffering.Plan.CRN != nil && *instance.CatalogOffering.Plan.CRN != "" { + catalogMap[isInstanceCatalogOfferingPlanCrn] = *instance.CatalogOffering.Plan.CRN + } + if instance.CatalogOffering.Plan.Deleted != nil { + deletedMap := resourceIbmIsInstanceCatalogOfferingVersionPlanReferenceDeletedToMap(*instance.CatalogOffering.Plan.Deleted) + catalogMap["deleted"] = []map[string]interface{}{deletedMap} + } + } catalogList = append(catalogList, catalogMap) l[isInstanceCatalogOffering] = catalogList } diff --git a/ibm/service/vpc/data_source_ibm_is_instances_test.go b/ibm/service/vpc/data_source_ibm_is_instances_test.go index fd51bd3c35..7d119635b0 100644 --- a/ibm/service/vpc/data_source_ibm_is_instances_test.go +++ b/ibm/service/vpc/data_source_ibm_is_instances_test.go @@ -63,52 +63,26 @@ ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCKVmnMOlHKcZK8tpt3MP1lqOLAcqcJzhsvJcjscgVE }, }) } -func TestAccIBMISInstancesDataSource_concom(t *testing.T) { - var instance string + +func TestAccIBMISInstancesDataSourceWithCatalogOffering(t *testing.T) { vpcname := fmt.Sprintf("tfins-vpc-%d", acctest.RandIntRange(10, 100)) subnetname := fmt.Sprintf("tfins-subnet-%d", acctest.RandIntRange(10, 100)) - publicKey := strings.TrimSpace(` -ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCKVmnMOlHKcZK8tpt3MP1lqOLAcqcJzhsvJcjscgVERRN7/9484SOBJ3HSKxxNG5JN8owAjy5f9yYwcUg+JaUVuytn5Pv3aeYROHGGg+5G346xaq3DAwX6Y5ykr2fvjObgncQBnuU5KHWCECO/4h8uWuwh/kfniXPVjFToc+gnkqA+3RKpAecZhFXwfalQ9mMuYGFxn+fwn8cYEApsJbsEmb0iJwPiZ5hjFC8wREuiTlhPHDgkBLOiycd20op2nXzDbHfCHInquEe/gYxEitALONxm0swBOwJZwlTDOB7C6y2dzlrtxr1L59m7pCkWI4EtTRLvleehBoj3u7jB4usR -`) + sshname := fmt.Sprintf("tfins-ssh-%d", acctest.RandIntRange(10, 100)) instanceName := fmt.Sprintf("tfins-name-%d", acctest.RandIntRange(10, 100)) resName := "data.ibm_is_instances.ds_instances" - userData := "a" + planCrn := "crn:v1:staging:public:globalcatalog-collection:global::1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:plan:sw.1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.279a3cee-ba7d-42d5-ae88-6a0ebc56fa4a-global" + versionCrn := "crn:v1:staging:public:globalcatalog-collection:global::1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:4f8466eb-2218-42e3-a755-bf352b559c69-global/6a73aa69-5dd9-4243-a908-3b62f467cbf8-global" resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, Steps: []resource.TestStep{ { - Config: testAccCheckIBMISInstanceConfig(vpcname, subnetname, sshname, publicKey, instanceName, userData), + Config: testAccCheckIBMISInstancesDataSourceConfigWithCatalogOffering(vpcname, subnetname, sshname, instanceName, planCrn, versionCrn), Check: resource.ComposeTestCheckFunc( - testAccCheckIBMISInstanceExists("ibm_is_instance.testacc_instance", instance), - resource.TestCheckResourceAttr( - "ibm_is_instance.testacc_instance", "name", instanceName), - resource.TestCheckResourceAttr( - "ibm_is_instance.testacc_instance", "zone", acc.ISZoneName), - ), - }, - { - Config: testAccCheckIBMISInstancesDataSourceConfig(), - Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttrSet(resName, "instances.0.name"), - resource.TestCheckResourceAttrSet(resName, "instances.0.memory"), - resource.TestCheckResourceAttrSet(resName, "instances.0.status"), - resource.TestCheckResourceAttrSet(resName, "instances.0.resource_group"), - resource.TestCheckResourceAttrSet(resName, "instances.0.vpc"), - resource.TestCheckResourceAttrSet(resName, "instances.0.boot_volume.#"), - resource.TestCheckResourceAttrSet(resName, "instances.0.volume_attachments.#"), - resource.TestCheckResourceAttrSet(resName, "instances.0.primary_network_interface.#"), - resource.TestCheckResourceAttrSet(resName, "instances.0.network_interfaces.#"), - resource.TestCheckResourceAttrSet(resName, "instances.0.profile"), - resource.TestCheckResourceAttrSet(resName, "instances.0.vcpu.#"), - resource.TestCheckResourceAttrSet(resName, "instances.0.zone"), - resource.TestCheckResourceAttrSet(resName, "instances.0.availability_policy_host_failure"), - resource.TestCheckResourceAttrSet(resName, "instances.0.lifecycle_state"), - resource.TestCheckResourceAttr(resName, "instances.0.lifecycle_reasons.#", "0"), - resource.TestCheckResourceAttrSet(resName, "instances.0.vcpu.0.manufacturer"), - resource.TestCheckResourceAttrSet(resName, "instances.0.confidential_compute_mode"), - resource.TestCheckResourceAttrSet(resName, "instances.0.enable_secure_boot"), + resource.TestCheckResourceAttrSet(resName, "instances.0.catalog_offering.#"), + resource.TestCheckResourceAttrSet(resName, "instances.0.catalog_offering.0.plan_crn"), + resource.TestCheckResourceAttrSet(resName, "instances.0.catalog_offering.0.version_crn"), ), }, }, @@ -308,3 +282,94 @@ func testAccCheckIBMISInstancesDataSourceConfigInstanceGroup(insGrpName string) instance_group_name = "%s" }`, insGrpName) } + +func testAccCheckIBMISInstancesDataSourceConfigWithCatalogOffering(vpcname, subnetname, sshname, instanceName, planCrn, versionCrn string) string { + return fmt.Sprintf(` + resource "ibm_is_vpc" "testacc_vpc" { + name = "%s" + } + + resource "ibm_is_subnet" "testacc_subnet" { + name = "%s" + vpc = ibm_is_vpc.testacc_vpc.id + zone = "%s" + total_ipv4_address_count = 16 + } + + resource "ibm_is_ssh_key" "testacc_sshkey" { + name = "%s" + public_key = file("./test-fixtures/.ssh/id_rsa.pub") + } + + resource "ibm_is_instance" "testacc_instance" { + name = "%s" + profile = "%s" + primary_network_interface { + subnet = ibm_is_subnet.testacc_subnet.id + } + vpc = ibm_is_vpc.testacc_vpc.id + zone = "%s" + keys = [ibm_is_ssh_key.testacc_sshkey.id] + boot_volume { + auto_delete_volume = false + } + catalog_offering { + version_crn = "%s" + plan_crn = "%s" + } + } +data "ibm_is_instances" "ds_instances" { +}`, vpcname, subnetname, acc.ISZoneName, sshname, instanceName, acc.InstanceProfileName, acc.ISZoneName, versionCrn, planCrn) +} + +func TestAccIBMISInstancesDataSource_concom(t *testing.T) { + var instance string + vpcname := fmt.Sprintf("tfins-vpc-%d", acctest.RandIntRange(10, 100)) + subnetname := fmt.Sprintf("tfins-subnet-%d", acctest.RandIntRange(10, 100)) + publicKey := strings.TrimSpace(` +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCKVmnMOlHKcZK8tpt3MP1lqOLAcqcJzhsvJcjscgVERRN7/9484SOBJ3HSKxxNG5JN8owAjy5f9yYwcUg+JaUVuytn5Pv3aeYROHGGg+5G346xaq3DAwX6Y5ykr2fvjObgncQBnuU5KHWCECO/4h8uWuwh/kfniXPVjFToc+gnkqA+3RKpAecZhFXwfalQ9mMuYGFxn+fwn8cYEApsJbsEmb0iJwPiZ5hjFC8wREuiTlhPHDgkBLOiycd20op2nXzDbHfCHInquEe/gYxEitALONxm0swBOwJZwlTDOB7C6y2dzlrtxr1L59m7pCkWI4EtTRLvleehBoj3u7jB4usR +`) + sshname := fmt.Sprintf("tfins-ssh-%d", acctest.RandIntRange(10, 100)) + instanceName := fmt.Sprintf("tfins-name-%d", acctest.RandIntRange(10, 100)) + resName := "data.ibm_is_instances.ds_instances" + userData := "a" + resource.Test(t, resource.TestCase{ + PreCheck: func() { acc.TestAccPreCheck(t) }, + Providers: acc.TestAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccCheckIBMISInstanceConfig(vpcname, subnetname, sshname, publicKey, instanceName, userData), + Check: resource.ComposeTestCheckFunc( + testAccCheckIBMISInstanceExists("ibm_is_instance.testacc_instance", instance), + resource.TestCheckResourceAttr( + "ibm_is_instance.testacc_instance", "name", instanceName), + resource.TestCheckResourceAttr( + "ibm_is_instance.testacc_instance", "zone", acc.ISZoneName), + ), + }, + { + Config: testAccCheckIBMISInstancesDataSourceConfig(), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet(resName, "instances.0.name"), + resource.TestCheckResourceAttrSet(resName, "instances.0.memory"), + resource.TestCheckResourceAttrSet(resName, "instances.0.status"), + resource.TestCheckResourceAttrSet(resName, "instances.0.resource_group"), + resource.TestCheckResourceAttrSet(resName, "instances.0.vpc"), + resource.TestCheckResourceAttrSet(resName, "instances.0.boot_volume.#"), + resource.TestCheckResourceAttrSet(resName, "instances.0.volume_attachments.#"), + resource.TestCheckResourceAttrSet(resName, "instances.0.primary_network_interface.#"), + resource.TestCheckResourceAttrSet(resName, "instances.0.network_interfaces.#"), + resource.TestCheckResourceAttrSet(resName, "instances.0.profile"), + resource.TestCheckResourceAttrSet(resName, "instances.0.vcpu.#"), + resource.TestCheckResourceAttrSet(resName, "instances.0.zone"), + resource.TestCheckResourceAttrSet(resName, "instances.0.availability_policy_host_failure"), + resource.TestCheckResourceAttrSet(resName, "instances.0.lifecycle_state"), + resource.TestCheckResourceAttr(resName, "instances.0.lifecycle_reasons.#", "0"), + resource.TestCheckResourceAttrSet(resName, "instances.0.vcpu.0.manufacturer"), + resource.TestCheckResourceAttrSet(resName, "instances.0.confidential_compute_mode"), + resource.TestCheckResourceAttrSet(resName, "instances.0.enable_secure_boot"), + ), + }, + }, + }) +} diff --git a/ibm/service/vpc/data_source_ibm_is_security_group.go b/ibm/service/vpc/data_source_ibm_is_security_group.go index cb41feb4ac..2b5e2ddf07 100644 --- a/ibm/service/vpc/data_source_ibm_is_security_group.go +++ b/ibm/service/vpc/data_source_ibm_is_security_group.go @@ -27,6 +27,7 @@ const ( isSgRulePortMin = "port_min" isSgRuleProtocol = "protocol" isSgVPC = "vpc" + isSgVPCName = "vpc_name" isSgTags = "tags" isSgCRN = "crn" ) @@ -46,9 +47,22 @@ func DataSourceIBMISSecurityGroup() *schema.Resource { isSecurityGroupVPC: { Type: schema.TypeString, + Optional: true, + Computed: true, + Description: "Security group's vpc id", + }, + isSgVPCName: { + Type: schema.TypeString, + Optional: true, + Computed: true, + ConflictsWith: []string{isSecurityGroupVPC}, + Description: "Security group's vpc name", + }, + isSecurityGroupResourceGroup: { + Type: schema.TypeString, + Optional: true, Computed: true, Description: "Security group's resource group id", - ForceNew: true, }, isSgRules: { @@ -182,14 +196,26 @@ func DataSourceIBMISSecurityGroup() *schema.Resource { func dataSourceIBMISSecurityGroupRuleRead(d *schema.ResourceData, meta interface{}) error { sgName := d.Get(isSgName).(string) - err := securityGroupGet(d, meta, sgName) + vpcId := "" + vpcName := "" + rgId := "" + if vpcIdOk, ok := d.GetOk(isSgVPC); ok { + vpcId = vpcIdOk.(string) + } + if rgIdOk, ok := d.GetOk(isSecurityGroupResourceGroup); ok { + rgId = rgIdOk.(string) + } + if vpcNameOk, ok := d.GetOk(isSgVPCName); ok { + vpcName = vpcNameOk.(string) + } + err := securityGroupGet(d, meta, sgName, vpcId, vpcName, rgId) if err != nil { return err } return nil } -func securityGroupGet(d *schema.ResourceData, meta interface{}, name string) error { +func securityGroupGet(d *schema.ResourceData, meta interface{}, name, vpcId, vpcName, rgId string) error { sess, err := vpcClient(meta) if err != nil { return err @@ -199,8 +225,17 @@ func securityGroupGet(d *schema.ResourceData, meta interface{}, name string) err start := "" allrecs := []vpcv1.SecurityGroup{} + listSgOptions := &vpcv1.ListSecurityGroupsOptions{} + if vpcId != "" { + listSgOptions.VPCID = &vpcId + } + if vpcName != "" { + listSgOptions.VPCName = &vpcName + } + if rgId != "" { + listSgOptions.ResourceGroupID = &rgId + } for { - listSgOptions := &vpcv1.ListSecurityGroupsOptions{} if start != "" { listSgOptions.Start = &start } @@ -225,6 +260,8 @@ func securityGroupGet(d *schema.ResourceData, meta interface{}, name string) err d.Set(isSgName, *group.Name) d.Set(isSgVPC, *group.VPC.ID) + d.Set(isSgVPCName, group.VPC.Name) + d.Set(isSecurityGroupResourceGroup, group.ResourceGroup.ID) d.Set(isSgCRN, *group.CRN) tags, err := flex.GetGlobalTagsUsingCRN(meta, *group.CRN, "", isUserTagType) if err != nil { diff --git a/ibm/service/vpc/data_source_ibm_is_security_group_test.go b/ibm/service/vpc/data_source_ibm_is_security_group_test.go index 4ada572d5f..5b8653a435 100644 --- a/ibm/service/vpc/data_source_ibm_is_security_group_test.go +++ b/ibm/service/vpc/data_source_ibm_is_security_group_test.go @@ -34,6 +34,34 @@ func TestAccIBMISSecurityGroupDatasource_basic(t *testing.T) { }, }) } +func TestAccIBMISSecurityGroupDatasource_Filters(t *testing.T) { + vpcname := fmt.Sprintf("tfsubnet-vpc-%d", acctest.RandIntRange(10, 100)) + sgname := fmt.Sprintf("tfsubnet-name-%d", acctest.RandIntRange(10, 100)) + vpcname2 := fmt.Sprintf("tfsubnet-vpc2-%d", acctest.RandIntRange(10, 100)) + dataSourceName := "data.ibm_is_security_group.sg1_rule" + dataSourceName2 := "data.ibm_is_security_group.sg1_rule2" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { acc.TestAccPreCheck(t) }, + Providers: acc.TestAccProviders, + CheckDestroy: testAccCheckIBMISSecurityGroupDestroy, + Steps: []resource.TestStep{ + { + Config: testAccCheckIBMISSgRuleFilterConfig(vpcname, sgname, vpcname2, sgname), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet(dataSourceName, "vpc"), + resource.TestCheckResourceAttrSet(dataSourceName, "rules.#"), + resource.TestCheckResourceAttrSet(dataSourceName, "tags.#"), + resource.TestCheckResourceAttr(dataSourceName, "vpc_name", vpcname), + resource.TestCheckResourceAttrSet(dataSourceName2, "vpc"), + resource.TestCheckResourceAttrSet(dataSourceName2, "rules.#"), + resource.TestCheckResourceAttrSet(dataSourceName2, "tags.#"), + resource.TestCheckResourceAttr(dataSourceName2, "vpc_name", vpcname2), + ), + }, + }, + }) +} func testAccCheckIBMISSgRuleConfig(vpcname, sgname string) string { return fmt.Sprintf(` @@ -94,3 +122,116 @@ func testAccCheckIBMISSgRuleConfig(vpcname, sgname string) string { `, vpcname, sgname) } +func testAccCheckIBMISSgRuleFilterConfig(vpcname1, sgname1, vpcname2, sgname2 string) string { + return fmt.Sprintf(` + resource "ibm_is_vpc" "testacc_vpc" { + name = "%s" + } + + resource "ibm_is_security_group" "testacc_security_group" { + name = "%s" + tags = ["sgtag1" , "sgTag2"] + vpc = ibm_is_vpc.testacc_vpc.id + } + + resource "ibm_is_security_group_rule" "testacc_security_group_rule_all" { + group = ibm_is_security_group.testacc_security_group.id + direction = "inbound" + remote = "127.0.0.1" + } + + resource "ibm_is_security_group_rule" "testacc_security_group_rule_icmp" { + depends_on = [ibm_is_security_group_rule.testacc_security_group_rule_all] + group = ibm_is_security_group.testacc_security_group.id + direction = "inbound" + remote = "127.0.0.1" + icmp { + code = 20 + type = 30 + } + } + + resource "ibm_is_security_group_rule" "testacc_security_group_rule_udp" { + depends_on = [ibm_is_security_group_rule.testacc_security_group_rule_icmp] + group = ibm_is_security_group.testacc_security_group.id + direction = "inbound" + remote = "127.0.0.1" + udp { + port_min = 805 + port_max = 807 + } + } + + resource "ibm_is_security_group_rule" "testacc_security_group_rule_tcp" { + depends_on = [ibm_is_security_group_rule.testacc_security_group_rule_udp] + group = ibm_is_security_group.testacc_security_group.id + direction = "inbound" + remote = "127.0.0.1" + tcp { + port_min = 8080 + port_max = 8080 + } + } + + data "ibm_is_security_group" "sg1_rule" { + name = ibm_is_security_group.testacc_security_group.name + vpc = ibm_is_vpc.testacc_vpc.id + } + + resource "ibm_is_vpc" "testacc_vpc2" { + name = "%s" + } + + resource "ibm_is_security_group" "testacc_security_group2" { + name = "%s" + tags = ["sgtag1" , "sgTag2"] + vpc = ibm_is_vpc.testacc_vpc2.id + } + + resource "ibm_is_security_group_rule" "testacc_security_group_rule_all2" { + group = ibm_is_security_group.testacc_security_group2.id + direction = "inbound" + remote = "127.0.0.1" + } + + resource "ibm_is_security_group_rule" "testacc_security_group_rule_icmp2" { + depends_on = [ibm_is_security_group_rule.testacc_security_group_rule_all2] + group = ibm_is_security_group.testacc_security_group2.id + direction = "inbound" + remote = "127.0.0.1" + icmp { + code = 20 + type = 30 + } + } + + resource "ibm_is_security_group_rule" "testacc_security_group_rule_udp2" { + depends_on = [ibm_is_security_group_rule.testacc_security_group_rule_icmp2] + group = ibm_is_security_group.testacc_security_group2.id + direction = "inbound" + remote = "127.0.0.1" + udp { + port_min = 805 + port_max = 807 + } + } + + resource "ibm_is_security_group_rule" "testacc_security_group_rule_tcp2" { + depends_on = [ibm_is_security_group_rule.testacc_security_group_rule_udp2] + group = ibm_is_security_group.testacc_security_group2.id + direction = "inbound" + remote = "127.0.0.1" + tcp { + port_min = 8080 + port_max = 8080 + } + } + + data "ibm_is_security_group" "sg1_rule2" { + name = ibm_is_security_group.testacc_security_group2.name + vpc = ibm_is_vpc.testacc_vpc2.id + } + + `, vpcname1, sgname1, vpcname2, sgname2) + +} diff --git a/ibm/service/vpc/data_source_ibm_is_snapshot.go b/ibm/service/vpc/data_source_ibm_is_snapshot.go index 270579c8ba..3e82882fde 100644 --- a/ibm/service/vpc/data_source_ibm_is_snapshot.go +++ b/ibm/service/vpc/data_source_ibm_is_snapshot.go @@ -325,6 +325,39 @@ func DataSourceSnapshot() *schema.Resource { Set: flex.ResourceIBMVPCHash, Description: "User Tags for the snapshot", }, + isSnapshotCatalogOffering: { + Type: schema.TypeList, + Computed: true, + Description: "The catalog offering inherited from the snapshot's source. If a virtual server instance is provisioned with a source_snapshot specifying this snapshot, the virtual server instance will use this snapshot's catalog offering, including its pricing plan.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + isSnapshotCatalogOfferingPlanCrn: { + Type: schema.TypeString, + Computed: true, + Description: "The CRN for this catalog offering version's billing plan", + }, + "deleted": { + Type: schema.TypeList, + Computed: true, + Description: "If present, this property indicates the referenced resource has been deleted and provides some supplementary information.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "more_info": { + Type: schema.TypeString, + Computed: true, + Description: "Link to documentation about deleted resources.", + }, + }, + }, + }, + isSnapshotCatalogOfferingVersionCrn: { + Type: schema.TypeString, + Computed: true, + Description: "The CRN for this version of a catalog offering", + }, + }, + }, + }, isSnapshotBackupPolicyPlan: { Type: schema.TypeList, @@ -509,6 +542,33 @@ func snapshotGetByNameOrID(d *schema.ResourceData, meta interface{}, name, id st if snapshot.OperatingSystem != nil && snapshot.OperatingSystem.Name != nil { d.Set(isSnapshotOperatingSystem, *snapshot.OperatingSystem.Name) } + // catalog + if snapshot.CatalogOffering != nil { + versionCrn := "" + if snapshot.CatalogOffering.Version != nil && snapshot.CatalogOffering.Version.CRN != nil { + versionCrn = *snapshot.CatalogOffering.Version.CRN + } + catalogList := make([]map[string]interface{}, 0) + catalogMap := map[string]interface{}{} + if versionCrn != "" { + catalogMap[isSnapshotCatalogOfferingVersionCrn] = versionCrn + } + if snapshot.CatalogOffering.Plan != nil { + planCrn := "" + if snapshot.CatalogOffering.Plan != nil && snapshot.CatalogOffering.Plan.CRN != nil { + planCrn = *snapshot.CatalogOffering.Plan.CRN + } + if planCrn != "" { + catalogMap[isSnapshotCatalogOfferingPlanCrn] = planCrn + } + if snapshot.CatalogOffering.Plan.Deleted != nil { + deletedMap := resourceIbmIsSnapshotCatalogOfferingVersionPlanReferenceDeletedToMap(*snapshot.CatalogOffering.Plan.Deleted) + catalogMap["deleted"] = []map[string]interface{}{deletedMap} + } + } + catalogList = append(catalogList, catalogMap) + d.Set(isSnapshotCatalogOffering, catalogList) + } var clones []string clones = make([]string, 0) @@ -636,6 +696,33 @@ func snapshotGetByNameOrID(d *schema.ResourceData, meta interface{}, name, id st } d.Set(isSnapshotClones, flex.NewStringSet(schema.HashString, clones)) + if snapshot.CatalogOffering != nil { + versionCrn := "" + if snapshot.CatalogOffering.Version != nil && snapshot.CatalogOffering.Version.CRN != nil { + versionCrn = *snapshot.CatalogOffering.Version.CRN + } + catalogList := make([]map[string]interface{}, 0) + catalogMap := map[string]interface{}{} + if versionCrn != "" { + catalogMap[isSnapshotCatalogOfferingVersionCrn] = versionCrn + } + if snapshot.CatalogOffering.Plan != nil { + planCrn := "" + if snapshot.CatalogOffering.Plan != nil && snapshot.CatalogOffering.Plan.CRN != nil { + planCrn = *snapshot.CatalogOffering.Plan.CRN + } + if planCrn != "" { + catalogMap[isSnapshotCatalogOfferingPlanCrn] = planCrn + } + if snapshot.CatalogOffering.Plan.Deleted != nil { + deletedMap := resourceIbmIsSnapshotCatalogOfferingVersionPlanReferenceDeletedToMap(*snapshot.CatalogOffering.Plan.Deleted) + catalogMap["deleted"] = []map[string]interface{}{deletedMap} + } + } + catalogList = append(catalogList, catalogMap) + d.Set(isSnapshotCatalogOffering, catalogList) + } + backupPolicyPlanList := []map[string]interface{}{} if snapshot.BackupPolicyPlan != nil { backupPolicyPlan := map[string]interface{}{} @@ -660,3 +747,11 @@ func snapshotGetByNameOrID(d *schema.ResourceData, meta interface{}, name, id st return nil } } + +func resourceIbmIsSnapshotCatalogOfferingVersionPlanReferenceDeletedToMap(catalogOfferingVersionPlanReferenceDeleted vpcv1.CatalogOfferingVersionPlanReferenceDeleted) map[string]interface{} { + catalogOfferingVersionPlanReferenceDeletedMap := map[string]interface{}{} + + catalogOfferingVersionPlanReferenceDeletedMap["more_info"] = catalogOfferingVersionPlanReferenceDeleted.MoreInfo + + return catalogOfferingVersionPlanReferenceDeletedMap +} diff --git a/ibm/service/vpc/data_source_ibm_is_snapshot_test.go b/ibm/service/vpc/data_source_ibm_is_snapshot_test.go index 0f9a1a541e..776d5dbf90 100644 --- a/ibm/service/vpc/data_source_ibm_is_snapshot_test.go +++ b/ibm/service/vpc/data_source_ibm_is_snapshot_test.go @@ -119,6 +119,85 @@ ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCKVmnMOlHKcZK8tpt3MP1lqOLAcqcJzhsvJcjscgVE }) } +func TestAccIBMISSnapshotDatasourceWithCatalogOffering(t *testing.T) { + var snapshot string + snpName := "data.ibm_is_snapshot.ds_snapshot" + vpcname := fmt.Sprintf("tf-vpc-%d", acctest.RandIntRange(10, 100)) + name := fmt.Sprintf("tf-instnace-%d", acctest.RandIntRange(10, 100)) + subnetname := fmt.Sprintf("tf-subnet-%d", acctest.RandIntRange(10, 100)) + publicKey := strings.TrimSpace(` +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCKVmnMOlHKcZK8tpt3MP1lqOLAcqcJzhsvJcjscgVERRN7/9484SOBJ3HSKxxNG5JN8owAjy5f9yYwcUg+JaUVuytn5Pv3aeYROHGGg+5G346xaq3DAwX6Y5ykr2fvjObgncQBnuU5KHWCECO/4h8uWuwh/kfniXPVjFToc+gnkqA+3RKpAecZhFXwfalQ9mMuYGFxn+fwn8cYEApsJbsEmb0iJwPiZ5hjFC8wREuiTlhPHDgkBLOiycd20op2nXzDbHfCHInquEe/gYxEitALONxm0swBOwJZwlTDOB7C6y2dzlrtxr1L59m7pCkWI4EtTRLvleehBoj3u7jB4usR +`) + sshname := fmt.Sprintf("tf-ssh-%d", acctest.RandIntRange(10, 100)) + name1 := fmt.Sprintf("tfsnapshotuat-%d", acctest.RandIntRange(10, 100)) + planCrn := "crn:v1:staging:public:globalcatalog-collection:global::1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:plan:sw.1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.279a3cee-ba7d-42d5-ae88-6a0ebc56fa4a-global" + versionCrn := "crn:v1:staging:public:globalcatalog-collection:global::1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:4f8466eb-2218-42e3-a755-bf352b559c69-global/6a73aa69-5dd9-4243-a908-3b62f467cbf8-global" + resource.Test(t, resource.TestCase{ + PreCheck: func() { acc.TestAccPreCheck(t) }, + Providers: acc.TestAccProviders, + CheckDestroy: testAccCheckIBMISSnapshotDestroy, + Steps: []resource.TestStep{ + { + Config: testDSCheckIBMISSnapshotConfigWithCatalogOffering(vpcname, subnetname, sshname, publicKey, name, name1, planCrn, versionCrn), + Check: resource.ComposeTestCheckFunc( + testAccCheckIBMISSnapshotExists("ibm_is_snapshot.testacc_snapshot", snapshot), + resource.TestCheckResourceAttr( + "ibm_is_snapshot.testacc_snapshot", "name", name1), + resource.TestCheckResourceAttrSet(snpName, "catalog_offering.#"), + resource.TestCheckResourceAttrSet(snpName, "catalog_offering.0.version_crn"), + resource.TestCheckResourceAttrSet(snpName, "catalog_offering.0.plan_crn"), + ), + }, + }, + }) +} + +func testDSCheckIBMISSnapshotConfigWithCatalogOffering(vpcname, subnetname, sshname, publicKey, name, sname, planCrn, versionCrn string) string { + return fmt.Sprintf(` + resource "ibm_is_vpc" "testacc_vpc" { + name = "%s" + } + + resource "ibm_is_subnet" "testacc_subnet" { + name = "%s" + vpc = ibm_is_vpc.testacc_vpc.id + zone = "%s" + total_ipv4_address_count = 16 + } + + resource "ibm_is_ssh_key" "testacc_sshkey" { + name = "%s" + public_key = "%s" + } + + resource "ibm_is_instance" "testacc_instance" { + name = "%s" + profile = "%s" + primary_network_interface { + subnet = ibm_is_subnet.testacc_subnet.id + } + vpc = ibm_is_vpc.testacc_vpc.id + zone = "%s" + keys = [ibm_is_ssh_key.testacc_sshkey.id] + boot_volume { + auto_delete_volume = false + } + catalog_offering { + version_crn = "%s" + plan_crn = "%s" + } + } + resource "ibm_is_snapshot" "testacc_snapshot" { + name = "%s" + source_volume = ibm_is_instance.testacc_instance.boot_volume.0.volume_id + } + data "ibm_is_snapshot" "ds_snapshot" { + depends_on = [ibm_is_snapshot.testacc_snapshot] + name = "%s" + } +`, vpcname, subnetname, acc.ISZoneName, sshname, publicKey, name, acc.InstanceProfileName, acc.ISZoneName, versionCrn, planCrn, sname, sname) +} + func testDSCheckIBMISSnapshotConfig(vpcname, subnetname, sshname, publicKey, volname, name, sname string) string { return fmt.Sprintf(` resource "ibm_is_vpc" "testacc_vpc" { diff --git a/ibm/service/vpc/data_source_ibm_is_snapshots.go b/ibm/service/vpc/data_source_ibm_is_snapshots.go index b323149c5a..ef227c9250 100644 --- a/ibm/service/vpc/data_source_ibm_is_snapshots.go +++ b/ibm/service/vpc/data_source_ibm_is_snapshots.go @@ -437,6 +437,39 @@ func DataSourceSnapshots() *schema.Resource { Set: flex.ResourceIBMVPCHash, Description: "List of access tags", }, + isSnapshotCatalogOffering: { + Type: schema.TypeList, + Computed: true, + Description: "The catalog offering inherited from the snapshot's source. If a virtual server instance is provisioned with a source_snapshot specifying this snapshot, the virtual server instance will use this snapshot's catalog offering, including its pricing plan.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + isSnapshotCatalogOfferingPlanCrn: { + Type: schema.TypeString, + Computed: true, + Description: "The CRN for this catalog offering version's billing plan", + }, + "deleted": { + Type: schema.TypeList, + Computed: true, + Description: "If present, this property indicates the referenced resource has been deleted and provides some supplementary information.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "more_info": { + Type: schema.TypeString, + Computed: true, + Description: "Link to documentation about deleted resources.", + }, + }, + }, + }, + isSnapshotCatalogOfferingVersionCrn: { + Type: schema.TypeString, + Computed: true, + Description: "The CRN for this version of a catalog offering", + }, + }, + }, + }, isSnapshotBackupPolicyPlan: { Type: schema.TypeList, @@ -679,6 +712,35 @@ func getSnapshots(d *schema.ResourceData, meta interface{}) error { } } l[isSnapshotClones] = flex.NewStringSet(schema.HashString, clones) + + // catalog + if snapshot.CatalogOffering != nil { + versionCrn := "" + if snapshot.CatalogOffering.Version != nil && snapshot.CatalogOffering.Version.CRN != nil { + versionCrn = *snapshot.CatalogOffering.Version.CRN + } + catalogList := make([]map[string]interface{}, 0) + catalogMap := map[string]interface{}{} + if versionCrn != "" { + catalogMap[isSnapshotCatalogOfferingVersionCrn] = versionCrn + } + if snapshot.CatalogOffering.Plan != nil { + planCrn := "" + if snapshot.CatalogOffering.Plan.CRN != nil { + planCrn = *snapshot.CatalogOffering.Plan.CRN + } + if planCrn != "" { + catalogMap[isSnapshotCatalogOfferingPlanCrn] = planCrn + } + if snapshot.CatalogOffering.Plan.Deleted != nil { + deletedMap := resourceIbmIsSnapshotCatalogOfferingVersionPlanReferenceDeletedToMap(*snapshot.CatalogOffering.Plan.Deleted) + catalogMap["deleted"] = []map[string]interface{}{deletedMap} + } + } + catalogList = append(catalogList, catalogMap) + l[isSnapshotCatalogOffering] = catalogList + } + backupPolicyPlanList := []map[string]interface{}{} if snapshot.BackupPolicyPlan != nil { backupPolicyPlan := map[string]interface{}{} diff --git a/ibm/service/vpc/data_source_ibm_is_snapshots_test.go b/ibm/service/vpc/data_source_ibm_is_snapshots_test.go index 876dd94756..59e7dc95a6 100644 --- a/ibm/service/vpc/data_source_ibm_is_snapshots_test.go +++ b/ibm/service/vpc/data_source_ibm_is_snapshots_test.go @@ -95,6 +95,79 @@ ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCKVmnMOlHKcZK8tpt3MP1lqOLAcqcJzhsvJcjscgVE }, }) } + +func TestAccIBMISSnapshotsDatasourceWithCatalogOffering(t *testing.T) { + snpName := "data.ibm_is_snapshots.ds_snapshot" + vpcname := fmt.Sprintf("tf-vpc-%d", acctest.RandIntRange(10, 100)) + name := fmt.Sprintf("tf-instnace-%d", acctest.RandIntRange(10, 100)) + subnetname := fmt.Sprintf("tf-subnet-%d", acctest.RandIntRange(10, 100)) + publicKey := strings.TrimSpace(` +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCKVmnMOlHKcZK8tpt3MP1lqOLAcqcJzhsvJcjscgVERRN7/9484SOBJ3HSKxxNG5JN8owAjy5f9yYwcUg+JaUVuytn5Pv3aeYROHGGg+5G346xaq3DAwX6Y5ykr2fvjObgncQBnuU5KHWCECO/4h8uWuwh/kfniXPVjFToc+gnkqA+3RKpAecZhFXwfalQ9mMuYGFxn+fwn8cYEApsJbsEmb0iJwPiZ5hjFC8wREuiTlhPHDgkBLOiycd20op2nXzDbHfCHInquEe/gYxEitALONxm0swBOwJZwlTDOB7C6y2dzlrtxr1L59m7pCkWI4EtTRLvleehBoj3u7jB4usR +`) + sshname := fmt.Sprintf("tf-ssh-%d", acctest.RandIntRange(10, 100)) + name1 := fmt.Sprintf("tfsnapshotuat-%d", acctest.RandIntRange(10, 100)) + planCrn := "crn:v1:staging:public:globalcatalog-collection:global::1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:plan:sw.1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.279a3cee-ba7d-42d5-ae88-6a0ebc56fa4a-global" + versionCrn := "crn:v1:staging:public:globalcatalog-collection:global::1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:4f8466eb-2218-42e3-a755-bf352b559c69-global/6a73aa69-5dd9-4243-a908-3b62f467cbf8-global" + resource.Test(t, resource.TestCase{ + PreCheck: func() { acc.TestAccPreCheck(t) }, + Providers: acc.TestAccProviders, + CheckDestroy: testAccCheckIBMISSnapshotDestroy, + Steps: []resource.TestStep{ + { + Config: testAccCheckIBMISSnapshotsConfigWithCatalogOffering(vpcname, subnetname, sshname, publicKey, name, name1, planCrn, versionCrn), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet(snpName, "snapshots.0.catalog_offering.#"), + resource.TestCheckResourceAttrSet(snpName, "snapshots.0.catalog_offering.0.plan_crn"), + resource.TestCheckResourceAttrSet(snpName, "snapshots.0.catalog_offering.0.version_crn"), + ), + }, + }, + }) +} + +func TestAccIBMISSnapshotsDatasource_catalog(t *testing.T) { + var snapshot string + snpName := "data.ibm_is_snapshots.ds_snapshot" + vpcname := fmt.Sprintf("tf-vpc-%d", acctest.RandIntRange(10, 100)) + name := fmt.Sprintf("tf-instnace-%d", acctest.RandIntRange(10, 100)) + subnetname := fmt.Sprintf("tf-subnet-%d", acctest.RandIntRange(10, 100)) + publicKey := strings.TrimSpace(` +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCKVmnMOlHKcZK8tpt3MP1lqOLAcqcJzhsvJcjscgVERRN7/9484SOBJ3HSKxxNG5JN8owAjy5f9yYwcUg+JaUVuytn5Pv3aeYROHGGg+5G346xaq3DAwX6Y5ykr2fvjObgncQBnuU5KHWCECO/4h8uWuwh/kfniXPVjFToc+gnkqA+3RKpAecZhFXwfalQ9mMuYGFxn+fwn8cYEApsJbsEmb0iJwPiZ5hjFC8wREuiTlhPHDgkBLOiycd20op2nXzDbHfCHInquEe/gYxEitALONxm0swBOwJZwlTDOB7C6y2dzlrtxr1L59m7pCkWI4EtTRLvleehBoj3u7jB4usR +`) + sshname := fmt.Sprintf("tf-ssh-%d", acctest.RandIntRange(10, 100)) + volname := fmt.Sprintf("tf-vol-%d", acctest.RandIntRange(10, 100)) + name1 := fmt.Sprintf("tfsnapshotuat-%d", acctest.RandIntRange(10, 100)) + resource.Test(t, resource.TestCase{ + PreCheck: func() { acc.TestAccPreCheck(t) }, + Providers: acc.TestAccProviders, + CheckDestroy: testAccCheckIBMISSnapshotDestroy, + Steps: []resource.TestStep{ + { + Config: testAccCheckIBMISSnapshotConfig(vpcname, subnetname, sshname, publicKey, volname, name, name1), + Check: resource.ComposeTestCheckFunc( + testAccCheckIBMISSnapshotExists("ibm_is_snapshot.testacc_snapshot", snapshot), + resource.TestCheckResourceAttr( + "ibm_is_snapshot.testacc_snapshot", "name", name1), + ), + }, + { + Config: testDSCheckIBMISSnapshotsConfig(name1), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr( + snpName, "snapshots.0.name", name1), + resource.TestCheckResourceAttrSet(snpName, "snapshots.0.href"), + resource.TestCheckResourceAttrSet(snpName, "snapshots.0.crn"), + resource.TestCheckResourceAttrSet(snpName, "snapshots.0.lifecycle_state"), + resource.TestCheckResourceAttrSet(snpName, "snapshots.0.encryption"), + resource.TestCheckResourceAttrSet(snpName, "snapshots.0.captured_at"), + resource.TestCheckResourceAttrSet(snpName, "snapshots.0.catalog_offering.#"), + resource.TestCheckResourceAttrSet(snpName, "snapshots.0.catalog_offering.0.version_crn"), + resource.TestCheckResourceAttrSet(snpName, "snapshots.0.catalog_offering.0.plan_crn"), + ), + }, + }, + }) +} func TestAccIBMISSnapshotsDatasource_clonesbasic(t *testing.T) { var snapshot string snpName := "data.ibm_is_snapshots.ds_snapshot" @@ -146,3 +219,48 @@ func testDSCheckIBMISSnapshotsConfig(name1 string) string { name = "%s" }`, name1) } + +func testAccCheckIBMISSnapshotsConfigWithCatalogOffering(vpcname, subnetname, sshname, publicKey, name, sname, planCrn, versionCrn string) string { + return fmt.Sprintf(` + resource "ibm_is_vpc" "testacc_vpc" { + name = "%s" + } + + resource "ibm_is_subnet" "testacc_subnet" { + name = "%s" + vpc = ibm_is_vpc.testacc_vpc.id + zone = "%s" + total_ipv4_address_count = 16 + } + + resource "ibm_is_ssh_key" "testacc_sshkey" { + name = "%s" + public_key = "%s" + } + + resource "ibm_is_instance" "testacc_instance" { + name = "%s" + profile = "%s" + primary_network_interface { + subnet = ibm_is_subnet.testacc_subnet.id + } + vpc = ibm_is_vpc.testacc_vpc.id + zone = "%s" + keys = [ibm_is_ssh_key.testacc_sshkey.id] + boot_volume { + auto_delete_volume = false + } + catalog_offering { + version_crn = "%s" + plan_crn = "%s" + } + } + resource "ibm_is_snapshot" "testacc_snapshot" { + name = "%s" + source_volume = ibm_is_instance.testacc_instance.boot_volume.0.volume_id + } + data "ibm_is_snapshots" "ds_snapshot" { + name = "%s" + } +`, vpcname, subnetname, acc.ISZoneName, sshname, publicKey, name, acc.InstanceProfileName, acc.ISZoneName, versionCrn, planCrn, sname, sname) +} diff --git a/ibm/service/vpc/data_source_ibm_is_virtual_network_interface.go b/ibm/service/vpc/data_source_ibm_is_virtual_network_interface.go index cfd0945afb..ed62a65983 100644 --- a/ibm/service/vpc/data_source_ibm_is_virtual_network_interface.go +++ b/ibm/service/vpc/data_source_ibm_is_virtual_network_interface.go @@ -184,6 +184,11 @@ func DataSourceIBMIsVirtualNetworkInterface() *schema.Resource { }, }, }, + "protocol_state_filtering_mode": { + Type: schema.TypeString, + Computed: true, + Description: "The protocol state filtering mode used for this virtual network interface.", + }, "resource_group": { Type: schema.TypeList, Computed: true, @@ -471,7 +476,9 @@ func dataSourceIBMIsVirtualNetworkInterfaceRead(context context.Context, d *sche if err = d.Set("primary_ip", primaryIP); err != nil { return diag.FromErr(fmt.Errorf("Error setting primary_ip %s", err)) } - + if virtualNetworkInterface.ProtocolStateFilteringMode != nil { + d.Set("protocol_state_filtering_mode", virtualNetworkInterface.ProtocolStateFilteringMode) + } resourceGroup := []map[string]interface{}{} if virtualNetworkInterface.ResourceGroup != nil { modelMap, err := dataSourceIBMIsVirtualNetworkInterfaceResourceGroupReferenceToMap(virtualNetworkInterface.ResourceGroup) diff --git a/ibm/service/vpc/data_source_ibm_is_virtual_network_interfaces.go b/ibm/service/vpc/data_source_ibm_is_virtual_network_interfaces.go index 4db5bee907..f45cd66b88 100644 --- a/ibm/service/vpc/data_source_ibm_is_virtual_network_interfaces.go +++ b/ibm/service/vpc/data_source_ibm_is_virtual_network_interfaces.go @@ -192,6 +192,11 @@ func DataSourceIBMIsVirtualNetworkInterfaces() *schema.Resource { }, }, }, + "protocol_state_filtering_mode": { + Type: schema.TypeString, + Computed: true, + Description: "The protocol state filtering mode used for this virtual network interface.", + }, "resource_group": &schema.Schema{ Type: schema.TypeList, Computed: true, @@ -525,6 +530,9 @@ func dataSourceIBMIsVirtualNetworkInterfacesVirtualNetworkInterfaceToMap(model * } modelMap["primary_ip"] = []map[string]interface{}{primaryIPMap} } + if model.ProtocolStateFilteringMode != nil { + modelMap["protocol_state_filtering_mode"] = *model.ProtocolStateFilteringMode + } if model.ResourceGroup != nil { resourceGroupMap, err := dataSourceIBMIsVirtualNetworkInterfaceResourceGroupReferenceToMap(model.ResourceGroup) if err != nil { diff --git a/ibm/service/vpc/data_source_ibm_is_volume.go b/ibm/service/vpc/data_source_ibm_is_volume.go index 75c44512a7..9994ed1797 100644 --- a/ibm/service/vpc/data_source_ibm_is_volume.go +++ b/ibm/service/vpc/data_source_ibm_is_volume.go @@ -178,6 +178,39 @@ func DataSourceIBMISVolume() *schema.Resource { }, }, }, + isVolumeCatalogOffering: { + Type: schema.TypeList, + Computed: true, + Description: "The catalog offering this volume was created from. If a virtual server instance is provisioned with a boot_volume_attachment specifying this volume, the virtual server instance will use this volume's catalog offering, including its pricing plan.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + isVolumeCatalogOfferingPlanCrn: { + Type: schema.TypeString, + Computed: true, + Description: "The CRN for this catalog offering version's billing plan", + }, + "deleted": { + Type: schema.TypeList, + Computed: true, + Description: "If present, this property indicates the referenced resource has been deleted and provides some supplementary information.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "more_info": { + Type: schema.TypeString, + Computed: true, + Description: "Link to documentation about deleted resources.", + }, + }, + }, + }, + isVolumeCatalogOfferingVersionCrn: { + Type: schema.TypeString, + Computed: true, + Description: "The CRN for this version of a catalog offering", + }, + }, + }, + }, isVolumeHealthState: { Type: schema.TypeString, @@ -404,8 +437,43 @@ func volumeGet(d *schema.ResourceData, meta interface{}, name string) error { } d.Set(isVolumeHealthReasons, healthReasonsList) } + // catalog + if vol.CatalogOffering != nil { + versionCrn := "" + if vol.CatalogOffering.Version != nil && vol.CatalogOffering.Version.CRN != nil { + versionCrn = *vol.CatalogOffering.Version.CRN + } + catalogList := make([]map[string]interface{}, 0) + catalogMap := map[string]interface{}{} + if versionCrn != "" { + catalogMap[isVolumeCatalogOfferingVersionCrn] = versionCrn + } + if vol.CatalogOffering.Plan != nil { + planCrn := "" + if vol.CatalogOffering.Plan.CRN != nil { + planCrn = *vol.CatalogOffering.Plan.CRN + } + if planCrn != "" { + catalogMap[isVolumeCatalogOfferingPlanCrn] = *vol.CatalogOffering.Plan.CRN + } + if vol.CatalogOffering.Plan.Deleted != nil { + deletedMap := resourceIbmIsVolumeCatalogOfferingVersionPlanReferenceDeletedToMap(*vol.CatalogOffering.Plan.Deleted) + catalogMap["deleted"] = []map[string]interface{}{deletedMap} + } + } + catalogList = append(catalogList, catalogMap) + d.Set(isVolumeCatalogOffering, catalogList) + } if vol.HealthState != nil { d.Set(isVolumeHealthState, *vol.HealthState) } return nil } + +func resourceIbmIsVolumeCatalogOfferingVersionPlanReferenceDeletedToMap(catalogOfferingVersionPlanReferenceDeleted vpcv1.CatalogOfferingVersionPlanReferenceDeleted) map[string]interface{} { + catalogOfferingVersionPlanReferenceDeletedMap := map[string]interface{}{} + + catalogOfferingVersionPlanReferenceDeletedMap["more_info"] = catalogOfferingVersionPlanReferenceDeleted.MoreInfo + + return catalogOfferingVersionPlanReferenceDeletedMap +} diff --git a/ibm/service/vpc/data_source_ibm_is_volume_test.go b/ibm/service/vpc/data_source_ibm_is_volume_test.go index bf21675fce..b35015d9b0 100644 --- a/ibm/service/vpc/data_source_ibm_is_volume_test.go +++ b/ibm/service/vpc/data_source_ibm_is_volume_test.go @@ -103,6 +103,37 @@ ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCKVmnMOlHKcZK8tpt3MP1lqOLAcqcJzhsvJcjscgVE }, }) } +func TestAccIBMISVolumeDatasourceWithCatalogOffering(t *testing.T) { + + resName := "data.ibm_is_volume.testacc_dsvol" + vpcname := fmt.Sprintf("tf-vpc-%d", acctest.RandIntRange(10, 100)) + name := fmt.Sprintf("tf-instnace-%d", acctest.RandIntRange(10, 100)) + subnetname := fmt.Sprintf("tf-subnet-%d", acctest.RandIntRange(10, 100)) + publicKey := strings.TrimSpace(` +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCKVmnMOlHKcZK8tpt3MP1lqOLAcqcJzhsvJcjscgVERRN7/9484SOBJ3HSKxxNG5JN8owAjy5f9yYwcUg+JaUVuytn5Pv3aeYROHGGg+5G346xaq3DAwX6Y5ykr2fvjObgncQBnuU5KHWCECO/4h8uWuwh/kfniXPVjFToc+gnkqA+3RKpAecZhFXwfalQ9mMuYGFxn+fwn8cYEApsJbsEmb0iJwPiZ5hjFC8wREuiTlhPHDgkBLOiycd20op2nXzDbHfCHInquEe/gYxEitALONxm0swBOwJZwlTDOB7C6y2dzlrtxr1L59m7pCkWI4EtTRLvleehBoj3u7jB4usR +`) + sshname := fmt.Sprintf("tf-ssh-%d", acctest.RandIntRange(10, 100)) + planCrn := "crn:v1:staging:public:globalcatalog-collection:global::1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:plan:sw.1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.279a3cee-ba7d-42d5-ae88-6a0ebc56fa4a-global" + versionCrn := "crn:v1:staging:public:globalcatalog-collection:global::1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:4f8466eb-2218-42e3-a755-bf352b559c69-global/6a73aa69-5dd9-4243-a908-3b62f467cbf8-global" + resource.Test(t, resource.TestCase{ + PreCheck: func() { acc.TestAccPreCheck(t) }, + Providers: acc.TestAccProviders, + Steps: []resource.TestStep{ + { + Config: testAccCheckIBMISVolumeDataSourceWithCatalogOffering(vpcname, subnetname, sshname, publicKey, name, planCrn, versionCrn), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet( + resName, "catalog_offering.#"), + resource.TestCheckResourceAttrSet( + resName, "catalog_offering.0.plan_crn"), + resource.TestCheckResourceAttrSet( + resName, "catalog_offering.0.version_crn"), + ), + }, + }, + }) +} + func testAccCheckIBMISVolumeDataSourceFromSnapshotConfig(vpcname, subnetname, sshname, publicKey, volname, name, name1 string) string { return testAccCheckIBMISVolumeConfigSnapshot(vpcname, subnetname, sshname, publicKey, volname, name, name1) + fmt.Sprintf(` @@ -121,3 +152,45 @@ func testAccCheckIBMISVolumeDataSourceConfig(name, zone string) string { name = ibm_is_volume.testacc_volume.name }`, name, zone) } + +func testAccCheckIBMISVolumeDataSourceWithCatalogOffering(vpcname, subnetname, sshname, publicKey, name, planCrn, versionCrn string) string { + return fmt.Sprintf(` + + resource "ibm_is_vpc" "testacc_vpc" { + name = "%s" + } + + resource "ibm_is_subnet" "testacc_subnet" { + name = "%s" + vpc = ibm_is_vpc.testacc_vpc.id + zone = "%s" + total_ipv4_address_count = 16 + } + + resource "ibm_is_ssh_key" "testacc_sshkey" { + name = "%s" + public_key = "%s" + } + + resource "ibm_is_instance" "testacc_instance" { + name = "%s" + profile = "%s" + primary_network_interface { + subnet = ibm_is_subnet.testacc_subnet.id + } + vpc = ibm_is_vpc.testacc_vpc.id + zone = "%s" + keys = [ibm_is_ssh_key.testacc_sshkey.id] + boot_volume { + auto_delete_volume = false + } + catalog_offering { + version_crn = "%s" + plan_crn = "%s" + } + } + + data "ibm_is_volume" "testacc_dsvol" { + name = ibm_is_instance.testacc_instance.boot_volume.0.name + }`, vpcname, subnetname, acc.ISZoneName, sshname, publicKey, name, acc.InstanceProfileName, acc.ISZoneName, versionCrn, planCrn) +} diff --git a/ibm/service/vpc/data_source_ibm_is_volumes.go b/ibm/service/vpc/data_source_ibm_is_volumes.go index 3fb204a337..aec47ddeed 100644 --- a/ibm/service/vpc/data_source_ibm_is_volumes.go +++ b/ibm/service/vpc/data_source_ibm_is_volumes.go @@ -584,7 +584,39 @@ func DataSourceIBMIsVolumes() *schema.Resource { }, }, }, - + isVolumeCatalogOffering: { + Type: schema.TypeList, + Computed: true, + Description: "The catalog offering this volume was created from. If a virtual server instance is provisioned with a boot_volume_attachment specifying this volume, the virtual server instance will use this volume's catalog offering, including its pricing plan.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + isVolumeCatalogOfferingPlanCrn: { + Type: schema.TypeString, + Computed: true, + Description: "The CRN for this catalog offering version's billing plan", + }, + "deleted": { + Type: schema.TypeList, + Computed: true, + Description: "If present, this property indicates the referenced resource has been deleted and provides some supplementary information.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "more_info": { + Type: schema.TypeString, + Computed: true, + Description: "Link to documentation about deleted resources.", + }, + }, + }, + }, + isVolumeCatalogOfferingVersionCrn: { + Type: schema.TypeString, + Computed: true, + Description: "The CRN for this version of a catalog offering", + }, + }, + }, + }, isVolumeHealthState: { Type: schema.TypeString, Computed: true, @@ -774,6 +806,32 @@ func dataSourceVolumeCollectionVolumesToMap(volumesItem vpcv1.Volume, meta inter } volumesMap[isVolumeHealthReasons] = healthReasonsList } + if volumesItem.CatalogOffering != nil { + versionCrn := "" + if volumesItem.CatalogOffering.Version != nil && volumesItem.CatalogOffering.Version.CRN != nil { + versionCrn = *volumesItem.CatalogOffering.Version.CRN + } + catalogList := make([]map[string]interface{}, 0) + catalogMap := map[string]interface{}{} + if versionCrn != "" { + catalogMap[isVolumeCatalogOfferingVersionCrn] = versionCrn + } + if volumesItem.CatalogOffering.Plan != nil { + planCrn := "" + if volumesItem.CatalogOffering.Plan.CRN != nil { + planCrn = *volumesItem.CatalogOffering.Plan.CRN + } + if planCrn != "" { + catalogMap[isVolumeCatalogOfferingPlanCrn] = *volumesItem.CatalogOffering.Plan.CRN + } + if volumesItem.CatalogOffering.Plan.Deleted != nil { + deletedMap := resourceIbmIsVolumeCatalogOfferingVersionPlanReferenceDeletedToMap(*volumesItem.CatalogOffering.Plan.Deleted) + catalogMap["deleted"] = []map[string]interface{}{deletedMap} + } + } + catalogList = append(catalogList, catalogMap) + volumesMap[isVolumeCatalogOffering] = catalogList + } if volumesItem.VolumeAttachments != nil { volumeAttachmentsList := []map[string]interface{}{} for _, volumeAttachmentsItem := range volumesItem.VolumeAttachments { diff --git a/ibm/service/vpc/data_source_ibm_is_volumes_test.go b/ibm/service/vpc/data_source_ibm_is_volumes_test.go index d2a84c6347..5e9a147e39 100644 --- a/ibm/service/vpc/data_source_ibm_is_volumes_test.go +++ b/ibm/service/vpc/data_source_ibm_is_volumes_test.go @@ -97,6 +97,38 @@ ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCKVmnMOlHKcZK8tpt3MP1lqOLAcqcJzhsvJcjscgVE }, }) } + +func TestAccIBMIsVolumesFromSnapshotDataSourceWithCatalogOffering(t *testing.T) { + resName := "data.ibm_is_volumes.is_volumes" + vpcname := fmt.Sprintf("tf-vpc-%d", acctest.RandIntRange(10, 100)) + name := fmt.Sprintf("tf-instnace-%d", acctest.RandIntRange(10, 100)) + subnetname := fmt.Sprintf("tf-subnet-%d", acctest.RandIntRange(10, 100)) + publicKey := strings.TrimSpace(` +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCKVmnMOlHKcZK8tpt3MP1lqOLAcqcJzhsvJcjscgVERRN7/9484SOBJ3HSKxxNG5JN8owAjy5f9yYwcUg+JaUVuytn5Pv3aeYROHGGg+5G346xaq3DAwX6Y5ykr2fvjObgncQBnuU5KHWCECO/4h8uWuwh/kfniXPVjFToc+gnkqA+3RKpAecZhFXwfalQ9mMuYGFxn+fwn8cYEApsJbsEmb0iJwPiZ5hjFC8wREuiTlhPHDgkBLOiycd20op2nXzDbHfCHInquEe/gYxEitALONxm0swBOwJZwlTDOB7C6y2dzlrtxr1L59m7pCkWI4EtTRLvleehBoj3u7jB4usR +`) + sshname := fmt.Sprintf("tf-ssh-%d", acctest.RandIntRange(10, 100)) + planCrn := "crn:v1:staging:public:globalcatalog-collection:global::1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:plan:sw.1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.279a3cee-ba7d-42d5-ae88-6a0ebc56fa4a-global" + versionCrn := "crn:v1:staging:public:globalcatalog-collection:global::1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:4f8466eb-2218-42e3-a755-bf352b559c69-global/6a73aa69-5dd9-4243-a908-3b62f467cbf8-global" + resource.Test(t, resource.TestCase{ + PreCheck: func() { acc.TestAccPreCheck(t) }, + Providers: acc.TestAccProviders, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccCheckIBMIsVolumesWithCatalogOffering(vpcname, subnetname, sshname, publicKey, name, planCrn, versionCrn), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttrSet("data.ibm_is_volumes.is_volumes", "id"), + resource.TestCheckResourceAttrSet("data.ibm_is_volumes.is_volumes", "volumes.#"), + resource.TestCheckResourceAttrSet( + resName, "volumes.0.catalog_offering.#"), + resource.TestCheckResourceAttrSet( + resName, "volumes.0.catalog_offering.0.plan_crn"), + resource.TestCheckResourceAttrSet( + resName, "volumes.0.catalog_offering.0.version_crn"), + ), + }, + }, + }) +} func testAccCheckIBMIsVolumesFromSnapshotDataSourceConfigBasic(vpcname, subnetname, sshname, publicKey, volname, name, name1 string) string { return testAccCheckIBMISVolumeConfigSnapshot(vpcname, subnetname, sshname, publicKey, volname, name, name1) + fmt.Sprintf(` data "ibm_is_volumes" "is_volumes" { @@ -130,3 +162,44 @@ func testAccCheckIBMIsVolumesDataSourceConfigFilterByName() string { } `) } + +func testAccCheckIBMIsVolumesWithCatalogOffering(vpcname, subnetname, sshname, publicKey, name, planCrn, versionCrn string) string { + return fmt.Sprintf(` + + resource "ibm_is_vpc" "testacc_vpc" { + name = "%s" + } + + resource "ibm_is_subnet" "testacc_subnet" { + name = "%s" + vpc = ibm_is_vpc.testacc_vpc.id + zone = "%s" + total_ipv4_address_count = 16 + } + + resource "ibm_is_ssh_key" "testacc_sshkey" { + name = "%s" + public_key = "%s" + } + + resource "ibm_is_instance" "testacc_instance" { + name = "%s" + profile = "%s" + primary_network_interface { + subnet = ibm_is_subnet.testacc_subnet.id + } + vpc = ibm_is_vpc.testacc_vpc.id + zone = "%s" + keys = [ibm_is_ssh_key.testacc_sshkey.id] + boot_volume { + auto_delete_volume = false + } + catalog_offering { + version_crn = "%s" + plan_crn = "%s" + } + } + data "ibm_is_volumes" "is_volumes" { + volume_name = ibm_is_instance.testacc_instance.boot_volume.0.name + }`, vpcname, subnetname, acc.ISZoneName, sshname, publicKey, name, acc.InstanceProfileName, acc.ISZoneName, versionCrn, planCrn) +} diff --git a/ibm/service/vpc/resource_ibm_is_bare_metal_server.go b/ibm/service/vpc/resource_ibm_is_bare_metal_server.go index b3e6843848..f6b6607f33 100644 --- a/ibm/service/vpc/resource_ibm_is_bare_metal_server.go +++ b/ibm/service/vpc/resource_ibm_is_bare_metal_server.go @@ -569,6 +569,13 @@ func ResourceIBMIsBareMetalServer() *schema.Resource { ValidateFunc: validate.InvokeValidator("ibm_is_virtual_network_interface", "vni_name"), Description: "The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC.", }, + "protocol_state_filtering_mode": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validate.InvokeValidator("ibm_is_virtual_network_interface", "protocol_state_filtering_mode"), + Description: "The protocol state filtering mode used for this virtual network interface.", + }, "primary_ip": &schema.Schema{ Type: schema.TypeList, Optional: true, @@ -959,6 +966,13 @@ func ResourceIBMIsBareMetalServer() *schema.Resource { ValidateFunc: validate.InvokeValidator("ibm_is_virtual_network_interface", "vni_name"), Description: "The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC.", }, + "protocol_state_filtering_mode": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validate.InvokeValidator("ibm_is_virtual_network_interface", "protocol_state_filtering_mode"), + Description: "The protocol state filtering mode used for this virtual network interface.", + }, "primary_ip": &schema.Schema{ Type: schema.TypeList, Optional: true, @@ -2387,6 +2401,10 @@ func bareMetalServerUpdate(context context.Context, d *schema.ResourceData, meta allIpSpoofing := d.Get("primary_network_attachment.0.virtual_network_interface.0.allow_ip_spoofing").(bool) virtualNetworkInterfacePatch.AllowIPSpoofing = &allIpSpoofing } + if d.HasChange("primary_network_attachment.0.virtual_network_interface.0.protocol_state_filtering_mode") { + psfMode := d.Get("primary_network_attachment.0.virtual_network_interface.0.protocol_state_filtering_mode").(string) + virtualNetworkInterfacePatch.ProtocolStateFilteringMode = &psfMode + } virtualNetworkInterfacePatchAsPatch, err := virtualNetworkInterfacePatch.AsPatch() if err != nil { return fmt.Errorf("[ERROR] Error encountered while apply as patch for virtualNetworkInterfacePatch of BareMetalServer(%s) vni (%s) %s", d.Id(), vniId, err) @@ -4058,6 +4076,7 @@ func resourceIBMIsBareMetalServerBareMetalServerNetworkAttachmentReferenceToMap( vniMap["auto_delete"] = vniDetails.AutoDelete vniMap["enable_infrastructure_nat"] = vniDetails.EnableInfrastructureNat vniMap["resource_group"] = vniDetails.ResourceGroup.ID + vniMap["protocol_state_filtering_mode"] = vniDetails.ProtocolStateFilteringMode primaryipId := *vniDetails.PrimaryIP.ID if !core.IsNil(vniDetails.Ips) { ips := []map[string]interface{}{} @@ -4200,6 +4219,9 @@ func resourceIBMIsBareMetalServerMapToVirtualNetworkInterfacePrototypeAttachment if _, ok := d.GetOkExists(enablenat); ok && modelMap["enable_infrastructure_nat"] != nil { model.EnableInfrastructureNat = core.BoolPtr(modelMap["enable_infrastructure_nat"].(bool)) } + if pStateFilteringInt, ok := modelMap["protocol_state_filtering_mode"]; ok { + model.ProtocolStateFilteringMode = core.StringPtr(pStateFilteringInt.(string)) + } if modelMap["ips"] != nil && modelMap["ips"].(*schema.Set).Len() > 0 { ips := []vpcv1.VirtualNetworkInterfaceIPPrototypeIntf{} for _, ipsItem := range modelMap["ips"].(*schema.Set).List() { @@ -4458,6 +4480,9 @@ func compareAddedNacs(oldList, newList []interface{}, bareMetalServerId string) } virtualNetworkInterface.PrimaryIP = primaryIPModel } + if newListItemVniMap["protocol_state_filtering_mode"] != nil && newListItemVniMap["protocol_state_filtering_mode"].(string) != "" { + virtualNetworkInterface.ProtocolStateFilteringMode = core.StringPtr(newListItemVniMap["protocol_state_filtering_mode"].(string)) + } if newListItemVniMap["resource_group"] != nil && newListItemVniMap["resource_group"].(string) != "" { virtualNetworkInterface.ResourceGroup = &vpcv1.ResourceGroupIdentity{ @@ -4544,6 +4569,9 @@ func compareAddedNacs(oldList, newList []interface{}, bareMetalServerId string) } virtualNetworkInterface.PrimaryIP = primaryIPModel } + if newListVniitemmMap["protocol_state_filtering_mode"] != nil && newListVniitemmMap["protocol_state_filtering_mode"].(string) != "" { + virtualNetworkInterface.ProtocolStateFilteringMode = core.StringPtr(newListVniitemmMap["protocol_state_filtering_mode"].(string)) + } if newListVniitemmMap["resource_group"] != nil && newListVniitemmMap["resource_group"].(string) != "" { virtualNetworkInterface.ResourceGroup = &vpcv1.ResourceGroupIdentity{ @@ -4657,6 +4685,8 @@ func compareModifiedNacs(oldList, newList []interface{}, bareMetalServerId strin s2vniMapIPS := s2VniMap["ips"] s2vniMapName := s2VniMap["name"] s2vniMapSG := s2VniMap["security_groups"] + s1vniPSFM := s1VniMap["protocol_state_filtering_mode"] + s2vniPSFM := s2VniMap["protocol_state_filtering_mode"] vniUpdateOptions := &vpcv1.UpdateVirtualNetworkInterfaceOptions{ ID: &vniId, } @@ -4678,7 +4708,13 @@ func compareModifiedNacs(oldList, newList []interface{}, bareMetalServerId strin vniPatch.Name = core.StringPtr(s2vniMapName.(string)) hasChanged = true } + if s1vniPSFM != nil && s2vniPSFM != nil && s1vniPSFM.(string) != s2vniPSFM.(string) { + vniPatch.ProtocolStateFilteringMode = core.StringPtr(s2vniPSFM.(string)) + hasChanged = true + } if hasChanged { + virtualNetworkInterfacePatchAsPatch, err := vniPatch.AsPatch() + vniUpdateOptions.VirtualNetworkInterfacePatch = virtualNetworkInterfacePatchAsPatch _, res, err := sess.UpdateVirtualNetworkInterface(vniUpdateOptions) if err != nil { return fmt.Errorf("%s/n%v", err, res) diff --git a/ibm/service/vpc/resource_ibm_is_bare_metal_server_network_attachment.go b/ibm/service/vpc/resource_ibm_is_bare_metal_server_network_attachment.go index 93c4309274..7d37c7a7c1 100644 --- a/ibm/service/vpc/resource_ibm_is_bare_metal_server_network_attachment.go +++ b/ibm/service/vpc/resource_ibm_is_bare_metal_server_network_attachment.go @@ -172,6 +172,13 @@ func ResourceIBMIsBareMetalServerNetworkAttachment() *schema.Resource { ValidateFunc: validate.InvokeValidator("ibm_is_virtual_network_interface", "vni_name"), Description: "The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC.", }, + "protocol_state_filtering_mode": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validate.InvokeValidator("ibm_is_virtual_network_interface", "protocol_state_filtering_mode"), + Description: "The protocol state filtering mode used for this virtual network interface.", + }, "primary_ip": &schema.Schema{ Type: schema.TypeList, Optional: true, @@ -933,6 +940,10 @@ func resourceIBMIsBareMetalServerNetworkAttachmentUpdate(context context.Context return diag.FromErr(fmt.Errorf("[ERROR] Error updating vni reserved ip(%s): %s\n%s", ripId, err, response)) } } + if d.HasChange("virtual_network_interface.0.protocol_state_filtering_mode") { + psfMode := d.Get("virtual_network_interface.0.protocol_state_filtering_mode").(string) + virtualNetworkInterfacePatch.ProtocolStateFilteringMode = &psfMode + } if d.HasChange("virtual_network_interface.0.security_groups") { ovs, nvs := d.GetChange("virtual_network_interface.0.security_groups") ov := ovs.(*schema.Set) @@ -1081,6 +1092,9 @@ func resourceIBMIsBareMetalServerNetworkAttachmentMapToBareMetalServerNetworkAtt if modelMap["name"] != nil && modelMap["name"].(string) != "" { model.Name = core.StringPtr(modelMap["name"].(string)) } + if pStateFilteringInt, ok := modelMap["protocol_state_filtering_mode"]; ok { + model.ProtocolStateFilteringMode = core.StringPtr(pStateFilteringInt.(string)) + } if modelMap["primary_ip"] != nil && len(modelMap["primary_ip"].([]interface{})) > 0 { PrimaryIPModel, err := resourceIBMIsBareMetalServerNetworkAttachmentMapToVirtualNetworkInterfacePrimaryIPPrototype(modelMap["primary_ip"].([]interface{})[0].(map[string]interface{})) if err != nil { @@ -1188,6 +1202,7 @@ func resourceIBMIsBareMetalServerNetworkAttachmentVirtualNetworkInterfaceReferen modelMap["auto_delete"] = vniDetails.AutoDelete modelMap["enable_infrastructure_nat"] = vniDetails.EnableInfrastructureNat modelMap["resource_group"] = vniDetails.ResourceGroup.ID + modelMap["protocol_state_filtering_mode"] = vniDetails.ProtocolStateFilteringMode primaryipId := *vniDetails.PrimaryIP.ID if !core.IsNil(vniDetails.Ips) { ips := []map[string]interface{}{} diff --git a/ibm/service/vpc/resource_ibm_is_bare_metal_server_network_attachment_test.go b/ibm/service/vpc/resource_ibm_is_bare_metal_server_network_attachment_test.go index 4302347a42..05c523eb8a 100644 --- a/ibm/service/vpc/resource_ibm_is_bare_metal_server_network_attachment_test.go +++ b/ibm/service/vpc/resource_ibm_is_bare_metal_server_network_attachment_test.go @@ -94,6 +94,65 @@ ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCKVmnMOlHKcZK8tpt3MP1lqOLAcqcJzhsvJcjscgVE }) } +func TestAccIBMIsBareMetalServerNetworkAttachmentVlanPSFM(t *testing.T) { + var conf vpcv1.BareMetalServerNetworkAttachment + vpcname := fmt.Sprintf("tf-vpc-%d", acctest.RandIntRange(10, 100)) + name := fmt.Sprintf("tf-server-%d", acctest.RandIntRange(10, 100)) + subnetname := fmt.Sprintf("tfip-subnet-%d", acctest.RandIntRange(10, 100)) + publicKey := strings.TrimSpace(` +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCKVmnMOlHKcZK8tpt3MP1lqOLAcqcJzhsvJcjscgVERRN7/9484SOBJ3HSKxxNG5JN8owAjy5f9yYwcUg+JaUVuytn5Pv3aeYROHGGg+5G346xaq3DAwX6Y5ykr2fvjObgncQBnuU5KHWCECO/4h8uWuwh/kfniXPVjFToc+gnkqA+3RKpAecZhFXwfalQ9mMuYGFxn+fwn8cYEApsJbsEmb0iJwPiZ5hjFC8wREuiTlhPHDgkBLOiycd20op2nXzDbHfCHInquEe/gYxEitALONxm0swBOwJZwlTDOB7C6y2dzlrtxr1L59m7pCkWI4EtTRLvleehBoj3u7jB4usR +`) + sshname := fmt.Sprintf("tf-sshname-%d", acctest.RandIntRange(10, 100)) + vniname := fmt.Sprintf("tf-vni-%d", acctest.RandIntRange(10, 100)) + psfm1 := "auto" + psfm2 := "disabled" + resource.Test(t, resource.TestCase{ + PreCheck: func() { acc.TestAccPreCheck(t) }, + Providers: acc.TestAccProviders, + CheckDestroy: testAccCheckIBMIsBareMetalServerNetworkAttachmentDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccCheckIBMIsBareMetalServerNetworkAttachmentConfigVlanPSFM(vpcname, subnetname, sshname, publicKey, vniname, name, psfm1), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckIBMIsBareMetalServerNetworkAttachmentExists("ibm_is_bare_metal_server_network_attachment.is_bare_metal_server_network_attachment", conf), + resource.TestCheckResourceAttrSet("ibm_is_bare_metal_server_network_attachment.is_bare_metal_server_network_attachment", "vlan"), + resource.TestCheckResourceAttrSet("ibm_is_bare_metal_server_network_attachment.is_bare_metal_server_network_attachment", "created_at"), + resource.TestCheckResourceAttrSet("ibm_is_bare_metal_server_network_attachment.is_bare_metal_server_network_attachment", "href"), + resource.TestCheckResourceAttrSet("ibm_is_bare_metal_server_network_attachment.is_bare_metal_server_network_attachment", "id"), + resource.TestCheckResourceAttrSet("ibm_is_bare_metal_server_network_attachment.is_bare_metal_server_network_attachment", "interface_type"), + resource.TestCheckResourceAttrSet("ibm_is_bare_metal_server_network_attachment.is_bare_metal_server_network_attachment", "name"), + resource.TestCheckResourceAttrSet("ibm_is_bare_metal_server_network_attachment.is_bare_metal_server_network_attachment", "port_speed"), + resource.TestCheckResourceAttrSet("ibm_is_bare_metal_server_network_attachment.is_bare_metal_server_network_attachment", "virtual_network_interface.#"), + resource.TestCheckResourceAttrSet("ibm_is_bare_metal_server_network_attachment.is_bare_metal_server_network_attachment", "virtual_network_interface.0.primary_ip.#"), + resource.TestCheckResourceAttr("ibm_is_bare_metal_server_network_attachment.is_bare_metal_server_network_attachment", "vlan", "100"), + resource.TestCheckResourceAttr("ibm_is_bare_metal_server_network_attachment.is_bare_metal_server_network_attachment", "type", "secondary"), + resource.TestCheckResourceAttr("ibm_is_bare_metal_server_network_attachment.is_bare_metal_server_network_attachment", "lifecycle_state", "stable"), + resource.TestCheckResourceAttr("ibm_is_bare_metal_server_network_attachment.is_bare_metal_server_network_attachment", "resource_type", "bare_metal_server_network_attachment"), + ), + }, + resource.TestStep{ + Config: testAccCheckIBMIsBareMetalServerNetworkAttachmentConfigVlanPSFM(vpcname, subnetname, sshname, publicKey, vniname, name, psfm2), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckIBMIsBareMetalServerNetworkAttachmentExists("ibm_is_bare_metal_server_network_attachment.is_bare_metal_server_network_attachment", conf), + resource.TestCheckResourceAttrSet("ibm_is_bare_metal_server_network_attachment.is_bare_metal_server_network_attachment", "vlan"), + resource.TestCheckResourceAttrSet("ibm_is_bare_metal_server_network_attachment.is_bare_metal_server_network_attachment", "created_at"), + resource.TestCheckResourceAttrSet("ibm_is_bare_metal_server_network_attachment.is_bare_metal_server_network_attachment", "href"), + resource.TestCheckResourceAttrSet("ibm_is_bare_metal_server_network_attachment.is_bare_metal_server_network_attachment", "id"), + resource.TestCheckResourceAttrSet("ibm_is_bare_metal_server_network_attachment.is_bare_metal_server_network_attachment", "interface_type"), + resource.TestCheckResourceAttrSet("ibm_is_bare_metal_server_network_attachment.is_bare_metal_server_network_attachment", "name"), + resource.TestCheckResourceAttrSet("ibm_is_bare_metal_server_network_attachment.is_bare_metal_server_network_attachment", "port_speed"), + resource.TestCheckResourceAttrSet("ibm_is_bare_metal_server_network_attachment.is_bare_metal_server_network_attachment", "virtual_network_interface.#"), + resource.TestCheckResourceAttrSet("ibm_is_bare_metal_server_network_attachment.is_bare_metal_server_network_attachment", "virtual_network_interface.0.primary_ip.#"), + resource.TestCheckResourceAttr("ibm_is_bare_metal_server_network_attachment.is_bare_metal_server_network_attachment", "vlan", "100"), + resource.TestCheckResourceAttr("ibm_is_bare_metal_server_network_attachment.is_bare_metal_server_network_attachment", "type", "secondary"), + resource.TestCheckResourceAttr("ibm_is_bare_metal_server_network_attachment.is_bare_metal_server_network_attachment", "lifecycle_state", "stable"), + resource.TestCheckResourceAttr("ibm_is_bare_metal_server_network_attachment.is_bare_metal_server_network_attachment", "resource_type", "bare_metal_server_network_attachment"), + ), + }, + }, + }) +} + func testAccCheckIBMIsBareMetalServerNetworkAttachmentConfigVlan(vpcname, subnetname, sshname, publicKey, vniname, name string) string { return testAccCheckIBMISBareMetalServerVNIConfig(vpcname, subnetname, sshname, publicKey, vniname, name) + fmt.Sprintf(` resource "ibm_is_virtual_network_interface" "testacc_vni1"{ @@ -111,6 +170,24 @@ func testAccCheckIBMIsBareMetalServerNetworkAttachmentConfigVlan(vpcname, subnet } `) } + +func testAccCheckIBMIsBareMetalServerNetworkAttachmentConfigVlanPSFM(vpcname, subnetname, sshname, publicKey, vniname, name, psfm string) string { + return testAccCheckIBMISBareMetalServerVNIConfig(vpcname, subnetname, sshname, publicKey, vniname, name) + fmt.Sprintf(` + + resource "ibm_is_bare_metal_server_network_attachment" "is_bare_metal_server_network_attachment" { + bare_metal_server = ibm_is_bare_metal_server.testacc_bms.id + vlan = 100 + virtual_network_interface { + name = "%s" + subnet = "0717-a68ebc16-d63c-44e7-aa37-4b3791415b1d" + enable_infrastructure_nat = true + allow_ip_spoofing = true + protocol_state_filtering_mode = "%s" + } + } + `, vniname, psfm) +} + func testAccCheckIBMIsBareMetalServerNetworkAttachmentConfigPci(vpcname, subnetname, sshname, publicKey, vniname, name string) string { return testAccCheckIBMISBareMetalServerVNIConfig(vpcname, subnetname, sshname, publicKey, vniname, name) + fmt.Sprintf(` resource "ibm_is_virtual_network_interface" "testacc_vni1"{ diff --git a/ibm/service/vpc/resource_ibm_is_bare_metal_server_test.go b/ibm/service/vpc/resource_ibm_is_bare_metal_server_test.go index dfd18946c2..545ff26719 100644 --- a/ibm/service/vpc/resource_ibm_is_bare_metal_server_test.go +++ b/ibm/service/vpc/resource_ibm_is_bare_metal_server_test.go @@ -75,6 +75,58 @@ ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCKVmnMOlHKcZK8tpt3MP1lqOLAcqcJzhsvJcjscgVE }, }) } + +func TestAccIBMISBareMetalServerVNIPSFM_basic(t *testing.T) { + var server string + vpcname := fmt.Sprintf("tf-vpc-%d", acctest.RandIntRange(10, 100)) + name := fmt.Sprintf("tf-server-%d", acctest.RandIntRange(10, 100)) + subnetname := fmt.Sprintf("tfip-subnet-%d", acctest.RandIntRange(10, 100)) + vniname1 := fmt.Sprintf("tfip-vni-%d", acctest.RandIntRange(10, 100)) + vniname2 := fmt.Sprintf("tfip-vni-%d", acctest.RandIntRange(10, 100)) + psfm1 := "auto" + psfm2 := "disabled" + publicKey := strings.TrimSpace(` +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCKVmnMOlHKcZK8tpt3MP1lqOLAcqcJzhsvJcjscgVERRN7/9484SOBJ3HSKxxNG5JN8owAjy5f9yYwcUg+JaUVuytn5Pv3aeYROHGGg+5G346xaq3DAwX6Y5ykr2fvjObgncQBnuU5KHWCECO/4h8uWuwh/kfniXPVjFToc+gnkqA+3RKpAecZhFXwfalQ9mMuYGFxn+fwn8cYEApsJbsEmb0iJwPiZ5hjFC8wREuiTlhPHDgkBLOiycd20op2nXzDbHfCHInquEe/gYxEitALONxm0swBOwJZwlTDOB7C6y2dzlrtxr1L59m7pCkWI4EtTRLvleehBoj3u7jB4usR +`) + sshname := fmt.Sprintf("tf-sshname-%d", acctest.RandIntRange(10, 100)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { acc.TestAccPreCheck(t) }, + Providers: acc.TestAccProviders, + CheckDestroy: testAccCheckIBMISBareMetalServerDestroy, + Steps: []resource.TestStep{ + { + Config: testAccCheckIBMISBareMetalServerVNIPSFMConfig(vpcname, subnetname, sshname, publicKey, vniname1, vniname2, psfm1, psfm2, name), + Check: resource.ComposeTestCheckFunc( + testAccCheckIBMISBareMetalServerExists("ibm_is_bare_metal_server.testacc_bms", server), + resource.TestCheckResourceAttr( + "ibm_is_bare_metal_server.testacc_bms", "name", name), + resource.TestCheckResourceAttr( + "ibm_is_bare_metal_server.testacc_bms", "zone", acc.ISZoneName), + resource.TestCheckResourceAttr( + "ibm_is_bare_metal_server.testacc_bms", "primary_network_attachment.0.virtual_network_interface.0.protocol_state_filtering_mode", psfm1), + resource.TestCheckResourceAttr( + "ibm_is_bare_metal_server.testacc_bms", "network_attachments.0.virtual_network_interface.0.protocol_state_filtering_mode", psfm2), + ), + }, + { + Config: testAccCheckIBMISBareMetalServerVNIPSFMConfig(vpcname, subnetname, sshname, publicKey, vniname1, vniname2, psfm2, psfm1, name), + Check: resource.ComposeTestCheckFunc( + testAccCheckIBMISBareMetalServerExists("ibm_is_bare_metal_server.testacc_bms", server), + resource.TestCheckResourceAttr( + "ibm_is_bare_metal_server.testacc_bms", "name", name), + resource.TestCheckResourceAttr( + "ibm_is_bare_metal_server.testacc_bms", "zone", acc.ISZoneName), + resource.TestCheckResourceAttr( + "ibm_is_bare_metal_server.testacc_bms", "primary_network_attachment.0.virtual_network_interface.0.protocol_state_filtering_mode", psfm2), + resource.TestCheckResourceAttr( + "ibm_is_bare_metal_server.testacc_bms", "network_attachments.0.virtual_network_interface.0.protocol_state_filtering_mode", psfm1), + ), + }, + }, + }) +} + func TestAccIBMISBareMetalServer_sg_update(t *testing.T) { var server string vpcname := fmt.Sprintf("tf-vpc-%d", acctest.RandIntRange(10, 100)) @@ -474,6 +526,58 @@ func testAccCheckIBMISBareMetalServerVNIConfig(vpcname, subnetname, sshname, pub } `, vpcname, subnetname, acc.ISZoneName, sshname, publicKey, vniname, acc.IsBareMetalServerProfileName, name, acc.IsBareMetalServerImage, acc.ISZoneName) } + +func testAccCheckIBMISBareMetalServerVNIPSFMConfig(vpcname, subnetname, sshname, publicKey, vniname1, vniname2, psfm1, psfm2, name string) string { + return fmt.Sprintf(` + resource "ibm_is_vpc" "testacc_vpc" { + name = "%s" + } + + resource "ibm_is_subnet" "testacc_subnet" { + name = "%s" + vpc = ibm_is_vpc.testacc_vpc.id + zone = "%s" + total_ipv4_address_count = 16 + } + + resource "ibm_is_ssh_key" "testacc_sshkey" { + name = "%s" + public_key = "%s" + } + + resource "ibm_is_bare_metal_server" "testacc_bms" { + profile = "%s" + name = "%s" + image = "%s" + zone = "%s" + keys = [ibm_is_ssh_key.testacc_sshkey.id] + primary_network_attachment { + name = "test-vni-100-102" + virtual_network_interface { + name = "%s" + subnet = ibm_is_subnet.testacc_subnet.id + enable_infrastructure_nat = true + allow_ip_spoofing = true + protocol_state_filteting_mode = "%s" + } + allowed_vlans = [100, 102] + } + network_attachments { + name = "test-vni-tfp-snac100-102" + virtual_network_interface { + name = "%s" + subnet = ibm_is_subnet.testacc_subnet.id + enable_infrastructure_nat = true + allow_ip_spoofing = true + protocol_state_filteting_mode = "%s" + } + allowed_vlans = [103, 105] + } + vpc = ibm_is_vpc.testacc_vpc.id + } +`, vpcname, subnetname, acc.ISZoneName, sshname, publicKey, acc.IsBareMetalServerProfileName, name, acc.IsBareMetalServerImage, acc.ISZoneName, vniname2, psfm1, vniname2, psfm2) +} + func testAccCheckIBMISBareMetalServerSgUpdateConfig(vpcname, subnetname, sshname, publicKey, name string) string { return fmt.Sprintf(` resource "ibm_is_vpc" "testacc_vpc" { diff --git a/ibm/service/vpc/resource_ibm_is_instance.go b/ibm/service/vpc/resource_ibm_is_instance.go index c99f3a7763..0ebf3f4439 100644 --- a/ibm/service/vpc/resource_ibm_is_instance.go +++ b/ibm/service/vpc/resource_ibm_is_instance.go @@ -45,6 +45,7 @@ const ( isInstanceZone = "zone" isInstanceBootVolume = "boot_volume" isInstanceVolumeSnapshot = "snapshot" + isInstanceVolumeSnapshotCrn = "snapshot_crn" isInstanceSourceTemplate = "instance_template" isInstanceBandwidth = "bandwidth" isInstanceTotalVolumeBandwidth = "total_volume_bandwidth" @@ -109,6 +110,7 @@ const ( isInstanceCatalogOffering = "catalog_offering" isInstanceCatalogOfferingOfferingCrn = "offering_crn" isInstanceCatalogOfferingVersionCrn = "version_crn" + isInstanceCatalogOfferingPlanCrn = "plan_crn" isPlacementTargetDedicatedHost = "dedicated_host" isPlacementTargetDedicatedHostGroup = "dedicated_host_group" @@ -231,8 +233,8 @@ func ResourceIBMISInstance() *schema.Resource { Type: schema.TypeString, ForceNew: true, Optional: true, - AtLeastOneOf: []string{isInstanceImage, isInstanceSourceTemplate, "boot_volume.0.snapshot", "catalog_offering.0.offering_crn", "catalog_offering.0.version_crn", "boot_volume.0.volume_id"}, - ConflictsWith: []string{"boot_volume.0.snapshot", "boot_volume.0.volume_id"}, + AtLeastOneOf: []string{isInstanceImage, isInstanceSourceTemplate, "boot_volume.0.snapshot", "boot_volume.0.snapshot_crn", "catalog_offering.0.offering_crn", "catalog_offering.0.version_crn", "boot_volume.0.volume_id"}, + ConflictsWith: []string{"boot_volume.0.snapshot", "boot_volume.0.snapshot_crn", "boot_volume.0.volume_id"}, Description: "Id of the instance template", }, isInstanceZone: { @@ -409,6 +411,27 @@ func ResourceIBMISInstance() *schema.Resource { RequiredWith: []string{isInstanceZone, isInstancePrimaryNetworkInterface, isInstanceKeys, isInstanceVPC, isInstanceProfile}, Description: "Identifies a version of a catalog offering by a unique CRN property", }, + isInstanceCatalogOfferingPlanCrn: { + Type: schema.TypeString, + Computed: true, + Optional: true, + ForceNew: true, + Description: "The CRN for this catalog offering version's billing plan", + }, + "deleted": { + Type: schema.TypeList, + Computed: true, + Description: "If present, this property indicates the referenced resource has been deleted and provides some supplementary information.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "more_info": { + Type: schema.TypeString, + Computed: true, + Description: "Link to documentation about deleted resources.", + }, + }, + }, + }, }, }, }, @@ -670,6 +693,13 @@ func ResourceIBMISInstance() *schema.Resource { ValidateFunc: validate.InvokeValidator("ibm_is_virtual_network_interface", "vni_name"), Description: "The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC.", }, + "protocol_state_filtering_mode": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validate.InvokeValidator("ibm_is_virtual_network_interface", "protocol_state_filtering_mode"), + Description: "The protocol state filtering mode used for this virtual network interface.", + }, "primary_ip": &schema.Schema{ Type: schema.TypeList, Optional: true, @@ -1002,6 +1032,13 @@ func ResourceIBMISInstance() *schema.Resource { ValidateFunc: validate.InvokeValidator("ibm_is_virtual_network_interface", "vni_name"), Description: "The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC.", }, + "protocol_state_filtering_mode": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validate.InvokeValidator("ibm_is_virtual_network_interface", "protocol_state_filtering_mode"), + Description: "The protocol state filtering mode used for this virtual network interface.", + }, "primary_ip": &schema.Schema{ Type: schema.TypeList, Optional: true, @@ -1104,8 +1141,8 @@ func ResourceIBMISInstance() *schema.Resource { ForceNew: true, Computed: true, Optional: true, - ConflictsWith: []string{"boot_volume.0.snapshot", "catalog_offering.0.offering_crn", "catalog_offering.0.version_crn", "boot_volume.0.volume_id"}, - AtLeastOneOf: []string{isInstanceImage, isInstanceSourceTemplate, "boot_volume.0.snapshot", "catalog_offering.0.offering_crn", "catalog_offering.0.version_crn", "boot_volume.0.volume_id"}, + ConflictsWith: []string{"boot_volume.0.snapshot", "boot_volume.0.snapshot_crn", "catalog_offering.0.offering_crn", "catalog_offering.0.version_crn", "boot_volume.0.volume_id"}, + AtLeastOneOf: []string{isInstanceImage, isInstanceSourceTemplate, "boot_volume.0.snapshot", "boot_volume.0.snapshot_crn", "catalog_offering.0.offering_crn", "catalog_offering.0.version_crn", "boot_volume.0.volume_id"}, RequiredWith: []string{isInstanceZone, isInstanceKeys, isInstanceVPC, isInstanceProfile}, Description: "image id", }, @@ -1123,8 +1160,8 @@ func ResourceIBMISInstance() *schema.Resource { ForceNew: true, Computed: true, RequiredWith: []string{isInstanceZone, isInstanceProfile, isInstanceKeys, isInstanceVPC}, - AtLeastOneOf: []string{isInstanceImage, isInstanceSourceTemplate, "boot_volume.0.volume_id", "boot_volume.0.snapshot", "catalog_offering.0.offering_crn", "catalog_offering.0.version_crn"}, - ConflictsWith: []string{isInstanceImage, isInstanceSourceTemplate, "boot_volume.0.snapshot", "boot_volume.0.name", "boot_volume.0.encryption", "catalog_offering.0.offering_crn", "catalog_offering.0.version_crn"}, + AtLeastOneOf: []string{isInstanceImage, isInstanceSourceTemplate, "boot_volume.0.volume_id", "boot_volume.0.snapshot", "boot_volume.0.snapshot_crn", "catalog_offering.0.offering_crn", "catalog_offering.0.version_crn"}, + ConflictsWith: []string{isInstanceImage, isInstanceSourceTemplate, "boot_volume.0.snapshot", "boot_volume.0.snapshot_crn", "boot_volume.0.name", "boot_volume.0.encryption", "catalog_offering.0.offering_crn", "catalog_offering.0.version_crn"}, Description: "The unique identifier for this volume", }, isInstanceVolAttVolAutoDelete: { @@ -1143,8 +1180,17 @@ func ResourceIBMISInstance() *schema.Resource { isInstanceVolumeSnapshot: { Type: schema.TypeString, RequiredWith: []string{isInstanceZone, isInstanceProfile, isInstanceKeys, isInstanceVPC}, - AtLeastOneOf: []string{isInstanceImage, isInstanceSourceTemplate, "boot_volume.0.snapshot", "catalog_offering.0.offering_crn", "catalog_offering.0.version_crn", "boot_volume.0.volume_id"}, - ConflictsWith: []string{isInstanceImage, isInstanceSourceTemplate, "catalog_offering.0.offering_crn", "catalog_offering.0.version_crn", "boot_volume.0.volume_id"}, + AtLeastOneOf: []string{isInstanceImage, isInstanceSourceTemplate, "boot_volume.0.snapshot", "boot_volume.0.snapshot_crn", "catalog_offering.0.offering_crn", "catalog_offering.0.version_crn", "boot_volume.0.volume_id"}, + ConflictsWith: []string{isInstanceImage, isInstanceSourceTemplate, "catalog_offering.0.offering_crn", "catalog_offering.0.version_crn", "boot_volume.0.volume_id", "boot_volume.0.snapshot_crn"}, + Optional: true, + ForceNew: true, + Computed: true, + }, + isInstanceVolumeSnapshotCrn: { + Type: schema.TypeString, + RequiredWith: []string{isInstanceZone, isInstanceProfile, isInstanceKeys, isInstanceVPC}, + AtLeastOneOf: []string{isInstanceImage, isInstanceSourceTemplate, "boot_volume.0.snapshot", "boot_volume.0.snapshot_crn", "catalog_offering.0.offering_crn", "catalog_offering.0.version_crn", "boot_volume.0.volume_id"}, + ConflictsWith: []string{isInstanceImage, isInstanceSourceTemplate, "catalog_offering.0.offering_crn", "catalog_offering.0.version_crn", "boot_volume.0.volume_id", "boot_volume.0.snapshot"}, Optional: true, ForceNew: true, Computed: true, @@ -2149,7 +2195,7 @@ func instanceCreateByImage(d *schema.ResourceData, meta interface{}, profile, na } return nil } -func instanceCreateByCatalogOffering(d *schema.ResourceData, meta interface{}, profile, name, vpcID, zone, image, offerringCrn, versionCrn string) error { +func instanceCreateByCatalogOffering(d *schema.ResourceData, meta interface{}, profile, name, vpcID, zone, image, offerringCrn, versionCrn, planCrn string) error { sess, err := vpcClient(meta) if err != nil { return err @@ -2172,6 +2218,14 @@ func instanceCreateByCatalogOffering(d *schema.ResourceData, meta interface{}, p if _, ok := d.GetOkExists("enable_secure_boot"); ok { instanceproto.EnableSecureBoot = core.BoolPtr(d.Get("enable_secure_boot").(bool)) } + var planOffering *vpcv1.CatalogOfferingVersionPlanIdentityCatalogOfferingVersionPlanByCRN + planOffering = nil + if planCrn != "" { + planOffering = &vpcv1.CatalogOfferingVersionPlanIdentityCatalogOfferingVersionPlanByCRN{ + CRN: &planCrn, + } + } + if offerringCrn != "" { catalogOffering := &vpcv1.CatalogOfferingIdentityCatalogOfferingByCRN{ CRN: &offerringCrn, @@ -2179,6 +2233,9 @@ func instanceCreateByCatalogOffering(d *schema.ResourceData, meta interface{}, p offeringPrototype := &vpcv1.InstanceCatalogOfferingPrototypeCatalogOfferingByOffering{ Offering: catalogOffering, } + if planOffering != nil { + offeringPrototype.Plan = planOffering + } instanceproto.CatalogOffering = offeringPrototype } if versionCrn != "" { @@ -2188,6 +2245,9 @@ func instanceCreateByCatalogOffering(d *schema.ResourceData, meta interface{}, p versionPrototype := &vpcv1.InstanceCatalogOfferingPrototypeCatalogOfferingByVersion{ Version: versionOffering, } + if planOffering != nil { + versionPrototype.Plan = planOffering + } instanceproto.CatalogOffering = versionPrototype } if defaultTrustedProfileTargetIntf, ok := d.GetOk(isInstanceDefaultTrustedProfileTarget); ok { @@ -3116,6 +3176,13 @@ func instanceCreateBySnapshot(d *schema.ResourceData, meta interface{}, profile, ID: &snapshotIdStr, } } + snapshotCrn, ok := bootvol[isInstanceVolumeSnapshotCrn] + snapshotCrnStr := snapshotCrn.(string) + if snapshotCrnStr != "" && ok { + volTemplate.SourceSnapshot = &vpcv1.SnapshotIdentity{ + CRN: &snapshotCrnStr, + } + } deleteboolIntf := bootvol[isInstanceVolAttVolAutoDelete] deletebool := deleteboolIntf.(bool) instanceproto.BootVolumeAttachment = &vpcv1.VolumeAttachmentPrototypeInstanceBySourceSnapshotContext{ @@ -3846,13 +3913,15 @@ func resourceIBMisInstanceCreate(d *schema.ResourceData, meta interface{}) error zone := d.Get(isInstanceZone).(string) image := d.Get(isInstanceImage).(string) snapshot := d.Get("boot_volume.0.snapshot").(string) + snapshotcrn := d.Get("boot_volume.0.snapshot_crn").(string) volume := d.Get("boot_volume.0.volume_id").(string) template := d.Get(isInstanceSourceTemplate).(string) if catalogOfferingOk, ok := d.GetOk(isInstanceCatalogOffering); ok { catalogOffering := catalogOfferingOk.([]interface{})[0].(map[string]interface{}) offeringCrn, _ := catalogOffering[isInstanceCatalogOfferingOfferingCrn].(string) versionCrn, _ := catalogOffering[isInstanceCatalogOfferingVersionCrn].(string) - err := instanceCreateByCatalogOffering(d, meta, profile, name, vpcID, zone, image, offeringCrn, versionCrn) + planCrn, _ := catalogOffering[isInstanceCatalogOfferingPlanCrn].(string) + err := instanceCreateByCatalogOffering(d, meta, profile, name, vpcID, zone, image, offeringCrn, versionCrn, planCrn) if err != nil { return err } @@ -3862,7 +3931,7 @@ func resourceIBMisInstanceCreate(d *schema.ResourceData, meta interface{}) error if err != nil { return err } - } else if snapshot != "" { + } else if snapshot != "" || snapshotcrn != "" { err := instanceCreateBySnapshot(d, meta, profile, name, vpcID, zone) if err != nil { return err @@ -4058,6 +4127,15 @@ func instanceGet(d *schema.ResourceData, meta interface{}, id string) error { catalogList := make([]map[string]interface{}, 0) catalogMap := map[string]interface{}{} catalogMap[isInstanceCatalogOfferingVersionCrn] = versionCrn + if instance.CatalogOffering.Plan != nil { + if instance.CatalogOffering.Plan.CRN != nil && *instance.CatalogOffering.Plan.CRN != "" { + catalogMap[isInstanceCatalogOfferingPlanCrn] = *instance.CatalogOffering.Plan.CRN + } + if instance.CatalogOffering.Plan.Deleted != nil { + deletedMap := resourceIbmIsInstanceCatalogOfferingVersionPlanReferenceDeletedToMap(*instance.CatalogOffering.Plan.Deleted) + catalogMap["deleted"] = []map[string]interface{}{deletedMap} + } + } catalogList = append(catalogList, catalogMap) d.Set(isInstanceCatalogOffering, catalogList) } @@ -4414,6 +4492,7 @@ func instanceGet(d *schema.ResourceData, meta interface{}, id string) error { } if vol.SourceSnapshot != nil { bootVol[isInstanceVolumeSnapshot] = vol.SourceSnapshot.ID + bootVol[isInstanceVolumeSnapshotCrn] = vol.SourceSnapshot.CRN } if vol.UserTags != nil { bootVol[isInstanceBootVolumeTags] = vol.UserTags @@ -4599,6 +4678,7 @@ func instanceUpdate(d *schema.ResourceData, meta interface{}) error { ipsName := fmt.Sprintf("%s.%s", nacVniName, "0.ips") enableNatName := fmt.Sprintf("%s.%s", nacVniName, "0.enable_infrastructure_nat") allowIpSpoofingName := fmt.Sprintf("%s.%s", nacVniName, "0.allow_ip_spoofing") + pStateFilteringModeSchemaName := fmt.Sprintf("%s.%s", nacVniName, "0.protocol_state_filtering_mode") if d.HasChange(autoDeleteName) { autodelete := d.Get(autoDeleteName).(bool) virtualNetworkInterfacePatch.AutoDelete = &autodelete @@ -4615,6 +4695,10 @@ func instanceUpdate(d *schema.ResourceData, meta interface{}) error { allIpSpoofing := d.Get(allowIpSpoofingName).(bool) virtualNetworkInterfacePatch.AllowIPSpoofing = &allIpSpoofing } + if d.HasChange(pStateFilteringModeSchemaName) { + pStateFilteringMode := d.Get(pStateFilteringModeSchemaName).(string) + virtualNetworkInterfacePatch.ProtocolStateFilteringMode = &pStateFilteringMode + } virtualNetworkInterfacePatchAsPatch, err := virtualNetworkInterfacePatch.AsPatch() if err != nil { return fmt.Errorf("[ERROR] Error encountered while apply as patch for virtualNetworkInterfacePatch of instance(%s) vni (%s) %s", d.Id(), vniId, err) @@ -4795,6 +4879,7 @@ func instanceUpdate(d *schema.ResourceData, meta interface{}) error { sgName := fmt.Sprintf("%s.%s", nacVniName, "0.security_groups") enableNatName := fmt.Sprintf("%s.%s", nacVniName, "0.enable_infrastructure_nat") allowIpSpoofingName := fmt.Sprintf("%s.%s", nacVniName, "0.allow_ip_spoofing") + pStateFilteringModeSchemaName := fmt.Sprintf("%s.%s", nacVniName, "0.protocol_state_filtering_mode") if d.HasChange(autoDeleteName) { autodelete := d.Get(autoDeleteName).(bool) virtualNetworkInterfacePatch.AutoDelete = &autodelete @@ -4811,6 +4896,10 @@ func instanceUpdate(d *schema.ResourceData, meta interface{}) error { allIpSpoofing := d.Get(allowIpSpoofingName).(bool) virtualNetworkInterfacePatch.AllowIPSpoofing = &allIpSpoofing } + if d.HasChange(pStateFilteringModeSchemaName) { + pStateFilteringMode := d.Get(pStateFilteringModeSchemaName).(string) + virtualNetworkInterfacePatch.ProtocolStateFilteringMode = &pStateFilteringMode + } virtualNetworkInterfacePatchAsPatch, err := virtualNetworkInterfacePatch.AsPatch() if err != nil { return fmt.Errorf("[ERROR] Error encountered while apply as patch for virtualNetworkInterfacePatch of instance(%s) vni (%s) %s", d.Id(), vniId, err) @@ -6295,6 +6384,7 @@ func resourceIBMIsInstanceInstanceNetworkAttachmentReferenceToMap(model *vpcv1.I vniMap["auto_delete"] = vniDetails.AutoDelete vniMap["enable_infrastructure_nat"] = vniDetails.EnableInfrastructureNat vniMap["resource_group"] = vniDetails.ResourceGroup.ID + vniMap["protocol_state_filtering_mode"] = vniDetails.ProtocolStateFilteringMode primaryipId := *vniDetails.PrimaryIP.ID if !core.IsNil(vniDetails.Ips) { ips := []map[string]interface{}{} @@ -6403,6 +6493,9 @@ func resourceIBMIsInstanceMapToVirtualNetworkInterfacePrototypeAttachmentContext if modelMap["name"] != nil && modelMap["name"].(string) != "" { model.Name = core.StringPtr(modelMap["name"].(string)) } + if pStateFilteringInt, ok := modelMap["protocol_state_filtering_mode"]; ok { + model.ProtocolStateFilteringMode = core.StringPtr(pStateFilteringInt.(string)) + } if modelMap["primary_ip"] != nil && len(modelMap["primary_ip"].([]interface{})) > 0 { PrimaryIPModel, err := resourceIBMIsInstanceMapToVirtualNetworkInterfacePrimaryIPReservedIPPrototype(modelMap["primary_ip"].([]interface{})[0].(map[string]interface{})) if err != nil { diff --git a/ibm/service/vpc/resource_ibm_is_instance_network_attachment.go b/ibm/service/vpc/resource_ibm_is_instance_network_attachment.go index 0a0c1ae4a6..c28c258a5e 100644 --- a/ibm/service/vpc/resource_ibm_is_instance_network_attachment.go +++ b/ibm/service/vpc/resource_ibm_is_instance_network_attachment.go @@ -182,6 +182,13 @@ func ResourceIBMIsInstanceNetworkAttachment() *schema.Resource { ValidateFunc: validate.InvokeValidator("ibm_is_virtual_network_interface", "name"), Description: "The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC.", }, + "protocol_state_filtering_mode": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validate.InvokeValidator("ibm_is_virtual_network_interface", "protocol_state_filtering_mode"), + Description: "The protocol state filtering mode used for this virtual network interface.", + }, "primary_ip": &schema.Schema{ Type: schema.TypeList, Optional: true, @@ -412,6 +419,7 @@ func resourceIBMIsInstanceNetworkAttachmentRead(context context.Context, d *sche vniMap["name"] = vniDetails.Name vniMap["resource_group"] = vniDetails.ResourceGroup.ID vniMap["resource_type"] = vniDetails.ResourceType + vniMap["protocol_state_filtering_mode"] = vniDetails.ProtocolStateFilteringMode primaryipId := *instanceNetworkAttachment.PrimaryIP.ID if !core.IsNil(vniDetails.Ips) { ips := []map[string]interface{}{} @@ -499,6 +507,10 @@ func resourceIBMIsInstanceNetworkAttachmentUpdate(context context.Context, d *sc allIpSpoofing := d.Get("virtual_network_interface.0.allow_ip_spoofing").(bool) virtualNetworkInterfacePatch.AllowIPSpoofing = &allIpSpoofing } + if d.HasChange("virtual_network_interface.0.protocol_state_filtering_mode") { + pStateFilteringMode := d.Get("virtual_network_interface.0.protocol_state_filtering_mode").(string) + virtualNetworkInterfacePatch.ProtocolStateFilteringMode = &pStateFilteringMode + } virtualNetworkInterfacePatchAsPatch, err := virtualNetworkInterfacePatch.AsPatch() if err != nil { return diag.FromErr(fmt.Errorf("[ERROR] Error encountered while apply as patch for virtualNetworkInterfacePatch of instance(%s) vni (%s) %s", d.Id(), vniId, err)) @@ -720,6 +732,9 @@ func resourceIBMIsInstanceNetworkAttachmentMapToInstanceNetworkAttachmentPrototy if modelMap["name"] != nil && modelMap["name"].(string) != "" { model.Name = core.StringPtr(modelMap["name"].(string)) } + if pStateFilteringInt, ok := modelMap["protocol_state_filtering_mode"]; ok { + model.ProtocolStateFilteringMode = core.StringPtr(pStateFilteringInt.(string)) + } if modelMap["primary_ip"] != nil && len(modelMap["primary_ip"].([]interface{})) > 0 { PrimaryIPModel, err := resourceIBMIsInstanceNetworkAttachmentMapToVirtualNetworkInterfacePrimaryIPPrototype(modelMap["primary_ip"].([]interface{})[0].(map[string]interface{})) if err != nil { diff --git a/ibm/service/vpc/resource_ibm_is_instance_network_attachment_test.go b/ibm/service/vpc/resource_ibm_is_instance_network_attachment_test.go index 3ea2973088..75436514b7 100644 --- a/ibm/service/vpc/resource_ibm_is_instance_network_attachment_test.go +++ b/ibm/service/vpc/resource_ibm_is_instance_network_attachment_test.go @@ -110,6 +110,8 @@ func TestAccIBMIsInstanceNetworkAttachmentAllArgsUpdate(t *testing.T) { subnetname := fmt.Sprintf("tvni-subnet-%d", acctest.RandIntRange(10, 100)) naname := fmt.Sprintf("tvni-na-%d", acctest.RandIntRange(10, 100)) nanameupdated := fmt.Sprintf("tvni-na-upd-%d", acctest.RandIntRange(10, 100)) + protocolStateFilteringMode := "auto" + protocolStateFilteringUpdated := "enabled" publicKey := strings.TrimSpace(` ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCKVmnMOlHKcZK8tpt3MP1lqOLAcqcJzhsvJcjscgVERRN7/9484SOBJ3HSKxxNG5JN8owAjy5f9yYwcUg+JaUVuytn5Pv3aeYROHGGg+5G346xaq3DAwX6Y5ykr2fvjObgncQBnuU5KHWCECO/4h8uWuwh/kfniXPVjFToc+gnkqA+3RKpAecZhFXwfalQ9mMuYGFxn+fwn8cYEApsJbsEmb0iJwPiZ5hjFC8wREuiTlhPHDgkBLOiycd20op2nXzDbHfCHInquEe/gYxEitALONxm0swBOwJZwlTDOB7C6y2dzlrtxr1L59m7pCkWI4EtTRLvleehBoj3u7jB4usR `) @@ -120,7 +122,7 @@ ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCKVmnMOlHKcZK8tpt3MP1lqOLAcqcJzhsvJcjscgVE CheckDestroy: testAccCheckIBMIsInstanceNetworkAttachmentDestroy, Steps: []resource.TestStep{ resource.TestStep{ - Config: testAccCheckIBMIsInstanceNetworkAttachmentUpdateConfig(vpcname, subnetname, sshname, publicKey, vniname, name, naname), + Config: testAccCheckIBMIsInstanceNetworkAttachmentUpdateConfig(vpcname, subnetname, sshname, publicKey, vniname, name, naname, protocolStateFilteringMode), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckIBMIsInstanceNetworkAttachmentExists("ibm_is_instance_network_attachment.is_instance_network_attachment", conf), resource.TestCheckResourceAttr("ibm_is_instance_network_attachment.is_instance_network_attachment", "resource_type", "instance_network_attachment"), @@ -144,10 +146,11 @@ ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCKVmnMOlHKcZK8tpt3MP1lqOLAcqcJzhsvJcjscgVE resource.TestCheckResourceAttr("ibm_is_instance_network_attachment.is_instance_network_attachment", "virtual_network_interface.0.name", vniname+"-inline"), resource.TestCheckResourceAttrSet("ibm_is_instance_network_attachment.is_instance_network_attachment", "virtual_network_interface.0.primary_ip.#"), resource.TestCheckResourceAttrSet("ibm_is_instance_network_attachment.is_instance_network_attachment", "virtual_network_interface.0.primary_ip.0.address"), + resource.TestCheckResourceAttr("ibm_is_instance_network_attachment.is_instance_network_attachment", "virtual_network_interface.0.protocol_state_filtering_mode", protocolStateFilteringMode), ), }, resource.TestStep{ - Config: testAccCheckIBMIsInstanceNetworkAttachmentUpdateConfig(vpcname, subnetname, sshname, publicKey, vninameupdated, name, nanameupdated), + Config: testAccCheckIBMIsInstanceNetworkAttachmentUpdateConfig(vpcname, subnetname, sshname, publicKey, vninameupdated, name, nanameupdated, protocolStateFilteringUpdated), Check: resource.ComposeAggregateTestCheckFunc( testAccCheckIBMIsInstanceNetworkAttachmentExists("ibm_is_instance_network_attachment.is_instance_network_attachment", conf), resource.TestCheckResourceAttr("ibm_is_instance_network_attachment.is_instance_network_attachment", "resource_type", "instance_network_attachment"), @@ -171,6 +174,7 @@ ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCKVmnMOlHKcZK8tpt3MP1lqOLAcqcJzhsvJcjscgVE resource.TestCheckResourceAttr("ibm_is_instance_network_attachment.is_instance_network_attachment", "virtual_network_interface.0.name", vninameupdated+"-inline"), resource.TestCheckResourceAttrSet("ibm_is_instance_network_attachment.is_instance_network_attachment", "virtual_network_interface.0.primary_ip.#"), resource.TestCheckResourceAttrSet("ibm_is_instance_network_attachment.is_instance_network_attachment", "virtual_network_interface.0.primary_ip.0.address"), + resource.TestCheckResourceAttr("ibm_is_instance_network_attachment.is_instance_network_attachment", "virtual_network_interface.0.protocol_state_filtering_mode", protocolStateFilteringUpdated), ), }, }, @@ -288,7 +292,7 @@ func testAccCheckIBMIsInstanceNetworkAttachmentConfig(vpcname, subnetname, sshna } `, vpcname, subnetname, acc.ISZoneName2, sshname, publicKey, vniname, true, acc.InstanceProfileName, name, acc.IsImage, acc.ISZoneName2, naname, vniname, true) } -func testAccCheckIBMIsInstanceNetworkAttachmentUpdateConfig(vpcname, subnetname, sshname, publicKey, vniname, name, naname string) string { +func testAccCheckIBMIsInstanceNetworkAttachmentUpdateConfig(vpcname, subnetname, sshname, publicKey, vniname, name, naname, psftMode string) string { return fmt.Sprintf(` resource "ibm_is_vpc" "testacc_vpc" { @@ -340,10 +344,11 @@ func testAccCheckIBMIsInstanceNetworkAttachmentUpdateConfig(vpcname, subnetname, auto_delete = true address = cidrhost(ibm_is_subnet.testacc_subnet.ipv4_cidr_block, 11) } + protocol_state_filtering_mode = "%s" subnet = ibm_is_subnet.testacc_subnet.id } } - `, vpcname, subnetname, acc.ISZoneName2, sshname, publicKey, vniname, true, acc.InstanceProfileName, name, acc.IsImage, acc.ISZoneName2, naname, vniname, true) + `, vpcname, subnetname, acc.ISZoneName2, sshname, publicKey, vniname, true, acc.InstanceProfileName, name, acc.IsImage, acc.ISZoneName2, naname, vniname, true, psftMode) } func testAccCheckIBMIsInstanceNetworkAttachmentExists(n string, obj vpcv1.InstanceNetworkAttachment) resource.TestCheckFunc { diff --git a/ibm/service/vpc/resource_ibm_is_instance_template.go b/ibm/service/vpc/resource_ibm_is_instance_template.go index 5962380323..f722c741e2 100644 --- a/ibm/service/vpc/resource_ibm_is_instance_template.go +++ b/ibm/service/vpc/resource_ibm_is_instance_template.go @@ -68,6 +68,7 @@ const ( isInstanceTemplateCatalogOffering = "catalog_offering" isInstanceTemplateCatalogOfferingOfferingCrn = "offering_crn" isInstanceTemplateCatalogOfferingVersionCrn = "version_crn" + isInstanceTemplateCatalogOfferingPlanCrn = "plan_crn" ) func ResourceIBMISInstanceTemplate() *schema.Resource { @@ -340,6 +341,27 @@ func ResourceIBMISInstanceTemplate() *schema.Resource { ConflictsWith: []string{"catalog_offering.0.offering_crn"}, Description: "Identifies a version of a catalog offering by a unique CRN property", }, + isInstanceTemplateCatalogOfferingPlanCrn: { + Type: schema.TypeString, + Computed: true, + Optional: true, + ForceNew: true, + Description: "The CRN for this catalog offering version's billing plan", + }, + "deleted": { + Type: schema.TypeList, + Computed: true, + Description: "If present, this property indicates the referenced resource has been deleted and provides some supplementary information.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "more_info": { + Type: schema.TypeString, + Computed: true, + Description: "Link to documentation about deleted resources.", + }, + }, + }, + }, }, }, }, @@ -712,6 +734,13 @@ func ResourceIBMISInstanceTemplate() *schema.Resource { }, }, }, + "protocol_state_filtering_mode": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validate.InvokeValidator("ibm_is_virtual_network_interface", "protocol_state_filtering_mode"), + Description: "The protocol state filtering mode used for this virtual network interface.", + }, "resource_group": &schema.Schema{ Type: schema.TypeString, Optional: true, @@ -948,6 +977,13 @@ func ResourceIBMISInstanceTemplate() *schema.Resource { }, }, }, + "protocol_state_filtering_mode": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validate.InvokeValidator("ibm_is_virtual_network_interface", "protocol_state_filtering_mode"), + Description: "The protocol state filtering mode used for this virtual network interface.", + }, "resource_group": &schema.Schema{ Type: schema.TypeString, Optional: true, @@ -1172,7 +1208,8 @@ func resourceIBMisInstanceTemplateCreate(d *schema.ResourceData, meta interface{ catalogOffering := catalogOfferingOk.([]interface{})[0].(map[string]interface{}) offeringCrn, _ := catalogOffering[isInstanceTemplateCatalogOfferingOfferingCrn].(string) versionCrn, _ := catalogOffering[isInstanceTemplateCatalogOfferingVersionCrn].(string) - err := instanceTemplateCreateByCatalogOffering(d, meta, profile, name, vpcID, zone, offeringCrn, versionCrn) + planCrn, _ := catalogOffering[isInstanceTemplateCatalogOfferingPlanCrn].(string) + err := instanceTemplateCreateByCatalogOffering(d, meta, profile, name, vpcID, zone, offeringCrn, versionCrn, planCrn) if err != nil { return err } @@ -1224,7 +1261,7 @@ func resourceIBMisInstanceTemplateExists(d *schema.ResourceData, meta interface{ return ok, err } -func instanceTemplateCreateByCatalogOffering(d *schema.ResourceData, meta interface{}, profile, name, vpcID, zone, offeringCrn, versionCrn string) error { +func instanceTemplateCreateByCatalogOffering(d *schema.ResourceData, meta interface{}, profile, name, vpcID, zone, offeringCrn, versionCrn, planCrn string) error { sess, err := vpcClient(meta) if err != nil { return err @@ -1247,12 +1284,22 @@ func instanceTemplateCreateByCatalogOffering(d *schema.ResourceData, meta interf if _, ok := d.GetOkExists("enable_secure_boot"); ok { instanceproto.EnableSecureBoot = core.BoolPtr(d.Get("enable_secure_boot").(bool)) } + var planOffering *vpcv1.CatalogOfferingVersionPlanIdentityCatalogOfferingVersionPlanByCRN + planOffering = nil + if planCrn != "" { + planOffering = &vpcv1.CatalogOfferingVersionPlanIdentityCatalogOfferingVersionPlanByCRN{ + CRN: &planCrn, + } + } if offeringCrn != "" { catalogOffering := &vpcv1.InstanceCatalogOfferingPrototypeCatalogOfferingByOffering{ Offering: &vpcv1.CatalogOfferingIdentityCatalogOfferingByCRN{ CRN: &offeringCrn, }, } + if planOffering != nil { + catalogOffering.Plan = planOffering + } instanceproto.CatalogOffering = catalogOffering } if versionCrn != "" { @@ -1261,6 +1308,9 @@ func instanceTemplateCreateByCatalogOffering(d *schema.ResourceData, meta interf CRN: &versionCrn, }, } + if planOffering != nil { + catalogOffering.Plan = planOffering + } instanceproto.CatalogOffering = catalogOffering } @@ -2245,6 +2295,12 @@ func instanceTemplateGet(d *schema.ResourceData, meta interface{}, ID string) er version := insTempCatalogOffering.Version.(*vpcv1.CatalogOfferingVersionIdentity) currentOffering[isInstanceTemplateCatalogOfferingVersionCrn] = *version.CRN } + if insTempCatalogOffering.Plan != nil { + plan := insTempCatalogOffering.Plan.(*vpcv1.CatalogOfferingVersionPlanIdentity) + if plan.CRN != nil && *plan.CRN != "" { + currentOffering[isInstanceTemplateCatalogOfferingPlanCrn] = *plan.CRN + } + } catOfferingList = append(catOfferingList, currentOffering) d.Set(isInstanceTemplateCatalogOffering, catOfferingList) @@ -2676,6 +2732,7 @@ func resourceIBMIsInstanceTemplateNetworkAttachmentReferenceToMap(model *vpcv1.I } vniMap["primary_ip"] = []map[string]interface{}{primaryIPMap} } + vniMap["protocol_state_filtering_mode"] = pna.ProtocolStateFilteringMode if pna.Subnet != nil { subnet := pna.Subnet.(*vpcv1.SubnetIdentity) vniMap["subnet"] = subnet.ID @@ -2756,6 +2813,9 @@ func resourceIBMIsInstanceTemplateMapToVirtualNetworkInterfacePrototypeAttachmen } model.PrimaryIP = PrimaryIPModel } + if pStateFilteringInt, ok := modelMap["protocol_state_filtering_mode"]; ok { + model.ProtocolStateFilteringMode = core.StringPtr(pStateFilteringInt.(string)) + } if modelMap["resource_group"] != nil && modelMap["resource_group"].(string) != "" { resourcegroupid := modelMap["resource_group"].(string) model.ResourceGroup = &vpcv1.ResourceGroupIdentity{ diff --git a/ibm/service/vpc/resource_ibm_is_instance_template_test.go b/ibm/service/vpc/resource_ibm_is_instance_template_test.go index 57b59a36fc..0fde16a693 100644 --- a/ibm/service/vpc/resource_ibm_is_instance_template_test.go +++ b/ibm/service/vpc/resource_ibm_is_instance_template_test.go @@ -139,6 +139,41 @@ func TestAccIBMISInstanceTemplate_vni(t *testing.T) { }, }) } +func TestAccIBMISInstanceTemplate_vniPSFM(t *testing.T) { + randInt := acctest.RandIntRange(10, 100) + + publicKey := strings.TrimSpace(` + ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDVtuCfWKVGKaRmaRG6JQZY8YdxnDgGzVOK93IrV9R5Hl0JP1oiLLWlZQS2reAKb8lBqyDVEREpaoRUDjqDqXG8J/kR42FKN51su914pjSBc86wJ02VtT1Wm1zRbSg67kT+g8/T1jCgB5XBODqbcICHVP8Z1lXkgbiHLwlUrbz6OZkGJHo/M/kD1Eme8lctceIYNz/Ilm7ewMXZA4fsidpto9AjyarrJLufrOBl4MRVcZTDSJ7rLP982aHpu9pi5eJAjOZc7Og7n4ns3NFppiCwgVMCVUQbN5GBlWhZ1OsT84ZiTf+Zy8ew+Yg5T7Il8HuC7loWnz+esQPf0s3xhC/kTsGgZreIDoh/rxJfD67wKXetNSh5RH/n5BqjaOuXPFeNXmMhKlhj9nJ8scayx/wsvOGuocEIkbyJSLj3sLUU403OafgatEdnJOwbqg6rUNNF5RIjpJpL7eEWlKIi1j9LyhmPJ+fEO7TmOES82VpCMHpLbe4gf/MhhJ/Xy8DKh9s= root@ffd8363b1226 + `) + vpcName := fmt.Sprintf("tf-testvpc%d", randInt) + subnetName := fmt.Sprintf("tf-testsubnet%d", randInt) + templateName := fmt.Sprintf("tf-testtemplate%d", randInt) + sshKeyName := fmt.Sprintf("tf-testsshkey%d", randInt) + protocolStateFilteringMode := "auto" + + pNacName := fmt.Sprintf("tf-testvpc-pNac%d", randInt) + sNacName := fmt.Sprintf("tf-testvpc-sNac%d", randInt) + resource.Test(t, resource.TestCase{ + PreCheck: func() { acc.TestAccPreCheck(t) }, + Providers: acc.TestAccProviders, + CheckDestroy: testAccCheckIBMISInstanceTemplateDestroy, + Steps: []resource.TestStep{ + { + Config: testAccCheckIBMISInstanceTemplateVniPSFMConfig(vpcName, subnetName, sshKeyName, publicKey, templateName, pNacName, protocolStateFilteringMode, sNacName, protocolStateFilteringMode), + Check: resource.ComposeTestCheckFunc( + resource.TestCheckResourceAttr( + "ibm_is_instance_template.instancetemplate1", "name", templateName), + resource.TestCheckResourceAttrSet( + "ibm_is_instance_template.instancetemplate1", "profile"), + resource.TestCheckResourceAttrSet( + "ibm_is_instance_template.instancetemplate1", "primary_network_attachment"), + resource.TestCheckResourceAttrSet( + "ibm_is_instance_template.instancetemplate1", "primary_network_attachment.0.virtual_network_interface"), + ), + }, + }, + }) +} func TestAccIBMISInstanceTemplate_catalog_basic(t *testing.T) { randInt := acctest.RandIntRange(10, 100) @@ -165,6 +200,8 @@ func TestAccIBMISInstanceTemplate_catalog_basic(t *testing.T) { "ibm_is_instance_template.instancetemplate1", "catalog_offering.#"), resource.TestCheckResourceAttrSet( "ibm_is_instance_template.instancetemplate1", "catalog_offering.0.version_crn"), + resource.TestCheckResourceAttrSet( + "ibm_is_instance_template.instancetemplate1", "catalog_offering.0.plan_crn"), resource.TestCheckNoResourceAttr( "ibm_is_instance_template.instancetemplate1", "image"), ), @@ -505,6 +542,63 @@ func testAccCheckIBMISInstanceTemplateVniConfig(vpcName, subnetName, sshKeyName, `, vpcName, subnetName, sshKeyName, publicKey, templateName) } + +func testAccCheckIBMISInstanceTemplateVniPSFMConfig(vpcName, subnetName, sshKeyName, publicKey, templateName, pNacName, ppsfm, sNacName, spsfm string) string { + return fmt.Sprintf(` + resource "ibm_is_vpc" "vpc2" { + name = "%s" + } + + resource "ibm_is_subnet" "subnet2" { + name = "%s" + vpc = ibm_is_vpc.vpc2.id + zone = "us-south-2" + ipv4_cidr_block = "10.240.64.0/28" + } + + resource "ibm_is_ssh_key" "sshkey" { + name = "%s" + public_key = "%s" + } + + data "ibm_is_images" "is_images" { + } + + resource "ibm_is_instance_template" "instancetemplate1" { + name = "%s" + image = data.ibm_is_images.is_images.images.0.id + profile = "bx2-8x32" + + primary_network_attachment { + name = "%s" + virtual_network_interface { + primary_ip { + auto_delete = true + } + subnet = ibm_is_subnet.subnet2.id + protocol_state_filtering_mode = "%s" + } + } + network_attachments { + name = "%s" + virtual_network_interface { + primary_ip { + auto_delete = true + } + subnet = ibm_is_subnet.subnet2.id + protocol_state_filtering_mode = "%s" + } + } + vpc = ibm_is_vpc.vpc2.id + zone = "us-south-2" + keys = [ibm_is_ssh_key.sshkey.id] + } + + + `, vpcName, subnetName, sshKeyName, publicKey, templateName, pNacName, ppsfm, sNacName, spsfm) + +} + func testAccCheckIBMISInstanceTemplateCatalogConfig(vpcName, subnetName, sshKeyName, publicKey, templateName string) string { return fmt.Sprintf(` resource "ibm_is_vpc" "vpc2" { @@ -531,6 +625,7 @@ func testAccCheckIBMISInstanceTemplateCatalogConfig(vpcName, subnetName, sshKeyN name = "%s" catalog_offering { version_crn = data.ibm_is_images.is_images.images.0.catalog_offering.0.version.0.crn + plan_crn = "crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e" } profile = "bx2-2x8" diff --git a/ibm/service/vpc/resource_ibm_is_instance_test.go b/ibm/service/vpc/resource_ibm_is_instance_test.go index 3dde989462..229fba272d 100644 --- a/ibm/service/vpc/resource_ibm_is_instance_test.go +++ b/ibm/service/vpc/resource_ibm_is_instance_test.go @@ -200,14 +200,15 @@ ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCKVmnMOlHKcZK8tpt3MP1lqOLAcqcJzhsvJcjscgVE pnaNameUpdated := fmt.Sprintf("tf-pna-upd-%d", acctest.RandIntRange(10, 100)) sshname := fmt.Sprintf("tf-ssh-%d", acctest.RandIntRange(10, 100)) userData1 := "a" - + protocolStateFilteringMode := "auto" + protocolStateFilteringUpdated := "enabled" resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, CheckDestroy: testAccCheckIBMISInstanceDestroy, Steps: []resource.TestStep{ { - Config: testAccCheckIBMISInstanceVniUpdateConfig(vpcname, subnetname, sshname, publicKey, name, vniname, inlinevniname, pnaName, snaName, userData1), + Config: testAccCheckIBMISInstanceVniUpdateConfig(vpcname, subnetname, sshname, publicKey, name, vniname, inlinevniname, pnaName, snaName, userData1, protocolStateFilteringMode), Check: resource.ComposeTestCheckFunc( testAccCheckIBMISInstanceExists("ibm_is_instance.testacc_instance", instance), resource.TestCheckResourceAttr( @@ -230,10 +231,12 @@ ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCKVmnMOlHKcZK8tpt3MP1lqOLAcqcJzhsvJcjscgVE "ibm_is_instance.testacc_instance", "network_attachments.0.name", snaName), resource.TestCheckResourceAttr( "ibm_is_instance.testacc_instance", "network_attachments.0.virtual_network_interface.0.name", inlinevniname), + resource.TestCheckResourceAttr( + "ibm_is_instance.testacc_instance", "network_attachments.0.virtual_network_interface.0.protocol_state_filtering_mode", protocolStateFilteringMode), ), }, { - Config: testAccCheckIBMISInstanceVniUpdateConfig(vpcname, subnetname, sshname, publicKey, name, vniname, inlinevniupdatedname, pnaNameUpdated, snaNameUpdated, userData1), + Config: testAccCheckIBMISInstanceVniUpdateConfig(vpcname, subnetname, sshname, publicKey, name, vniname, inlinevniupdatedname, pnaNameUpdated, snaNameUpdated, userData1, protocolStateFilteringUpdated), Check: resource.ComposeTestCheckFunc( testAccCheckIBMISInstanceExists("ibm_is_instance.testacc_instance", instance), resource.TestCheckResourceAttr( @@ -256,6 +259,8 @@ ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCKVmnMOlHKcZK8tpt3MP1lqOLAcqcJzhsvJcjscgVE "ibm_is_instance.testacc_instance", "network_attachments.0.name", snaNameUpdated), resource.TestCheckResourceAttr( "ibm_is_instance.testacc_instance", "network_attachments.0.virtual_network_interface.0.name", inlinevniupdatedname), + resource.TestCheckResourceAttr( + "ibm_is_instance.testacc_instance", "network_attachments.0.virtual_network_interface.0.protocol_state_filtering_mode", protocolStateFilteringUpdated), ), }, }, @@ -298,6 +303,8 @@ ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCKVmnMOlHKcZK8tpt3MP1lqOLAcqcJzhsvJcjscgVE "ibm_is_instance.testacc_instance", "boot_volume.0.encryption"), resource.TestCheckResourceAttrSet( "ibm_is_instance.testacc_instance", "catalog_offering.0.version_crn"), + resource.TestCheckResourceAttrSet( + "ibm_is_instance.testacc_instance", "catalog_offering.0.plan_crn"), ), }, }, @@ -1071,6 +1078,44 @@ ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCKVmnMOlHKcZK8tpt3MP1lqOLAcqcJzhsvJcjscgVE }, }) } +func TestAccIBMISInstanceSnapshotRestore_crn(t *testing.T) { + var instance, instanceRestore string + vpcname := fmt.Sprintf("tf-vpc-%d", acctest.RandIntRange(10, 100)) + name := fmt.Sprintf("tf-instnace-%d", acctest.RandIntRange(10, 100)) + subnetname := fmt.Sprintf("tf-subnet-%d", acctest.RandIntRange(10, 100)) + publicKey := strings.TrimSpace(` +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCKVmnMOlHKcZK8tpt3MP1lqOLAcqcJzhsvJcjscgVERRN7/9484SOBJ3HSKxxNG5JN8owAjy5f9yYwcUg+JaUVuytn5Pv3aeYROHGGg+5G346xaq3DAwX6Y5ykr2fvjObgncQBnuU5KHWCECO/4h8uWuwh/kfniXPVjFToc+gnkqA+3RKpAecZhFXwfalQ9mMuYGFxn+fwn8cYEApsJbsEmb0iJwPiZ5hjFC8wREuiTlhPHDgkBLOiycd20op2nXzDbHfCHInquEe/gYxEitALONxm0swBOwJZwlTDOB7C6y2dzlrtxr1L59m7pCkWI4EtTRLvleehBoj3u7jB4usR +`) + sshname := fmt.Sprintf("tf-ssh-%d", acctest.RandIntRange(10, 100)) + snapshot := fmt.Sprintf("tf-snapshot-%d", acctest.RandIntRange(10, 100)) + vsiRestore := fmt.Sprintf("tf-instancerestore-%d", acctest.RandIntRange(10, 100)) + resource.Test(t, resource.TestCase{ + PreCheck: func() { acc.TestAccPreCheck(t) }, + Providers: acc.TestAccProviders, + CheckDestroy: testAccCheckIBMISInstanceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccCheckIBMISInstanceSnapshotRestoreCrnConfig(vpcname, subnetname, sshname, publicKey, name, snapshot, vsiRestore), + Check: resource.ComposeTestCheckFunc( + testAccCheckIBMISInstanceExists("ibm_is_instance.testacc_instance", instance), + testAccCheckIBMISInstanceExists("ibm_is_instance.testacc_instance_restore", instanceRestore), + resource.TestCheckResourceAttr( + "ibm_is_instance.testacc_instance", "name", name), + resource.TestCheckResourceAttr( + "ibm_is_instance.testacc_instance", "zone", acc.ISZoneName), + resource.TestCheckResourceAttr( + "ibm_is_snapshot.testacc_snapshot", "name", snapshot), + resource.TestCheckResourceAttr( + "ibm_is_instance.testacc_instance_restore", "zone", acc.ISZoneName), + resource.TestCheckResourceAttr( + "ibm_is_instance.testacc_instance_restore", "name", vsiRestore), + resource.TestCheckResourceAttr( + "ibm_is_instance.testacc_instance_restore", "boot_volume.0.name", "boot-restore"), + ), + }, + }, + }) +} func TestAccIBMISInstanceSnapshotRestore_forcenew(t *testing.T) { var instance, instanceRestore string @@ -1434,7 +1479,7 @@ resource "ibm_is_instance" "testacc_instance" { keys = [ibm_is_ssh_key.testacc_sshkey.id] }`, vpcname, subnetname, acc.ISZoneName, acc.ISCIDR, sshname, publicKey, vniname, name, acc.IsImage, acc.InstanceProfileName, userData, acc.ISZoneName) } -func testAccCheckIBMISInstanceVniUpdateConfig(vpcname, subnetname, sshname, publicKey, name, vniname, inlinevniname, pnaName, snaName, userData string) string { +func testAccCheckIBMISInstanceVniUpdateConfig(vpcname, subnetname, sshname, publicKey, name, vniname, inlinevniname, pnaName, snaName, userData, protocolStateFilteringMode string) string { return fmt.Sprintf(` resource "ibm_is_vpc" "testacc_vpc" { name = "%s" @@ -1466,6 +1511,7 @@ resource "ibm_is_instance" "testacc_instance" { name = "%s" virtual_network_interface { id = ibm_is_virtual_network_interface.testacc_vni.id + protocol_state_filtering_mode = "%s" } } network_attachments { @@ -1477,13 +1523,14 @@ resource "ibm_is_instance" "testacc_instance" { address = cidrhost(ibm_is_subnet.testacc_subnet.ipv4_cidr_block, 23) } subnet = ibm_is_subnet.testacc_subnet.id + protocol_state_filtering_mode = "%s" } } user_data = "%s" vpc = ibm_is_vpc.testacc_vpc.id zone = "%s" keys = [ibm_is_ssh_key.testacc_sshkey.id] -}`, vpcname, subnetname, acc.ISZoneName, acc.ISCIDR, sshname, publicKey, vniname, name, acc.IsImage, acc.InstanceProfileName, pnaName, snaName, inlinevniname, userData, acc.ISZoneName) +}`, vpcname, subnetname, acc.ISZoneName, acc.ISCIDR, sshname, publicKey, vniname, name, acc.IsImage, acc.InstanceProfileName, pnaName, protocolStateFilteringMode, snaName, inlinevniname, protocolStateFilteringMode, userData, acc.ISZoneName) } func testAccCheckIBMISInstanceCatEncryptionConfig(vpcname, subnetname, sshname, publicKey, name, userData, resourceName, keyName string) string { @@ -1521,7 +1568,8 @@ func testAccCheckIBMISInstanceCatEncryptionConfig(vpcname, subnetname, sshname, resource "ibm_is_instance" "testacc_instance" { name = "%s" catalog_offering { - version_crn = data.ibm_is_images.testacc_images.images.1.catalog_offering.0.version.0.crn + version_crn = "crn:v1:staging:public:globalcatalog-collection:global::1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:version:4f8466eb-2218-42e3-a755-bf352b559c69-global/6a73aa69-5dd9-4243-a908-3b62f467cbf8-global" + plan_crn = "crn:v1:staging:public:globalcatalog-collection:global::1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc:plan:sw.1082e7d2-5e2f-0a11-a3bc-f88a8e1931fc.279a3cee-ba7d-42d5-ae88-6a0ebc56fa4a-global" } boot_volume { encryption = ibm_kms_key.testacc_key.crn @@ -1892,6 +1940,64 @@ func testAccCheckIBMISInstanceSnapshotRestoreConfig(vpcname, subnetname, sshname } `, vpcname, subnetname, acc.ISZoneName, sshname, publicKey, name, acc.IsImage, acc.InstanceProfileName, acc.ISZoneName, snapshot, insRestore, acc.InstanceProfileName, acc.ISZoneName) } +func testAccCheckIBMISInstanceSnapshotRestoreCrnConfig(vpcname, subnetname, sshname, publicKey, name, snapshot, insRestore string) string { + return fmt.Sprintf(` + resource "ibm_is_vpc" "testacc_vpc" { + name = "%s" + } + + resource "ibm_is_subnet" "testacc_subnet" { + name = "%s" + vpc = ibm_is_vpc.testacc_vpc.id + zone = "%s" + total_ipv4_address_count = 16 + } + + resource "ibm_is_ssh_key" "testacc_sshkey" { + name = "%s" + public_key = "%s" + } + + resource "ibm_is_instance" "testacc_instance" { + name = "%s" + image = "%s" + profile = "%s" + primary_network_interface { + subnet = ibm_is_subnet.testacc_subnet.id + } + vpc = ibm_is_vpc.testacc_vpc.id + zone = "%s" + keys = [ibm_is_ssh_key.testacc_sshkey.id] + network_interfaces { + subnet = ibm_is_subnet.testacc_subnet.id + name = "eth1" + } + } + resource "ibm_is_snapshot" "testacc_snapshot" { + name = "%s" + source_volume = ibm_is_instance.testacc_instance.volume_attachments[0].volume_id + } + + resource "ibm_is_instance" "testacc_instance_restore" { + name = "%s" + profile = "%s" + boot_volume { + name = "boot-restore" + snapshot_crn = ibm_is_snapshot.testacc_snapshot.crn + } + primary_network_interface { + subnet = ibm_is_subnet.testacc_subnet.id + } + vpc = ibm_is_vpc.testacc_vpc.id + zone = "%s" + keys = [ibm_is_ssh_key.testacc_sshkey.id] + network_interfaces { + subnet = ibm_is_subnet.testacc_subnet.id + name = "eth1" + } + } + `, vpcname, subnetname, acc.ISZoneName, sshname, publicKey, name, acc.IsImage, acc.InstanceProfileName, acc.ISZoneName, snapshot, insRestore, acc.InstanceProfileName, acc.ISZoneName) +} func testAccCheckIBMISInstanceSnapshotRestoreForceNewConfig(vpcname, subnetname, sshname, publicKey, name, name2, name3, insRestore string) string { return fmt.Sprintf(` @@ -2477,6 +2583,8 @@ ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCKVmnMOlHKcZK8tpt3MP1lqOLAcqcJzhsvJcjscgVE "ibm_is_instance.testacc_instance", "zone", acc.ISZoneName), resource.TestCheckResourceAttrSet( "ibm_is_instance.testacc_instance", "catalog_offering.0.version_crn"), + resource.TestCheckResourceAttrSet( + "ibm_is_instance.testacc_instance", "catalog_offering.0.plan_crn"), resource.TestCheckResourceAttrSet( "data.ibm_is_images.testacc_images", "images.0.name"), ), @@ -2523,6 +2631,7 @@ func testAccCheckIBMISInstanceCatalogImageConfig(vpcname, subnetname, sshname, p } catalog_offering { version_crn = data.ibm_is_images.testacc_images.images.0.catalog_offering.0.version.0.crn + plan_crn = "crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e" } }`, vpcname, subnetname, acc.ISZoneName, acc.ISCIDR, sshname, publicKey, name, acc.InstanceProfileName, userData, acc.ISZoneName) } diff --git a/ibm/service/vpc/resource_ibm_is_instance_volume_attachment.go b/ibm/service/vpc/resource_ibm_is_instance_volume_attachment.go index 4c1cb7ed41..1e1075549b 100644 --- a/ibm/service/vpc/resource_ibm_is_instance_volume_attachment.go +++ b/ibm/service/vpc/resource_ibm_is_instance_volume_attachment.go @@ -143,7 +143,7 @@ func ResourceIBMISInstanceVolumeAttachment() *schema.Resource { Type: schema.TypeInt, Optional: true, Computed: true, - AtLeastOneOf: []string{isInstanceVolAttVol, isInstanceVolCapacity, isInstanceVolumeSnapshot}, + AtLeastOneOf: []string{isInstanceVolAttVol, isInstanceVolCapacity, isInstanceVolumeSnapshot, isInstanceVolumeSnapshotCrn}, ConflictsWith: []string{isInstanceVolAttVol}, ValidateFunc: validate.InvokeValidator("ibm_is_instance_volume_attachment", isInstanceVolCapacity), Description: "The capacity of the volume in gigabytes. The specified minimum and maximum capacity values for creating or updating volumes may expand in the future.", @@ -160,9 +160,18 @@ func ResourceIBMISInstanceVolumeAttachment() *schema.Resource { Optional: true, Computed: true, ForceNew: true, - AtLeastOneOf: []string{isInstanceVolAttVol, isInstanceVolCapacity, isInstanceVolumeSnapshot}, - ConflictsWith: []string{isInstanceVolAttVol}, - Description: "The snapshot of the volume to be attached", + AtLeastOneOf: []string{isInstanceVolAttVol, isInstanceVolCapacity, isInstanceVolumeSnapshot, isInstanceVolumeSnapshotCrn}, + ConflictsWith: []string{isInstanceVolAttVol, isInstanceVolumeSnapshotCrn}, + Description: "The snapshot ID of the volume to be attached", + }, + isInstanceVolumeSnapshotCrn: { + Type: schema.TypeString, + Optional: true, + Computed: true, + ForceNew: true, + AtLeastOneOf: []string{isInstanceVolAttVol, isInstanceVolCapacity, isInstanceVolumeSnapshot, isInstanceVolumeSnapshotCrn}, + ConflictsWith: []string{isInstanceVolAttVol, isInstanceVolumeSnapshot}, + Description: "The snapshot crn of the volume to be attached", }, isInstanceVolumeAttVolumeReferenceCrn: { Type: schema.TypeString, @@ -293,31 +302,38 @@ func instanceVolAttachmentCreate(d *schema.ResourceData, meta interface{}, insta volnamestr := volname.(string) volProtoVol.Name = &volnamestr } - var userTags *schema.Set - if v, ok := d.GetOk(isInstanceVolAttTags); ok { - userTags = v.(*schema.Set) - if userTags != nil && userTags.Len() != 0 { - userTagsArray := make([]string, userTags.Len()) - for i, userTag := range userTags.List() { - userTagStr := userTag.(string) - userTagsArray[i] = userTagStr - } - schematicTags := os.Getenv("IC_ENV_TAGS") - var envTags []string - if schematicTags != "" { - envTags = strings.Split(schematicTags, ",") - userTagsArray = append(userTagsArray, envTags...) - } - volProtoVol.UserTags = userTagsArray - } - } + // var userTags *schema.Set + // if v, ok := d.GetOk(isInstanceVolAttTags); ok { + // userTags = v.(*schema.Set) + // if userTags != nil && userTags.Len() != 0 { + // userTagsArray := make([]string, userTags.Len()) + // for i, userTag := range userTags.List() { + // userTagStr := userTag.(string) + // userTagsArray[i] = userTagStr + // } + // schematicTags := os.Getenv("IC_ENV_TAGS") + // var envTags []string + // if schematicTags != "" { + // envTags = strings.Split(schematicTags, ",") + // userTagsArray = append(userTagsArray, envTags...) + // } + // volProtoVol.UserTags = userTagsArray + // } + // } volSnapshotStr := "" + volSnapshotCrnStr := "" if volSnapshot, ok := d.GetOk(isInstanceVolumeSnapshot); ok { volSnapshotStr = volSnapshot.(string) volProtoVol.SourceSnapshot = &vpcv1.SnapshotIdentity{ ID: &volSnapshotStr, } } + if volSnapshotCrn, ok := d.GetOk(isInstanceVolumeSnapshotCrn); ok { + volSnapshotCrnStr = volSnapshotCrn.(string) + volProtoVol.SourceSnapshot = &vpcv1.SnapshotIdentity{ + CRN: &volSnapshotCrnStr, + } + } encryptionCRNStr := "" if encryptionCRN, ok := d.GetOk(isInstanceVolEncryptionKey); ok { encryptionCRNStr = encryptionCRN.(string) @@ -326,7 +342,10 @@ func instanceVolAttachmentCreate(d *schema.ResourceData, meta interface{}, insta } } var snapCapacity int64 - if volSnapshotStr != "" { + if volSnapshotStr != "" || volSnapshotCrnStr != "" { + if volSnapshotStr == "" { + volSnapshotStr = volSnapshotCrnStr[strings.LastIndex(volSnapshotCrnStr, ":")+1:] + } snapshotGet, _, err := sess.GetSnapshot(&vpcv1.GetSnapshotOptions{ ID: &volSnapshotStr, }) @@ -388,10 +407,21 @@ func instanceVolAttachmentCreate(d *schema.ResourceData, meta interface{}, insta return fmt.Errorf("[ERROR] Error while attaching volume for instance %s: %q", instanceId, err) } d.SetId(makeTerraformVolAttID(instanceId, *instanceVolAtt.ID)) - _, err = isWaitForInstanceVolumeAttached(sess, d, instanceId, *instanceVolAtt.ID) + volAtt, err := isWaitForInstanceVolumeAttached(sess, d, instanceId, *instanceVolAtt.ID) if err != nil { return err } + + v := os.Getenv("IC_ENV_TAGS") + if _, ok := d.GetOk(isInstanceVolAttTags); ok || v != "" { + volAttRef := volAtt.(*vpcv1.VolumeAttachment) + oldList, newList := d.GetChange(isInstanceVolAttTags) + err = flex.UpdateGlobalTagsUsingCRN(oldList, newList, meta, *volAttRef.Volume.CRN, "", isInstanceUserTagType) + if err != nil { + log.Printf( + "Error on create of resource instance volume attachment (%s) tags: %s", d.Id(), err) + } + } log.Printf("[INFO] Instance (%s) volume attachment : %s", instanceId, *instanceVolAtt.ID) return nil } @@ -475,7 +505,14 @@ func instanceVolumeAttachmentGet(d *schema.ResourceData, meta interface{}, insta } if volumeDetail.SourceSnapshot != nil { d.Set(isInstanceVolumeSnapshot, *volumeDetail.SourceSnapshot.ID) + d.Set(isInstanceVolumeSnapshotCrn, *volumeDetail.SourceSnapshot.CRN) } + tags, err := flex.GetGlobalTagsUsingCRN(meta, *volumeDetail.CRN, "", isInstanceUserTagType) + if err != nil { + log.Printf( + "Error on get of resource Instance volume attachment (%s) tags: %s", d.Id(), err) + } + d.Set(isInstanceTags, tags) return nil } @@ -488,6 +525,17 @@ func instanceVolAttUpdate(d *schema.ResourceData, meta interface{}) error { if err != nil { return err } + if volumecrnok, ok := d.GetOk("volume_crn"); ok { + volumecrn := volumecrnok.(string) + if d.HasChange(isInstanceTags) { + oldList, newList := d.GetChange(isInstanceTags) + err = flex.UpdateTagsUsingCRN(oldList, newList, meta, volumecrn) + if err != nil { + log.Printf( + "Error on update of resource Instance volume attachment (%s) tags: %s", d.Id(), err) + } + } + } updateInstanceVolAttOptions := &vpcv1.UpdateInstanceVolumeAttachmentOptions{ InstanceID: &instanceId, ID: &id, @@ -548,7 +596,7 @@ func instanceVolAttUpdate(d *schema.ResourceData, meta interface{}) error { volId = volIdOk.(string) } - if volId != "" && (d.HasChange(isInstanceVolIops) || d.HasChange(isInstanceVolProfile) || d.HasChange(isInstanceVolAttTags)) { + if volId != "" && (d.HasChange(isInstanceVolIops) || d.HasChange(isInstanceVolProfile)) { // || d.HasChange(isInstanceVolAttTags) insId := d.Get(isInstanceId).(string) getinsOptions := &vpcv1.GetInstanceOptions{ ID: &insId, @@ -590,26 +638,26 @@ func instanceVolAttUpdate(d *schema.ResourceData, meta interface{}) error { iops := int64(d.Get(isVolumeIops).(int)) volumeProfilePatchModel.Iops = &iops } - if d.HasChange(isInstanceVolAttTags) && !d.IsNewResource() { - if v, ok := d.GetOk(isInstanceVolAttTags); ok { - userTags := v.(*schema.Set) - if userTags != nil && userTags.Len() != 0 { - userTagsArray := make([]string, userTags.Len()) - for i, userTag := range userTags.List() { - userTagStr := userTag.(string) - userTagsArray[i] = userTagStr - } - schematicTags := os.Getenv("IC_ENV_TAGS") - var envTags []string - if schematicTags != "" { - envTags = strings.Split(schematicTags, ",") - userTagsArray = append(userTagsArray, envTags...) - } - volumeProfilePatchModel.UserTags = userTagsArray - } - } - - } + // if d.HasChange(isInstanceVolAttTags) && !d.IsNewResource() { + // if v, ok := d.GetOk(isInstanceVolAttTags); ok { + // userTags := v.(*schema.Set) + // if userTags != nil && userTags.Len() != 0 { + // userTagsArray := make([]string, userTags.Len()) + // for i, userTag := range userTags.List() { + // userTagStr := userTag.(string) + // userTagsArray[i] = userTagStr + // } + // schematicTags := os.Getenv("IC_ENV_TAGS") + // var envTags []string + // if schematicTags != "" { + // envTags = strings.Split(schematicTags, ",") + // userTagsArray = append(userTagsArray, envTags...) + // } + // volumeProfilePatchModel.UserTags = userTagsArray + // } + // } + + // } volumeProfilePatch, err := volumeProfilePatchModel.AsPatch() if err != nil { diff --git a/ibm/service/vpc/resource_ibm_is_instance_volume_attachment_test.go b/ibm/service/vpc/resource_ibm_is_instance_volume_attachment_test.go index bedbd571b8..6e99984c0f 100644 --- a/ibm/service/vpc/resource_ibm_is_instance_volume_attachment_test.go +++ b/ibm/service/vpc/resource_ibm_is_instance_volume_attachment_test.go @@ -85,6 +85,41 @@ ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCKVmnMOlHKcZK8tpt3MP1lqOLAcqcJzhsvJcjscgVE }, }) } +func TestAccIBMISInstanceVolumeAttachment_crn(t *testing.T) { + var instanceVolAtt string + vpcname := fmt.Sprintf("tf-vpc-%d", acctest.RandIntRange(10, 100)) + name := fmt.Sprintf("tf-instnace-%d", acctest.RandIntRange(10, 100)) + subnetname := fmt.Sprintf("tf-subnet-%d", acctest.RandIntRange(10, 100)) + publicKey := strings.TrimSpace(` +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCKVmnMOlHKcZK8tpt3MP1lqOLAcqcJzhsvJcjscgVERRN7/9484SOBJ3HSKxxNG5JN8owAjy5f9yYwcUg+JaUVuytn5Pv3aeYROHGGg+5G346xaq3DAwX6Y5ykr2fvjObgncQBnuU5KHWCECO/4h8uWuwh/kfniXPVjFToc+gnkqA+3RKpAecZhFXwfalQ9mMuYGFxn+fwn8cYEApsJbsEmb0iJwPiZ5hjFC8wREuiTlhPHDgkBLOiycd20op2nXzDbHfCHInquEe/gYxEitALONxm0swBOwJZwlTDOB7C6y2dzlrtxr1L59m7pCkWI4EtTRLvleehBoj3u7jB4usR +`) + sshname := fmt.Sprintf("tf-ssh-%d", acctest.RandIntRange(10, 100)) + attName := fmt.Sprintf("tf-volatt-%d", acctest.RandIntRange(10, 100)) + autoDelete := true + volName := fmt.Sprintf("tf-vol-%d", acctest.RandIntRange(10, 100)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { acc.TestAccPreCheck(t) }, + Providers: acc.TestAccProviders, + CheckDestroy: testAccCheckIBMISInstanceDestroy, + Steps: []resource.TestStep{ + { + Config: testAccCheckIBMISInstanceVolumeAttachmentCrnConfig(vpcname, subnetname, sshname, publicKey, name, attName, volName, autoDelete), + Check: resource.ComposeTestCheckFunc( + testAccCheckIBMISInstanceVolumeAttachmentExists("ibm_is_instance_volume_attachment.testacc_att", instanceVolAtt), + resource.TestCheckResourceAttr( + "ibm_is_instance_volume_attachment.testacc_att", "name", attName), + resource.TestCheckResourceAttr( + "ibm_is_instance_volume_attachment.testacc_att", "delete_volume_on_instance_delete", fmt.Sprintf("%t", autoDelete)), + resource.TestCheckResourceAttrSet( + "ibm_is_instance_volume_attachment.testacc_att", "capacity"), + resource.TestCheckResourceAttrSet( + "ibm_is_instance_volume_attachment.testacc_att", "iops"), + ), + }, + }, + }) +} func TestAccIBMISInstanceVolumeAttachment_userTag(t *testing.T) { var instanceVolAtt string @@ -242,6 +277,51 @@ func testAccCheckIBMISInstanceVolumeAttachmentConfig(vpcname, subnetname, sshnam `, vpcname, subnetname, acc.ISZoneName, sshname, publicKey, name, acc.IsImage, acc.InstanceProfileName, acc.ISZoneName, attName, capacity, iops, autoDelete, volName) } +func testAccCheckIBMISInstanceVolumeAttachmentCrnConfig(vpcname, subnetname, sshname, publicKey, name, attName, volName string, autoDelete bool) string { + return fmt.Sprintf(` + resource "ibm_is_vpc" "testacc_vpc" { + name = "%s" + } + resource "ibm_is_subnet" "testacc_subnet" { + name = "%s" + vpc = ibm_is_vpc.testacc_vpc.id + zone = "%s" + total_ipv4_address_count = 16 + } + resource "ibm_is_ssh_key" "testacc_sshkey" { + name = "%s" + public_key = "%s" + } + resource "ibm_is_instance" "testacc_instance" { + name = "%s" + image = "%s" + profile = "%s" + primary_network_interface { + subnet = ibm_is_subnet.testacc_subnet.id + } + vpc = ibm_is_vpc.testacc_vpc.id + zone = "%s" + keys = [ibm_is_ssh_key.testacc_sshkey.id] + network_interfaces { + subnet = ibm_is_subnet.testacc_subnet.id + name = "eth1" + } + } + resource "ibm_is_snapshot" "testacc_snapshot" { + name = "tf-test-snapshot" + source_volume = ibm_is_instance.testacc_instance.volume_attachments[0].volume_id + } + resource "ibm_is_instance_volume_attachment" "testacc_att" { + instance = ibm_is_instance.testacc_instance.id + name = "%s" + profile = "general-purpose" + snapshot_crn = ibm_is_snapshot.testacc_snapshot.crn + delete_volume_on_instance_delete = %t + volume_name = "%s" + } + `, vpcname, subnetname, acc.ISZoneName, sshname, publicKey, name, acc.IsImage, acc.InstanceProfileName, acc.ISZoneName, attName, autoDelete, volName) +} + func testAccCheckIBMISInstanceVolumeAttachmentUsertagConfig(vpcname, subnetname, sshname, publicKey, name, attName, volName, usertag string, autoDelete bool, capacity, iops int64) string { return fmt.Sprintf(` resource "ibm_is_vpc" "testacc_vpc" { diff --git a/ibm/service/vpc/resource_ibm_is_share.go b/ibm/service/vpc/resource_ibm_is_share.go index fb41ab16f5..96b6681574 100644 --- a/ibm/service/vpc/resource_ibm_is_share.go +++ b/ibm/service/vpc/resource_ibm_is_share.go @@ -181,6 +181,13 @@ func ResourceIbmIsShare() *schema.Resource { Computed: true, Description: "If `true`:- The VPC infrastructure performs any needed NAT operations.- `floating_ips` must not have more than one floating IP.If `false`:- Packets are passed unchanged to/from the network interface, allowing the workload to perform any needed NAT operations.- `allow_ip_spoofing` must be `false`.- If the virtual network interface is attached: - The target `resource_type` must be `bare_metal_server_network_attachment`. - The target `interface_type` must not be `hipersocket`.", }, + "protocol_state_filtering_mode": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validate.InvokeValidator("ibm_is_virtual_network_interface", "protocol_state_filtering_mode"), + Description: "The protocol state filtering mode used for this virtual network interface.", + }, "primary_ip": { Type: schema.TypeList, Optional: true, @@ -388,6 +395,12 @@ func ResourceIbmIsShare() *schema.Resource { Computed: true, Description: "The user-defined name for this share target. Names must be unique within the share the share target resides in. If unspecified, the name will be a hyphenated list of randomly-selected words.", }, + "transit_encryption": { + Type: schema.TypeString, + Optional: true, + Computed: true, + Description: "The transit encryption mode.", + }, "virtual_network_interface": { Type: schema.TypeList, Optional: true, @@ -432,6 +445,13 @@ func ResourceIbmIsShare() *schema.Resource { Computed: true, Description: "If `true`:- The VPC infrastructure performs any needed NAT operations.- `floating_ips` must not have more than one floating IP.If `false`:- Packets are passed unchanged to/from the network interface, allowing the workload to perform any needed NAT operations.- `allow_ip_spoofing` must be `false`.- If the virtual network interface is attached: - The target `resource_type` must be `bare_metal_server_network_attachment`. - The target `interface_type` must not be `hipersocket`.", }, + "protocol_state_filtering_mode": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validate.InvokeValidator("ibm_is_virtual_network_interface", "protocol_state_filtering_mode"), + Description: "The protocol state filtering mode used for this virtual network interface.", + }, "primary_ip": { Type: schema.TypeList, Optional: true, @@ -512,6 +532,7 @@ func ResourceIbmIsShare() *schema.Resource { "vpc": { Type: schema.TypeString, Optional: true, + Computed: true, Description: "The ID of the VPC in which instances can mount the file share using this share target.This property will be removed in a future release.The `subnet` property should be used instead.", }, }, @@ -1718,6 +1739,7 @@ func shareUpdate(vpcClient *vpcv1.VpcV1, context context.Context, d *schema.Reso vniPrimaryIpAutoDelete := fmt.Sprintf("%s.%d.virtual_network_interface.0.primary_ip.0.auto_delete", shareMountTargetSchema, targetIdx) vniSubnet := fmt.Sprintf("%s.%d.virtual_network_interface.0.subnet", shareMountTargetSchema, targetIdx) vniResvedIp := fmt.Sprintf("%s.%d.virtual_network_interface.0.primary_ip.0.reserved_ip", shareMountTargetSchema, targetIdx) + vniPSFM := fmt.Sprintf("%s.%d.virtual_network_interface.0.protocol_state_filtering_mode", shareMountTargetSchema, targetIdx) mountTargetId := d.Get(targetId).(string) if d.HasChange(targetName) { updateShareTargetOptions := &vpcv1.UpdateShareMountTargetOptions{} @@ -1747,7 +1769,7 @@ func shareUpdate(vpcClient *vpcv1.VpcV1, context context.Context, d *schema.Reso } } - if d.HasChange(vniName) || d.HasChange(vniAutoDelete) { + if d.HasChange(vniName) || d.HasChange(vniAutoDelete) || d.HasChange(vniPSFM) { vniPatchModel := &vpcv1.VirtualNetworkInterfacePatch{} if d.HasChange(vniName) { vniNameStr := d.Get(vniName).(string) @@ -1757,6 +1779,10 @@ func shareUpdate(vpcClient *vpcv1.VpcV1, context context.Context, d *schema.Reso autoDelete := d.Get(vniAutoDelete).(bool) vniPatchModel.AutoDelete = &autoDelete } + if d.HasChange(vniPSFM) { + psfm := d.Get(vniPSFM).(string) + vniPatchModel.ProtocolStateFilteringMode = &psfm + } vniPatch, err := vniPatchModel.AsPatch() if err != nil { log.Printf("[DEBUG] Virtual network interface AsPatch failed %s", err) diff --git a/ibm/service/vpc/resource_ibm_is_share_mount_target.go b/ibm/service/vpc/resource_ibm_is_share_mount_target.go index 536e378303..136092b20b 100644 --- a/ibm/service/vpc/resource_ibm_is_share_mount_target.go +++ b/ibm/service/vpc/resource_ibm_is_share_mount_target.go @@ -103,6 +103,13 @@ func ResourceIBMIsShareMountTarget() *schema.Resource { Computed: true, Description: "If `true`:- The VPC infrastructure performs any needed NAT operations.- `floating_ips` must not have more than one floating IP.If `false`:- Packets are passed unchanged to/from the network interface, allowing the workload to perform any needed NAT operations.- `allow_ip_spoofing` must be `false`.- If the virtual network interface is attached: - The target `resource_type` must be `bare_metal_server_network_attachment`. - The target `interface_type` must not be `hipersocket`.", }, + "protocol_state_filtering_mode": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validate.InvokeValidator("ibm_is_virtual_network_interface", "protocol_state_filtering_mode"), + Description: "The protocol state filtering mode used for this virtual network interface.", + }, "primary_ip": { Type: schema.TypeList, MinItems: 0, @@ -457,7 +464,7 @@ func resourceIBMIsShareMountTargetUpdate(context context.Context, d *schema.Reso hasChange = true } - if d.HasChange("virtual_network_interface.0.name") || d.HasChange("virtual_network_interface.0.auto_delete") { + if d.HasChange("virtual_network_interface.0.name") || d.HasChange("virtual_network_interface.0.auto_delete") || d.HasChange("virtual_network_interface.0.protocol_state_filtering_mode") { vniPatchModel := &vpcv1.VirtualNetworkInterfacePatch{} if d.HasChange("virtual_network_interface.0.name") { vniName := d.Get("virtual_network_interface.0.name").(string) @@ -467,6 +474,10 @@ func resourceIBMIsShareMountTargetUpdate(context context.Context, d *schema.Reso autoDelete := d.Get("virtual_network_interface.0.auto_delete").(bool) vniPatchModel.AutoDelete = &autoDelete } + if d.HasChange("virtual_network_interface.0.protocol_state_filtering_mode") { + psfm := d.Get("virtual_network_interface.0.protocol_state_filtering_mode").(string) + vniPatchModel.ProtocolStateFilteringMode = &psfm + } vniPatch, err := vniPatchModel.AsPatch() if err != nil { log.Printf("[DEBUG] Virtual network interface AsPatch failed %s", err) @@ -781,6 +792,8 @@ func ShareMountTargetVirtualNetworkInterfaceToMap(context context.Context, vpcCl vniMap["subnet"] = vni.Subnet.ID vniMap["resource_type"] = vni.ResourceType vniMap["resource_group"] = vni.ResourceGroup.ID + vniMap["protocol_state_filtering_mode"] = vni.ProtocolStateFilteringMode + if len(vni.SecurityGroups) != 0 { secgrpList := []string{} for i := 0; i < len(vni.SecurityGroups); i++ { @@ -798,6 +811,9 @@ func ShareMountTargetMapToShareMountTargetPrototype(d *schema.ResourceData, vniM if name != "" { vniPrototype.Name = &name } + if pStateFilteringInt, ok := vniMap["protocol_state_filtering_mode"]; ok { + vniPrototype.ProtocolStateFilteringMode = core.StringPtr(pStateFilteringInt.(string)) + } primaryIp, ok := vniMap["primary_ip"] if ok && len(primaryIp.([]interface{})) > 0 { primaryIpPrototype := &vpcv1.VirtualNetworkInterfacePrimaryIPPrototype{} diff --git a/ibm/service/vpc/resource_ibm_is_share_mount_target_test.go b/ibm/service/vpc/resource_ibm_is_share_mount_target_test.go index fb4a0d6597..833b0a2756 100644 --- a/ibm/service/vpc/resource_ibm_is_share_mount_target_test.go +++ b/ibm/service/vpc/resource_ibm_is_share_mount_target_test.go @@ -176,6 +176,47 @@ func TestAccIbmIsShareMountTargetVNI(t *testing.T) { }) } +func TestAccIbmIsShareMountTargetVNIProtocolStateFilteringMode(t *testing.T) { + var conf vpcv1.ShareMountTarget + vpcname := fmt.Sprintf("tf-vpc-name-%d", acctest.RandIntRange(10, 100)) + targetName := fmt.Sprintf("tf-target-%d", acctest.RandIntRange(10, 100)) + targetNameUpdate := fmt.Sprintf("tf-target-%d", acctest.RandIntRange(10, 100)) + sname := fmt.Sprintf("tf-fs-name-%d", acctest.RandIntRange(10, 100)) + subnetName := fmt.Sprintf("tf-subnet-name-%d", acctest.RandIntRange(10, 100)) + vniName := fmt.Sprintf("tf-vni-name-%d", acctest.RandIntRange(10, 100)) + vniNameUpdated := fmt.Sprintf("tf-vni-name-updated-%d", acctest.RandIntRange(10, 100)) + pIpName := fmt.Sprintf("tf-pip-name-%d", acctest.RandIntRange(10, 100)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { acc.TestAccPreCheck(t) }, + Providers: acc.TestAccProviders, + CheckDestroy: testAccCheckIbmIsShareTargetDestroy, + Steps: []resource.TestStep{ + { + Config: testAccCheckIbmIsShareMountTargetConfigVNIProtocolStateFilteringMode(vpcname, sname, targetName, subnetName, vniName, pIpName), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckIbmIsShareTargetExists("ibm_is_share_mount_target.is_share_target", conf), + resource.TestCheckResourceAttr("ibm_is_share_mount_target.is_share_target", "name", targetName), + resource.TestCheckResourceAttr("ibm_is_share_mount_target.is_share_target", "virtual_network_interface.0.name", vniName), + resource.TestCheckResourceAttrSet("ibm_is_share_mount_target.is_share_target", "virtual_network_interface.0.subnet"), + resource.TestCheckResourceAttrSet("ibm_is_share_mount_target.is_share_target", "virtual_network_interface.0.primary_ip.0.name"), + resource.TestCheckResourceAttr("ibm_is_share_mount_target.is_share_target", "virtual_network_interface.0.protocol_state_filtering_mode", "auto"), + resource.TestCheckResourceAttr("data.ibm_is_virtual_network_interface.is_virtual_network_interface", "protocol_state_filtering_mode", "auto"), + ), + }, + { + Config: testAccCheckIbmIsShareMountTargetConfigVNIProtocolStateFilteringModeUpdate(vpcname, sname, targetNameUpdate, subnetName, vniNameUpdated, pIpName), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr("ibm_is_share_mount_target.is_share_target", "name", targetNameUpdate), + resource.TestCheckResourceAttr("ibm_is_share_mount_target.is_share_target", "virtual_network_interface.0.name", vniNameUpdated), + resource.TestCheckResourceAttr("ibm_is_share_mount_target.is_share_target", "virtual_network_interface.0.protocol_state_filtering_mode", "enabled"), + resource.TestCheckResourceAttr("data.ibm_is_virtual_network_interface.is_virtual_network_interface", "protocol_state_filtering_mode", "enabled"), + ), + }, + }, + }) +} + func TestAccIbmIsShareMountTargetVNIID(t *testing.T) { var conf vpcv1.ShareMountTarget vpcname := fmt.Sprintf("tf-vpc-name-%d", acctest.RandIntRange(10, 100)) @@ -308,6 +349,82 @@ func testAccCheckIbmIsShareMountTargetConfigVNIPrimaryIPID(vpcName, sname, targe `, sname, acc.ShareProfileName, vpcName, subnetName, acc.ISCIDR, resIPName, vniName, targetName) } +func testAccCheckIbmIsShareMountTargetConfigVNIProtocolStateFilteringMode(vpcName, sname, targetName, subnetName, vniName, pIpName string) string { + return fmt.Sprintf(` + resource "ibm_is_share" "is_share" { + zone = "us-south-1" + size = 200 + name = "%s" + profile = "%s" + } + resource "ibm_is_vpc" "testacc_vpc" { + name = "%s" + } + resource "ibm_is_subnet" "testacc_subnet" { + name = "%s" + vpc = ibm_is_vpc.testacc_vpc.id + zone = "us-south-1" + ipv4_cidr_block = "%s" + } + resource "ibm_is_share_mount_target" "is_share_target" { + share = ibm_is_share.is_share.id + virtual_network_interface { + name = "%s" + primary_ip { + name = "%s" + address = "${replace(ibm_is_subnet.testacc_subnet.ipv4_cidr_block, "0/24", "14")}" + auto_delete = %t + } + subnet = ibm_is_subnet.testacc_subnet.id + protocol_state_filtering_mode = "auto" + } + + name = "%s" + } + data "ibm_is_virtual_network_interface" "is_virtual_network_interface" { + virtual_network_interface = ibm_is_share_mount_target.is_share_target.virtual_network_interface.0.id + } + `, sname, acc.ShareProfileName, vpcName, subnetName, acc.ISCIDR, vniName, pIpName, false, targetName) +} + +func testAccCheckIbmIsShareMountTargetConfigVNIProtocolStateFilteringModeUpdate(vpcName, sname, targetName, subnetName, vniName, pIpName string) string { + return fmt.Sprintf(` + data "ibm_resource_group" "group" { + is_default = "true" + } + resource "ibm_is_share" "is_share" { + zone = "us-south-1" + size = 200 + name = "%s" + profile = "%s" + } + resource "ibm_is_vpc" "testacc_vpc" { + name = "%s" + } + resource "ibm_is_subnet" "testacc_subnet" { + name = "%s" + vpc = ibm_is_vpc.testacc_vpc.id + zone = "us-south-1" + ipv4_cidr_block = "%s" + } + resource "ibm_is_share_mount_target" "is_share_target" { + share = ibm_is_share.is_share.id + virtual_network_interface { + name = "%s" + primary_ip { + name = "%s" + address = "${replace(ibm_is_subnet.testacc_subnet.ipv4_cidr_block, "0/24", "14")}" + auto_delete = %t + } + subnet = ibm_is_subnet.testacc_subnet.id + protocol_state_filtering_mode = "enabled" + } + + name = "%s" + } + `, sname, acc.ShareProfileName, vpcName, subnetName, acc.ISCIDR, vniName, pIpName, false, targetName) +} + func testAccCheckIbmIsShareMountTargetConfigVNI(vpcName, sname, targetName, subnetName, vniName, pIpName string) string { return fmt.Sprintf(` data "ibm_resource_group" "group" { diff --git a/ibm/service/vpc/resource_ibm_is_share_test.go b/ibm/service/vpc/resource_ibm_is_share_test.go index 5b08126d32..d0a2a94c11 100644 --- a/ibm/service/vpc/resource_ibm_is_share_test.go +++ b/ibm/service/vpc/resource_ibm_is_share_test.go @@ -60,6 +60,47 @@ func TestAccIbmIsShareCrossRegionReplication(t *testing.T) { }) } +func TestAccIbmIsShareProtocolStateFiltering(t *testing.T) { + var conf vpcv1.Share + name := fmt.Sprintf("tf-fs-name-%d", acctest.RandIntRange(10, 100)) + psfm := "auto" + psfmUpdated := "enabled" + subnetName := fmt.Sprintf("tf-subnet-%d", acctest.RandIntRange(10, 100)) + vpcname := fmt.Sprintf("tf-vpc-name-%d", acctest.RandIntRange(10, 100)) + targetName := fmt.Sprintf("tf-target-%d", acctest.RandIntRange(10, 100)) + resource.Test(t, resource.TestCase{ + PreCheck: func() { acc.TestAccPreCheck(t) }, + Providers: acc.TestAccProviders, + CheckDestroy: testAccCheckIbmIsShareDestroy, + Steps: []resource.TestStep{ + { + Config: testAccCheckIbmIsShareProtocolStateFilteringConfig(vpcname, subnetName, name, targetName, psfm), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckIbmIsShareExists("ibm_is_share.is_share", conf), + resource.TestCheckResourceAttrSet("ibm_is_share.is_share", "source_share_crn"), + resource.TestCheckResourceAttrSet("ibm_is_share.is_share", "encryption_key"), + resource.TestCheckResourceAttr("ibm_is_share.is_share", "name", name), + resource.TestCheckResourceAttr("ibm_is_share.is_share", "encryption", "user_managed"), + resource.TestCheckResourceAttr("ibm_is_share.is_share", "mount_targets.0.virtual_network_interface.0.protocol_state_filtering_mode", psfm), + resource.TestCheckResourceAttr("data.ibm_is_virtual_network_interface.is_virtual_network_interface", "protocol_state_filtering_mode", psfm), + ), + }, + { + Config: testAccCheckIbmIsShareProtocolStateFilteringConfig(vpcname, subnetName, name, targetName, psfmUpdated), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckIbmIsShareExists("ibm_is_share.is_share", conf), + resource.TestCheckResourceAttrSet("ibm_is_share.is_share", "source_share_crn"), + resource.TestCheckResourceAttrSet("ibm_is_share.is_share", "encryption_key"), + resource.TestCheckResourceAttr("ibm_is_share.is_share", "name", name), + resource.TestCheckResourceAttr("ibm_is_share.is_share", "encryption", "user_managed"), + resource.TestCheckResourceAttr("ibm_is_share.is_share", "mount_targets.0.virtual_network_interface.0.protocol_state_filtering_mode", psfmUpdated), + resource.TestCheckResourceAttr("data.ibm_is_virtual_network_interface.is_virtual_network_interface", "protocol_state_filtering_mode", psfmUpdated), + ), + }, + }, + }) +} + func TestAccIbmIsShareAllArgs(t *testing.T) { var conf vpcv1.Share @@ -252,6 +293,40 @@ func testAccCheckIbmIsShareCrossRegionReplicaConfig(name string) string { } `, acc.ShareEncryptionKey, acc.SourceShareCRN, name, acc.ShareProfileName) } + +func testAccCheckIbmIsShareProtocolStateFilteringConfig(vpcname, subnetName, name, mtName, psfm string) string { + return fmt.Sprintf(` + resource "ibm_is_vpc" "testacc_vpc" { + name = "%s" + } + resource "ibm_is_subnet" "testacc_subnet" { + name = "%s" + vpc = ibm_is_vpc.testacc_vpc.id + zone = "us-south-1" + ipv4_cidr_block = "%s" + } + resource "ibm_is_share" "is_share" { + access_control_mode = "vpc" + zone = "us-south-2" + size = 200 + name = "%s" + profile = "%s" + mount_targets { + name = "%s" + vpc = ibm_is_vpc.testacc_vpc.id + virtual_network_interface { + subnet = ibm_is_subnet.testacc_subnet.id + protocol_state_filtering_mode = "%s" + } + } + + } + data "ibm_is_virtual_network_interface" "is_virtual_network_interface" { + virtual_network_interface = ibm_is_share.is_share.mount_targets.0.virtual_network_interface.0.id + } + `, vpcname, subnetName, acc.ISCIDR, name, acc.ShareProfileName, mtName, psfm) +} + func testAccCheckIbmIsShareConfig(vpcName, name string, size int, shareTergetName string) string { return fmt.Sprintf(` diff --git a/ibm/service/vpc/resource_ibm_is_snapshot.go b/ibm/service/vpc/resource_ibm_is_snapshot.go index 20a110180d..639cae8dd9 100644 --- a/ibm/service/vpc/resource_ibm_is_snapshot.go +++ b/ibm/service/vpc/resource_ibm_is_snapshot.go @@ -49,6 +49,10 @@ const ( isSnapshotWaiting = "waiting" isSnapshotCapturedAt = "captured_at" isSnapshotBackupPolicyPlan = "backup_policy_plan" + + isSnapshotCatalogOffering = "catalog_offering" + isSnapshotCatalogOfferingPlanCrn = "plan_crn" + isSnapshotCatalogOfferingVersionCrn = "version_crn" ) func ResourceIBMSnapshot() *schema.Resource { @@ -391,6 +395,39 @@ func ResourceIBMSnapshot() *schema.Resource { Set: flex.ResourceIBMVPCHash, Description: "User Tags for the snapshot", }, + isSnapshotCatalogOffering: { + Type: schema.TypeList, + Computed: true, + Description: "The catalog offering inherited from the snapshot's source. If a virtual server instance is provisioned with a source_snapshot specifying this snapshot, the virtual server instance will use this snapshot's catalog offering, including its pricing plan.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + isSnapshotCatalogOfferingPlanCrn: { + Type: schema.TypeString, + Computed: true, + Description: "The CRN for this catalog offering version's billing plan", + }, + "deleted": { + Type: schema.TypeList, + Computed: true, + Description: "If present, this property indicates the referenced resource has been deleted and provides some supplementary information.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "more_info": { + Type: schema.TypeString, + Computed: true, + Description: "Link to documentation about deleted resources.", + }, + }, + }, + }, + isSnapshotCatalogOfferingVersionCrn: { + Type: schema.TypeString, + Computed: true, + Description: "The CRN for this version of a catalog offering", + }, + }, + }, + }, isSnapshotBackupPolicyPlan: { Type: schema.TypeList, @@ -758,6 +795,34 @@ func snapshotGet(d *schema.ResourceData, meta interface{}, id string) error { } d.Set(isSnapshotClones, flex.NewStringSet(schema.HashString, clones)) + // catalog + if snapshot.CatalogOffering != nil { + versionCrn := "" + if snapshot.CatalogOffering.Version != nil && snapshot.CatalogOffering.Version.CRN != nil { + versionCrn = *snapshot.CatalogOffering.Version.CRN + } + catalogList := make([]map[string]interface{}, 0) + catalogMap := map[string]interface{}{} + if versionCrn != "" { + catalogMap[isSnapshotCatalogOfferingVersionCrn] = versionCrn + } + if snapshot.CatalogOffering.Plan != nil { + planCrn := "" + if snapshot.CatalogOffering.Plan != nil && snapshot.CatalogOffering.Plan.CRN != nil { + planCrn = *snapshot.CatalogOffering.Plan.CRN + } + if planCrn != "" { + catalogMap[isSnapshotCatalogOfferingPlanCrn] = planCrn + } + if snapshot.CatalogOffering.Plan.Deleted != nil { + deletedMap := resourceIbmIsSnapshotCatalogOfferingVersionPlanReferenceDeletedToMap(*snapshot.CatalogOffering.Plan.Deleted) + catalogMap["deleted"] = []map[string]interface{}{deletedMap} + } + } + catalogList = append(catalogList, catalogMap) + d.Set(isSnapshotCatalogOffering, catalogList) + } + backupPolicyPlanList := []map[string]interface{}{} if snapshot.BackupPolicyPlan != nil { backupPolicyPlan := map[string]interface{}{} diff --git a/ibm/service/vpc/resource_ibm_is_snapshot_test.go b/ibm/service/vpc/resource_ibm_is_snapshot_test.go index 550e2f902e..c18d61e340 100644 --- a/ibm/service/vpc/resource_ibm_is_snapshot_test.go +++ b/ibm/service/vpc/resource_ibm_is_snapshot_test.go @@ -195,6 +195,39 @@ func TestAccIBMISSnapshotSourceSnapshotCopy(t *testing.T) { }) } +func TestAccIBMISSnapshot_CatalogOffering(t *testing.T) { + var snapshot string + vpcname := fmt.Sprintf("tf-vpc-%d", acctest.RandIntRange(10, 100)) + name := fmt.Sprintf("tf-instnace-%d", acctest.RandIntRange(10, 100)) + subnetname := fmt.Sprintf("tf-subnet-%d", acctest.RandIntRange(10, 100)) + publicKey := strings.TrimSpace(` +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCKVmnMOlHKcZK8tpt3MP1lqOLAcqcJzhsvJcjscgVERRN7/9484SOBJ3HSKxxNG5JN8owAjy5f9yYwcUg+JaUVuytn5Pv3aeYROHGGg+5G346xaq3DAwX6Y5ykr2fvjObgncQBnuU5KHWCECO/4h8uWuwh/kfniXPVjFToc+gnkqA+3RKpAecZhFXwfalQ9mMuYGFxn+fwn8cYEApsJbsEmb0iJwPiZ5hjFC8wREuiTlhPHDgkBLOiycd20op2nXzDbHfCHInquEe/gYxEitALONxm0swBOwJZwlTDOB7C6y2dzlrtxr1L59m7pCkWI4EtTRLvleehBoj3u7jB4usR +`) + sshname := fmt.Sprintf("tf-ssh-%d", acctest.RandIntRange(10, 100)) + volname := fmt.Sprintf("tf-vol-%d", acctest.RandIntRange(10, 100)) + name1 := fmt.Sprintf("tfsnapshotuat-%d", acctest.RandIntRange(10, 100)) + + resource.Test(t, resource.TestCase{ + PreCheck: func() { acc.TestAccPreCheck(t) }, + Providers: acc.TestAccProviders, + CheckDestroy: testAccCheckIBMISSnapshotDestroy, + Steps: []resource.TestStep{ + { + Config: testAccCheckIBMISSnapshotConfig(vpcname, subnetname, sshname, publicKey, volname, name, name1), + Check: resource.ComposeTestCheckFunc( + testAccCheckIBMISSnapshotExists("ibm_is_snapshot.testacc_snapshot", snapshot), + resource.TestCheckResourceAttr( + "ibm_is_snapshot.testacc_snapshot", "name", name1), + resource.TestCheckResourceAttrSet( + "ibm_is_snapshot.testacc_snapshot", "catalog_offering.#"), + resource.TestCheckResourceAttrSet( + "ibm_is_snapshot.testacc_snapshot", "catalog_offering.0.plan"), + ), + }, + }, + }) +} + func testAccCheckIBMISSnapshotDestroy(s *terraform.State) error { sess, _ := acc.TestAccProvider.Meta().(conns.ClientSession).VpcV1API() for _, rs := range s.RootModule().Resources { @@ -274,7 +307,7 @@ func testAccCheckIBMISSnapshotConfig(vpcname, subnetname, sshname, publicKey, vo resource "ibm_is_snapshot" "testacc_snapshot" { name = "%s" source_volume = ibm_is_instance.testacc_instance.volume_attachments[0].volume_id -}`, vpcname, subnetname, acc.ISZoneName, sshname, publicKey, name, acc.IsImage, acc.InstanceProfileName, acc.ISZoneName, sname) + }`, vpcname, subnetname, acc.ISZoneName, sshname, publicKey, name, acc.IsImage, acc.InstanceProfileName, acc.ISZoneName, sname) } func testAccCheckIBMISSnapshotEncryptedConfig(vpcname, subnetname, sshname, publicKey, volname, name, sname string) string { diff --git a/ibm/service/vpc/resource_ibm_is_virtual_network_interface.go b/ibm/service/vpc/resource_ibm_is_virtual_network_interface.go index 24dfd87ad5..30ceb60379 100644 --- a/ibm/service/vpc/resource_ibm_is_virtual_network_interface.go +++ b/ibm/service/vpc/resource_ibm_is_virtual_network_interface.go @@ -152,6 +152,13 @@ func ResourceIBMIsVirtualNetworkInterface() *schema.Resource { ValidateFunc: validate.InvokeValidator("ibm_is_virtual_network_interface", "name"), Description: "The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC.", }, + "protocol_state_filtering_mode": { + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validate.InvokeValidator("ibm_is_virtual_network_interface", "protocol_state_filtering_mode"), + Description: "The protocol state filtering mode used for this virtual network interface.", + }, "primary_ip": &schema.Schema{ Type: schema.TypeList, MaxItems: 1, @@ -374,6 +381,15 @@ func ResourceIBMIsVirtualNetworkInterfaceValidator() *validate.ResourceValidator MaxValueLength: 63, }, ) + validateSchema = append(validateSchema, + validate.ValidateSchema{ + Identifier: "protocol_state_filtering_mode", + ValidateFunctionIdentifier: validate.ValidateAllowedStringValue, + Type: validate.TypeString, + Optional: true, + AllowedValues: "auto, enabled, disabled", + }, + ) resourceValidator := validate.ResourceValidator{ResourceName: "ibm_is_virtual_network_interface", Schema: validateSchema} return &resourceValidator @@ -411,6 +427,9 @@ func resourceIBMIsVirtualNetworkInterfaceCreate(context context.Context, d *sche if _, ok := d.GetOk("name"); ok { createVirtualNetworkInterfaceOptions.SetName(d.Get("name").(string)) } + if psFilteringIntf, ok := d.GetOk("protocol_state_filtering_mode"); ok { + createVirtualNetworkInterfaceOptions.SetProtocolStateFilteringMode(psFilteringIntf.(string)) + } if _, ok := d.GetOk("primary_ip"); ok { autodelete := true if autodeleteOk, ok := d.GetOkExists("primary_ip.0.auto_delete"); ok { @@ -531,6 +550,9 @@ func resourceIBMIsVirtualNetworkInterfaceRead(context context.Context, d *schema return diag.FromErr(fmt.Errorf("[ERROR] Error setting name: %s", err)) } } + if !core.IsNil(virtualNetworkInterface.ProtocolStateFilteringMode) { + d.Set("protocol_state_filtering_mode", virtualNetworkInterface.ProtocolStateFilteringMode) + } if !core.IsNil(virtualNetworkInterface.PrimaryIP) { autodelete := d.Get("primary_ip.0.auto_delete").(bool) primaryIPMap, err := resourceIBMIsVirtualNetworkInterfaceReservedIPReferenceToMap(virtualNetworkInterface.PrimaryIP, autodelete) @@ -671,6 +693,12 @@ func resourceIBMIsVirtualNetworkInterfaceUpdate(context context.Context, d *sche hasChange = true } + if d.HasChange("protocol_state_filtering_mode") { + pStateFilteringMode := d.Get("protocol_state_filtering_mode").(string) + patchVals.ProtocolStateFilteringMode = &pStateFilteringMode + hasChange = true + } + if d.HasChange("ips") { oldips, newips := d.GetChange("ips") os := oldips.(*schema.Set) diff --git a/ibm/service/vpc/resource_ibm_is_virtual_network_interface_test.go b/ibm/service/vpc/resource_ibm_is_virtual_network_interface_test.go index 021e95a510..355c687877 100644 --- a/ibm/service/vpc/resource_ibm_is_virtual_network_interface_test.go +++ b/ibm/service/vpc/resource_ibm_is_virtual_network_interface_test.go @@ -170,6 +170,71 @@ func TestAccIBMIsVirtualNetworkInterfaceAllArgs(t *testing.T) { }) } +func TestAccIBMIsVirtualNetworkInterfacePStateFiltering(t *testing.T) { + var conf vpcv1.VirtualNetworkInterface + vpcname := fmt.Sprintf("tfvpngw-vpc-%d", acctest.RandIntRange(10, 100)) + subnetname := fmt.Sprintf("tfvpngw-subnet-%d", acctest.RandIntRange(10, 100)) + vniname := fmt.Sprintf("tfvpngw-createname-%d", acctest.RandIntRange(10, 100)) + tag1 := "env:test" + tag2 := "env:dev" + tag3 := "env:prod" + enable_infrastructure_nat := true + allow_ip_spoofing := true + resource.Test(t, resource.TestCase{ + PreCheck: func() { acc.TestAccPreCheck(t) }, + Providers: acc.TestAccProviders, + CheckDestroy: testAccCheckIBMIsVirtualNetworkInterfaceDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccCheckIBMIsVirtualNetworkInterfaceConfigPStateFiltering(vpcname, subnetname, vniname, tag1, tag2, tag3, enable_infrastructure_nat, allow_ip_spoofing, false), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckIBMIsVirtualNetworkInterfaceExists("ibm_is_virtual_network_interface.testacc_vni", conf), + resource.TestCheckResourceAttrSet("ibm_is_virtual_network_interface.testacc_vni", "subnet"), + resource.TestCheckResourceAttrSet("ibm_is_virtual_network_interface.testacc_vni", "name"), + resource.TestCheckResourceAttrSet("ibm_is_virtual_network_interface.testacc_vni", "created_at"), + resource.TestCheckResourceAttrSet("ibm_is_virtual_network_interface.testacc_vni", "crn"), + resource.TestCheckResourceAttrSet("ibm_is_virtual_network_interface.testacc_vni", "href"), + resource.TestCheckResourceAttrSet("ibm_is_virtual_network_interface.testacc_vni", "vpc.#"), + resource.TestCheckResourceAttrSet("ibm_is_virtual_network_interface.testacc_vni", "zone"), + resource.TestCheckResourceAttrSet("ibm_is_virtual_network_interface.testacc_vni", "primary_ip.#"), + resource.TestCheckResourceAttrSet("ibm_is_virtual_network_interface.testacc_vni", "ips.#"), + resource.TestCheckResourceAttrSet("ibm_is_virtual_network_interface.testacc_vni", "id"), + resource.TestCheckResourceAttr("ibm_is_virtual_network_interface.testacc_vni", "enable_infrastructure_nat", "true"), + resource.TestCheckResourceAttr("ibm_is_virtual_network_interface.testacc_vni", "lifecycle_state", "stable"), + resource.TestCheckResourceAttr("ibm_is_virtual_network_interface.testacc_vni", "resource_type", "virtual_network_interface"), + resource.TestCheckResourceAttrSet("ibm_is_virtual_network_interface.testacc_vni", "resource_group"), + resource.TestCheckResourceAttr("ibm_is_virtual_network_interface.testacc_vni", "tags.#", "3"), + resource.TestCheckResourceAttr("ibm_is_virtual_network_interface.testacc_vni", "allow_ip_spoofing", "true"), + resource.TestCheckResourceAttr("ibm_is_virtual_network_interface.testacc_vni", "protocol_state_filtering_mode", "auto"), + ), + }, + resource.TestStep{ + Config: testAccCheckIBMIsVirtualNetworkInterfaceConfigPStateFilteringUpdate(vpcname, subnetname, vniname, tag1, tag2, tag3, enable_infrastructure_nat, allow_ip_spoofing, true), + Check: resource.ComposeAggregateTestCheckFunc( + testAccCheckIBMIsVirtualNetworkInterfaceExists("ibm_is_virtual_network_interface.testacc_vni", conf), + resource.TestCheckResourceAttrSet("ibm_is_virtual_network_interface.testacc_vni", "subnet"), + resource.TestCheckResourceAttrSet("ibm_is_virtual_network_interface.testacc_vni", "name"), + resource.TestCheckResourceAttrSet("ibm_is_virtual_network_interface.testacc_vni", "created_at"), + resource.TestCheckResourceAttrSet("ibm_is_virtual_network_interface.testacc_vni", "crn"), + resource.TestCheckResourceAttrSet("ibm_is_virtual_network_interface.testacc_vni", "href"), + resource.TestCheckResourceAttrSet("ibm_is_virtual_network_interface.testacc_vni", "vpc.#"), + resource.TestCheckResourceAttrSet("ibm_is_virtual_network_interface.testacc_vni", "zone"), + resource.TestCheckResourceAttrSet("ibm_is_virtual_network_interface.testacc_vni", "primary_ip.#"), + resource.TestCheckResourceAttrSet("ibm_is_virtual_network_interface.testacc_vni", "ips.#"), + resource.TestCheckResourceAttr("ibm_is_virtual_network_interface.testacc_vni", "tags.#", "2"), + resource.TestCheckResourceAttrSet("ibm_is_virtual_network_interface.testacc_vni", "id"), + resource.TestCheckResourceAttr("ibm_is_virtual_network_interface.testacc_vni", "enable_infrastructure_nat", "true"), + resource.TestCheckResourceAttr("ibm_is_virtual_network_interface.testacc_vni", "lifecycle_state", "stable"), + resource.TestCheckResourceAttr("ibm_is_virtual_network_interface.testacc_vni", "resource_type", "virtual_network_interface"), + resource.TestCheckResourceAttrSet("ibm_is_virtual_network_interface.testacc_vni", "resource_group"), + resource.TestCheckResourceAttr("ibm_is_virtual_network_interface.testacc_vni", "allow_ip_spoofing", "true"), + resource.TestCheckResourceAttr("ibm_is_virtual_network_interface.testacc_vni", "protocol_state_filtering_mode", "disabled"), + ), + }, + }, + }) +} + func testAccCheckIBMIsVirtualNetworkInterfaceConfigBasic(vpcname, subnetname, vniname, tag1, tag2, tag3 string, enablenat, allowipspoofing, isUpdate bool) string { return fmt.Sprintf(` resource "ibm_is_vpc" "testacc_vpc" { @@ -194,6 +259,56 @@ func testAccCheckIBMIsVirtualNetworkInterfaceConfigBasic(vpcname, subnetname, vn `, vpcname, subnetname, acc.ISZoneName, vniname, enablenat, allowipspoofing, isUpdate, tag1, tag2, tag1, tag2, tag3) } +func testAccCheckIBMIsVirtualNetworkInterfaceConfigPStateFiltering(vpcname, subnetname, vniname, tag1, tag2, tag3 string, enablenat, allowipspoofing, isUpdate bool) string { + return fmt.Sprintf(` + resource "ibm_is_vpc" "testacc_vpc" { + name = "%s" + } + + resource "ibm_is_subnet" "testacc_subnet" { + name = "%s" + vpc = ibm_is_vpc.testacc_vpc.id + zone = "%s" + total_ipv4_address_count = 16 + + } + + resource "ibm_is_virtual_network_interface" "testacc_vni"{ + name = "%s" + subnet = ibm_is_subnet.testacc_subnet.id + protocol_state_filtering_mode = "auto" + enable_infrastructure_nat = %t + allow_ip_spoofing = %t + tags = %t ? ["%s", "%s"] : ["%s", "%s", "%s"] + } + `, vpcname, subnetname, acc.ISZoneName, vniname, enablenat, allowipspoofing, isUpdate, tag1, tag2, tag1, tag2, tag3) +} + +func testAccCheckIBMIsVirtualNetworkInterfaceConfigPStateFilteringUpdate(vpcname, subnetname, vniname, tag1, tag2, tag3 string, enablenat, allowipspoofing, isUpdate bool) string { + return fmt.Sprintf(` + resource "ibm_is_vpc" "testacc_vpc" { + name = "%s" + } + + resource "ibm_is_subnet" "testacc_subnet" { + name = "%s" + vpc = ibm_is_vpc.testacc_vpc.id + zone = "%s" + total_ipv4_address_count = 16 + + } + + resource "ibm_is_virtual_network_interface" "testacc_vni"{ + name = "%s" + subnet = ibm_is_subnet.testacc_subnet.id + protocol_state_filtering_mode = "disabled" + enable_infrastructure_nat = %t + allow_ip_spoofing = %t + tags = %t ? ["%s", "%s"] : ["%s", "%s", "%s"] + } + `, vpcname, subnetname, acc.ISZoneName, vniname, enablenat, allowipspoofing, isUpdate, tag1, tag2, tag1, tag2, tag3) +} + func testAccCheckIBMIsVirtualNetworkInterfaceConfigResourceGroup(vpcname, subnetname, vniname string, enablenat, allowipspoofing bool) string { return fmt.Sprintf(` resource "ibm_is_vpc" "testacc_vpc" { diff --git a/ibm/service/vpc/resource_ibm_is_volume.go b/ibm/service/vpc/resource_ibm_is_volume.go index ba2507f430..b485aa94c7 100644 --- a/ibm/service/vpc/resource_ibm_is_volume.go +++ b/ibm/service/vpc/resource_ibm_is_volume.go @@ -40,6 +40,7 @@ const ( isVolumeProvisioningDone = "done" isVolumeResourceGroup = "resource_group" isVolumeSourceSnapshot = "source_snapshot" + isVolumeSourceSnapshotCrn = "source_snapshot_crn" isVolumeDeleteAllSnapshots = "delete_all_snapshots" isVolumeBandwidth = "bandwidth" isVolumeAccessTags = "access_tags" @@ -50,6 +51,10 @@ const ( isVolumeHealthReasonsMessage = "message" isVolumeHealthReasonsMoreInfo = "more_info" isVolumeHealthState = "health_state" + + isVolumeCatalogOffering = "catalog_offering" + isVolumeCatalogOfferingPlanCrn = "plan_crn" + isVolumeCatalogOfferingVersionCrn = "version_crn" ) func ResourceIBMISVolume() *schema.Resource { @@ -127,12 +132,21 @@ func ResourceIBMISVolume() *schema.Resource { Description: "Volume capacity value", }, isVolumeSourceSnapshot: { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Computed: true, - ValidateFunc: validate.InvokeValidator("ibm_is_volume", isVolumeSourceSnapshot), - Description: "The unique identifier for this snapshot", + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Computed: true, + ConflictsWith: []string{isVolumeSourceSnapshotCrn}, + ValidateFunc: validate.InvokeValidator("ibm_is_volume", isVolumeSourceSnapshot), + Description: "The unique identifier for this snapshot", + }, + isVolumeSourceSnapshotCrn: { + Type: schema.TypeString, + Optional: true, + ForceNew: true, + Computed: true, + ConflictsWith: []string{isVolumeSourceSnapshot}, + Description: "The crn for this snapshot", }, isVolumeResourceGroup: { Type: schema.TypeString, @@ -184,6 +198,39 @@ func ResourceIBMISVolume() *schema.Resource { }, }, }, + isVolumeCatalogOffering: { + Type: schema.TypeList, + Computed: true, + Description: "The catalog offering this volume was created from. If a virtual server instance is provisioned with a boot_volume_attachment specifying this volume, the virtual server instance will use this volume's catalog offering, including its pricing plan.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + isVolumeCatalogOfferingPlanCrn: { + Type: schema.TypeString, + Computed: true, + Description: "The CRN for this catalog offering version's billing plan", + }, + "deleted": { + Type: schema.TypeList, + Computed: true, + Description: "If present, this property indicates the referenced resource has been deleted and provides some supplementary information.", + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "more_info": { + Type: schema.TypeString, + Computed: true, + Description: "Link to documentation about deleted resources.", + }, + }, + }, + }, + isVolumeCatalogOfferingVersionCrn: { + Type: schema.TypeString, + Computed: true, + Description: "The CRN for this version of a catalog offering", + }, + }, + }, + }, isVolumeHealthReasons: { Type: schema.TypeList, Computed: true, @@ -339,7 +386,15 @@ func ResourceIBMISVolumeValidator() *validate.ResourceValidator { Regexp: `^([a-z]|[a-z][-a-z0-9]*[a-z0-9])$`, MinValueLength: 1, MaxValueLength: 63}) - + validateSchema = append(validateSchema, + validate.ValidateSchema{ + Identifier: isVolumeSourceSnapshot, + ValidateFunctionIdentifier: validate.ValidateRegexpLen, + Type: validate.TypeString, + Optional: true, + Regexp: `^[-0-9a-z_]+$`, + MinValueLength: 1, + MaxValueLength: 64}) validateSchema = append(validateSchema, validate.ValidateSchema{ Identifier: "tags", @@ -364,15 +419,6 @@ func ResourceIBMISVolumeValidator() *validate.ResourceValidator { Type: validate.TypeInt, MinValue: "10", MaxValue: "16000"}) - validateSchema = append(validateSchema, - validate.ValidateSchema{ - Identifier: isVolumeSourceSnapshot, - ValidateFunctionIdentifier: validate.ValidateRegexpLen, - Type: validate.TypeString, - Optional: true, - Regexp: `^[-0-9a-z_]+$`, - MinValueLength: 1, - MaxValueLength: 64}) validateSchema = append(validateSchema, validate.ValidateSchema{ Identifier: isVolumeIops, @@ -413,7 +459,6 @@ func volCreate(d *schema.ResourceData, meta interface{}, volName, profile, zone if err != nil { return err } - log.Println("I AM INSIDE func volCreate(d *schema.ResourceData, meta interface{}, volName, profile, zone string)") options := &vpcv1.CreateVolumeOptions{ VolumePrototype: &vpcv1.VolumePrototype{ Name: &volName, @@ -453,8 +498,33 @@ func volCreate(d *schema.ResourceData, meta interface{}, volName, profile, zone } volTemplate.Capacity = &volCapacity } - } else { + } else if sourceSnapshtCrn, ok := d.GetOk(isVolumeSourceSnapshot); ok { + sourceSnapshot := sourceSnapshtCrn.(string) + snapshotIdentity := &vpcv1.SnapshotIdentity{ + CRN: &sourceSnapshot, + } + volTemplate.SourceSnapshot = snapshotIdentity + getSnapshotOptions := &vpcv1.GetSnapshotOptions{ + ID: &sourceSnapshot, + } + snapshot, response, err := sess.GetSnapshot(getSnapshotOptions) + if err != nil { + return fmt.Errorf("[ERROR] Error fetching snapshot %s\n%s", err, response) + } + if (response != nil && response.StatusCode == 404) || snapshot == nil { + return fmt.Errorf("[ERROR] No snapshot found with id %s", sourceSnapshot) + } + minimumCapacity := *snapshot.MinimumCapacity + if capacity, ok := d.GetOk(isVolumeCapacity); ok { + if int64(capacity.(int)) > minimumCapacity { + volCapacity = int64(capacity.(int)) + } else { + volCapacity = minimumCapacity + } + volTemplate.Capacity = &volCapacity + } + } else { if capacity, ok := d.GetOk(isVolumeCapacity); ok { if int64(capacity.(int)) > 0 { volCapacity = int64(capacity.(int)) @@ -566,6 +636,7 @@ func volGet(d *schema.ResourceData, meta interface{}, id string) error { d.Set(isVolumeCrn, *vol.CRN) if vol.SourceSnapshot != nil { d.Set(isVolumeSourceSnapshot, *vol.SourceSnapshot.ID) + d.Set(isVolumeSourceSnapshotCrn, *vol.SourceSnapshot.CRN) } d.Set(isVolumeStatus, *vol.Status) if vol.HealthState != nil { @@ -614,6 +685,33 @@ func volGet(d *schema.ResourceData, meta interface{}, id string) error { } d.Set(isVolumeHealthReasons, healthReasonsList) } + // catalog + if vol.CatalogOffering != nil { + versionCrn := "" + if vol.CatalogOffering.Version != nil && vol.CatalogOffering.Version.CRN != nil { + versionCrn = *vol.CatalogOffering.Version.CRN + } + catalogList := make([]map[string]interface{}, 0) + catalogMap := map[string]interface{}{} + if versionCrn != "" { + catalogMap[isVolumeCatalogOfferingVersionCrn] = versionCrn + } + if vol.CatalogOffering.Plan != nil { + planCrn := "" + if vol.CatalogOffering.Plan.CRN != nil { + planCrn = *vol.CatalogOffering.Plan.CRN + } + if planCrn != "" { + catalogMap[isVolumeCatalogOfferingPlanCrn] = *vol.CatalogOffering.Plan.CRN + } + if vol.CatalogOffering.Plan.Deleted != nil { + deletedMap := resourceIbmIsVolumeCatalogOfferingVersionPlanReferenceDeletedToMap(*vol.CatalogOffering.Plan.Deleted) + catalogMap["deleted"] = []map[string]interface{}{deletedMap} + } + } + catalogList = append(catalogList, catalogMap) + d.Set(isVolumeCatalogOffering, catalogList) + } controller, err := flex.GetBaseController(meta) if err != nil { return err diff --git a/ibm/service/vpc/resource_ibm_is_volume_test.go b/ibm/service/vpc/resource_ibm_is_volume_test.go index d37f3b1e22..da6f147ca1 100644 --- a/ibm/service/vpc/resource_ibm_is_volume_test.go +++ b/ibm/service/vpc/resource_ibm_is_volume_test.go @@ -78,6 +78,35 @@ ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCKVmnMOlHKcZK8tpt3MP1lqOLAcqcJzhsvJcjscgVE }, }) } +func TestAccIBMISVolume_snapshotcrn(t *testing.T) { + var vol string + vpcname := fmt.Sprintf("tf-vpc-%d", acctest.RandIntRange(10, 100)) + name := fmt.Sprintf("tf-instnace-%d", acctest.RandIntRange(10, 100)) + subnetname := fmt.Sprintf("tf-subnet-%d", acctest.RandIntRange(10, 100)) + publicKey := strings.TrimSpace(` +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCKVmnMOlHKcZK8tpt3MP1lqOLAcqcJzhsvJcjscgVERRN7/9484SOBJ3HSKxxNG5JN8owAjy5f9yYwcUg+JaUVuytn5Pv3aeYROHGGg+5G346xaq3DAwX6Y5ykr2fvjObgncQBnuU5KHWCECO/4h8uWuwh/kfniXPVjFToc+gnkqA+3RKpAecZhFXwfalQ9mMuYGFxn+fwn8cYEApsJbsEmb0iJwPiZ5hjFC8wREuiTlhPHDgkBLOiycd20op2nXzDbHfCHInquEe/gYxEitALONxm0swBOwJZwlTDOB7C6y2dzlrtxr1L59m7pCkWI4EtTRLvleehBoj3u7jB4usR +`) + sshname := fmt.Sprintf("tf-ssh-%d", acctest.RandIntRange(10, 100)) + volname := fmt.Sprintf("tf-vol-%d", acctest.RandIntRange(10, 100)) + name1 := fmt.Sprintf("tfsnapshotuat-%d", acctest.RandIntRange(10, 100)) + resource.Test(t, resource.TestCase{ + PreCheck: func() { acc.TestAccPreCheck(t) }, + Providers: acc.TestAccProviders, + CheckDestroy: testAccCheckIBMISVolumeDestroy, + Steps: []resource.TestStep{ + { + Config: testAccCheckIBMISVolumeConfigSnapshotCrn(vpcname, subnetname, sshname, publicKey, volname, name, name1), + Check: resource.ComposeTestCheckFunc( + testAccCheckIBMISVolumeExists("ibm_is_volume.storage", vol), + resource.TestCheckResourceAttrSet("ibm_is_volume.storage", "health_state"), + resource.TestCheckResourceAttrSet("ibm_is_volume.storage", "health_reasons.#"), + resource.TestCheckResourceAttr( + "ibm_is_volume.storage", "name", volname), + ), + }, + }, + }) +} func TestAccIBMISVolumeUsertag_basic(t *testing.T) { var vol string name := fmt.Sprintf("tf-vol-%d", acctest.RandIntRange(10, 100)) @@ -548,3 +577,14 @@ func testAccCheckIBMISVolumeConfigSnapshot(vpcname, subnetname, sshname, publicK } `, volname, acc.ISZoneName) } +func testAccCheckIBMISVolumeConfigSnapshotCrn(vpcname, subnetname, sshname, publicKey, volname, name, name1 string) string { + + return testAccCheckIBMISSnapshotConfig(vpcname, subnetname, sshname, publicKey, volname, name, name1) + fmt.Sprintf(` + resource "ibm_is_volume" "storage" { + name = "%s" + profile = "general-purpose" + zone = "%s" + source_snapshot_crn = ibm_is_snapshot.testacc_snapshot.crn + } + `, volname, acc.ISZoneName) +} diff --git a/scripts/build.sh b/scripts/build.sh index 9d374b19d0..602700a444 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -51,6 +51,7 @@ if [[ -n "${TF_RELEASE}" ]]; then fi # Build! +VERSION="1.64.0" echo "==> Building..." gox \ -os="${XC_OS}" \ diff --git a/website/docs/d/is_instance.html.markdown b/website/docs/d/is_instance.html.markdown index 6adce9542e..da2a86203e 100644 --- a/website/docs/d/is_instance.html.markdown +++ b/website/docs/d/is_instance.html.markdown @@ -123,6 +123,11 @@ In addition to all argument reference list, you can access the following attribu Nested scheme for `catalog_offering`: - `offering_crn` - (String) The CRN for this catalog offering. Identifies a catalog offering by this unique property - `version_crn` - (String) The CRN for this version of a catalog offering. Identifies a version of a catalog offering by this unique property + - `plan_crn` - (String) The CRN for this catalog offering version's billing plan + - `deleted` - (List) If present, this property indicates the referenced resource has been deleted, and provides some supplementary information. + Nested schema for `deleted`: + - `more_info` - (String) Link to documentation about deleted resources. + - `confidential_compute_mode` - (String) The confidential compute mode to use for this virtual server instance.If unspecified, the default confidential compute mode from the profile will be used. - `crn` - (String) The CRN of the instance. - `disks` - (List) Collection of the instance's disks. Nested `disks` blocks has the following structure: diff --git a/website/docs/d/is_instance_template.html.markdown b/website/docs/d/is_instance_template.html.markdown index 2be7605163..ac4b54dfec 100644 --- a/website/docs/d/is_instance_template.html.markdown +++ b/website/docs/d/is_instance_template.html.markdown @@ -63,6 +63,7 @@ You can access the following attribute references after your data source is crea Nested scheme for `catalog_offering`: - `offering_crn` - (String) The CRN for this catalog offering. Identifies a catalog offering by this unique property - `version_crn` - (String) The CRN for this version of a catalog offering. Identifies a version of a catalog offering by this unique property + - `plan_crn` - (String) The CRN for this catalog offering version's billing plan - `crn` - (String) The CRN of the instance template. - `default_trusted_profile_auto_link` - (Boolean) If set to `true`, the system will create a link to the specified `target` trusted profile during instance creation. Regardless of whether a link is created by the system or manually using the IAM Identity service, it will be automatically deleted when the instance is deleted. Default is true. @@ -103,6 +104,7 @@ You can access the following attribute references after your data source is crea - `id` - (String) The unique identifier for this reserved IP. - `name` - (String) The name for this reserved IP. The name must not be used by another reserved IP in the subnet. Names starting with `ibm-` are reserved for provider-owned resources, and are not allowed. If unspecified, the name will be a hyphenated list of randomly-selected words. - `name` - (String) The name for this virtual network interface. The name must not be used by another virtual network interface in the VPC. If unspecified, the name will be a hyphenated list of randomly-selected words. Names beginning with `ibm-` are reserved for provider-owned resources, and are not allowed. + - `protocol_state_filtering_mode` - (String) The protocol state filtering mode to use for this virtual network interface. - `primary_ip` - (List) The primary IP address to bind to the virtual network interface. May be either areserved IP identity, or a reserved IP prototype object which will be used to create anew reserved IP.If a reserved IP identity is provided, the specified reserved IP must be unbound.If a reserved IP prototype object with an address is provided, the address must beavailable on the virtual network interface's subnet. If no address is specified,an available address on the subnet will be automatically selected and reserved. Nested schema for **primary_ip**: - `address` - (String) The IP address to reserve, which must not already be reserved on the subnet.If unspecified, an available address on the subnet will automatically be selected. @@ -158,6 +160,7 @@ You can access the following attribute references after your data source is crea - `id` - (String) The unique identifier for this reserved IP. - `name` - (String) The name for this reserved IP. The name must not be used by another reserved IP in the subnet. Names starting with `ibm-` are reserved for provider-owned resources, and are not allowed. If unspecified, the name will be a hyphenated list of randomly-selected words. - `name` - (String) The name for this virtual network interface. The name must not be used by another virtual network interface in the VPC. If unspecified, the name will be a hyphenated list of randomly-selected words. Names beginning with `ibm-` are reserved for provider-owned resources, and are not allowed. + - `protocol_state_filtering_mode` - (String) The protocol state filtering mode to use for this virtual network interface. - `primary_ip` - (List) The primary IP address to bind to the virtual network interface. May be either areserved IP identity, or a reserved IP prototype object which will be used to create anew reserved IP.If a reserved IP identity is provided, the specified reserved IP must be unbound.If a reserved IP prototype object with an address is provided, the address must beavailable on the virtual network interface's subnet. If no address is specified,an available address on the subnet will be automatically selected and reserved. Nested schema for **primary_ip**: - `address` - (String) The IP address to reserve, which must not already be reserved on the subnet.If unspecified, an available address on the subnet will automatically be selected. diff --git a/website/docs/d/is_instance_templates.html.markdown b/website/docs/d/is_instance_templates.html.markdown index f94da7e526..9a746a15c7 100644 --- a/website/docs/d/is_instance_templates.html.markdown +++ b/website/docs/d/is_instance_templates.html.markdown @@ -51,6 +51,7 @@ You can access the following attribute references after your data source is crea - `offering_crn` - (String) The CRN for this catalog offering. Identifies a catalog offering by this unique property - `version_crn` - (String) The CRN for this version of a catalog offering. Identifies a version of a catalog offering by this unique property + - `plan_crn` - (String) The CRN for this catalog offering version's billing plan - `crn` - (String) The CRN of the instance template. - `default_trusted_profile_auto_link` - (Boolean) If set to `true`, the system will create a link to the specified `target` trusted profile during instance creation. Regardless of whether a link is created by the system or manually using the IAM Identity service, it will be automatically deleted when the instance is deleted. Default is true. @@ -91,6 +92,7 @@ You can access the following attribute references after your data source is crea - `id` - (String) The unique identifier for this reserved IP. - `name` - (String) The name for this reserved IP. The name must not be used by another reserved IP in the subnet. Names starting with `ibm-` are reserved for provider-owned resources, and are not allowed. If unspecified, the name will be a hyphenated list of randomly-selected words. - `name` - (String) The name for this virtual network interface. The name must not be used by another virtual network interface in the VPC. If unspecified, the name will be a hyphenated list of randomly-selected words. Names beginning with `ibm-` are reserved for provider-owned resources, and are not allowed. + - `protocol_state_filtering_mode` - (String) The protocol state filtering mode to use for this virtual network interface. - `primary_ip` - (List) The primary IP address to bind to the virtual network interface. May be either areserved IP identity, or a reserved IP prototype object which will be used to create anew reserved IP.If a reserved IP identity is provided, the specified reserved IP must be unbound.If a reserved IP prototype object with an address is provided, the address must beavailable on the virtual network interface's subnet. If no address is specified,an available address on the subnet will be automatically selected and reserved. Nested schema for **primary_ip**: - `address` - (String) The IP address to reserve, which must not already be reserved on the subnet.If unspecified, an available address on the subnet will automatically be selected. @@ -144,6 +146,7 @@ You can access the following attribute references after your data source is crea - `id` - (String) The unique identifier for this reserved IP. - `name` - (String) The name for this reserved IP. The name must not be used by another reserved IP in the subnet. Names starting with `ibm-` are reserved for provider-owned resources, and are not allowed. If unspecified, the name will be a hyphenated list of randomly-selected words. - `name` - (String) The name for this virtual network interface. The name must not be used by another virtual network interface in the VPC. If unspecified, the name will be a hyphenated list of randomly-selected words. Names beginning with `ibm-` are reserved for provider-owned resources, and are not allowed. + - `protocol_state_filtering_mode` - (String) The protocol state filtering mode to use for this virtual network interface. - `primary_ip` - (List) The primary IP address to bind to the virtual network interface. May be either areserved IP identity, or a reserved IP prototype object which will be used to create anew reserved IP.If a reserved IP identity is provided, the specified reserved IP must be unbound.If a reserved IP prototype object with an address is provided, the address must beavailable on the virtual network interface's subnet. If no address is specified,an available address on the subnet will be automatically selected and reserved. Nested schema for **primary_ip**: - `address` - (String) The IP address to reserve, which must not already be reserved on the subnet.If unspecified, an available address on the subnet will automatically be selected. diff --git a/website/docs/d/is_instances.html.markdown b/website/docs/d/is_instances.html.markdown index f43b68bd63..d28babb838 100644 --- a/website/docs/d/is_instances.html.markdown +++ b/website/docs/d/is_instances.html.markdown @@ -73,7 +73,11 @@ In addition to all argument reference list, you can access the following attribu Nested scheme for `catalog_offering`: - `offering_crn` - (String) The CRN for this catalog offering. Identifies a catalog offering by this unique property - `version_crn` - (String) The CRN for this version of a catalog offering. Identifies a version of a catalog offering by this unique property - + - `plan_crn` - (String) The CRN for this catalog offering version's billing plan + - `deleted` - (List) If present, this property indicates the referenced resource has been deleted, and provides some supplementary information. + Nested schema for `deleted`: + - `more_info` - (String) Link to documentation about deleted resources. + - `confidential_compute_mode` - (String) The confidential compute mode to use for this virtual server instance.If unspecified, the default confidential compute mode from the profile will be used. - `crn` - (String) The CRN of the instance. - `disks` - (List) Collection of the instance's disks. Nested `disks` blocks has the following structure: diff --git a/website/docs/d/is_security_group.html.markdown b/website/docs/d/is_security_group.html.markdown index 6a8eddf06c..32a92c4fc5 100644 --- a/website/docs/d/is_security_group.html.markdown +++ b/website/docs/d/is_security_group.html.markdown @@ -72,12 +72,20 @@ resource "ibm_is_security_group_rule" "example" { data "ibm_is_security_group" "example" { name = ibm_is_security_group.example.name } + +data "ibm_is_security_group" "examplevpc" { + name = ibm_is_security_group.example.name + vpc = ibm_is_vpc.example.id +} ``` ## Argument reference Review the argument references that you can specify for your resource. - `name` - (Required, String) The name of the security group. +- `vpc` - (Optional, String) The identifier of the vpc where this security group resides. (Useful when two security groups have same name across different VPCs) +- `vpc_name` - (Optional, String) The name of the vpc where this security group resides. (Useful when two security groups have same name across different VPCs) +- `resource_group` - (Optional, String) The identifier of the resource group where this security group resides. ## Attribute reference In addition to all argument reference list, you can access the following attribute references after your data source is created. diff --git a/website/docs/d/is_snapshot.html.markdown b/website/docs/d/is_snapshot.html.markdown index 00900e21bd..8ade1cb2ce 100644 --- a/website/docs/d/is_snapshot.html.markdown +++ b/website/docs/d/is_snapshot.html.markdown @@ -102,6 +102,15 @@ In addition to all argument reference list, you can access the following attribu - `name` - (String) The unique user defined name for this backup policy plan. If unspecified, the name will be a hyphenated list of randomly selected words. - `resource_type` - (String) The type of resource referenced. - `bootable` - (Bool) Indicates if a boot volume attachment can be created with a volume created from this snapshot. +- `catalog_offering` - (List) The catalog offering inherited from the snapshot's source. If a virtual server instance is provisioned with a source_snapshot specifying this snapshot, the virtual server instance will use this snapshot's catalog offering, including its pricing plan. If absent, this snapshot is not associated with a catalog offering. + + Nested scheme for `catalog_offering`: + - `version_crn` - (String) The CRN for this version of a catalog offering + - `plan_crn` - (String) The CRN for this catalog offering version's billing plan + - `deleted` - (List) If present, this property indicates the referenced resource has been deleted, and provides some supplementary information. + + Nested schema for `deleted`: + - `more_info` - (String) Link to documentation about deleted resources. - `clones` - (List) The list of zones where clones of this snapshot exist. - `copies` - (List) The copies of this snapshot in other regions. diff --git a/website/docs/d/is_snapshots.html.markdown b/website/docs/d/is_snapshots.html.markdown index 417ec5d5f8..1df61ec574 100644 --- a/website/docs/d/is_snapshots.html.markdown +++ b/website/docs/d/is_snapshots.html.markdown @@ -70,6 +70,15 @@ In addition to all argument reference list, you can access the following attribu - `name` - (String) The unique user defined name for this backup policy plan. If unspecified, the name will be a hyphenated list of randomly selected words. - `resource_type` - (String) The type of resource referenced. - `bootable` - (Bool) Indicates if a boot volume attachment can be created with a volume created from this snapshot. + - `catalog_offering` - (List) The catalog offering inherited from the snapshot's source. If a virtual server instance is provisioned with a source_snapshot specifying this snapshot, the virtual server instance will use this snapshot's catalog offering, including its pricing plan. If absent, this snapshot is not associated with a catalog offering. + + Nested scheme for `catalog_offering`: + - `version_crn` - (String) The CRN for this version of a catalog offering + - `plan_crn` - (String) The CRN for this catalog offering version's billing plan + - `deleted` - (List) If present, this property indicates the referenced resource has been deleted, and provides some supplementary information. + + Nested schema for `deleted`: + - `more_info` - (String) Link to documentation about deleted resources. - `copies` - (List) The copies of this snapshot in other regions. Nested scheme for `copies`: diff --git a/website/docs/d/is_virtual_network_interface.html.markdown b/website/docs/d/is_virtual_network_interface.html.markdown index 7dd5cd5ace..8bebf60e59 100644 --- a/website/docs/d/is_virtual_network_interface.html.markdown +++ b/website/docs/d/is_virtual_network_interface.html.markdown @@ -89,6 +89,7 @@ In addition to all argument references listed, you can access the following attr - `id` - (String) The unique identifier for this reserved IP. - `name` - (String) The name for this reserved IP. The name is unique across all reserved IPs in a subnet. - `resource_type` - (String) The resource type. +- `protocol_state_filtering_mode` - (String) The protocol state filtering mode to use for this virtual network interface. - `resource_group` - (List) The resource group for this virtual network interface. Nested scheme for **resource_group**: - `href` - (String) The URL for this resource group. diff --git a/website/docs/d/is_virtual_network_interfaces.html.markdown b/website/docs/d/is_virtual_network_interfaces.html.markdown index 21a80e52ca..eb50a947d8 100644 --- a/website/docs/d/is_virtual_network_interfaces.html.markdown +++ b/website/docs/d/is_virtual_network_interfaces.html.markdown @@ -57,6 +57,7 @@ In addition to all argument references listed, you can access the following attr - `id` - (String) The unique identifier for this reserved IP. - `name` - (String) The name for this reserved IP. The name is unique across all reserved IPs in a subnet. - `resource_type` - (String) The resource type. + - `protocol_state_filtering_mode` - (String) The protocol state filtering mode to use for this virtual network interface. - `resource_group` - (List) The resource group for this virtual network interface. Nested scheme for **resource_group**: - `href` - (String) The URL for this resource group. diff --git a/website/docs/d/is_volume.html.markdown b/website/docs/d/is_volume.html.markdown index adbb899828..b5389962ac 100644 --- a/website/docs/d/is_volume.html.markdown +++ b/website/docs/d/is_volume.html.markdown @@ -49,6 +49,15 @@ In addition to all argument reference list, you can access the following attribu - `bandwidth` - The maximum bandwidth (in megabits per second) for the volume - `busy` - (Boolean) Indicates whether this volume is performing an operation that must be serialized. This must be `false` to perform an operation that is specified to require serialization. - `capacity` - (String) The capacity of the volume in gigabytes. +- `catalog_offering` - (List) The catalog offering this volume was created from. If a virtual server instance is provisioned with a boot_volume_attachment specifying this volume, the virtual server instance will use this volume's catalog offering, including its pricing plan.If absent, this volume was not created from a catalog offering. + + Nested scheme for `catalog_offering`: + - `version_crn` - (String) The CRN for this version of a catalog offering + - `plan_crn` - (String) The CRN for this catalog offering version's billing plan + - `deleted` - (List) If present, this property indicates the referenced resource has been deleted, and provides some supplementary information. + + Nested schema for `deleted`: + - `more_info` - (String) Link to documentation about deleted resources. - `created_at` - (String) The date and time that the volume was created. - `crn` - (String) The crn of this volume. - `encryption_key` - (String) The key to use for encrypting this volume. diff --git a/website/docs/d/is_volumes.html.markdown b/website/docs/d/is_volumes.html.markdown index c3fd6fa872..1a8dd26481 100644 --- a/website/docs/d/is_volumes.html.markdown +++ b/website/docs/d/is_volumes.html.markdown @@ -50,6 +50,15 @@ In addition to all argument references listed, you can access the following attr - `busy` - (Boolean) Indicates whether this volume is performing an operation that must be serialized. This must be `false` to perform an operation that is specified to require serialization. - `capacity` - (Integer) The capacity to use for the volume (in gigabytes). The specified minimum and maximum capacity values for creating or updating volumes may expand in the future. - Constraints: The minimum value is `1`. + - `catalog_offering` - (List) The catalog offering this volume was created from. If a virtual server instance is provisioned with a boot_volume_attachment specifying this volume, the virtual server instance will use this volume's catalog offering, including its pricing plan.If absent, this volume was not created from a catalog offering. + + Nested scheme for `catalog_offering`: + - `version_crn` - (String) The CRN for this version of a catalog offering + - `plan_crn` - (String) The CRN for this catalog offering version's billing plan + - `deleted` - (List) If present, this property indicates the referenced resource has been deleted, and provides some supplementary information. + + Nested schema for `deleted`: + - `more_info` - (String) Link to documentation about deleted resources. - `created_at` - (String) The date and time that the volume was created. - `crn` - (String) The CRN for this volume. - `encryption` - (String) The type of encryption used on the volume. diff --git a/website/docs/r/is_bare_metal_server.markdown b/website/docs/r/is_bare_metal_server.markdown index 1225f6b240..ffc4db8f4e 100644 --- a/website/docs/r/is_bare_metal_server.markdown +++ b/website/docs/r/is_bare_metal_server.markdown @@ -161,6 +161,12 @@ Review the argument references that you can specify for your resource. - `reserved_ip` - (Required, String) The unique identifier for this reserved IP. - `name` - (Required, String) The name for this reserved IP. The name is unique across all reserved IPs in a subnet. - `resource_type` - (Computed, String) The resource type. + - `protocol_state_filtering_mode` - (Optional, String) The protocol state filtering mode to use for this virtual network interface. + + ~> **If auto, protocol state packet filtering is enabled or disabled based on the virtual network interface's target resource type:** + **•** bare_metal_server_network_attachment: disabled
+ **•** instance_network_attachment: enabled
+ **•** share_mount_target: enabled
- `resource_group` - (Optional, List) The resource group id for this virtual network interface. - `security_groups` - (Optional, Array of string) The security group ids list for this virtual network interface. - `subnet` - (Optional, List) The associated subnet id. @@ -217,6 +223,12 @@ Review the argument references that you can specify for your resource. - `reserved_ip` - (Required, String) The unique identifier for this reserved IP. - `name` - (Required, String) The name for this reserved IP. The name is unique across all reserved IPs in a subnet. - `resource_type` - (Computed, String) The resource type. + - `protocol_state_filtering_mode` - (Optional, String) The protocol state filtering mode to use for this virtual network interface. + + ~> **If auto, protocol state packet filtering is enabled or disabled based on the virtual network interface's target resource type:** + **•** bare_metal_server_network_attachment: disabled
+ **•** instance_network_attachment: enabled
+ **•** share_mount_target: enabled
- `resource_group` - (Optional, List) The resource group id for this virtual network interface. - `security_groups` - (Optional, Array of string) The security group ids list for this virtual network interface. - `subnet` - (Optional, List) The associated subnet id. diff --git a/website/docs/r/is_bare_metal_server_network_attachment.html.markdown b/website/docs/r/is_bare_metal_server_network_attachment.html.markdown index 7deb0a58a4..b7ea58bbac 100644 --- a/website/docs/r/is_bare_metal_server_network_attachment.html.markdown +++ b/website/docs/r/is_bare_metal_server_network_attachment.html.markdown @@ -73,6 +73,12 @@ You can specify the following arguments for this resource. - `reserved_ip` - (Required, String) The unique identifier for this reserved IP. - `name` - (Required, String) The name for this reserved IP. The name is unique across all reserved IPs in a subnet. - `resource_type` - (Computed, String) The resource type. + - `protocol_state_filtering_mode` - (Optional, String) The protocol state filtering mode to use for this virtual network interface. + + ~> **If auto, protocol state packet filtering is enabled or disabled based on the virtual network interface's target resource type:** + **•** bare_metal_server_network_attachment: disabled
+ **•** instance_network_attachment: enabled
+ **•** share_mount_target: enabled
- `resource_group` - (Optional, List) The resource group id for this virtual network interface. - `security_groups` - (Optional, Array of string) The security group ids list for this virtual network interface. - `subnet` - (Optional, List) The associated subnet id. diff --git a/website/docs/r/is_instance.html.markdown b/website/docs/r/is_instance.html.markdown index 4a9225281c..3e368608b7 100644 --- a/website/docs/r/is_instance.html.markdown +++ b/website/docs/r/is_instance.html.markdown @@ -417,6 +417,7 @@ resource "ibm_is_instance" "example" { profile = "cx2-2x4" catalog_offering { version_crn = data.ibm_is_images.example.images.0.catalog_offering.0.version.0.crn + plan_crn = "crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e" } primary_network_interface { subnet = ibm_is_subnet.example.id @@ -471,6 +472,7 @@ resource "ibm_is_instance" "example" { profile = "cx2-2x4" catalog_offering { version_crn = data.ibm_is_images.example.images.0.catalog_offering.0.version.0.crn + plan_crn = "crn:v1:bluemix:public:globalcatalog-collection:global:a/123456:51c9e0db-2911-45a6-adb0-ac5332d27cf2:plan:sw.51c9e0db-2911-45a6-adb0-ac5332d27cf2.772c0dbe-aa62-482e-adbe-a3fc20101e0e" } primary_network_interface { subnet = ibm_is_subnet.example.id @@ -516,14 +518,18 @@ Review the argument references that you can specify for your resource. - `auto_delete_volume` - (Optional, String) If set to **true**, when deleting the instance the volume will also be deleted - `encryption` - (Optional, String) The type of encryption to use for the boot volume. - `name` - (Optional, String) The name of the boot volume. - - `size` - (Optional, Integer) The size of the boot volume.(The capacity of the volume in gigabytes. This defaults to minimum capacity of the image and maximum to `250`. + - `size` - (Optional, Integer) The size of the boot volume.(The capacity of the volume in gigabytes. This defaults to minimum capacity of the image and maximum to `250`.) ~> **NOTE:** Supports only expansion on update (must be attached to a running instance and must not be less than the current volume size) - - `snapshot` - (Optional, Forces new resource, String) The snapshot id of the volume to be used for creating boot volume attachment + - `snapshot` - (Optional, Forces new resource, String) The snapshot id of the snapshot to be used for creating boot volume attachment ~> **Note:** - `snapshot` conflicts with `image` id, `instance_template` , `catalog_offering` and `boot_volume.volume_id` + `snapshot` conflicts with `image` id, `instance_template` , `catalog_offering`, `boot_volume.volume_id` and `snapshot_crn` + - `snapshot_crn` - (Optional, Forces new resource, String) The crn of the snapshot to be used for creating boot volume attachment + + ~> **Note:** + `snapshot` conflicts with `image` id, `instance_template` , `catalog_offering`, `boot_volume.volume_id` and `snapshot` - `volume_id` - (Optional, Forces new resource, String) The ID of the volume to be used for creating boot volume attachment ~> **Note:** @@ -533,6 +539,7 @@ Review the argument references that you can specify for your resource. Nested scheme for `catalog_offering`: - `offering_crn` - (Optional, String) The CRN for this catalog offering. Identifies a catalog offering by this unique property - `version_crn` - (Optional, String) The CRN for this version of a catalog offering. Identifies a version of a catalog offering by this unique property + - `plan_crn` - (Optional, String) The CRN for this catalog offering version's billing plan. If unspecified, no billing plan will be used (free). Must be specified for catalog offering versions that require a billing plan to be used. ~> **Note:** `offering_crn` conflicts with `version_crn`, both are mutually exclusive. `catalog_offering` and `image` id are mutually exclusive. @@ -596,7 +603,7 @@ Review the argument references that you can specify for your resource. - `allow_ip_spoofing` - (Optional, Boolean) Indicates whether source IP spoofing is allowed on this interface. If false, source IP spoofing is prevented on this interface. If true, source IP spoofing is allowed on this interface. - `auto_delete` - (Optional, Boolean) Indicates whether this virtual network interface will be automatically deleted when target is deleted - `enable_infrastructure_nat` - (Optional, Boolean) If true: The VPC infrastructure performs any needed NAT operations and floating_ips must not have more than one floating IP. If false: Packets are passed unchanged to/from the virtual network interface, allowing the workload to perform any needed NAT operations, allow_ip_spoofing must be false, can only be attached to a target with a resource_type of bare_metal_server_network_attachment. - - `name` - (Optional, String) The resource type. + - `name` - (Optional, String) The virtual network interface name. The name must not be used by another virtual network interface in the VPC. - `ips` - (Optional, Array of String) Additional IP addresses to bind to the virtual network interface. Each item may be either a reserved IP identity, or a reserved IP prototype object which will be used to create a new reserved IP. All IP addresses must be in the primary IP's subnet. ~> **NOTE** to add `ips` only existing `reserved_ip` is supported, new reserved_ip creation is not supported as it leads to unmanaged(dangling) reserved ips. Use `ibm_is_subnet_reserved_ip` to create a reserved_ip - `resource_group` - (Optional, String) The resource type. @@ -611,6 +618,12 @@ Review the argument references that you can specify for your resource. - `id` - (Required, String) The unique identifier for this reserved IP. - `name` - (Required, String) The name for this reserved IP. The name is unique across all reserved IPs in a subnet. - `resource_type` - (String) The resource type. + - `protocol_state_filtering_mode` - (Optional, String) The protocol state filtering mode to use for this virtual network interface. + + ~> **If auto, protocol state packet filtering is enabled or disabled based on the virtual network interface's target resource type:** + **•** bare_metal_server_network_attachment: disabled
+ **•** instance_network_attachment: enabled
+ **•** share_mount_target: enabled
- `resource_type` - (String) The resource type. - `subnet` - (Required, String) The subnet id of the virtual network interface for the network attachment. - `network_interfaces` (Optional, Forces new resource, List) A list of more network interfaces that are set up for the instance. @@ -650,7 +663,7 @@ Review the argument references that you can specify for your resource. - `allow_ip_spoofing` - (Optional, Boolean) Indicates whether source IP spoofing is allowed on this interface. If false, source IP spoofing is prevented on this interface. If true, source IP spoofing is allowed on this interface. - `auto_delete` - (Optional, Boolean) Indicates whether this virtual network interface will be automatically deleted when target is deleted - `enable_infrastructure_nat` - (Optional, Boolean) If true: The VPC infrastructure performs any needed NAT operations and floating_ips must not have more than one floating IP. If false: Packets are passed unchanged to/from the virtual network interface, allowing the workload to perform any needed NAT operations, allow_ip_spoofing must be false, can only be attached to a target with a resource_type of bare_metal_server_network_attachment. - - `name` - (Optional, String) The resource type. + - `name` - (Optional, String) The virtual network interface name. The name must not be used by another virtual network interface in the VPC. - `ips` - (Optional, Array of String) Additional IP addresses to bind to the virtual network interface. Each item may be either a reserved IP identity, or a reserved IP prototype object which will be used to create a new reserved IP. All IP addresses must be in the primary IP's subnet. - `resource_group` - (Optional, String) The resource type. - `security_groups` - (Optional, Array of String) The resource type. @@ -664,6 +677,12 @@ Review the argument references that you can specify for your resource. - `id` - (Required, String) The unique identifier for this reserved IP. - `name` - (Required, String) The name for this reserved IP. The name is unique across all reserved IPs in a subnet. - `resource_type` - (String) The resource type. + - `protocol_state_filtering_mode` - (Optional, String) The protocol state filtering mode to use for this virtual network interface. + + ~> **If auto, protocol state packet filtering is enabled or disabled based on the virtual network interface's target resource type:** + **•** bare_metal_server_network_attachment: disabled
+ **•** instance_network_attachment: enabled
+ **•** share_mount_target: enabled
- `resource_type` - (String) The resource type. - `subnet` - (Required, String) The subnet id of the virtual network interface for the network attachment. @@ -728,6 +747,15 @@ In addition to all argument reference list, you can access the following attribu - `name` - (String) The name of the boot volume. - `profile` - (String) The profile of the volume. - `size`- (Integer) The capacity of the volume in gigabytes. +- `catalog_offering` - (List) The [catalog](https://cloud.ibm.com/docs/account?topic=account-restrict-by-user&interface=ui) offering or offering version to use when provisioning this virtual server instance. If an offering is specified, the latest version of that offering will be used. The specified offering or offering version may be in a different account in the same [enterprise](https://cloud.ibm.com/docs/account?topic=account-what-is-enterprise), subject to IAM policies. + + Nested scheme for `catalog_offering`: + - `offering_crn` - (String) The CRN for this catalog offering. Identifies a catalog offering by this unique property + - `version_crn` - (String) The CRN for this version of a catalog offering. Identifies a version of a catalog offering by this unique property + - `plan_crn` - (String) The CRN for this catalog offering version's billing plan + - `deleted` - (List) If present, this property indicates the referenced resource has been deleted, and provides some supplementary information. + Nested schema for `deleted`: + - `more_info` - (String) Link to documentation about deleted resources. - `crn` - (String) The CRN of the instance. - `disks` - (List of Strings) The collection of the instance's disks. Nested `disks` blocks have the following structure: diff --git a/website/docs/r/is_instance_network_attachment.html.markdown b/website/docs/r/is_instance_network_attachment.html.markdown index 104106e033..fe7b395a45 100644 --- a/website/docs/r/is_instance_network_attachment.html.markdown +++ b/website/docs/r/is_instance_network_attachment.html.markdown @@ -34,7 +34,14 @@ You can specify the following arguments for this resource. - `id` - (Required, String) The unique identifier for this virtual network interface. ~> **NOTE** to add `ips` only existing `reserved_ip` is supported, new reserved_ip creation is not supported as it leads to unmanaged(dangling) reserved ips. Use `ibm_is_subnet_reserved_ip` to create a reserved_ip - `name` - (Required, String) The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC. + - `protocol_state_filtering_mode` - (Optional, String) The protocol state filtering mode to use for this virtual network interface. + + ~> **If auto, protocol state packet filtering is enabled or disabled based on the virtual network interface's target resource type:** + **•** bare_metal_server_network_attachment: disabled
+ **•** instance_network_attachment: enabled
+ **•** share_mount_target: enabled
- `resource_type` - (Computed, String) The resource type. + ## Attribute Reference diff --git a/website/docs/r/is_instance_template.html.markdown b/website/docs/r/is_instance_template.html.markdown index 5d966ec553..a499a0d793 100644 --- a/website/docs/r/is_instance_template.html.markdown +++ b/website/docs/r/is_instance_template.html.markdown @@ -218,10 +218,12 @@ Review the argument references that you can specify for your resource. Nested scheme for `catalog_offering`: - `offering_crn` - (Optional, Force new resource, String) The CRN for this catalog offering. Identifies a catalog offering by this unique property. Conflicts with `catalog_offering.0.version_crn` - `version_crn` - (Optional, Force new resource, String) The CRN for this version of a catalog offering. Identifies a version of a catalog offering by this unique property. Conflicts with `catalog_offering.0.offering_crn` + - `plan_crn` - (Optional, String) The CRN for this catalog offering version's billing plan. If unspecified, no billing plan will be used (free). Must be specified for catalog offering versions that require a billing plan to be used. - `confidential_compute_mode` - (Optional, String) The confidential compute mode to use for this virtual server instance.If unspecified, the default confidential compute mode from the profile will be used. ** Constraints: Allowable values are: `disabled`, `sgx`** {Select Availability} ~>**Note:** The confidential_compute_mode is `Select Availability` feature. + - `dedicated_host` - (Optional, Force new resource, String) The placement restrictions to use for the virtual server instance. Unique Identifier of the dedicated host where the instance is placed. ~>**Note:** @@ -288,6 +290,12 @@ Review the argument references that you can specify for your resource. - `id` - (Required, String) The unique identifier for this reserved IP. - `name` - (Required, String) The name for this reserved IP. The name is unique across all reserved IPs in a subnet. - `resource_type` - (String) The resource type. + - `protocol_state_filtering_mode` - (Optional, String) The protocol state filtering mode to use for this virtual network interface. + + ~> **If auto, protocol state packet filtering is enabled or disabled based on the virtual network interface's target resource type:** + **•** bare_metal_server_network_attachment: disabled
+ **•** instance_network_attachment: enabled
+ **•** share_mount_target: enabled
- `resource_type` - (String) The resource type. - `subnet` - (Required, String) The subnet id of the virtual network interface for the network attachment. @@ -329,6 +337,12 @@ Review the argument references that you can specify for your resource. - `id` - (Required, String) The unique identifier for this reserved IP. - `name` - (Required, String) The name for this reserved IP. The name is unique across all reserved IPs in a subnet. - `resource_type` - (String) The resource type. + - `protocol_state_filtering_mode` - (Optional, String) The protocol state filtering mode to use for this virtual network interface. + + ~> **If auto, protocol state packet filtering is enabled or disabled based on the virtual network interface's target resource type:** + **•** bare_metal_server_network_attachment: disabled
+ **•** instance_network_attachment: enabled
+ **•** share_mount_target: enabled
- `resource_type` - (String) The resource type. - `subnet` - (Required, String) The subnet id of the virtual network interface for the network attachment. @@ -378,6 +392,12 @@ In addition to all arguments listed, you can access the following attribute refe - `crn` - (String) The CRN for this instance template. - `id` - (String) The ID of an instance template. +- `catalog_offering` - (List) The [catalog](https://cloud.ibm.com/docs/account?topic=account-restrict-by-user&interface=ui) offering or offering version to use when provisioning this virtual server instance. If an offering is specified, the latest version of that offering will be used. The specified offering or offering version may be in a different account in the same [enterprise](https://cloud.ibm.com/docs/account?topic=account-what-is-enterprise), subject to IAM policies. + + Nested scheme for `catalog_offering`: + - `offering_crn` - (String) The CRN for this catalog offering. Identifies a catalog offering by this unique property + - `version_crn` - (String) The CRN for this version of a catalog offering. Identifies a version of a catalog offering by this unique property + - `plan_crn` - (String) The CRN for this catalog offering version's billing plan - `placement_target` - (List) The placement restrictions to use for the virtual server instance. Nested scheme for `placement_target`: - `crn` - (String) The unique identifier for this placement target. diff --git a/website/docs/r/is_instance_volume_attachment.html.markdown b/website/docs/r/is_instance_volume_attachment.html.markdown index ba4601a9a7..f040cd6f53 100644 --- a/website/docs/r/is_instance_volume_attachment.html.markdown +++ b/website/docs/r/is_instance_volume_attachment.html.markdown @@ -195,6 +195,11 @@ Review the argument references that you can specify for your resource. **•** Stopped instances will be started on update of volume.
- `snapshot` - (Optional, String) The unique identifier for this snapshot from which to clone the new volume. + ~> **NOTE** + **•** one of `capacity` or `snapshot` must be present for volume creation.
+ **•** If `capacity` is not present or less than `minimum_capacity` of the snapshot, `minimum_capacity` is taken as the volume capacity.
+- `snapshot_crn` - (Optional, String) The CRN for this snapshot from which to clone the new volume. + ~> **NOTE** **•** one of `capacity` or `snapshot` must be present for volume creation.
**•** If `capacity` is not present or less than `minimum_capacity` of the snapshot, `minimum_capacity` is taken as the volume capacity.
diff --git a/website/docs/r/is_share.html.markdown b/website/docs/r/is_share.html.markdown index 029d01af0b..e268513403 100644 --- a/website/docs/r/is_share.html.markdown +++ b/website/docs/r/is_share.html.markdown @@ -115,7 +115,7 @@ The following arguments are supported: - `virtual_network_interface` (Optional, List) The virtual network interface for this share mount target. Required if the share's `access_control_mode` is `security_group`. Nested scheme for `virtual_network_interface`: - - `name` - (Required, String) Name for this virtual network interface. + - `name` - (Required, String) Name for this virtual network interface. The name must not be used by another virtual network interface in the VPC. - `id` - (Optional) The ID for virtual network interface. Mutually exclusive with other `virtual_network_interface` arguments. ~> **Note** @@ -130,6 +130,12 @@ The following arguments are supported: - `address` - (Optional, Forces new resource, String) The IP address to reserve. If unspecified, an available address on the subnet will automatically be selected. - `name`- (Optional, String) The name for this reserved IP. The name must not be used by another reserved IP in the subnet. Names starting with ibm- are reserved for provider-owned resources, and are not allowed. - `reserved_ip`- (Optional, String) The unique identifier for this reserved IP + - `protocol_state_filtering_mode` - (Optional, String) The protocol state filtering mode to use for this virtual network interface. + + ~> **If auto, protocol state packet filtering is enabled or disabled based on the virtual network interface's target resource type:** + **•** bare_metal_server_network_attachment: disabled
+ **•** instance_network_attachment: enabled
+ **•** share_mount_target: enabled
- `resource_group` - (Optional, String) The ID of the resource group to use. - `security_groups`- (Optional, List of string) The security groups to use for this virtual network interface. - `subnet` - (Optional, string) The associated subnet. @@ -158,7 +164,7 @@ The following arguments are supported: - `name` - (Optional, String) - `virtual_network_interface` (Optional, List) The virtual network interface for this share mount target. Required if the share's `access_control_mode` is `security_group`. Nested scheme for `virtual_network_interface`: - - `name` - (Required, String) Name for this virtual network interface. + - `name` - (Required, String) Name for this virtual network interface. The name must not be used by another virtual network interface in the VPC. - `id` - (Optional) The ID for virtual network interface. Mutually exclusive with other `virtual_network_interface` arguments. ~> **Note** @@ -172,6 +178,12 @@ The following arguments are supported: - `address` - (Optional, Forces new resource, String) The IP address to reserve. If unspecified, an available address on the subnet will automatically be selected. - `name`- (Optional, String) The name for this reserved IP. The name must not be used by another reserved IP in the subnet. Names starting with ibm- are reserved for provider-owned resources, and are not allowed. - `reserved_ip`- (Optional, String) The unique identifier for this reserved IP + - `protocol_state_filtering_mode` - (Optional, String) The protocol state filtering mode to use for this virtual network interface. + + ~> **If auto, protocol state packet filtering is enabled or disabled based on the virtual network interface's target resource type:** + **•** bare_metal_server_network_attachment: disabled
+ **•** instance_network_attachment: enabled
+ **•** share_mount_target: enabled
- `resource_group` - (Optional, String) The ID of the resource group to use. - `security_groups`- (Optional, List of string) The security groups to use for this virtual network interface. - `subnet` - (Optional, string) The associated subnet. diff --git a/website/docs/r/is_share_mount_target.html.markdown b/website/docs/r/is_share_mount_target.html.markdown index 32d37b0d45..ef05a78bf1 100644 --- a/website/docs/r/is_share_mount_target.html.markdown +++ b/website/docs/r/is_share_mount_target.html.markdown @@ -116,7 +116,7 @@ The following arguments are supported: - `share` - (Required, String) The file share identifier. - `virtual_network_interface` (Optional, List) The virtual network interface for this share mount target. Required if the share's `access_control_mode` is `security_group`. - - `name` - (Required, String) Name for this virtual network interface. + - `name` - (Required, String) Name for this virtual network interface. The name must not be used by another virtual network interface in the VPC. Nested scheme for `virtual_network_interface`: - `id` - (Optional) The ID for virtual network interface. Mutually exclusive with other `virtual_network_interface` arguments. @@ -134,7 +134,12 @@ The following arguments are supported: ~> **Note** Within `primary_ip`, `reserved_ip` is mutually exclusive to `auto_delete`, `address` and `name` + - `protocol_state_filtering_mode` - (Optional, String) The protocol state filtering mode to use for this virtual network interface. + ~> **If auto, protocol state packet filtering is enabled or disabled based on the virtual network interface's target resource type:** + **•** bare_metal_server_network_attachment: disabled
+ **•** instance_network_attachment: enabled
+ **•** share_mount_target: enabled
- `resource_group` - (Optional, String) The ID of the resource group to use. - `security_groups`- (Optional, List of string) The security groups to use for this virtual network interface. - `subnet` - (Optional, string) The associated subnet. diff --git a/website/docs/r/is_snapshot.html.markdown b/website/docs/r/is_snapshot.html.markdown index 08bdc70f69..6d31cf926e 100644 --- a/website/docs/r/is_snapshot.html.markdown +++ b/website/docs/r/is_snapshot.html.markdown @@ -132,6 +132,15 @@ In addition to all argument reference list, you can access the following attribu - `name` - (String) The unique user defined name for this backup policy plan. If unspecified, the name will be a hyphenated list of randomly selected words. - `resource_type` - (String) The type of resource referenced. - `bootable` - (Bool) Indicates if a boot volume attachment can be created with a volume created from this snapshot. +- `catalog_offering` - (List) The catalog offering inherited from the snapshot's source. If a virtual server instance is provisioned with a source_snapshot specifying this snapshot, the virtual server instance will use this snapshot's catalog offering, including its pricing plan. If absent, this snapshot is not associated with a catalog offering. + + Nested scheme for `catalog_offering`: + - `version_crn` - (String) The CRN for this version of a catalog offering + - `plan_crn` - (String) The CRN for this catalog offering version's billing plan + - `deleted` - (List) If present, this property indicates the referenced resource has been deleted, and provides some supplementary information. + + Nested schema for `deleted`: + - `more_info` - (String) Link to documentation about deleted resources. - `copies` - (List) The copies of this snapshot in other regions. Nested scheme for `copies`: diff --git a/website/docs/r/is_virtual_network_interface.html.markdown b/website/docs/r/is_virtual_network_interface.html.markdown index 7cb0838a66..ee875f4dae 100644 --- a/website/docs/r/is_virtual_network_interface.html.markdown +++ b/website/docs/r/is_virtual_network_interface.html.markdown @@ -21,7 +21,18 @@ resource "ibm_is_virtual_network_interface" "is_virtual_network_interface_instan subnet = "7ec86020-1c6e-4889-b3f0-a15f2e50f87e" } ``` +## Example Usage with protocol_state_filtering_mode enabled +```terraform +resource "ibm_is_virtual_network_interface" "is_virtual_network_interface_instance" { + allow_ip_spoofing = true + auto_delete = false + enable_infrastructure_nat = true + name = "my-virtual-network-interface" + subnet = "7ec86020-1c6e-4889-b3f0-a15f2e50f87e" + protocol_state_filtering_mode = "enabled" +} +``` ## Argument Reference You can specify the following arguments for this resource. @@ -44,6 +55,12 @@ You can specify the following arguments for this resource. Nested schema for **ips**: - `reserved_ip` - (Required, String) The unique identifier for this reserved IP. - `name` - (Optional, String) The name for this virtual network interface. The name is unique across all virtual network interfaces in the VPC. +- `protocol_state_filtering_mode` - (Optional, String) The protocol state filtering mode to use for this virtual network interface. + + ~> **If auto, protocol state packet filtering is enabled or disabled based on the virtual network interface's target resource type:** + **•** bare_metal_server_network_attachment: disabled
+ **•** instance_network_attachment: enabled
+ **•** share_mount_target: enabled
- `primary_ip` - (Optional, List) The reserved IP for this virtual network interface. Nested schema for **primary_ip**: - `address` - (Required, String) The IP address.If the address has not yet been selected, the value will be `0.0.0.0`.This property may add support for IPv6 addresses in the future. When processing a value in this property, verify that the address is in an expected format. If it is not, log an error. Optionally halt processing and surface the error, or bypass the resource on which the unexpected IP address format was encountered. diff --git a/website/docs/r/is_volume.html.markdown b/website/docs/r/is_volume.html.markdown index 372319ae2d..1b909fe257 100644 --- a/website/docs/r/is_volume.html.markdown +++ b/website/docs/r/is_volume.html.markdown @@ -104,11 +104,21 @@ Review the argument references that you can specify for your resource. - `resource_group` - (Optional, Forces new resource, String) The resource group ID for this volume. - `resource_controller_url` - (Optional, Forces new resource, String) The URL of the IBM Cloud dashboard that can be used to explore and view details about this instance. - `source_snapshot` - The ID of snapshot from which to clone the volume. +- `source_snapshot_crn` - The CRN of snapshot from which to clone the volume. - `tags`- (Optional, Array of Strings) A list of user tags that you want to add to your volume. (https://cloud.ibm.com/apidocs/tagging#types-of-tags) - `zone` - (Required, Forces new resource, String) The location of the volume. ## Attribute reference In addition to all argument reference list, you can access the following attribute reference after your resource is created. +- `catalog_offering` - (List) The catalog offering this volume was created from. If a virtual server instance is provisioned with a boot_volume_attachment specifying this volume, the virtual server instance will use this volume's catalog offering, including its pricing plan.If absent, this volume was not created from a catalog offering. + + Nested scheme for `catalog_offering`: + - `version_crn` - (String) The CRN for this version of a catalog offering + - `plan_crn` - (String) The CRN for this catalog offering version's billing plan + - `deleted` - (List) If present, this property indicates the referenced resource has been deleted, and provides some supplementary information. + + Nested schema for `deleted`: + - `more_info` - (String) Link to documentation about deleted resources. - `encryption_type` - (String) The type of encryption used in the volume [**provider_managed**, **user_managed**]. - `health_reasons` - (List) The reasons for the current health_state (if any).